diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0eee133626ef850ba48cd04beda928abea938401..530926174cf8f6b5b0c06315adc12335bf0ab2d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -252,6 +252,12 @@ default: _TARGET_PHP: "8.3-ubuntu" _TARGET_DB: "pgsql-16" +'PHP 8.3 PostgreSQL 17': + <<: [ *default-stage, *run-on-mr ] + variables: + _TARGET_PHP: "8.3-ubuntu" + _TARGET_DB: "pgsql-17" + 'PHP 8.3 SQLite 3.45': <<: [ *default-stage, *run-on-mr ] variables: @@ -292,6 +298,11 @@ default: needs: [ '[Daily] PHP 8.3 MariaDB 10.6' ] <<: [ *run-daily ] +'[Daily] PHP 8.3 PostgreSQL 17': + extends: 'PHP 8.3 PostgreSQL 17' + needs: [ '[Daily] PHP 8.3 MySQL 8.4' ] + <<: [ *run-daily ] + ################ # Lint Jobs ################ diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml index fec13acc7b36d55bc1181d9cfd51976ae277fd62..b094571428a5e886f3e5418c1cd43451494ad928 100644 --- a/.gitlab-ci/pipeline.yml +++ b/.gitlab-ci/pipeline.yml @@ -201,10 +201,6 @@ variables: 'âš¡ï¸ PHPUnit Unit': <<: [ *with-composer, *run-tests, *default-job-settings ] - services: - # There are some unit tests that need a database. - # @todo Remove after https://www.drupal.org/project/drupal/issues/3386217 - - <<: *with-database variables: TESTSUITE: PHPUnit-Unit KUBERNETES_CPU_REQUEST: "1" diff --git a/composer.json b/composer.json index e7c2f23fb7b5b1bdbab9f81d8b6855978d92c157..5fcb341d5c7efab33a9125d49c0d12340a7e8487 100644 --- a/composer.json +++ b/composer.json @@ -31,15 +31,15 @@ "php-http/guzzle7-adapter": "^1.0", "phpspec/prophecy-phpunit": "^2", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.11.10", + "phpstan/phpstan": "^1.12.4", "phpstan/phpstan-phpunit": "^1.3.16", "phpunit/phpunit": "^10.5.19", - "symfony/browser-kit": "^7.1", - "symfony/css-selector": "^7.1", - "symfony/dom-crawler": "^7.1", - "symfony/error-handler": "^7.1", - "symfony/lock": "^7.1", - "symfony/var-dumper": "^7.1" + "symfony/browser-kit": "^7.2@beta", + "symfony/css-selector": "^7.2@beta", + "symfony/dom-crawler": "^7.2@beta", + "symfony/error-handler": "^7.2@beta", + "symfony/lock": "^7.2@beta", + "symfony/var-dumper": "^7.2@beta" }, "replace": { "symfony/polyfill-php72": "*", @@ -60,11 +60,12 @@ }, "allow-plugins": { "composer/installers": true, + "dealerdirect/phpcodesniffer-composer-installer": true, "drupal/core-project-message": true, "drupal/core-vendor-hardening": true, + "php-http/discovery": true, "phpstan/extension-installer": true, - "dealerdirect/phpcodesniffer-composer-installer": true, - "php-http/discovery": true + "tbachert/spi": false } }, "extra": { diff --git a/composer.lock b/composer.lock index eec7d7c32975c073736bf32698c1c24321d01131..c1f830f287400858763eed1b077b5e5652047935 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": "78f87842624db9947bbe307f649c3d96", + "content-hash": "104086943ee98f64d5bcac7860b72b1c", "packages": [ { "name": "asm89/stack-cors", @@ -291,16 +291,16 @@ }, { "name": "doctrine/annotations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", "shasum": "" }, "require": { @@ -312,10 +312,10 @@ "require-dev": { "doctrine/cache": "^2.0", "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", + "phpstan/phpstan": "^1.10.28", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" + "symfony/cache": "^5.4 || ^6.4 || ^7", + "vimeo/psalm": "^4.30 || ^5.14" }, "suggest": { "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" @@ -361,9 +361,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" + "source": "https://github.com/doctrine/annotations/tree/2.0.2" }, - "time": "2023-02-02T22:02:53+00:00" + "time": "2024-09-05T10:17:24+00:00" }, { "name": "doctrine/deprecations", @@ -496,7 +496,7 @@ "dist": { "type": "path", "url": "core", - "reference": "946773df28ad729a17c4002a6b5740a746b6deb5" + "reference": "f2db3b7ce714b984d75a410d178d58fa91648926" }, "require": { "asm89/stack-cors": "^2.1", @@ -525,25 +525,27 @@ "mck89/peast": "^1.14", "pear/archive_tar": "^1.4.14", "php": ">=8.3.0", + "php-tuf/composer-stager": "^2-rc5", "psr/log": "^3.0", + "revolt/event-loop": "^1.0", "sebastian/diff": "^4|^5", - "symfony/console": "^7.1", - "symfony/dependency-injection": "^7.1", - "symfony/event-dispatcher": "^7.1", - "symfony/filesystem": "^7.1", - "symfony/finder": "^7.1", - "symfony/http-foundation": "^7.1", - "symfony/http-kernel": "^7.1", - "symfony/mailer": "^7.1", - "symfony/mime": "^7.1", + "symfony/console": "^7.2@beta", + "symfony/dependency-injection": "^7.2@beta", + "symfony/event-dispatcher": "^7.2@beta", + "symfony/filesystem": "^7.2@beta", + "symfony/finder": "^7.2@beta", + "symfony/http-foundation": "^7.2@beta", + "symfony/http-kernel": "^7.2@beta", + "symfony/mailer": "^7.2@beta", + "symfony/mime": "^7.2@beta", "symfony/polyfill-iconv": "^1.26", - "symfony/process": "^7.1", - "symfony/psr-http-message-bridge": "^7.1", - "symfony/routing": "^7.1", - "symfony/serializer": "^7.1", - "symfony/validator": "^7.1", - "symfony/yaml": "^7.1", - "twig/twig": "^3.14.0" + "symfony/process": "^7.2@beta", + "symfony/psr-http-message-bridge": "^7.2@beta", + "symfony/routing": "^7.2@beta", + "symfony/serializer": "^7.2@beta", + "symfony/validator": "^7.2@beta", + "symfony/yaml": "^7.2@beta", + "twig/twig": "^3.14.2" }, "conflict": { "drush/drush": "<12.4.3" @@ -914,16 +916,16 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "shasum": "" }, "require": { @@ -977,7 +979,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.3" + "source": "https://github.com/guzzle/promises/tree/2.0.4" }, "funding": [ { @@ -993,7 +995,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T10:29:17+00:00" + "time": "2024-10-17T10:06:22+00:00" }, { "name": "guzzlehttp/psr7", @@ -1456,6 +1458,83 @@ }, "time": "2021-03-21T15:43:46+00:00" }, + { + "name": "php-tuf/composer-stager", + "version": "v2.0.0-rc5", + "source": { + "type": "git", + "url": "https://github.com/php-tuf/composer-stager.git", + "reference": "9c5aef2ab98db381c30fe4837e9007e1ac2b89e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-tuf/composer-stager/zipball/9c5aef2ab98db381c30fe4837e9007e1ac2b89e6", + "reference": "9c5aef2ab98db381c30fe4837e9007e1ac2b89e6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=8.1.0", + "symfony/filesystem": "^6.2 || ^7.0", + "symfony/process": "^6.2 || ^7.0", + "symfony/translation-contracts": "^3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "infection/infection": "^0.27.0 || ^0.28.0 || ^0.29.0", + "phpbench/phpbench": "^1.2", + "phpro/grumphp-shim": "^2.0", + "phpspec/prophecy": "^1.17", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "^9.6", + "rector/rector": "^0.17.5 || ^0.18.0 || ^0.19.0 || ^1.0.0", + "slevomat/coding-standard": "^8.13", + "squizlabs/php_codesniffer": "^3.7", + "symfony/config": "^6.3", + "symfony/dependency-injection": "^6.3", + "symfony/yaml": "^6.3", + "thecodingmachine/phpstan-strict-rules": "^1.0" + }, + "suggest": { + "symfony/dependency-injection": "For dependency injection", + "symfony/translation": "For internationalization tools" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "2.x-dev" + }, + "grumphp": { + "disable-plugin": true + } + }, + "autoload": { + "psr-4": { + "PhpTuf\\ComposerStager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Travis Carden", + "email": "travis.carden@gmail.com", + "role": "Developer" + } + ], + "description": "Stages Composer commands so they can be safely run on a production codebase.", + "homepage": "https://github.com/php-tuf/composer-stager", + "support": { + "issues": "https://github.com/php-tuf/composer-stager/issues", + "source": "https://github.com/php-tuf/composer-stager" + }, + "time": "2024-07-17T18:52:20+00:00" + }, { "name": "psr/cache", "version": "3.0.0", @@ -1862,6 +1941,78 @@ }, "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "revolt/event-loop", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.15" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Revolt\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" + }, + "time": "2023-11-30T05:34:44+00:00" + }, { "name": "sebastian/diff", "version": "5.1.1", @@ -1931,16 +2082,16 @@ }, { "name": "symfony/console", - "version": "v7.1.5", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" + "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", + "url": "https://api.github.com/repos/symfony/console/zipball/23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", + "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", "shasum": "" }, "require": { @@ -2004,7 +2155,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.5" + "source": "https://github.com/symfony/console/tree/v7.2.0-RC1" }, "funding": [ { @@ -2020,20 +2171,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "8126f0be4ff984e4db0140e60917900a53facb49" + "reference": "5f5dbbaf5193a4fa46b9b699beca14dc9818a53a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8126f0be4ff984e4db0140e60917900a53facb49", - "reference": "8126f0be4ff984e4db0140e60917900a53facb49", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/5f5dbbaf5193a4fa46b9b699beca14dc9818a53a", + "reference": "5f5dbbaf5193a4fa46b9b699beca14dc9818a53a", "shasum": "" }, "require": { @@ -2084,7 +2235,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.1.3" + "source": "https://github.com/symfony/dependency-injection/tree/v7.2.0-RC1" }, "funding": [ { @@ -2100,7 +2251,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T07:35:39+00:00" + "time": "2024-11-09T09:29:03+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2171,16 +2322,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "432bb369952795c61ca1def65e078c4a80dad13c" + "reference": "672b3dd1ef8b87119b446d67c58c106c43f965fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c", - "reference": "432bb369952795c61ca1def65e078c4a80dad13c", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/672b3dd1ef8b87119b446d67c58c106c43f965fe", + "reference": "672b3dd1ef8b87119b446d67c58c106c43f965fe", "shasum": "" }, "require": { @@ -2226,7 +2377,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.3" + "source": "https://github.com/symfony/error-handler/tree/v7.2.0-RC1" }, "funding": [ { @@ -2242,20 +2393,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T13:02:51+00:00" + "time": "2024-11-05T15:35:02+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", "shasum": "" }, "require": { @@ -2306,7 +2457,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0-RC1" }, "funding": [ { @@ -2322,7 +2473,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2402,16 +2553,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.1.5", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { @@ -2448,7 +2599,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.5" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0-RC1" }, "funding": [ { @@ -2464,20 +2615,20 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/finder", - "version": "v7.1.4", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" + "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", + "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", + "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", "shasum": "" }, "require": { @@ -2512,7 +2663,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.4" + "source": "https://github.com/symfony/finder/tree/v7.2.0-RC1" }, "funding": [ { @@ -2528,35 +2679,36 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:28:19+00:00" + "time": "2024-10-23T06:56:12+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a" + "reference": "b77b5a8295ea945ae6f4f91adc5204a2405cc579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", - "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b77b5a8295ea945ae6f4f91adc5204a2405cc579", + "reference": "b77b5a8295ea945ae6f4f91adc5204a2405cc579", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4" + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" }, "require-dev": { "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4|^7.0", + "symfony/cache": "^6.4.12|^7.1.5", "symfony/dependency-injection": "^6.4|^7.0", "symfony/expression-language": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", @@ -2589,7 +2741,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.1.3" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.0-RC1" }, "funding": [ { @@ -2605,20 +2757,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:41:01+00:00" + "time": "2024-11-09T09:29:03+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186" + "reference": "ad175ab2d5a75702194b5336556a348717a39f0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/db9702f3a04cc471ec8c70e881825db26ac5f186", - "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ad175ab2d5a75702194b5336556a348717a39f0f", + "reference": "ad175ab2d5a75702194b5336556a348717a39f0f", "shasum": "" }, "require": { @@ -2647,7 +2799,7 @@ "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", "symfony/var-dumper": "<6.4", - "twig/twig": "<3.0.4" + "twig/twig": "<3.12" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" @@ -2675,7 +2827,7 @@ "symfony/validator": "^6.4|^7.0", "symfony/var-dumper": "^6.4|^7.0", "symfony/var-exporter": "^6.4|^7.0", - "twig/twig": "^3.0.4" + "twig/twig": "^3.12" }, "type": "library", "autoload": { @@ -2703,7 +2855,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.1.3" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.0-RC1" }, "funding": [ { @@ -2719,20 +2871,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T14:58:15+00:00" + "time": "2024-11-13T14:53:30+00:00" }, { "name": "symfony/mailer", - "version": "v7.1.2", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "8fcff0af9043c8f8a8e229437cea363e282f9aee" + "reference": "abbcc8b84a81d08ee1a0e6ca60a90d0aaf24e79b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/8fcff0af9043c8f8a8e229437cea363e282f9aee", - "reference": "8fcff0af9043c8f8a8e229437cea363e282f9aee", + "url": "https://api.github.com/repos/symfony/mailer/zipball/abbcc8b84a81d08ee1a0e6ca60a90d0aaf24e79b", + "reference": "abbcc8b84a81d08ee1a0e6ca60a90d0aaf24e79b", "shasum": "" }, "require": { @@ -2741,7 +2893,7 @@ "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", + "symfony/mime": "^7.2", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -2783,7 +2935,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.1.2" + "source": "https://github.com/symfony/mailer/tree/v7.2.0-RC1" }, "funding": [ { @@ -2799,20 +2951,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-11-09T06:58:08+00:00" }, { "name": "symfony/mime", - "version": "v7.1.2", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc" + "reference": "f31946de86ef8fcf48ae76652542f29df2ef4428" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/26a00b85477e69a4bab63b66c5dce64f18b0cbfc", - "reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc", + "url": "https://api.github.com/repos/symfony/mime/zipball/f31946de86ef8fcf48ae76652542f29df2ef4428", + "reference": "f31946de86ef8fcf48ae76652542f29df2ef4428", "shasum": "" }, "require": { @@ -2867,7 +3019,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.1.2" + "source": "https://github.com/symfony/mime/tree/v7.2.0-RC1" }, "funding": [ { @@ -2883,7 +3035,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-11-10T09:50:45+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2966,20 +3118,20 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805" + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c027e6a3c6aee334663ec21f5852e89738abc805", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956", + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-iconv": "*" @@ -3026,7 +3178,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0" }, "funding": [ { @@ -3042,7 +3194,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -3124,22 +3276,21 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -3188,7 +3339,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -3204,7 +3355,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -3369,16 +3520,16 @@ }, { "name": "symfony/process", - "version": "v7.1.5", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5c03ee6369281177f07f7c68252a280beccba847" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", - "reference": "5c03ee6369281177f07f7c68252a280beccba847", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { @@ -3410,7 +3561,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.5" + "source": "https://github.com/symfony/process/tree/v7.2.0-RC1" }, "funding": [ { @@ -3426,20 +3577,20 @@ "type": "tidelift" } ], - "time": "2024-09-19T21:48:23+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "1365d10f5476f74a27cf9c2d1eee70c069019db0" + "reference": "03f2f72319e7acaf2a9f6fcbe30ef17eec51594f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/1365d10f5476f74a27cf9c2d1eee70c069019db0", - "reference": "1365d10f5476f74a27cf9c2d1eee70c069019db0", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/03f2f72319e7acaf2a9f6fcbe30ef17eec51594f", + "reference": "03f2f72319e7acaf2a9f6fcbe30ef17eec51594f", "shasum": "" }, "require": { @@ -3493,7 +3644,7 @@ "psr-7" ], "support": { - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.1.3" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.2.0-RC1" }, "funding": [ { @@ -3509,20 +3660,20 @@ "type": "tidelift" } ], - "time": "2024-07-17T06:10:24+00:00" + "time": "2024-09-26T08:57:56+00:00" }, { "name": "symfony/routing", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0" + "reference": "0782e32f411cf1c4a1ab3f5c074a9b61f3df8e5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", - "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", + "url": "https://api.github.com/repos/symfony/routing/zipball/0782e32f411cf1c4a1ab3f5c074a9b61f3df8e5a", + "reference": "0782e32f411cf1c4a1ab3f5c074a9b61f3df8e5a", "shasum": "" }, "require": { @@ -3574,7 +3725,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.1.3" + "source": "https://github.com/symfony/routing/tree/v7.2.0-RC1" }, "funding": [ { @@ -3590,20 +3741,20 @@ "type": "tidelift" } ], - "time": "2024-07-17T06:10:24+00:00" + "time": "2024-11-06T08:41:34+00:00" }, { "name": "symfony/serializer", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09" + "reference": "2127f4a5b547f90b117da612e85caa8ba79c79b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09", - "reference": "0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09", + "url": "https://api.github.com/repos/symfony/serializer/zipball/2127f4a5b547f90b117da612e85caa8ba79c79b2", + "reference": "2127f4a5b547f90b117da612e85caa8ba79c79b2", "shasum": "" }, "require": { @@ -3617,17 +3768,19 @@ "symfony/dependency-injection": "<6.4", "symfony/property-access": "<6.4", "symfony/property-info": "<6.4", + "symfony/type-info": "<7.2", "symfony/uid": "<6.4", "symfony/validator": "<6.4", "symfony/yaml": "<6.4" }, "require-dev": { "phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", "seld/jsonlint": "^1.10", "symfony/cache": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dependency-injection": "^7.2", "symfony/error-handler": "^6.4|^7.0", "symfony/filesystem": "^6.4|^7.0", "symfony/form": "^6.4|^7.0", @@ -3638,7 +3791,7 @@ "symfony/property-access": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/type-info": "^7.1", + "symfony/type-info": "^7.2", "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", "symfony/var-dumper": "^6.4|^7.0", @@ -3671,7 +3824,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v7.1.3" + "source": "https://github.com/symfony/serializer/tree/v7.2.0-RC1" }, "funding": [ { @@ -3687,7 +3840,7 @@ "type": "tidelift" } ], - "time": "2024-07-17T06:10:24+00:00" + "time": "2024-11-13T14:27:59+00:00" }, { "name": "symfony/service-contracts", @@ -3774,16 +3927,16 @@ }, { "name": "symfony/string", - "version": "v7.1.5", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", + "url": "https://api.github.com/repos/symfony/string/zipball/591ebd41565f356fcd8b090fe64dbb5878f50281", + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281", "shasum": "" }, "require": { @@ -3841,7 +3994,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.5" + "source": "https://github.com/symfony/string/tree/v7.1.8" }, "funding": [ { @@ -3857,7 +4010,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-11-13T13:31:21+00:00" }, { "name": "symfony/translation-contracts", @@ -3939,16 +4092,16 @@ }, { "name": "symfony/validator", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "ba711a6cfc008544dad059abb3c1d997f1472237" + "reference": "76d2cc63dc3aaaa8c691b32f140517b09a79a43b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/ba711a6cfc008544dad059abb3c1d997f1472237", - "reference": "ba711a6cfc008544dad059abb3c1d997f1472237", + "url": "https://api.github.com/repos/symfony/validator/zipball/76d2cc63dc3aaaa8c691b32f140517b09a79a43b", + "reference": "76d2cc63dc3aaaa8c691b32f140517b09a79a43b", "shasum": "" }, "require": { @@ -3986,7 +4139,7 @@ "symfony/property-access": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0", "symfony/translation": "^6.4.3|^7.0.3", - "symfony/type-info": "^7.1", + "symfony/type-info": "^7.2", "symfony/yaml": "^6.4|^7.0" }, "type": "library", @@ -4016,7 +4169,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v7.1.3" + "source": "https://github.com/symfony/validator/tree/v7.2.0-RC1" }, "funding": [ { @@ -4032,20 +4185,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:41:01+00:00" + "time": "2024-11-13T14:27:59+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.1.3", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f" + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/86af4617cca75a6e28598f49ae0690f3b9d4591f", - "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", "shasum": "" }, "require": { @@ -4061,7 +4214,7 @@ "symfony/http-kernel": "^6.4|^7.0", "symfony/process": "^6.4|^7.0", "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.0.4" + "twig/twig": "^3.12" }, "bin": [ "Resources/bin/var-dump-server" @@ -4099,7 +4252,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.3" + "source": "https://github.com/symfony/var-dumper/tree/v7.2.0-RC1" }, "funding": [ { @@ -4115,20 +4268,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:41:01+00:00" + "time": "2024-11-08T15:48:14+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.1.2", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c" + "reference": "90173ef89c40e7c8c616653241048705f84130ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/90173ef89c40e7c8c616653241048705f84130ef", + "reference": "90173ef89c40e7c8c616653241048705f84130ef", "shasum": "" }, "require": { @@ -4175,7 +4328,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.1.2" + "source": "https://github.com/symfony/var-exporter/tree/v7.1.6" }, "funding": [ { @@ -4191,24 +4344,25 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/yaml", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "fa34c77015aa6720469db7003567b9f772492bf2" + "reference": "099581e99f557e9f16b43c5916c26380b54abb22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/fa34c77015aa6720469db7003567b9f772492bf2", - "reference": "fa34c77015aa6720469db7003567b9f772492bf2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/099581e99f557e9f16b43c5916c26380b54abb22", + "reference": "099581e99f557e9f16b43c5916c26380b54abb22", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -4246,7 +4400,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.1.1" + "source": "https://github.com/symfony/yaml/tree/v7.2.0-RC1" }, "funding": [ { @@ -4262,20 +4416,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-10-23T06:56:12+00:00" }, { "name": "twig/twig", - "version": "v3.14.0", + "version": "v3.14.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", "shasum": "" }, "require": { @@ -4329,7 +4483,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.0" + "source": "https://github.com/twigphp/Twig/tree/v3.14.2" }, "funding": [ { @@ -4341,22 +4495,22 @@ "type": "tidelift" } ], - "time": "2024-09-09T17:55:12+00:00" + "time": "2024-11-07T12:36:22+00:00" } ], "packages-dev": [ { "name": "behat/mink", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/minkphp/Mink.git", - "reference": "d8527fdf8785aad38455fb426af457ab9937aece" + "reference": "7e4edec6c335937029cb3569ce7ef81182804d0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/d8527fdf8785aad38455fb426af457ab9937aece", - "reference": "d8527fdf8785aad38455fb426af457ab9937aece", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/7e4edec6c335937029cb3569ce7ef81182804d0a", + "reference": "7e4edec6c335937029cb3569ce7ef81182804d0a", "shasum": "" }, "require": { @@ -4407,9 +4561,9 @@ ], "support": { "issues": "https://github.com/minkphp/Mink/issues", - "source": "https://github.com/minkphp/Mink/tree/v1.11.0" + "source": "https://github.com/minkphp/Mink/tree/v1.12.0" }, - "time": "2023-12-09T11:23:23+00:00" + "time": "2024-10-30T18:48:14+00:00" }, { "name": "behat/mink-browserkit-driver", @@ -4479,6 +4633,66 @@ }, "time": "2023-12-09T11:30:50+00:00" }, + { + "name": "brick/math", + "version": "0.12.1", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "bignumber", + "brick", + "decimal", + "integer", + "math", + "mathematics", + "rational" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.12.1" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + } + ], + "time": "2023-11-29T23:19:16+00:00" + }, { "name": "colinodell/psr-testlogger", "version": "v1.3.0", @@ -4560,16 +4774,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3b1fc3f0be055baa7c6258b1467849c3e8204eb2", + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2", "shasum": "" }, "require": { @@ -4616,7 +4830,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.2" + "source": "https://github.com/composer/ca-bundle/tree/1.5.3" }, "funding": [ { @@ -4632,7 +4846,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T07:49:53+00:00" + "time": "2024-11-04T10:15:26+00:00" }, { "name": "composer/class-map-generator", @@ -4709,16 +4923,16 @@ }, { "name": "composer/composer", - "version": "2.8.1", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "e52b8672276cf436670cdd6bd5de4353740e83b2" + "reference": "6e543d03187c882ea1c6ba43add2467754427803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e52b8672276cf436670cdd6bd5de4353740e83b2", - "reference": "e52b8672276cf436670cdd6bd5de4353740e83b2", + "url": "https://api.github.com/repos/composer/composer/zipball/6e543d03187c882ea1c6ba43add2467754427803", + "reference": "6e543d03187c882ea1c6ba43add2467754427803", "shasum": "" }, "require": { @@ -4803,7 +5017,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.8.1" + "source": "https://github.com/composer/composer/tree/2.8.2" }, "funding": [ { @@ -4819,7 +5033,7 @@ "type": "tidelift" } ], - "time": "2024-10-04T09:31:01+00:00" + "time": "2024-10-29T15:12:11+00:00" }, { "name": "composer/metadata-minifier", @@ -5265,16 +5479,16 @@ }, { "name": "drupal/coder", - "version": "8.3.24", + "version": "8.3.25", "source": { "type": "git", "url": "https://github.com/pfrenssen/coder.git", - "reference": "1a59890f972db5da091354f0191dec1037f7c582" + "reference": "c58e5a0c44c0010bbc8a91fc468f4667e177b976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pfrenssen/coder/zipball/1a59890f972db5da091354f0191dec1037f7c582", - "reference": "1a59890f972db5da091354f0191dec1037f7c582", + "url": "https://api.github.com/repos/pfrenssen/coder/zipball/c58e5a0c44c0010bbc8a91fc468f4667e177b976", + "reference": "c58e5a0c44c0010bbc8a91fc468f4667e177b976", "shasum": "" }, "require": { @@ -5312,20 +5526,20 @@ "issues": "https://www.drupal.org/project/issues/coder", "source": "https://www.drupal.org/project/coder" }, - "time": "2024-04-21T06:13:24+00:00" + "time": "2024-09-22T19:02:16+00:00" }, { "name": "google/protobuf", - "version": "v3.25.4", + "version": "v4.28.3", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e" + "reference": "c5c311e0f3d89928251ac5a2f0e3db283612c100" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/749f6c8e99a7fe51d096c2db656a4af9a46a6b5e", - "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/c5c311e0f3d89928251ac5a2f0e3db283612c100", + "reference": "c5c311e0f3d89928251ac5a2f0e3db283612c100", "shasum": "" }, "require": { @@ -5354,9 +5568,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.4" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.28.3" }, - "time": "2024-07-24T17:10:25+00:00" + "time": "2024-10-22T22:27:17+00:00" }, { "name": "justinrainbow/json-schema", @@ -5425,23 +5639,23 @@ }, { "name": "lullabot/mink-selenium2-driver", - "version": "v1.7.3", + "version": "v1.7.4", "source": { "type": "git", "url": "https://github.com/Lullabot/MinkSelenium2Driver.git", - "reference": "91445897dda062790a741003c9c85d9bb2f902cf" + "reference": "145fe8ed1fb611be7409b70d609f71b0285f4724" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lullabot/MinkSelenium2Driver/zipball/91445897dda062790a741003c9c85d9bb2f902cf", - "reference": "91445897dda062790a741003c9c85d9bb2f902cf", + "url": "https://api.github.com/repos/Lullabot/MinkSelenium2Driver/zipball/145fe8ed1fb611be7409b70d609f71b0285f4724", + "reference": "145fe8ed1fb611be7409b70d609f71b0285f4724", "shasum": "" }, "require": { "behat/mink": "^1.11@dev", "ext-json": "*", - "lullabot/php-webdriver": "^2.0.5", - "php": ">=7.2" + "lullabot/php-webdriver": "^2.0.6", + "php": ">=8.1" }, "replace": { "behat/mink-selenium2-driver": "1.7.0" @@ -5491,22 +5705,22 @@ "webdriver" ], "support": { - "source": "https://github.com/Lullabot/MinkSelenium2Driver/tree/v1.7.3" + "source": "https://github.com/Lullabot/MinkSelenium2Driver/tree/v1.7.4" }, - "time": "2024-07-17T16:07:12+00:00" + "time": "2024-08-08T07:40:04+00:00" }, { "name": "lullabot/php-webdriver", - "version": "v2.0.5", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/Lullabot/php-webdriver.git", - "reference": "b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4" + "reference": "8c28db7151b8a73bd98861fe19972ac3f40184d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lullabot/php-webdriver/zipball/b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4", - "reference": "b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4", + "url": "https://api.github.com/repos/Lullabot/php-webdriver/zipball/8c28db7151b8a73bd98861fe19972ac3f40184d2", + "reference": "8c28db7151b8a73bd98861fe19972ac3f40184d2", "shasum": "" }, "require": { @@ -5539,22 +5753,22 @@ ], "support": { "issues": "https://github.com/Lullabot/php-webdriver/issues", - "source": "https://github.com/Lullabot/php-webdriver/tree/v2.0.5" + "source": "https://github.com/Lullabot/php-webdriver/tree/v2.0.6" }, - "time": "2024-07-17T15:21:54+00:00" + "time": "2024-08-05T13:00:46+00:00" }, { "name": "mglaman/phpstan-drupal", - "version": "1.2.12", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/mglaman/phpstan-drupal.git", - "reference": "346bdddda169a56b6ebb7dc17893f0ac8f33a4f1" + "reference": "2bc25a59b53c8f3990f168efd71241d9c25ea0c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/346bdddda169a56b6ebb7dc17893f0ac8f33a4f1", - "reference": "346bdddda169a56b6ebb7dc17893f0ac8f33a4f1", + "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/2bc25a59b53c8f3990f168efd71241d9c25ea0c3", + "reference": "2bc25a59b53c8f3990f168efd71241d9c25ea0c3", "shasum": "" }, "require": { @@ -5563,7 +5777,7 @@ "phpstan/phpstan-deprecation-rules": "^1.1.4", "symfony/finder": "^4.2 || ^5.0 || ^6.0 || ^7.0", "symfony/yaml": "^4.2|| ^5.0 || ^6.0 || ^7.0", - "webflo/drupal-finder": "^1.2" + "webflo/drupal-finder": "^1.3.1" }, "require-dev": { "behat/mink": "^1.8", @@ -5629,7 +5843,7 @@ "description": "Drupal extension and rules for PHPStan", "support": { "issues": "https://github.com/mglaman/phpstan-drupal/issues", - "source": "https://github.com/mglaman/phpstan-drupal/tree/1.2.12" + "source": "https://github.com/mglaman/phpstan-drupal/tree/1.3.1" }, "funding": [ { @@ -5645,7 +5859,7 @@ "type": "tidelift" } ], - "time": "2024-08-07T21:15:21+00:00" + "time": "2024-09-27T08:54:16+00:00" }, { "name": "micheh/phpcs-gitlab", @@ -5753,16 +5967,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -5801,7 +6015,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -5809,20 +6023,20 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v5.1.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { @@ -5865,39 +6079,108 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + }, + "time": "2024-10-08T18:51:32+00:00" + }, + { + "name": "nyholm/psr7-server", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Nyholm/psr7-server.git", + "reference": "4335801d851f554ca43fa6e7d2602141538854dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc", + "reference": "4335801d851f554ca43fa6e7d2602141538854dc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "require-dev": { + "nyholm/nsa": "^1.1", + "nyholm/psr7": "^1.3", + "phpunit/phpunit": "^7.0 || ^8.5 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Nyholm\\Psr7Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + }, + { + "name": "Martijn van der Ven", + "email": "martijn@vanderven.se" + } + ], + "description": "Helper classes to handle PSR-7 server requests", + "homepage": "http://tnyholm.se", + "keywords": [ + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/Nyholm/psr7-server/issues", + "source": "https://github.com/Nyholm/psr7-server/tree/1.1.0" }, - "time": "2024-07-01T20:03:41+00:00" + "funding": [ + { + "url": "https://github.com/Zegnat", + "type": "github" + }, + { + "url": "https://github.com/nyholm", + "type": "github" + } + ], + "time": "2023-11-08T09:30:43+00:00" }, { "name": "open-telemetry/api", - "version": "1.0.3", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "87de95d926f46262885d0d390060c095af13e2e5" + "reference": "542064815d38a6df55af7957cd6f1d7d967c99c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/87de95d926f46262885d0d390060c095af13e2e5", - "reference": "87de95d926f46262885d0d390060c095af13e2e5", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/542064815d38a6df55af7957cd6f1d7d967c99c6", + "reference": "542064815d38a6df55af7957cd6f1d7d967c99c6", "shasum": "" }, "require": { "open-telemetry/context": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^8.1", "psr/log": "^1.1|^2.0|^3.0", - "symfony/polyfill-php80": "^1.26", - "symfony/polyfill-php81": "^1.26", "symfony/polyfill-php82": "^1.26" }, "conflict": { - "open-telemetry/sdk": "<=1.0.4" + "open-telemetry/sdk": "<=1.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.0.x-dev" + "dev-main": "1.1.x-dev" + }, + "spi": { + "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ + "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" + ] } }, "autoload": { @@ -5934,26 +6217,24 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-02-06T01:32:25+00:00" + "time": "2024-10-15T22:42:37+00:00" }, { "name": "open-telemetry/context", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/context.git", - "reference": "e9d254a7c89885e63fd2fde54e31e81aaaf52b7c" + "reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/e9d254a7c89885e63fd2fde54e31e81aaaf52b7c", - "reference": "e9d254a7c89885e63fd2fde54e31e81aaaf52b7c", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/0cba875ea1953435f78aec7f1d75afa87bdbf7f3", + "reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "symfony/polyfill-php80": "^1.26", - "symfony/polyfill-php81": "^1.26", + "php": "^8.1", "symfony/polyfill-php82": "^1.26" }, "suggest": { @@ -5995,27 +6276,27 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-01-13T05:50:44+00:00" + "time": "2024-08-21T00:29:20+00:00" }, { "name": "open-telemetry/exporter-otlp", - "version": "1.0.4", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/exporter-otlp.git", - "reference": "342686bfce05867b56561a0af2fc8a4a8f27b3cc" + "reference": "9b6de12204f25f8ab9540b46d6e7b5151897ce18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/342686bfce05867b56561a0af2fc8a4a8f27b3cc", - "reference": "342686bfce05867b56561a0af2fc8a4a8f27b3cc", + "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/9b6de12204f25f8ab9540b46d6e7b5151897ce18", + "reference": "9b6de12204f25f8ab9540b46d6e7b5151897ce18", "shasum": "" }, "require": { "open-telemetry/api": "^1.0", "open-telemetry/gen-otlp-protobuf": "^1.1", "open-telemetry/sdk": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^8.1", "php-http/discovery": "^1.14" }, "type": "library", @@ -6059,25 +6340,25 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-02-28T21:57:02+00:00" + "time": "2024-04-30T18:28:30+00:00" }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "76e2a44357f8c3fdcabcb070ec8a59e52ae3e3c3" + "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/76e2a44357f8c3fdcabcb070ec8a59e52ae3e3c3", - "reference": "76e2a44357f8c3fdcabcb070ec8a59e52ae3e3c3", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/66c3b98e998a726691c92e6405a82e6e7b8b169d", + "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d", "shasum": "" }, "require": { - "google/protobuf": "^3.3.0", - "php": "^7.4 || ^8.0" + "google/protobuf": "^3.22 || ^4.0", + "php": "^8.0" }, "suggest": { "ext-protobuf": "For better performance, when dealing with the protobuf format" @@ -6122,47 +6403,54 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-01-16T21:54:57+00:00" + "time": "2024-10-30T11:49:49+00:00" }, { "name": "open-telemetry/sdk", - "version": "1.0.8", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "1da4c0ca4f1a3c0fe84b81729dadec16f464fa77" + "reference": "fb0ff8d8279a3776bd604791e2531dd0cc147e8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1da4c0ca4f1a3c0fe84b81729dadec16f464fa77", - "reference": "1da4c0ca4f1a3c0fe84b81729dadec16f464fa77", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/fb0ff8d8279a3776bd604791e2531dd0cc147e8b", + "reference": "fb0ff8d8279a3776bd604791e2531dd0cc147e8b", "shasum": "" }, "require": { "ext-json": "*", - "open-telemetry/api": "^1.0", + "nyholm/psr7-server": "^1.1", + "open-telemetry/api": "~1.0 || ~1.1", "open-telemetry/context": "^1.0", "open-telemetry/sem-conv": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^8.1", "php-http/discovery": "^1.14", "psr/http-client": "^1.0", "psr/http-client-implementation": "^1.0", "psr/http-factory-implementation": "^1.0", "psr/http-message": "^1.0.1|^2.0", "psr/log": "^1.1|^2.0|^3.0", + "ramsey/uuid": "^3.0 || ^4.0", "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.26", - "symfony/polyfill-php81": "^1.26", - "symfony/polyfill-php82": "^1.26" + "symfony/polyfill-php82": "^1.26", + "tbachert/spi": "^1.0.1" }, "suggest": { "ext-gmp": "To support unlimited number of synchronous metric readers", - "ext-mbstring": "To increase performance of string operations" + "ext-mbstring": "To increase performance of string operations", + "open-telemetry/sdk-configuration": "File-based OpenTelemetry SDK configuration" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.0.x-dev" + }, + "spi": { + "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ + "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" + ] } }, "autoload": { @@ -6205,20 +6493,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-02-02T03:42:40+00:00" + "time": "2024-10-18T21:01:35+00:00" }, { "name": "open-telemetry/sem-conv", - "version": "1.27.0", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sem-conv.git", - "reference": "04685638c98df03419b6683aa1b2646877687c4b" + "reference": "1dba705fea74bc0718d04be26090e3697e56f4e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/04685638c98df03419b6683aa1b2646877687c4b", - "reference": "04685638c98df03419b6683aa1b2646877687c4b", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/1dba705fea74bc0718d04be26090e3697e56f4e6", + "reference": "1dba705fea74bc0718d04be26090e3697e56f4e6", "shasum": "" }, "require": { @@ -6262,7 +6550,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-08-06T15:17:39+00:00" + "time": "2024-08-28T09:20:31+00:00" }, { "name": "phar-io/manifest", @@ -6384,16 +6672,16 @@ }, { "name": "php-http/discovery", - "version": "1.19.4", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "0700efda8d7526335132360167315fdab3aeb599" + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/0700efda8d7526335132360167315fdab3aeb599", - "reference": "0700efda8d7526335132360167315fdab3aeb599", + "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", "shasum": "" }, "require": { @@ -6457,9 +6745,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.4" + "source": "https://github.com/php-http/discovery/tree/1.20.0" }, - "time": "2024-03-29T13:00:05+00:00" + "time": "2024-10-02T11:20:13+00:00" }, { "name": "php-http/guzzle7-adapter", @@ -6525,16 +6813,16 @@ }, { "name": "php-http/httplug", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "625ad742c360c8ac580fcc647a1541d29e257f67" + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67", - "reference": "625ad742c360c8ac580fcc647a1541d29e257f67", + "url": "https://api.github.com/repos/php-http/httplug/zipball/5cad731844891a4c282f3f3e1b582c46839d22f4", + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4", "shasum": "" }, "require": { @@ -6576,9 +6864,9 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/2.4.0" + "source": "https://github.com/php-http/httplug/tree/2.4.1" }, - "time": "2023-04-14T15:10:03+00:00" + "time": "2024-09-23T11:39:58+00:00" }, { "name": "php-http/promise", @@ -6687,16 +6975,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", + "version": "5.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/0c70d2c566e899666f367ab7b80986beb3581e6f", + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f", "shasum": "" }, "require": { @@ -6709,13 +6997,13 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.5", + "mockery/mockery": "~1.3.5 || ~1.6.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -6745,29 +7033,29 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.1" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2024-11-06T11:58:54+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.2", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18|^2.0" }, "require-dev": { "ext-tokenizer": "*", @@ -6803,9 +7091,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "time": "2024-02-23T11:10:43+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { "name": "phpspec/prophecy", @@ -6930,22 +7218,22 @@ }, { "name": "phpstan/extension-installer", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", "shasum": "" }, "require": { "composer-plugin-api": "^2.0", "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0" + "phpstan/phpstan": "^1.9.0 || ^2.0" }, "require-dev": { "composer/composer": "^2.0", @@ -6966,24 +7254,28 @@ "MIT" ], "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" }, - "time": "2024-06-10T08:20:49+00:00" + "time": "2024-09-04T20:21:43+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.33.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "shasum": "" }, "require": { @@ -7015,22 +7307,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-10-13T11:25:22+00:00" }, { "name": "phpstan/phpstan", - "version": "1.11.10", + "version": "1.12.10", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "640410b32995914bde3eed26fa89552f9c2c082f" + "reference": "fc463b5d0fe906dcf19689be692c65c50406a071" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/640410b32995914bde3eed26fa89552f9c2c082f", - "reference": "640410b32995914bde3eed26fa89552f9c2c082f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/fc463b5d0fe906dcf19689be692c65c50406a071", + "reference": "fc463b5d0fe906dcf19689be692c65c50406a071", "shasum": "" }, "require": { @@ -7075,25 +7367,25 @@ "type": "github" } ], - "time": "2024-08-08T09:02:50+00:00" + "time": "2024-11-11T15:37:09+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26" + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/fa8cce7720fa782899a0aa97b6a41225d1bb7b26", - "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.11" + "phpstan/phpstan": "^1.12" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -7120,9 +7412,9 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.0" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.1" }, - "time": "2024-04-20T06:39:48+00:00" + "time": "2024-09-11T15:52:35+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -7499,16 +7791,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.35", + "version": "10.5.38", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b" + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7ac8b4e63f456046dcb4c9787da9382831a1874b", - "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132", + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132", "shasum": "" }, "require": { @@ -7529,7 +7821,7 @@ "phpunit/php-timer": "^6.0.0", "sebastian/cli-parser": "^2.0.1", "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.2", + "sebastian/comparator": "^5.0.3", "sebastian/diff": "^5.1.1", "sebastian/environment": "^6.1.0", "sebastian/exporter": "^5.1.2", @@ -7580,7 +7872,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.35" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38" }, "funding": [ { @@ -7596,7 +7888,188 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:52:21+00:00" + "time": "2024-10-28T13:06:21+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2022-12-31T21:50:55+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.7.6", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.6" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2024-04-27T21:32:50+00:00" }, { "name": "react/promise", @@ -7841,16 +8314,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53" + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", - "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", "shasum": "" }, "require": { @@ -7861,7 +8334,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.4" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { @@ -7906,7 +8379,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" }, "funding": [ { @@ -7914,7 +8387,7 @@ "type": "github" } ], - "time": "2024-08-12T06:03:08+00:00" + "time": "2024-10-18T14:56:07+00:00" }, { "name": "sebastian/complexity", @@ -8818,16 +9291,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -8894,20 +9367,20 @@ "type": "open_collective" } ], - "time": "2024-07-21T23:26:44+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/browser-kit", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "9c13742e3175b5815e272b981876ae329bec2040" + "reference": "8d64d17e198082f8f198d023a6b634e7b5fdda94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9c13742e3175b5815e272b981876ae329bec2040", - "reference": "9c13742e3175b5815e272b981876ae329bec2040", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/8d64d17e198082f8f198d023a6b634e7b5fdda94", + "reference": "8d64d17e198082f8f198d023a6b634e7b5fdda94", "shasum": "" }, "require": { @@ -8946,7 +9419,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v7.1.1" + "source": "https://github.com/symfony/browser-kit/tree/v7.2.0-RC1" }, "funding": [ { @@ -8962,20 +9435,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/css-selector", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4" + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/1c7cee86c6f812896af54434f8ce29c8d94f9ff4", - "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2", "shasum": "" }, "require": { @@ -9011,7 +9484,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.1.1" + "source": "https://github.com/symfony/css-selector/tree/v7.2.0-RC1" }, "funding": [ { @@ -9027,20 +9500,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/dom-crawler", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "01ce8174447f1f1dd33a5854b01beef79061d9fa" + "reference": "3e838f9095f53f2b98287a361c1cdb68bbd3aa7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/01ce8174447f1f1dd33a5854b01beef79061d9fa", - "reference": "01ce8174447f1f1dd33a5854b01beef79061d9fa", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/3e838f9095f53f2b98287a361c1cdb68bbd3aa7b", + "reference": "3e838f9095f53f2b98287a361c1cdb68bbd3aa7b", "shasum": "" }, "require": { @@ -9078,7 +9551,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v7.1.1" + "source": "https://github.com/symfony/dom-crawler/tree/v7.2.0-RC1" }, "funding": [ { @@ -9094,20 +9567,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/lock", - "version": "v7.1.1", + "version": "v7.2.0-RC1", "source": { "type": "git", "url": "https://github.com/symfony/lock.git", - "reference": "1f8c941f1270dee046e09a826bcdd3b2ebada45e" + "reference": "07212a5994a30e3667e95e5b16b2dda0685aff84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/lock/zipball/1f8c941f1270dee046e09a826bcdd3b2ebada45e", - "reference": "1f8c941f1270dee046e09a826bcdd3b2ebada45e", + "url": "https://api.github.com/repos/symfony/lock/zipball/07212a5994a30e3667e95e5b16b2dda0685aff84", + "reference": "07212a5994a30e3667e95e5b16b2dda0685aff84", "shasum": "" }, "require": { @@ -9156,7 +9629,7 @@ "semaphore" ], "support": { - "source": "https://github.com/symfony/lock/tree/v7.1.1" + "source": "https://github.com/symfony/lock/tree/v7.2.0-RC1" }, "funding": [ { @@ -9172,7 +9645,59 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-10-25T15:34:29+00:00" + }, + { + "name": "tbachert/spi", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/Nevay/spi.git", + "reference": "2ddfaf815dafb45791a61b08170de8d583c16062" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nevay/spi/zipball/2ddfaf815dafb45791a61b08170de8d583c16062", + "reference": "2ddfaf815dafb45791a61b08170de8d583c16062", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "composer/semver": "^1.0 || ^2.0 || ^3.0", + "php": "^8.1" + }, + "require-dev": { + "composer/composer": "^2.0", + "infection/infection": "^0.27.9", + "phpunit/phpunit": "^10.5", + "psalm/phar": "^5.18" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-main": "0.2.x-dev" + }, + "class": "Nevay\\SPI\\Composer\\Plugin", + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Nevay\\SPI\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Service provider loading facility", + "keywords": [ + "service provider" + ], + "support": { + "issues": "https://github.com/Nevay/spi/issues", + "source": "https://github.com/Nevay/spi/tree/v1.0.2" + }, + "time": "2024-10-04T16:36:12+00:00" }, { "name": "theseer/tokenizer", @@ -9334,7 +9859,13 @@ "stability-flags": { "drupal/core": 20, "drupal/core-project-message": 20, - "drupal/core-vendor-hardening": 20 + "drupal/core-vendor-hardening": 20, + "symfony/browser-kit": 10, + "symfony/css-selector": 10, + "symfony/dom-crawler": 10, + "symfony/error-handler": 10, + "symfony/lock": 10, + "symfony/var-dumper": 10 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/composer/Metapackage/CoreRecommended/composer.json b/composer/Metapackage/CoreRecommended/composer.json index 2fc5519b0c5c1ab6756a5110dd0275c4e00ef98e..d8f570f6be00e025b6048da340aece874a39ce71 100644 --- a/composer/Metapackage/CoreRecommended/composer.json +++ b/composer/Metapackage/CoreRecommended/composer.json @@ -10,12 +10,12 @@ "drupal/core": "11.x-dev", "asm89/stack-cors": "~v2.2.0", "composer/semver": "~3.4.3", - "doctrine/annotations": "~2.0.1", + "doctrine/annotations": "~2.0.2", "doctrine/deprecations": "~1.1.3", "doctrine/lexer": "~2.1.1", "egulias/email-validator": "~4.0.2", "guzzlehttp/guzzle": "~7.9.2", - "guzzlehttp/promises": "~2.0.3", + "guzzlehttp/promises": "~2.0.4", "guzzlehttp/psr7": "~2.7.0", "masterminds/html5": "~2.9.0", "mck89/peast": "~v1.16.3", @@ -23,6 +23,7 @@ "pear/console_getopt": "~v1.4.3", "pear/pear-core-minimal": "~v1.10.15", "pear/pear_exception": "~v1.0.2", + "php-tuf/composer-stager": "~v2.0.0-rc5", "psr/cache": "~3.0.0", "psr/container": "~2.0.2", "psr/event-dispatcher": "~1.0.0", @@ -30,36 +31,37 @@ "psr/http-factory": "~1.1.0", "psr/log": "~3.0.2", "ralouphie/getallheaders": "~3.0.3", + "revolt/event-loop": "~v1.0.6", "sebastian/diff": "~5.1.1", - "symfony/console": "~v7.1.5", - "symfony/dependency-injection": "~v7.1.3", + "symfony/console": "~v7.2.0-RC1", + "symfony/dependency-injection": "~v7.2.0-RC1", "symfony/deprecation-contracts": "~v3.5.0", - "symfony/error-handler": "~v7.1.3", - "symfony/event-dispatcher": "~v7.1.1", + "symfony/error-handler": "~v7.2.0-RC1", + "symfony/event-dispatcher": "~v7.2.0-RC1", "symfony/event-dispatcher-contracts": "~v3.5.0", - "symfony/filesystem": "~v7.1.5", - "symfony/finder": "~v7.1.4", - "symfony/http-foundation": "~v7.1.3", - "symfony/http-kernel": "~v7.1.3", - "symfony/mailer": "~v7.1.2", - "symfony/mime": "~v7.1.2", + "symfony/filesystem": "~v7.2.0-RC1", + "symfony/finder": "~v7.2.0-RC1", + "symfony/http-foundation": "~v7.2.0-RC1", + "symfony/http-kernel": "~v7.2.0-RC1", + "symfony/mailer": "~v7.2.0-RC1", + "symfony/mime": "~v7.2.0-RC1", "symfony/polyfill-ctype": "~v1.31.0", - "symfony/polyfill-iconv": "~v1.30.0", + "symfony/polyfill-iconv": "~v1.31.0", "symfony/polyfill-intl-grapheme": "~v1.31.0", - "symfony/polyfill-intl-idn": "~v1.30.0", + "symfony/polyfill-intl-idn": "~v1.31.0", "symfony/polyfill-intl-normalizer": "~v1.31.0", "symfony/polyfill-mbstring": "~v1.31.0", - "symfony/process": "~v7.1.5", - "symfony/psr-http-message-bridge": "~v7.1.3", - "symfony/routing": "~v7.1.3", - "symfony/serializer": "~v7.1.3", + "symfony/process": "~v7.2.0-RC1", + "symfony/psr-http-message-bridge": "~v7.2.0-RC1", + "symfony/routing": "~v7.2.0-RC1", + "symfony/serializer": "~v7.2.0-RC1", "symfony/service-contracts": "~v3.5.0", - "symfony/string": "~v7.1.5", + "symfony/string": "~v7.1.8", "symfony/translation-contracts": "~v3.5.0", - "symfony/validator": "~v7.1.3", - "symfony/var-dumper": "~v7.1.3", - "symfony/var-exporter": "~v7.1.2", - "symfony/yaml": "~v7.1.1", - "twig/twig": "~v3.14.0" + "symfony/validator": "~v7.2.0-RC1", + "symfony/var-dumper": "~v7.2.0-RC1", + "symfony/var-exporter": "~v7.1.6", + "symfony/yaml": "~v7.2.0-RC1", + "twig/twig": "~v3.14.2" } } diff --git a/composer/Metapackage/DevDependencies/composer.json b/composer/Metapackage/DevDependencies/composer.json index 5fa0d4fb2cf83b3a06edfdc01b9d1081dca61549..c79fc3b1f37339d924ec302c8d89c4f3ca524990 100644 --- a/composer/Metapackage/DevDependencies/composer.json +++ b/composer/Metapackage/DevDependencies/composer.json @@ -23,14 +23,14 @@ "php-http/guzzle7-adapter": "^1.0", "phpspec/prophecy-phpunit": "^2", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.11.10", + "phpstan/phpstan": "^1.12.4", "phpstan/phpstan-phpunit": "^1.3.16", "phpunit/phpunit": "^10.5.19", - "symfony/browser-kit": "^7.1", - "symfony/css-selector": "^7.1", - "symfony/dom-crawler": "^7.1", - "symfony/error-handler": "^7.1", - "symfony/lock": "^7.1", - "symfony/var-dumper": "^7.1" + "symfony/browser-kit": "^7.2@beta", + "symfony/css-selector": "^7.2@beta", + "symfony/dom-crawler": "^7.2@beta", + "symfony/error-handler": "^7.2@beta", + "symfony/lock": "^7.2@beta", + "symfony/var-dumper": "^7.2@beta" } } diff --git a/composer/Metapackage/PinnedDevDependencies/composer.json b/composer/Metapackage/PinnedDevDependencies/composer.json index 801d1f2eced2f8775b53044f375cf661271336b4..c1b10bd197d9f66f6d78d993090a44f38bf92ba1 100644 --- a/composer/Metapackage/PinnedDevDependencies/composer.json +++ b/composer/Metapackage/PinnedDevDependencies/composer.json @@ -8,61 +8,65 @@ }, "require": { "drupal/core": "11.x-dev", - "behat/mink": "v1.11.0", + "behat/mink": "v1.12.0", "behat/mink-browserkit-driver": "v2.2.0", + "brick/math": "0.12.1", "colinodell/psr-testlogger": "v1.3.0", - "composer/ca-bundle": "1.5.2", + "composer/ca-bundle": "1.5.3", "composer/class-map-generator": "1.4.0", - "composer/composer": "2.8.1", + "composer/composer": "2.8.2", "composer/metadata-minifier": "1.0.0", "composer/pcre": "3.3.1", "composer/spdx-licenses": "1.5.8", "composer/xdebug-handler": "3.0.5", "dealerdirect/phpcodesniffer-composer-installer": "v1.0.0", "doctrine/instantiator": "2.0.0", - "drupal/coder": "8.3.24", - "google/protobuf": "v3.25.4", + "drupal/coder": "8.3.25", + "google/protobuf": "v4.28.3", "justinrainbow/json-schema": "5.3.0", - "lullabot/mink-selenium2-driver": "v1.7.3", - "lullabot/php-webdriver": "v2.0.5", - "mglaman/phpstan-drupal": "1.2.12", + "lullabot/mink-selenium2-driver": "v1.7.4", + "lullabot/php-webdriver": "v2.0.6", + "mglaman/phpstan-drupal": "1.3.1", "micheh/phpcs-gitlab": "1.1.0", "mikey179/vfsstream": "v1.6.12", - "myclabs/deep-copy": "1.12.0", - "nikic/php-parser": "v5.1.0", - "open-telemetry/api": "1.0.3", - "open-telemetry/context": "1.0.2", - "open-telemetry/exporter-otlp": "1.0.4", - "open-telemetry/gen-otlp-protobuf": "1.1.0", - "open-telemetry/sdk": "1.0.8", - "open-telemetry/sem-conv": "1.27.0", + "myclabs/deep-copy": "1.12.1", + "nikic/php-parser": "v5.3.1", + "nyholm/psr7-server": "1.1.0", + "open-telemetry/api": "1.1.1", + "open-telemetry/context": "1.1.0", + "open-telemetry/exporter-otlp": "1.1.0", + "open-telemetry/gen-otlp-protobuf": "1.2.1", + "open-telemetry/sdk": "1.1.2", + "open-telemetry/sem-conv": "1.27.1", "phar-io/manifest": "2.0.4", "phar-io/version": "3.2.1", - "php-http/discovery": "1.19.4", + "php-http/discovery": "1.20.0", "php-http/guzzle7-adapter": "1.0.0", - "php-http/httplug": "2.4.0", + "php-http/httplug": "2.4.1", "php-http/promise": "1.3.1", "phpdocumentor/reflection-common": "2.2.0", - "phpdocumentor/reflection-docblock": "5.4.1", - "phpdocumentor/type-resolver": "1.8.2", + "phpdocumentor/reflection-docblock": "5.5.1", + "phpdocumentor/type-resolver": "1.10.0", "phpspec/prophecy": "v1.19.0", "phpspec/prophecy-phpunit": "v2.2.0", - "phpstan/extension-installer": "1.4.1", - "phpstan/phpdoc-parser": "1.29.1", - "phpstan/phpstan": "1.11.10", - "phpstan/phpstan-deprecation-rules": "1.2.0", + "phpstan/extension-installer": "1.4.3", + "phpstan/phpdoc-parser": "1.33.0", + "phpstan/phpstan": "1.12.10", + "phpstan/phpstan-deprecation-rules": "1.2.1", "phpstan/phpstan-phpunit": "1.4.0", "phpunit/php-code-coverage": "10.1.16", "phpunit/php-file-iterator": "4.1.0", "phpunit/php-invoker": "4.0.0", "phpunit/php-text-template": "3.0.1", "phpunit/php-timer": "6.0.0", - "phpunit/phpunit": "10.5.35", + "phpunit/phpunit": "10.5.38", + "ramsey/collection": "2.0.0", + "ramsey/uuid": "4.7.6", "react/promise": "v3.2.0", "sebastian/cli-parser": "2.0.1", "sebastian/code-unit": "2.0.0", "sebastian/code-unit-reverse-lookup": "3.0.0", - "sebastian/comparator": "5.0.2", + "sebastian/comparator": "5.0.3", "sebastian/complexity": "3.2.0", "sebastian/environment": "6.1.0", "sebastian/exporter": "5.1.2", @@ -78,11 +82,12 @@ "seld/signal-handler": "2.0.2", "sirbrillig/phpcs-variable-analysis": "v2.11.19", "slevomat/coding-standard": "8.15.0", - "squizlabs/php_codesniffer": "3.10.2", - "symfony/browser-kit": "v7.1.1", - "symfony/css-selector": "v7.1.1", - "symfony/dom-crawler": "v7.1.1", - "symfony/lock": "v7.1.1", + "squizlabs/php_codesniffer": "3.10.3", + "symfony/browser-kit": "v7.2.0-RC1", + "symfony/css-selector": "v7.2.0-RC1", + "symfony/dom-crawler": "v7.2.0-RC1", + "symfony/lock": "v7.2.0-RC1", + "tbachert/spi": "v1.0.2", "theseer/tokenizer": "1.2.3", "webflo/drupal-finder": "1.3.1", "webmozart/assert": "1.11.0" diff --git a/composer/Plugin/Scaffold/Plugin.php b/composer/Plugin/Scaffold/Plugin.php index 8fe6961424cf6340306510306b60d541275210a1..3de043a36efb77b6c63ae1e8d65682ea9e5daf3e 100644 --- a/composer/Plugin/Scaffold/Plugin.php +++ b/composer/Plugin/Scaffold/Plugin.php @@ -47,7 +47,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface, Capable { /** * Record whether the 'require' command was called. * - * @param bool + * @var bool */ protected $requireWasCalled; diff --git a/composer/Plugin/VendorHardening/Config.php b/composer/Plugin/VendorHardening/Config.php index 411425b14f539ee6c8960a16c73adefceb6793af..136729e9242e0c158c240d74649fd8e3a46eb910 100644 --- a/composer/Plugin/VendorHardening/Config.php +++ b/composer/Plugin/VendorHardening/Config.php @@ -77,6 +77,7 @@ class Config { 'symfony/var-dumper' => ['Tests'], 'symfony/validator' => ['Tests', 'Resources'], 'symfony/yaml' => ['Tests'], + 'tbachert/spi' => ['tests'], 'theseer/tokenizer' => ['tests'], 'twig/twig' => ['doc', 'ext', 'test', 'tests'], ]; diff --git a/core/.deprecation-ignore.txt b/core/.deprecation-ignore.txt index 59bb7bc9955a99411a430d199b676ad71a3b53ca..8bf5c29373cce497f97ca2488dbb7d306cf44d80 100644 --- a/core/.deprecation-ignore.txt +++ b/core/.deprecation-ignore.txt @@ -19,6 +19,7 @@ # Indirect deprecations. These are not in Drupal's remit to fix, but it is # worth keeping track of dependencies' issues. %Method "[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in implementation "org\\bovigo\\vfs\\[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message% +%Method "[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in (child class|implementation) "OpenTelemetry\\[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message% # The following deprecation is listed for Twig 2 compatibility when unit # testing using \Symfony\Component\ErrorHandler\DebugClassLoader. @@ -30,3 +31,7 @@ # Twig 3. %Since twig/twig 3.12: Twig Filter "spaceless" is deprecated% + +# Symfony 7.2 +%Since symfony/http-foundation 7.2: NativeSessionStorage's "sid_length" option is deprecated and will be ignored in Symfony 8.0.% +%Since symfony/http-foundation 7.2: NativeSessionStorage's "sid_bits_per_character" option is deprecated and will be ignored in Symfony 8.0.% diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php index 3ec9c78dafacd8d80a5b3674f5d9929b919527c3..d6d75205e43477fdf91b9514e6e583a5045934e6 100644 --- a/core/.phpstan-baseline.php +++ b/core/.phpstan-baseline.php @@ -1,6 +1,66 @@ <?php declare(strict_types = 1); $ignoreErrors = []; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Generator\\\\PackageGenerator\\:\\:generate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Generator/PackageGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\ProjectMessage\\\\Message\\:\\:getText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/ProjectMessage/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\ProjectMessage\\\\MessagePlugin\\:\\:displayPostCreateMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/ProjectMessage/MessagePlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\AllowedPackages\\:\\:event\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/AllowedPackages.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Handler\\:\\:onPostPackageEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Handler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Handler\\:\\:requireWasCalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Handler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Handler\\:\\:scaffold\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Handler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\ManageGitIgnore\\:\\:addToGitIgnore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/ManageGitIgnore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\ManageGitIgnore\\:\\:manageIgnored\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/ManageGitIgnore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\ManageOptions\\:\\:ensureLocations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/ManageOptions.php', +]; $ignoreErrors[] = [ // identifier: empty.variable 'message' => '#^Variable \\$data_path in empty\\(\\) always exists and is not falsy\\.$#', @@ -8,2591 +68,70205 @@ 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Operations/AppendOp.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$app_root might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Operations\\\\ScaffoldFileCollection\\:\\:filterFiles\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/assets/scaffold/files/default.settings.php', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$site_path might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Plugin\\:\\:handler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/assets/scaffold/files/default.settings.php', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Plugin.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$new_set_index might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Plugin\\:\\:onCommand\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/includes/form.inc', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Plugin.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Function install_config_download_translations\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Plugin\\:\\:postCmd\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/includes/install.core.inc', -]; -$ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Function install_download_translation\\(\\) should return string but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/includes/install.core.inc', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Plugin.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\Plugin\\:\\:postPackage\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/includes/theme.inc', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/Plugin.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$custom_theme might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\PostPackageEventListenerInterface\\:\\:event\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/includes/theme.maintenance.inc', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/PostPackageEventListenerInterface.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:getTimeZone\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\Scaffold\\\\ScaffoldFilePath\\:\\:addInterpolationData\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', + 'path' => __DIR__ . '/../composer/Plugin/Scaffold/ScaffoldFilePath.php', ]; $ignoreErrors[] = [ // identifier: variable.undefined - 'message' => '#^Variable \\$value might not be defined\\.$#', + 'message' => '#^Variable \\$app_root might not be defined\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', + 'path' => __DIR__ . '/assets/scaffold/files/default.settings.php', ]; $ignoreErrors[] = [ // identifier: variable.undefined - 'message' => '#^Variable \\$x0 might not be defined\\.$#', - 'count' => 4, - 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', + 'message' => '#^Variable \\$site_path might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/assets/scaffold/files/default.settings.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$xi in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_current_set\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$y0 might not be defined\\.$#', - 'count' => 4, - 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', + // identifier: missingType.return + 'message' => '#^Function _batch_do\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$yi in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_finished\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$cache_backend_class\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_page\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$cache_backend_configuration\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_progress_page\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$collection\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_shutdown\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', + 'path' => __DIR__ . '/includes/batch.inc', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$prefix\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_error_handler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:getHeader\\(\\) should return Drupal\\\\Component\\\\Gettext\\\\PoHeader but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_exception_handler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:getLangcode\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_exception_handler_additional\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$log_vars might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_shutdown_function\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$permission might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_shutdown_function_handle_exception\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Access/AccessResult.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CsrfRequestHeaderAccessCheck\\:\\:applies\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_maintenance_theme\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Access/CsrfRequestHeaderAccessCheck.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: arguments.count - 'message' => '#^Method Drupal\\\\Core\\\\Executable\\\\ExecutableInterface\\:\\:execute\\(\\) invoked with 1 parameter, 0 required\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_static_reset\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionBase.php', + 'path' => __DIR__ . '/includes/bootstrap.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function base_path\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', + 'path' => __DIR__ . '/includes/common.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_attach_tabledrag\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', + 'path' => __DIR__ . '/includes/common.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Archiver\\\\ArchiverManager\\:\\:getInstance\\(\\) should return object\\|false but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_flush_all_caches\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Archiver/ArchiverManager.php', + 'path' => __DIR__ . '/includes/common.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$group_keys might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Asset/CssCollectionGrouper.php', + // identifier: missingType.return + 'message' => '#^Function _drupal_error_handler_real\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/errors.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$group_keys might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Asset/JsCollectionGrouper.php', + // identifier: missingType.return + 'message' => '#^Function _drupal_error_header\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/errors.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function _drupal_log_error\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', + 'path' => __DIR__ . '/includes/errors.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_error_levels\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', + 'path' => __DIR__ . '/includes/errors.inc', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Core\\\\Cache\\\\NullBackend has an unused parameter \\$bin\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_append_set\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function _batch_populate_queue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function batch_get\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/Condition.php', + // identifier: missingType.return + 'message' => '#^Function batch_set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$theme_list might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_checkboxes\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Config/ExtensionInstallStorage.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$statement might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_details\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Delete\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_fieldset\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Delete.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$affected_rows might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_form\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Upsert.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:discoverServiceProviders\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_form_element\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$container might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_form_element_label\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$container_definition might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_input\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_radios\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doLoadMultiple\\(\\) should return array\\<Drupal\\\\Core\\\\Entity\\\\EntityInterface\\> but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_select\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doSave\\(\\) should return bool\\|int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_textarea\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:has\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function template_preprocess_vertical_tabs\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$current_affected in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: variable.undefined + 'message' => '#^Variable \\$new_set_index might not be defined\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', + 'path' => __DIR__ . '/includes/form.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:deleteTitle\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function _install_config_locale_overrides_process_batch\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityController.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$candidate_ids might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', + // identifier: missingType.return + 'message' => '#^Function _install_module_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$string in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function _install_prepare_import\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:\\$id\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_base_system\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_begin_request\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConfirmFormBase.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:\\$_serializedKeys\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', + // identifier: missingType.return + 'message' => '#^Function install_bootstrap_full\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:createTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_check_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:createWithSampleValues\\(\\) should return Drupal\\\\Core\\\\Entity\\\\FieldableEntityInterface but return statement is missing\\.$#', + 'message' => '#^Function install_config_download_translations\\(\\) should return string but return statement is missing\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_config_import_batch\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraintValidator.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_config_revert_install_changes\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraintValidator.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:getClass\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_core_entity_type_definitions\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$next_index_prefix might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function install_database_errors\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Tables.php', + 'path' => __DIR__ . '/includes/install.core.inc', ]; $ignoreErrors[] = [ - // identifier: variable.undefined + // identifier: missingType.return + 'message' => '#^Function install_display_output\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Function install_download_translation\\(\\) should return string but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_drupal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_install_profile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_load_profile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_profile_themes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_recipe_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_recipe_required_modules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_state_defaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_verify_database_ready\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.core.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function drupal_install_system\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function drupal_load_updates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function install_goto\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/install.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_set_weight\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/module.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _field_multiple_value_form_sort_helper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _system_default_theme_features\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _template_preprocess_default_variables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function drupal_common_theme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function drupal_find_theme_templates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_breadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_container\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_datetime_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_datetime_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_field_multiple_value_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_install_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_item_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_maintenance_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_maintenance_task_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_menu_local_action\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_menu_local_task\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_pager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_region\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_time\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _drupal_maintenance_theme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.maintenance.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_authorize_report\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.maintenance.inc', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$custom_theme might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/theme.maintenance.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_fix_missing_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/update.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_check_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/update.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_do_one\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/update.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_invoke_post_update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/update.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function drupal_rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/includes/utility.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\:\\:setContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\:\\:unsetContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\AnnotationBase\\:\\:setClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/AnnotationBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\AnnotationBase\\:\\:setProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/AnnotationBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\AnnotationInterface\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/AnnotationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\AnnotationInterface\\:\\:setClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/AnnotationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\AnnotationInterface\\:\\:setProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/AnnotationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Doctrine\\\\StaticReflectionClass\\:\\:export\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Plugin\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Plugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Plugin\\:\\:setClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Plugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Plugin\\:\\:setProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Plugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Plugin\\\\Discovery\\\\AnnotatedClassDiscovery\\:\\:prepareAnnotationDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\PluginID\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/PluginID.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Annotation\\\\Reflection\\\\MockFileFinder\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:getTimeZone\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:__callStatic\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:_die\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:checkErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Datetime\\\\DateTimePlus\\:\\:setDefaultDateTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$value might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Datetime/DateTimePlus.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_added\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_block_header\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_changed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_context\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_deleted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_end_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_end_diff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_lines\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_start_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\DiffFormatter\\:\\:_start_diff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$x0 might not be defined\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$xi in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$y0 might not be defined\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$yi in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\Engine\\\\HWLDFWordAccumulator\\:\\:_flushGroup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\Engine\\\\HWLDFWordAccumulator\\:\\:_flushLine\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\Engine\\\\HWLDFWordAccumulator\\:\\:addWords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\Engine\\\\HWLDFWordAccumulator\\:\\:getLines\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\WordLevelDiff\\:\\:_split\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/WordLevelDiff.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\WordLevelDiff\\:\\:closing\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/WordLevelDiff.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Diff\\\\WordLevelDiff\\:\\:orig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Diff/WordLevelDiff.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\ApcuFileCacheBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/ApcuFileCacheBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\ApcuFileCacheBackend\\:\\:store\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/ApcuFileCacheBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCache\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCache\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCache\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheBackendInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheBackendInterface\\:\\:store\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheFactory\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheFactory\\:\\:setPrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\FileCacheInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/FileCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$cache_backend_class\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$cache_backend_configuration\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$collection\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Component\\\\FileCache\\\\NullFileCache has an unused parameter \\$prefix\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\NullFileCache\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\FileCache\\\\NullFileCache\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/FileCache/NullFileCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoHeader\\:\\:setFromString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoHeader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoHeader\\:\\:setLanguageName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoHeader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoHeader\\:\\:setProjectName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoHeader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:formatItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:formatSingular\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:formatString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setComment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setFromArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoItem\\:\\:setTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoItem.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:getHeader\\(\\) should return Drupal\\\\Component\\\\Gettext\\\\PoHeader but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:getLangcode\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:writeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:writeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMemoryWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMetadataInterface\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMetadataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoMetadataInterface\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoMetadataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamInterface\\:\\:close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamInterface\\:\\:open\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamInterface\\:\\:setURI\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:getSeek\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:open\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:readHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:setItemFromArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:setSeek\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamReader\\:\\:setURI\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$log_vars might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:open\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:setURI\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:write\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:writeHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:writeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoStreamWriter\\:\\:writeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoStreamWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoWriterInterface\\:\\:writeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoWriterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Gettext\\\\PoWriterInterface\\:\\:writeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Gettext/PoWriterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Graph\\\\Graph\\:\\:depthFirstSearch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Graph/Graph.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\HttpFoundation\\\\SecuredRedirectResponse\\:\\:fromResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/HttpFoundation/SecuredRedirectResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileReadOnlyStorage\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileReadOnlyStorage\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileReadOnlyStorage\\:\\:load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileStorage\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileStorage\\:\\:ensureDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileStorage\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\FileStorage\\:\\:load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/FileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\MTimeProtectedFastFileStorage\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\MTimeProtectedFastFileStorage\\:\\:getUncachedMTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\MTimeProtectedFileStorage\\:\\:getPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\MTimeProtectedFileStorage\\:\\:load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\PhpStorageInterface\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\PhpStorageInterface\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\PhpStorage\\\\PhpStorageInterface\\:\\:load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\ConfigurableInterface\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/ConfigurableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\ContextAwarePluginInterface\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\CachedDiscoveryInterface\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/CachedDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\CachedDiscoveryInterface\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/CachedDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\DerivativeDiscoveryDecorator\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\DerivativeDiscoveryDecorator\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\DerivativeDiscoveryDecorator\\:\\:getDerivatives\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\DerivativeDiscoveryDecorator\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\StaticDiscovery\\:\\:deleteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\StaticDiscovery\\:\\:setDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\Discovery\\\\StaticDiscoveryDecorator\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:addInstanceId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:removeInstanceId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\LazyPluginCollection\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/LazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Plugin\\\\PluginAwareInterface\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Plugin/PluginAwareInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Serialization\\\\YamlPecl\\:\\:errorHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Serialization/YamlPecl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Transliteration\\\\PhpTransliteration\\:\\:readGenericData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Transliteration/PhpTransliteration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Transliteration\\\\PhpTransliteration\\:\\:readLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Transliteration/PhpTransliteration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\ArgumentsResolver\\:\\:handleUnresolvedArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/ArgumentsResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\Html\\:\\:escapeCdataElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/Html.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\Html\\:\\:resetSeenIds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/Html.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\Html\\:\\:setIsAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/Html.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\HtmlSerializerRules\\:\\:escape\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/HtmlSerializerRules.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\NestedArray\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/NestedArray.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\NestedArray\\:\\:unsetValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/NestedArray.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\OpCodeCache\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/OpCodeCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\Timer\\:\\:start\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/Timer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Utility\\\\UrlHelper\\:\\:setAllowedProtocols\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Utility/UrlHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Component\\\\Version\\\\Constraint\\:\\:parseConstraint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Component/Version/Constraint.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$permission might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/AccessResult.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CheckProvider\\:\\:addCheckService\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CheckProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CheckProvider\\:\\:loadDynamicRequirementMap\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CheckProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CheckProvider\\:\\:setChecks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CheckProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CheckProviderInterface\\:\\:addCheckService\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CheckProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CheckProviderInterface\\:\\:setChecks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CheckProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\CsrfRequestHeaderAccessCheck\\:\\:applies\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/CsrfRequestHeaderAccessCheck.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Access\\\\RouteProcessorCsrf\\:\\:processOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Access/RouteProcessorCsrf.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ActionBase\\:\\:executeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionBase.php', +]; +$ignoreErrors[] = [ + // identifier: arguments.count + 'message' => '#^Method Drupal\\\\Core\\\\Executable\\\\ExecutableInterface\\:\\:execute\\(\\) invoked with 1 parameter, 0 required\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ActionInterface\\:\\:executeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ActionManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ActionManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ActionManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ConfigurableActionBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ConfigurableActionBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\ConfigurableActionBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/ConfigurableActionBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\DeleteAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\DeleteAction\\:\\:executeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\Derivative\\\\EntityActionDeriverBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityActionDeriverBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\Derivative\\\\EntityActionDeriverBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityActionDeriverBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\EmailAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\EmailAction\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\EmailAction\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\GotoAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\GotoAction\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\MessageAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\MessageAction\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\PublishAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/PublishAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\SaveAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Action\\\\Plugin\\\\Action\\\\UnpublishAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Action/Plugin/Action/UnpublishAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AddCssCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AddCssCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AddJsCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AddJsCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AfterCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AfterCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AlertCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AlertCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AnnounceCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AnnounceCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\AppendCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/AppendCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\BaseCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/BaseCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\BeforeCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/BeforeCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\ChangedCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/ChangedCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\CloseDialogCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/CloseDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\CommandInterface\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/CommandInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\CssCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/CssCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\DataCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/DataCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\FocusFirstCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/FocusFirstCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\HtmlCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/HtmlCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\InsertCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/InsertCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\InvokeCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/InvokeCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\MessageCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/MessageCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenDialogCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenDialogCommand\\:\\:setDialogOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenDialogCommand\\:\\:setDialogOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenDialogCommand\\:\\:setDialogTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenModalDialogWithUrl\\:\\:getBaseUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenModalDialogWithUrl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenModalDialogWithUrl\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenModalDialogWithUrl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\OpenOffCanvasDialogCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\PrependCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/PrependCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\RedirectCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/RedirectCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\RemoveCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/RemoveCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\ReplaceCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/ReplaceCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\RestripeCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/RestripeCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\SetDialogOptionCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/SetDialogOptionCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\SettingsCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/SettingsCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\TabledragWarningCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/TabledragWarningCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Ajax\\\\UpdateBuildIdCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Annotation\\\\PluralTranslation\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Annotation/PluralTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Annotation\\\\Translation\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Annotation/Translation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Archiver\\\\ArchiveTar\\:\\:_error\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Archiver/ArchiveTar.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Archiver\\\\ArchiveTar\\:\\:_warning\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Archiver/ArchiveTar.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Archiver\\\\ArchiverManager\\:\\:getInstance\\(\\) should return object\\|false but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Archiver/ArchiverManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\AssetCollectionOptimizerInterface\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$group_keys might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/CssCollectionGrouper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\CssCollectionOptimizerLazy\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$group_keys might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/JsCollectionGrouper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\JsCollectionOptimizerLazy\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscovery\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscoveryCollector\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscoveryCollector\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscoveryInterface\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscoveryParser\\:\\:isValidUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Asset\\\\LibraryDiscoveryParser\\:\\:setOverrideValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Authentication\\\\AuthenticationCollector\\:\\:addProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Authentication/AuthenticationCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Authentication\\\\AuthenticationCollectorInterface\\:\\:addProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:cleanup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:ensureTableExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorage\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorageInterface\\:\\:cleanup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorageInterface\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Batch\\\\BatchStorageInterface\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Batch/BatchStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:setConfigurationValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:setTransliteration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:traitBuildConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:getType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockManager\\:\\:traitGetSortedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockPluginInterface\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockPluginInterface\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\BlockPluginInterface\\:\\:setConfigurationValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/BlockPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\MainContentBlockPluginInterface\\:\\:setMainContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:getFormClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:getPreviewFallbackString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:hasFormClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:setConfigurationValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:setTransliteration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\Broken\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\Plugin\\\\Block\\\\PageTitleBlock\\:\\:setTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Block\\\\TitleBlockPluginInterface\\:\\:setTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Block/TitleBlockPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Breadcrumb\\\\BreadcrumbManager\\:\\:addBuilder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Breadcrumb\\\\ChainBreadcrumbBuilderInterface\\:\\:addBuilder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Breadcrumb/ChainBreadcrumbBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ApcuBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ApcuBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\BackendChain\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/BackendChain.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Cache\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Cache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheBackendInterface\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:invalidateCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:lazyLoadCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:persist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollector\\:\\:updateCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollectorInterface\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollectorInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollectorInterface\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollectorInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheCollectorInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheCollectorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheTagsChecksumInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheTagsChecksumInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheTagsInvalidator\\:\\:addInvalidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheTagsInvalidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheTagsInvalidator\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheTagsInvalidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheTagsInvalidator\\:\\:resetChecksums\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheTagsInvalidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheTagsInvalidatorInterface\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\CacheableMetadata\\:\\:applyTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/CacheableMetadata.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:getLastWriteTimestamp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:markAsOutdated\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\ChainedFastBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/ChainedFastBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\CacheContextsManager\\:\\:validateTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/CacheContextsManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\RequestFormatCacheContext\\:\\:getCacheableMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\RequestFormatCacheContext\\:\\:getContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\RequestFormatCacheContext\\:\\:getLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\SessionCacheContext\\:\\:getContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/SessionCacheContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\Context\\\\SessionCacheContext\\:\\:getLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/Context/SessionCacheContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:doSetMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:ensureBinExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:doInvalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:ensureTableExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:getDatabaseConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:getTagInvalidationCounts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:rootTransactionEndCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\DatabaseCacheTagsChecksum\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryCache\\\\MemoryCache\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryCache/MemoryCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryCounterBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryCounterBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryCounterBackend\\:\\:increaseCounter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryCounterBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryCounterBackend\\:\\:resetCounter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryCounterBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\MemoryCounterBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/MemoryCounterBackend.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Core\\\\Cache\\\\NullBackend has an unused parameter \\$bin\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\NullBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/NullBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:invalidateByHash\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:writeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cache/PhpBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Command\\\\DbDumpCommand\\:\\:getTableCollation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Command/DbDumpCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Command\\\\DbDumpCommand\\:\\:getTableIndexes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Command/DbDumpCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Command\\\\DbImportCommand\\:\\:runScript\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Command/DbImportCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Command\\\\ServerCommand\\:\\:openBrowser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Command/ServerCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Composer\\\\Composer\\:\\:preAutoloadDump\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Composer/Composer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Composer\\\\Composer\\:\\:upgradePHPUnit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Composer/Composer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionInterface\\:\\:setExecutableManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionInterface\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionManager\\:\\:getDefinitionsForContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionManager\\:\\:getType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionPluginBase\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionPluginBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionPluginBase\\:\\:setExecutableManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionPluginBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Condition\\\\ConditionPluginBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Condition/ConditionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Action\\\\Plugin\\\\ConfigAction\\\\Deriver\\\\EntityCreateDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityCreateDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Action\\\\Plugin\\\\ConfigAction\\\\Deriver\\\\EntityCreateDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityCreateDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Action\\\\Plugin\\\\ConfigAction\\\\Deriver\\\\EntityMethodDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Action\\\\Plugin\\\\ConfigAction\\\\Deriver\\\\EntityMethodDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\CachedStorage\\:\\:resetListCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/CachedStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigBase\\:\\:validateKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigBase\\:\\:validateName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigCollectionInfo\\:\\:addCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigCollectionInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactory\\:\\:addOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactory\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactory\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactory\\:\\:propagateConfigOverrideCacheability\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryInterface\\:\\:addOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryOverrideBase\\:\\:addCollections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryOverrideBase\\:\\:filterOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryOverrideBase\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryOverrideBase\\:\\:onConfigRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigFactoryOverrideBase\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImportValidateEventSubscriberBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImportValidateEventSubscriberBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImportValidateEventSubscriberBase\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:createExtensionChangelist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:doSyncStep\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:finish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:importConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:logError\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:processConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:processConfigurations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:processExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:processExtensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:processMissingContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:reInjectMe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:setProcessedConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:setProcessedExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigImporter\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigImporter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstaller\\:\\:checkConfigurationToInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstaller\\:\\:createConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstaller\\:\\:installCollectionDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstaller\\:\\:installDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstaller\\:\\:installOptionalConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstallerInterface\\:\\:checkConfigurationToInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstallerInterface\\:\\:installCollectionDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstallerInterface\\:\\:installDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigInstallerInterface\\:\\:installOptionalConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManager\\:\\:createSnapshot\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManager\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManager\\:\\:uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManagerInterface\\:\\:createSnapshot\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ConfigManagerInterface\\:\\:uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ConfigManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\DatabaseStorage\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Development\\\\ConfigSchemaChecker\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:addDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:invalidateTagsOnDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:invalidateTagsOnSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:setUninstalling\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBase\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBundleBase\\:\\:deleteDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBundleBase\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBundleBase\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityBundleBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:doDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:importCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:importDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:importRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:importUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityStorage\\:\\:invokeHook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityType\\:\\:checkStorageClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityUpdater\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityUpdater\\:\\:doOne\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\DraggableListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\DraggableListBuilder\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ImportableEntityStorageInterface\\:\\:importCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ImportableEntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ImportableEntityStorageInterface\\:\\:importDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ImportableEntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ImportableEntityStorageInterface\\:\\:importRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ImportableEntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\ImportableEntityStorageInterface\\:\\:importUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/ImportableEntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\Condition\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:deleteConfigKeyStore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:updateConfigKeyStore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ExportStorageManager\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ExportStorageManager.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$theme_list might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ExtensionInstallStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\FileStorage\\:\\:ensureStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/FileStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\ImportStorageTransformer\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/ImportStorageTransformer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Importer\\\\ConfigImporterBatch\\:\\:finish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Importer\\\\ConfigImporterBatch\\:\\:process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Importer\\\\FinalMissingContentSubscriber\\:\\:onMissingContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\InstallStorage\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/InstallStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Plugin\\\\Validation\\\\Constraint\\\\ConfigExistsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Plugin/Validation/Constraint/ConfigExistsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Plugin\\\\Validation\\\\Constraint\\\\RequiredConfigDependenciesConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Plugin/Validation/Constraint/RequiredConfigDependenciesConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\Schema\\\\ArrayElement\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/Schema/ArrayElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorableConfigBase\\:\\:validateValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorableConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageCacheInterface\\:\\:resetListCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:addChangeList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:addChangelistCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:addChangelistDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:addChangelistRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:addChangelistUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:getAndSortConfigData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:moveRenameToUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparer\\:\\:removeFromChangelist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\StorageComparerInterface\\:\\:moveRenameToUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/StorageComparerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\TypedConfigManager\\:\\:alterDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/TypedConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Config\\\\TypedConfigManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Config/TypedConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Controller\\\\ControllerBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Controller/ControllerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Controller\\\\ControllerBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Controller/ControllerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Controller\\\\ControllerBase\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Controller/ControllerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Controller\\\\TitleResolver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Controller/TitleResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Controller\\\\TitleResolver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Controller/TitleResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\CoreServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/CoreServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\CoreServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/CoreServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\CoreServiceProvider\\:\\:registerTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/CoreServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cron\\:\\:invokeCronHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cron.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cron\\:\\:processQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cron.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cron\\:\\:processQueues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cron.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Cron\\:\\:setCronLastTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Cron.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:commitAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:createDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:setKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:setLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:setPrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Connection\\:\\:setTarget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$statement might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:addConnectionInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:closeConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:ignoreTarget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:openConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:parseConnectionInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Database\\:\\:setMultipleConnectionInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Database.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Install\\\\Tasks\\:\\:checkEngineVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Install\\\\Tasks\\:\\:checkJsonSupport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Install\\\\Tasks\\:\\:fail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Install\\\\Tasks\\:\\:pass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Install\\\\Tasks\\:\\:runTestQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Log\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Log.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Log\\:\\:end\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Log.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Log\\:\\:start\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Log.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Condition\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\ConditionInterface\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/ConditionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Delete\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Delete.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Delete\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Delete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Merge\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Merge.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\PagerSelectExtender\\:\\:element\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/PagerSelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\PagerSelectExtender\\:\\:ensureElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/PagerSelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\PagerSelectExtender\\:\\:limit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/PagerSelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\PagerSelectExtender\\:\\:setCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/PagerSelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\PlaceholderInterface\\:\\:uniqueIdentifier\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/PlaceholderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Query\\:\\:uniqueIdentifier\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Query.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Select\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Select.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Select\\:\\:havingCompile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Select.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\SelectExtender\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/SelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\SelectExtender\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/SelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\SelectExtender\\:\\:havingCompile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/SelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\SelectExtender\\:\\:uniqueIdentifier\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/SelectExtender.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\SelectInterface\\:\\:havingCompile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/SelectInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Query\\\\Update\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Update.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$affected_rows might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Query/Upsert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\ReplicaKillSwitch\\:\\:checkReplicaServer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/ReplicaKillSwitch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\ReplicaKillSwitch\\:\\:trigger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/ReplicaKillSwitch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:addPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:changeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:createTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:ensureNotNullPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:prefixNonTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:renameTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:uniqueIdentifier\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\StatementInterface\\:\\:setFetchMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/StatementInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\StatementPrefetchIterator\\:\\:fetchColumn\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/StatementPrefetchIterator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\StatementPrefetchIterator\\:\\:setFetchMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/StatementPrefetchIterator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\StatementWrapperIterator\\:\\:setFetchMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/StatementWrapperIterator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Transaction\\:\\:name\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Transaction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Database\\\\Transaction\\:\\:rollBack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Database/Transaction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\DateFormatter\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/DateFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\DateFormatter\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/DateFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\DrupalDateTime\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/DrupalDateTime.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\DrupalDateTime\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/DrupalDateTime.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\Element\\\\Datelist\\:\\:validateDatelist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/Element/Datelist.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\Element\\\\Datetime\\:\\:validateDatetime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/Element/Datetime.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Datetime\\\\Entity\\\\DateFormat\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Datetime/Entity/DateFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\Compiler\\\\TaggedHandlersPass\\:\\:processServiceCollectorPass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\Compiler\\\\TaggedHandlersPass\\:\\:processServiceIdCollectorPass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\ContainerInjectionInterface\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/ContainerInjectionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\ServiceModifierInterface\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/ServiceModifierInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\ServiceProviderBase\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/ServiceProviderBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\ServiceProviderBase\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/ServiceProviderBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\ServiceProviderInterface\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\YamlFileLoader\\:\\:load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\YamlFileLoader\\:\\:parseDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DependencyInjection\\\\YamlFileLoader\\:\\:parseDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DestructableInterface\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DestructableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_added\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_block_header\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_changed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_context\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_deleted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_end_diff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_lines\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_start_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Diff\\\\DiffFormatter\\:\\:_start_diff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Diff/DiffFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:setWeight\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Display\\\\VariantInterface\\:\\:setWeight\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Display/VariantInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:addServiceFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:bootEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:classLoaderAddMultiplePsr4\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:discoverServiceProviders\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:getServicesToPersist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:initializeRequestGlobals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:initializeServiceProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:initializeSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:invalidateContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:loadLegacyIncludes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:persistServices\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:preHandle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:setSitePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:shutdown\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernel\\:\\:updateModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$container might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$container_definition might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:invalidateContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:loadLegacyIncludes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:preHandle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:setSitePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:shutdown\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\DrupalKernelInterface\\:\\:updateModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/DrupalKernelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Annotation\\\\ConfigEntityType\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Annotation\\\\ContentEntityType\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Annotation\\\\EntityType\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Annotation/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Annotation\\\\EntityType\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Annotation/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Annotation\\\\EntityType\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Annotation/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:__get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:clearTranslationCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:getLanguages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:preSaveRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:removeTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:setDefaultLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:updateFieldLangcodes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityBase\\:\\:updateOriginalValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:addDependencyListsToForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:getDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:traitGetCancelUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:traitGetQuestion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityDeleteForm\\:\\:traitLogDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:addRevisionableFormFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:flagViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:initFormLangcodes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:updateChangedTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityForm\\:\\:updateFormLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doDeleteFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doDeleteRevisionFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doLoadMultiple\\(\\) should return array\\<Drupal\\\\Core\\\\Entity\\\\EntityInterface\\> but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doSave\\(\\) should return bool\\|int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:doSaveFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:has\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityNullStorage\\:\\:purgeFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityNullStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:doDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:doDeleteFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:doDeleteRevisionFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:doPostSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:doSaveFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:finalizePurge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:initFieldValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:invokeFieldPostSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:invokeHook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:invokeStorageLoadHook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:invokeTranslationHooks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:populateAffectedRevisionTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:purgeFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityStorageBase\\:\\:setPersistentCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$current_affected in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityType\\:\\:checkStorageClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentEntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\ContentUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/ContentUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityController.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:deleteTitle\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityRevisionViewController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityRevisionViewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityRevisionViewController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityRevisionViewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityRevisionViewController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityRevisionViewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityViewController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Controller/EntityViewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Display\\\\EntityFormDisplayInterface\\:\\:buildForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Display\\\\EntityFormDisplayInterface\\:\\:flagWidgetsErrorsFromViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Display\\\\EntityFormDisplayInterface\\:\\:validateFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Element\\\\EntityAutocomplete\\:\\:validateEntityAutocomplete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Enhancer\\\\EntityBundleRouteEnhancer\\:\\:applies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Enhancer/EntityBundleRouteEnhancer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Entity\\\\EntityFormDisplay\\:\\:buildForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Entity\\\\EntityFormDisplay\\:\\:flagWidgetsErrorsFromViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Entity\\\\EntityFormDisplay\\:\\:processForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Entity\\\\EntityFormDisplay\\:\\:validateFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$candidate_ids might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Entity\\\\EntityViewDisplay\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityAccessControlHandler\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityAccessControlHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityAccessControlHandlerInterface\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$string in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:\\$id\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:invalidateTagsOnDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:invalidateTagsOnSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBundleListener\\:\\:onBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBundleListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBundleListener\\:\\:onBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBundleListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBundleListenerInterface\\:\\:onBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityBundleListenerInterface\\:\\:onBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityBundleListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConfirmFormBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConstraintViolationList\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConstraintViolationList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConstraintViolationList\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConstraintViolationList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityConstraintViolationList\\:\\:groupViolationOffsets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityConstraintViolationList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:installEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:installFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:installFieldableEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:uninstallEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:uninstallFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:updateEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:updateFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManager\\:\\:updateFieldableEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:installEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:installFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:installFieldableEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:uninstallEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:uninstallFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:updateEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:updateFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDefinitionUpdateManagerInterface\\:\\:updateFieldableEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDefinitionUpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDeleteForm\\:\\:addDependencyListsToForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:\\$_serializedKeys\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:getFieldDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:getFieldDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayModeBase\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayModeBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayModeBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayModeBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayModeBase\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayModeBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayRepository\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayRepository\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityDisplayRepository\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityDisplayRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManager\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManager\\:\\:clearCachedFieldDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManager\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManagerInterface\\:\\:clearCachedFieldDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityFieldManagerInterface\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:actionsElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:afterBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:prepareInvokeAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:processForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityHandlerBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityHandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityHandlerBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityHandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepository\\:\\:deleteLastInstalledFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepository\\:\\:setLastInstalledFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepository\\:\\:setLastInstalledFieldStorageDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepositoryInterface\\:\\:deleteLastInstalledFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepositoryInterface\\:\\:setLastInstalledFieldStorageDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityLastInstalledSchemaRepositoryInterface\\:\\:setLastInstalledFieldStorageDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityListBuilder\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityListBuilder\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityReferenceSelection\\\\SelectionInterface\\:\\:entityQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityReferenceSelection\\\\SelectionPluginBase\\:\\:entityQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityReferenceSelection\\\\SelectionPluginBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityReferenceSelection\\\\SelectionPluginBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityReferenceSelection\\\\SelectionPluginBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityResolverManager\\:\\:setParametersFromEntityInformation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityResolverManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityResolverManager\\:\\:setRouteOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityResolverManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:buildPropertyQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:doDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:doPostSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:invokeHook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:restore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageBase\\:\\:setStaticCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:\\:restore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityType\\:\\:checkStorageClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityType\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityType\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeBundleInfo\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeBundleInfo\\:\\:clearCachedBundles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeBundleInfoInterface\\:\\:clearCachedBundles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListener\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListenerInterface\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListenerInterface\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListenerInterface\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListenerInterface\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeListenerInterface\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeManager\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeRepository\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityTypeRepository\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityTypeRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilder\\:\\:addContextualLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilder\\:\\:alterBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilder\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilderInterface\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\EntityViewBuilderInterface\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Event\\\\BundleConfigImportValidate\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Event/BundleConfigImportValidate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\FieldableEntityInterface\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/FieldableEntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\FieldableEntityStorageInterface\\:\\:finalizePurge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\DeleteMultipleForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\DeleteMultipleForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\RevisionDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/RevisionDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\RevisionDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/RevisionDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\RevisionRevertForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/RevisionRevertForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Form\\\\RevisionRevertForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Form/RevisionRevertForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:createTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:createWithSampleValues\\(\\) should return Drupal\\\\Core\\\\Entity\\\\FieldableEntityInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:hasStoredTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueEntityStorage\\:\\:doDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Condition\\\\EntityBundle\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Condition\\\\EntityBundle\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\DataType\\\\ConfigEntityAdapter\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\DataType\\\\EntityAdapter\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\DataType\\\\EntityAdapter\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\DataType\\\\EntityReference\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Derivative\\\\DefaultSelectionDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Derivative/DefaultSelectionDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Derivative\\\\DefaultSelectionDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Derivative/DefaultSelectionDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\EntityReferenceSelection\\\\DefaultSelection\\:\\:elementValidateFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\EntityReferenceSelection\\\\DefaultSelection\\:\\:reAlterQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\EntityReferenceSelection\\\\DefaultSelection\\:\\:validateTargetBundles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\EntityReferenceSelection\\\\DefaultSelection\\:\\:validateTargetBundlesUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Validation\\\\Constraint\\\\EntityUntranslatableFieldsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Plugin\\\\Validation\\\\Constraint\\\\ValidReferenceConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\ConditionAggregateInterface\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\ConditionFundamentals\\:\\:conditions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\ConditionFundamentals\\:\\:getConjunction\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\ConditionInterface\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/ConditionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\ConditionInterface\\:\\:count\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/ConditionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\Null\\\\Condition\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Null/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:aggregate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:conditionAggregate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:getClass\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:groupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:initializePager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:sortAggregate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/QueryBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\Sql\\\\Condition\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\Sql\\\\Condition\\:\\:translateCondition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\Sql\\\\ConditionAggregate\\:\\:compile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/ConditionAggregate.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$next_index_prefix might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Tables.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined 'message' => '#^Variable \\$relationship_specifier might not be defined\\.$#', 'count' => 5, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Tables.php', + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/Tables.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\Sql\\\\pgsql\\\\Condition\\:\\:translateCondition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\RevisionableInterface\\:\\:preSaveRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/RevisionableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\RevisionableInterface\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/RevisionableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\RevisionableStorageInterface\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/RevisionableStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Schema\\\\DynamicallyFieldableEntityStorageSchemaInterface\\:\\:finalizePurge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Schema/DynamicallyFieldableEntityStorageSchemaInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:buildPropertyQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:deleteFromDedicatedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:deleteRevisionFromDedicatedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:doDeleteFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:doDeleteRevisionFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:doSaveFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:finalizePurge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:initTableLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:loadFromDedicatedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:loadFromSharedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:purgeFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:restore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:saveToDedicatedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:saveToSharedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:setEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:setFieldStorageDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:setTableMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:setTemporary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorage\\:\\:wrapSchemaException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$revision_query might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addSharedTableFieldForeignKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addSharedTableFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addSharedTableFieldUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addTableDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:copyData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:createDedicatedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:createEntitySchemaIndexes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:createSharedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:deleteDedicatedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:deleteEntitySchemaData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:deleteEntitySchemaIndexes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:deleteFieldSchemaData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:deleteSharedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:finalizePurge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:handleEntityTypeSchemaUpdateExceptionOnDataCopy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:performFieldSchemaOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:postUpdateEntityTypeSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:preUpdateEntityTypeSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:processDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:processFieldStorageSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:processIdentifierSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:processRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:saveEntitySchemaData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:saveFieldSchemaData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:traitOnFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:updateDedicatedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:updateSharedTableSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$initial_storage_value in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ActiveLinkResponseFilter\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AjaxResponseSubscriber\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AjaxResponseSubscriber\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AnonymousUserResponseSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AuthenticationSubscriber\\:\\:onExceptionAccessDenied\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AuthenticationSubscriber\\:\\:onExceptionSendChallenge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AuthenticationSubscriber\\:\\:onKernelRequestAuthenticate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\AuthenticationSubscriber\\:\\:onKernelRequestFilterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\CacheRouterRebuildSubscriber\\:\\:onRouterFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ClientErrorResponseSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ClientErrorResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ConfigImportSubscriber\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ConfigImportSubscriber\\:\\:validateDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ConfigImportSubscriber\\:\\:validateModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ConfigImportSubscriber\\:\\:validateThemes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ConfigSnapshotSubscriber\\:\\:onConfigImporterImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\CustomPageExceptionHtmlSubscriber\\:\\:makeSubrequestToCustomPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\CustomPageExceptionHtmlSubscriber\\:\\:on403\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\CustomPageExceptionHtmlSubscriber\\:\\:on404\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\DefaultExceptionHtmlSubscriber\\:\\:makeSubrequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\DefaultExceptionHtmlSubscriber\\:\\:on401\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\DefaultExceptionHtmlSubscriber\\:\\:on403\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\DefaultExceptionHtmlSubscriber\\:\\:on404\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\DefaultExceptionHtmlSubscriber\\:\\:on4xx\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\EarlyRenderingControllerWrapperSubscriber\\:\\:onController\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\EnforcedFormResponseSubscriber\\:\\:onKernelException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\EnforcedFormResponseSubscriber\\:\\:onKernelResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\EntityRouteAlterSubscriber\\:\\:onRoutingRouteAlterSetType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\EntityRouteProviderSubscriber\\:\\:onDynamicRouteEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionDetectNeedsInstallSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionJsonSubscriber\\:\\:on4xx\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionLoggingSubscriber\\:\\:on403\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionLoggingSubscriber\\:\\:on404\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionLoggingSubscriber\\:\\:onClientError\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionLoggingSubscriber\\:\\:onError\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExceptionLoggingSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExcludedModulesEventSubscriber\\:\\:onConfigTransformExport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ExcludedModulesEventSubscriber\\:\\:onConfigTransformImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\Fast404ExceptionHtmlSubscriber\\:\\:on404\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/Fast404ExceptionHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinalExceptionSubscriber\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinalExceptionSubscriber\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinalExceptionSubscriber\\:\\:on4xx\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinalExceptionSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:onAllResponds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:setCacheControlNoCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:setExpiresNoCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:setResponseCacheable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:setResponseNotCacheable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\HtmlResponsePlaceholderStrategySubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\HtmlResponseSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\HttpExceptionSubscriberBase\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MainContentViewSubscriber\\:\\:onViewRenderArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MaintenanceModeSubscriber\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MaintenanceModeSubscriber\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MaintenanceModeSubscriber\\:\\:onKernelRequestMaintenance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MaintenanceModeSubscriber\\:\\:onMaintenanceModeRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MenuRouterRebuildSubscriber\\:\\:menuLinksRebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\MenuRouterRebuildSubscriber\\:\\:onRouterRebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ModuleRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\OptionsRequestSubscriber\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ParamConverterSubscriber\\:\\:onRoutingRouteAlterSetParameterConverters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\PathRootsSubscriber\\:\\:onRouteAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\PathRootsSubscriber\\:\\:onRouteFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\PsrResponseSubscriber\\:\\:onKernelView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RedirectLeadingSlashesSubscriber\\:\\:redirect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RedirectLeadingSlashesSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriber\\:\\:checkRedirectUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriber\\:\\:setIgnoreDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RenderArrayNonHtmlSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\ResponseGeneratorSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/ResponseGeneratorSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RouteAccessResponseSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RouteAccessResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RouteMethodSubscriber\\:\\:onRouteBuilding\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\RssResponseRelativeUrlFilter\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\SpecialAttributesRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\EventSubscriber\\\\SpecialAttributesRouteSubscriber\\:\\:onAlterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Executable\\\\ExecutableInterface\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Executable/ExecutableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Executable\\\\ExecutablePluginBase\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Executable/ExecutablePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\DatabaseDriverList\\:\\:setPathname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/DatabaseDriverList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\DatabaseDriverUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/DatabaseDriverUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\DatabaseDriverUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/DatabaseDriverUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ExtensionList\\:\\:setPathname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$minor_version might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ExtensionVersion.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\InstallProfileUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\InstallProfileUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleExtensionList\\:\\:ensureRequiredDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleExtensionList\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleExtensionList\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:add\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:addModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:addProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:alterDeprecated\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:loadAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:loadAllIncludes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:reload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:resetImplementations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:setModuleList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:triggerDeprecationError\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandler\\:\\:writeCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:addModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:addProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:alterDeprecated\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:loadAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:loadAllIncludes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:reload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:resetImplementations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:setModuleList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleHandlerInterface\\:\\:writeCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleInstaller\\:\\:addUninstallValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleInstaller\\:\\:removeCacheBins\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleInstaller\\:\\:updateKernel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstaller.php', +]; +$ignoreErrors[] = [ + 'message' => '#^The "module_installer\\.uninstall_validators" service is deprecated in drupal\\:11\\.1\\.0 and is removed from drupal\\:12\\.0\\.0\\. Inject "\\!tagged_iterator module_install\\.uninstall_validator" instead\\. See https\\://www\\.drupal\\.org/node/3432595$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleInstallerInterface\\:\\:addUninstallValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleRequiredByThemesUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ModuleRequiredByThemesUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\Plugin\\\\Validation\\\\Constraint\\\\ExtensionExistsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/Plugin/Validation/Constraint/ExtensionExistsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\RequiredModuleUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\RequiredModuleUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeExtensionList\\:\\:fillInSubThemeData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandler\\:\\:addTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandler\\:\\:refreshInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandler\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandlerInterface\\:\\:addTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandlerInterface\\:\\:refreshInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeHandlerInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeInstaller\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeInstaller\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeInstaller\\:\\:resetSystem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeInstaller\\:\\:uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Extension\\\\ThemeInstallerInterface\\:\\:uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ThemeInstallerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\BaseFieldDefinition\\:\\:setDefaultValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/BaseFieldDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\BaseFieldDefinition\\:\\:setDefaultValueCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/BaseFieldDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Entity\\\\BaseFieldOverride\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Entity\\\\BaseFieldOverride\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldConfigBase\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldConfigBase\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldConfigBase\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$callback in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListener\\:\\:onFieldDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListener\\:\\:onFieldDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListener\\:\\:onFieldDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListenerInterface\\:\\:onFieldDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListenerInterface\\:\\:onFieldDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldDefinitionListenerInterface\\:\\:onFieldDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:generateSampleValue\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:writePropertyValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemInterface\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemInterface\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:__get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:generateSampleItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$values might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:__get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:generateSampleItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemListInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListener\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListener\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListener\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListenerInterface\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListenerInterface\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldStorageDefinitionListenerInterface\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: class.notFound + 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldTypePluginManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldTypePluginManager\\:\\:getGroupedDefinitionsTrait\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldTypePluginManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldTypePluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldTypePluginManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldUpdateActionBase\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldUpdateActionBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FormatterBase\\:\\:prepareView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FormatterBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FormatterInterface\\:\\:prepareView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/FormatterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldFormatter\\\\EntityReferenceFormatterBase\\:\\:prepareView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\ChangedItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/ChangedItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\DecimalItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:fieldSettingsAjaxProcess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:fieldSettingsAjaxProcessElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:fieldSettingsFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:formProcessMergeParent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:generateSampleValue\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:settingsAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\LanguageItem\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\LanguageItem\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\MapItem\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\NumericItemBase\\:\\:\\$value\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\PasswordItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsSelectWidget\\:\\:sanitizeLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:sanitizeLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:validateElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\PluginSettingsBase\\:\\:mergeDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/PluginSettingsBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:addMoreAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:addMoreSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:afterBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:deleteAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:deleteSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:extractFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:flagErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:formMultipleElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:formSingleElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBase\\:\\:setWidgetState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBaseInterface\\:\\:extractFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBaseInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBaseInterface\\:\\:flagErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBaseInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\WidgetBaseInterface\\:\\:setWidgetState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Field/WidgetBaseInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystem\\:\\:basename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystem\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystem\\:\\:deleteRecursive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystem\\:\\:mkdirCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystem\\:\\:prepareDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystemInterface\\:\\:basename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystemInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\FileSystemInterface\\:\\:deleteRecursive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/FileSystemInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\HtaccessWriter\\:\\:ensure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/HtaccessWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\HtaccessWriterInterface\\:\\:ensure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/HtaccessWriterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\MimeType\\\\ExtensionMimeTypeGuesser\\:\\:setMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\File\\\\MimeType\\\\MimeTypeGuesser\\:\\:registerWithSymfonyGuesser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\ChmodInterface\\:\\:chmodJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/ChmodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:chmodJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:connect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:copyFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:createDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:removeDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FTPExtension\\:\\:removeFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FTPExtension.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:__get\\(\\) should return bool\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:checkPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:chmod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:connect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:copyDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:copyDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:copyFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:copyFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:createDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:createDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:removeDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:removeDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:removeFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:removeFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:setChroot\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Form\\\\FileTransferAuthorizeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Form\\\\FileTransferAuthorizeForm\\:\\:setConnectionSettingsDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Form\\\\FileTransferAuthorizeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Form\\\\FileTransferAuthorizeForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:chmodJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:connect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:copyFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:createDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:removeDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\Local\\:\\:removeFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/Local.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:chmodJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:connect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:copyDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:copyFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:createDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:removeDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\SSH\\:\\:removeFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/SSH.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:doInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:ensureTableExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\DatabaseBackend\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/DatabaseBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\FloodInterface\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/FloodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\FloodInterface\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/FloodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\FloodInterface\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/FloodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\MemoryBackend\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\MemoryBackend\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Flood\\\\MemoryBackend\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Flood/MemoryBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\ConfigFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/ConfigFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\ConfigFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/ConfigFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\ConfigFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/ConfigFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\EventSubscriber\\\\FormAjaxSubscriber\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\EventSubscriber\\\\FormAjaxSubscriber\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\EventSubscriber\\\\FormAjaxSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\EventSubscriber\\\\FormAjaxSubscriber\\:\\:onView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:resetConfigFactory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:buttonWasClicked\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:deleteCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:elementTriggeredScriptedSubmission\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:executeSubmitHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:executeValidateHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:getCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:handleInputElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:prepareForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:setCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:setInvalidTokenError\\(\\) should return \\$this\\(Drupal\\\\Core\\\\Form\\\\FormBuilder\\) but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$form_id in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$input in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilderInterface\\:\\:prepareForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilderInterface\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCache\\:\\:deleteCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCache\\:\\:getCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCache\\:\\:loadCachedFormState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCache\\:\\:setCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$form in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCacheInterface\\:\\:deleteCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCacheInterface\\:\\:getCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormCacheInterface\\:\\:setCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCacheInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormErrorHandler\\:\\:displayErrorMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormErrorHandler\\:\\:setElementErrorsFromFormState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormErrorHandler\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormHelper\\:\\:processStates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormHelper\\:\\:processStatesArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormHelper\\:\\:rewriteStatesSelector\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormInterface\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormInterface\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormState\\:\\:clearErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormState\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormState\\:\\:hasTemporaryValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormState\\:\\:moduleLoadInclude\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormState\\:\\:setAnyErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateDecoratorBase\\:\\:clearErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateDecoratorBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateDecoratorBase\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateDecoratorBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateDecoratorBase\\:\\:hasTemporaryValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateDecoratorBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateInterface\\:\\:clearErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateInterface\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormStateInterface\\:\\:hasTemporaryValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormStateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormSubmitter\\:\\:batchGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormSubmitter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormSubmitter\\:\\:executeSubmitHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormSubmitter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormSubmitterInterface\\:\\:executeSubmitHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormSubmitterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:doValidateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:executeValidateHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:finalizeValidation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:handleErrorsWithLimitedValidation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:performRequiredValidation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:setInvalidTokenError\\(\\) should return \\$this\\(Drupal\\\\Core\\\\Form\\\\FormValidator\\) but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$is_empty_multiple might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$is_empty_null might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$is_empty_string might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidatorInterface\\:\\:executeValidateHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidatorInterface\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\OptGroup\\:\\:doFlattenOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Form/OptGroup.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Http\\\\HandlerStackConfigurator\\:\\:configure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Http/HandlerStackConfigurator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Http\\\\HandlerStackConfigurator\\:\\:initializeMiddlewares\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Http/HandlerStackConfigurator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ImageToolkit\\\\ImageToolkitBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\ConfigOverride\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/ConfigOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Exception\\\\InstallerException\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Exception/InstallerException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Exception\\\\InstallerException\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Exception/InstallerException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SelectLanguageForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SelectProfileForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SelectProfileForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteConfigureForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteConfigureForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteConfigureForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\Form\\\\SiteSettingsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerKernel\\:\\:resetConfigStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerModuleExtensionList\\:\\:setPathname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerModuleExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerThemeEngineExtensionList\\:\\:setPathname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerThemeEngineExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\InstallerThemeExtensionList\\:\\:setPathname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/InstallerThemeExtensionList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Installer\\\\NormalInstallerServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Installer/NormalInstallerServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:doSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:rename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorage\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorageExpirable\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorageExpirable\\:\\:doSetWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorageExpirable\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorageExpirable\\:\\:setMultipleWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\DatabaseStorageExpirable\\:\\:setWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueDatabaseExpirableFactory\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueDatabaseExpirableFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueDatabaseExpirableFactory\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueDatabaseExpirableFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreExpirableInterface\\:\\:setMultipleWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreExpirableInterface\\:\\:setWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:rename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\KeyValueStoreInterface\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:rename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\MemoryStorage\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/MemoryStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:rename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setIfNotExists\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setMultipleWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setWithExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setWithExpireIfNotExists\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\StorageBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/StorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\StorageBase\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/StorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Language\\\\ContextProvider\\\\CurrentLanguageContext\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Language\\\\ContextProvider\\\\CurrentLanguageContext\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Language\\\\Language\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Language/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Language\\\\LanguageDefault\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Language/LanguageDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\Annotation\\\\Layout\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/Annotation/Layout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutDefault\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutDefault.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutPluginManager\\:\\:getDefinitionsForContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutPluginManager\\:\\:getType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Layout\\\\LayoutPluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Layout/LayoutPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\DatabaseLockBackend\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\DatabaseLockBackend\\:\\:ensureTableExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\DatabaseLockBackend\\:\\:release\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\DatabaseLockBackend\\:\\:releaseAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\DatabaseLockBackend\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\LockBackendInterface\\:\\:release\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/LockBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\LockBackendInterface\\:\\:releaseAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/LockBackendInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\NullLockBackend\\:\\:release\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/NullLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\NullLockBackend\\:\\:releaseAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/NullLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\NullLockBackend\\:\\:wait\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Lock/NullLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannel\\:\\:addLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannel\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannel\\:\\:setLoggers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannel\\:\\:setRequestStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelFactory\\:\\:addLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelFactory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelFactoryInterface\\:\\:addLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelInterface\\:\\:addLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelInterface\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelInterface\\:\\:setLoggers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Logger\\\\LoggerChannelInterface\\:\\:setRequestStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Logger/LoggerChannelInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailFormatHelper\\:\\:htmlToMailUrls\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailFormatHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailFormatHelper\\:\\:htmlToTextClean\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailFormatHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailFormatHelper\\:\\:wrapMailLine\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailFormatHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Mail\\\\MailManager\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Mail/MailManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\ContextualLinkManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/ContextualLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\ContextualLinkManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/ContextualLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\DefaultMenuLinkTreeManipulators\\:\\:collectNodeLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:setMenuLinkInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkDefaultForm\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$parent in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Form\\\\MenuLinkFormInterface\\:\\:setMenuLinkInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkFormInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\LocalActionManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/LocalActionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\LocalTaskManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/LocalTaskManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuActiveTrail\\:\\:doGetActiveTrailIds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkBase\\:\\:deleteLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkInterface\\:\\:deleteLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:deleteInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:deleteLinksInMenu\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:getInstance\\(\\) should return object\\|false but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:menuNameInUse\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:removeDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:resetDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManagerInterface\\:\\:deleteLinksInMenu\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManagerInterface\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManagerInterface\\:\\:removeDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManagerInterface\\:\\:resetDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuParentFormSelector\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuParentFormSelector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuParentFormSelector\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuParentFormSelector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuParentFormSelector\\:\\:parentSelectOptionsTreeWalk\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuParentFormSelector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:doBuildTreeData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:doDeleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:moveChildren\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:purgeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:resetDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:saveRecursive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:setParents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorage\\:\\:updateParentalStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorageInterface\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuTreeStorageInterface\\:\\:resetDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\Plugin\\\\Block\\\\LocalTasksBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverrides\\:\\:deleteMultipleOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverrides\\:\\:deleteOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverrides\\:\\:getConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverrides\\:\\:reload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverridesInterface\\:\\:deleteMultipleOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverridesInterface\\:\\:deleteOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\StaticMenuLinkOverridesInterface\\:\\:reload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PageCache\\\\RequestPolicy\\\\CommandLineOrUnsafeMethod\\:\\:isCli\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PageCache/RequestPolicy/CommandLineOrUnsafeMethod.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PageCache\\\\ResponsePolicy\\\\KillSwitch\\:\\:trigger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PageCache/ResponsePolicy/KillSwitch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Pager\\\\Pager\\:\\:setCurrentPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Pager/Pager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Pager\\\\Pager\\:\\:setTotalPages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Pager/Pager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Pager\\\\PagerManager\\:\\:setPager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Pager/PagerManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ParamConverter\\\\ParamConverterManager\\:\\:setRouteParameterConverters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ParamConverter/ParamConverterManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ParamConverter\\\\ParamConverterManagerInterface\\:\\:setRouteParameterConverters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ParamConverter/ParamConverterManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Path\\\\PathValidator\\:\\:getUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Path/PathValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Path\\\\Plugin\\\\Validation\\\\Constraint\\\\UniquePathAliasConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Path/Plugin/Validation/Constraint/UniquePathAliasConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Path\\\\Plugin\\\\Validation\\\\Constraint\\\\ValidPathConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PathProcessor\\\\PathProcessorManager\\:\\:addInbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PathProcessor/PathProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PathProcessor\\\\PathProcessorManager\\:\\:addOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PathProcessor/PathProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PathProcessor\\\\PathProcessorManager\\:\\:sortProcessors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PathProcessor/PathProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\CachedDiscoveryClearer\\:\\:addCachedDiscovery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\CachedDiscoveryClearer\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\CachedDiscoveryClearerInterface\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/CachedDiscoveryClearerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Context\\\\Context\\:\\:setContextValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Context/Context.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Context\\\\ContextDefinition\\:\\:getSampleValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Context/ContextDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Context\\\\ContextHandler\\:\\:applyContextMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Context/ContextHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Context\\\\ContextHandlerInterface\\:\\:applyContextMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Context\\\\EntityContextDefinition\\:\\:getSampleValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Context/EntityContextDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultLazyPluginCollection\\:\\:addInstanceId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultLazyPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultLazyPluginCollection\\:\\:removeInstanceId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultLazyPluginCollection\\:\\:setInstanceConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultLazyPluginCollection\\:\\:sortHelper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:alterDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:alterInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:setCacheBackend\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:setCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultPluginManager\\:\\:useCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultSingleLazyPluginCollection\\:\\:addInstanceId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\DefaultSingleLazyPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Discovery\\\\AnnotatedClassDiscovery\\:\\:prepareAnnotationDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Discovery\\\\InfoHookDecorator\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\Discovery\\\\YamlDiscoveryDecorator\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginBase\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginFormBase\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginFormBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginFormInterface\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginFormInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Plugin\\\\PluginFormInterface\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/PluginFormInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\PrivateKey\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/PrivateKey.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Batch\\\\BatchStorage\\:\\:cleanup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Batch\\\\BatchStorage\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Batch\\\\BatchStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Batch\\\\BatchStorage\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Batch\\\\BatchStorage\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Config\\\\ConfigInstaller\\:\\:checkConfigurationToInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Config\\\\ConfigInstaller\\:\\:installCollectionDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Config\\\\ConfigInstaller\\:\\:installDefaultConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Config\\\\ConfigInstaller\\:\\:installOptionalConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Extension\\\\ModuleInstaller\\:\\:addUninstallValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\File\\\\MimeType\\\\ExtensionMimeTypeGuesser\\:\\:setMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\File\\\\MimeType\\\\MimeTypeGuesser\\:\\:addMimeTypeGuesser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/File/MimeType/MimeTypeGuesser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\DatabaseLockBackend\\:\\:release\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\DatabaseLockBackend\\:\\:releaseAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\DatabaseLockBackend\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\PersistentDatabaseLockBackend\\:\\:release\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\PersistentDatabaseLockBackend\\:\\:releaseAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Lock\\\\PersistentDatabaseLockBackend\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Menu\\\\MenuActiveTrail\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Routing\\\\MatcherDumper\\:\\:addRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Routing\\\\RouteBuilder\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\ProxyClass\\\\Routing\\\\RouteBuilder\\:\\:setRebuildNeeded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:catchException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:createQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:deleteItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:deleteQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:ensureTableExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\DatabaseQueue\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/DatabaseQueue.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Core\\\\Queue\\\\Memory has an unused parameter \\$name\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/Memory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\Memory\\:\\:createQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/Memory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\Memory\\:\\:deleteItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/Memory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\Memory\\:\\:deleteQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/Memory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueGarbageCollectionInterface\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueGarbageCollectionInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueInterface\\:\\:createQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueInterface\\:\\:deleteItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueInterface\\:\\:deleteQueue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueWorkerInterface\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueWorkerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Queue\\\\QueueWorkerManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Queue/QueueWorkerManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\BubbleableMetadata\\:\\:applyTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/BubbleableMetadata.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\:\\:setAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Button\\:\\:processButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Button.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Checkbox\\:\\:processCheckbox\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Checkbox.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Checkboxes\\:\\:preRenderCompositeFormElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Checkboxes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Checkboxes\\:\\:processCheckboxes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Checkboxes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Color\\:\\:validateColor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Color.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Dropbutton\\:\\:preRenderDropbutton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Dropbutton.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\ElementInterface\\:\\:setAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/ElementInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Email\\:\\:validateEmail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Email.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\File\\:\\:processFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\FormElement\\:\\:setAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/FormElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\FormElement\\:\\:validatePattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/FormElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\FormElementBase\\:\\:validatePattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/FormElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\MachineName\\:\\:getTransliterationLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/MachineName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\MachineName\\:\\:validateMachineName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/MachineName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Number\\:\\:validateNumber\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Number.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\PasswordConfirm\\:\\:processPasswordConfirm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/PasswordConfirm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\PasswordConfirm\\:\\:validatePasswordConfirm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/PasswordConfirm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\PathElement\\:\\:validateMatchedPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/PathElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Radios\\:\\:preRenderCompositeFormElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Radios.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Radios\\:\\:processRadios\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Radios.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\RenderElement\\:\\:setAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\RenderElementBase\\:\\:setAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$sort in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Select\\:\\:preRenderSelect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Select.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\StatusReport\\:\\:preRenderGroupRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/StatusReport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Table\\:\\:validateTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Url\\:\\:validateUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Url.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Element\\\\Weight\\:\\:processWeight\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/Weight.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\ElementInfoManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/ElementInfoManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\HtmlResponseAttachmentsProcessor\\:\\:renderHtmlResponseAttachmentPlaceholders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\HtmlResponseAttachmentsProcessor\\:\\:setHeaders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$output in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\MainContent\\\\HtmlRenderer\\:\\:buildPageTopAndBottom\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\MainContent\\\\HtmlRenderer\\:\\:invokePageAttachmentHooks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$page_bottom in empty\\(\\) always exists and is always falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$page_top in empty\\(\\) always exists and is always falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\MetadataBubblingUrlGenerator\\:\\:bubble\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Placeholder\\\\ChainedPlaceholderStrategy\\:\\:addPlaceholderStrategy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Placeholder/ChainedPlaceholderStrategy.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\RenderContext\\:\\:bubble\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/RenderContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\RenderContext\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/RenderContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Renderer\\:\\:addCacheableDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Renderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Renderer\\:\\:doRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Renderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\Renderer\\:\\:renderPlain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Renderer.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$elements in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/Renderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\RendererInterface\\:\\:addCacheableDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/RendererInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Render\\\\RendererInterface\\:\\:renderPlain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Render/RendererInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\RouteProcessor\\\\OutboundRouteProcessorInterface\\:\\:processOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/RouteProcessor/OutboundRouteProcessorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\RouteProcessor\\\\RouteProcessorCurrent\\:\\:processOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\RouteProcessor\\\\RouteProcessorManager\\:\\:addOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/RouteProcessor/RouteProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\RouteProcessor\\\\RouteProcessorManager\\:\\:processOutbound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/RouteProcessor/RouteProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\RouteProcessor\\\\RouteProcessorManager\\:\\:sortProcessors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/RouteProcessor/RouteProcessorManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\AccessAwareRouter\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/AccessAwareRouter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\AccessAwareRouter\\:\\:checkAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/AccessAwareRouter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\CacheableRouteProviderInterface\\:\\:addExtraCacheKeyPart\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/CacheableRouteProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\CacheableSecuredRedirectResponse\\:\\:fromResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/CacheableSecuredRedirectResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\CurrentRouteMatch\\:\\:resetRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/CurrentRouteMatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\Enhancer\\\\ParamConversionEnhancer\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\MatcherDumper\\:\\:addRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/MatcherDumper.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/MatcherDumper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\MatcherDumperInterface\\:\\:addRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/MatcherDumperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\NullGenerator\\:\\:processPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/NullGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\NullGenerator\\:\\:processRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/NullGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\NullMatcherDumper\\:\\:addRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/NullMatcherDumper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\PreloadableRouteProviderInterface\\:\\:preLoadRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/PreloadableRouteProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RequestContext\\:\\:fromRequestStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RequestContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RequestContext\\:\\:getCompleteBaseUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RequestContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RequestContext\\:\\:setCompleteBaseUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RequestContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\ResettableStackedRouteMatchInterface\\:\\:resetRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/ResettableStackedRouteMatchInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteBuildEvent\\:\\:getRouteCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteBuildEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteBuilder\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteBuilder\\:\\:setRebuildNeeded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteBuilderInterface\\:\\:setRebuildNeeded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteBuilderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RoutePreloader\\:\\:onAlterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RoutePreloader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RoutePreloader\\:\\:onFinishedRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RoutePreloader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RoutePreloader\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RoutePreloader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProvider\\:\\:addExtraCacheKeyPart\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProvider\\:\\:preLoadRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProvider\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProvider\\:\\:routeProviderRouteCompare\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProviderInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProviderInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProviderLazyBuilder\\:\\:preLoadRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProviderLazyBuilder\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProviderLazyBuilder\\:\\:routerRebuildFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteProviderLazyBuilder\\:\\:routerRebuilding\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteSubscriberBase\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\RouteSubscriberBase\\:\\:onAlterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/RouteSubscriberBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\Router\\:\\:addRouteEnhancer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/Router.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\Router\\:\\:addRouteFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/Router.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\UrlGenerator\\:\\:isStrictRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/UrlGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\UrlGenerator\\:\\:processPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/UrlGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\UrlGenerator\\:\\:processRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/UrlGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\UrlGenerator\\:\\:setStrictRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/UrlGenerator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Routing\\\\UrlMatcher\\:\\:finalMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Routing/UrlMatcher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\AccountProxy\\:\\:setAccount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/AccountProxy.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\AccountProxy\\:\\:setInitialAccountId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/AccountProxy.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\AccountProxyInterface\\:\\:setAccount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/AccountProxyInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\AccountProxyInterface\\:\\:setInitialAccountId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/AccountProxyInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\MetadataBag\\:\\:setCsrfTokenSeed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/MetadataBag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManager\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManager\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManager\\:\\:setWriteSafeHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManagerInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManagerInterface\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\SessionManagerInterface\\:\\:setWriteSafeHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/SessionManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\WriteSafeSessionHandler\\:\\:setSessionWritable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/WriteSafeSessionHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Session\\\\WriteSafeSessionHandlerInterface\\:\\:setSessionWritable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Session/WriteSafeSessionHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Site\\\\Settings\\:\\:initialize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Site/Settings.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$current might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Site/SettingsEditor.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$index might not be defined\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/lib/Drupal/Core/Site/SettingsEditor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StackMiddleware\\\\ReverseProxyMiddleware\\:\\:setSettingsOnRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\State\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/State.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\State\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/State.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\State\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/State.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\State\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/State.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\State\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/State.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\StateInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/StateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\StateInterface\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/StateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\StateInterface\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/StateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\StateInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/StateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\State\\\\StateInterface\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/State/StateInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\AssetsStream\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/AssetsStream.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\AssetsStream\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/AssetsStream.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\LocalStream\\:\\:setUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/LocalStream.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\LocalStream\\:\\:stream_close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/LocalStream.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\PhpStreamWrapperInterface\\:\\:stream_close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\ReadOnlyStream\\:\\:setUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperInterface\\:\\:setUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperManager\\:\\:addStreamWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperManager\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperManager\\:\\:registerWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperManager\\:\\:unregister\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StreamWrapper\\\\StreamWrapperManagerInterface\\:\\:registerWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup\\:\\:_die\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StringTranslation\\\\TranslationManager\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StringTranslation/TranslationManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StringTranslation\\\\TranslationManager\\:\\:setDefaultLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StringTranslation/TranslationManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StringTranslation\\\\Translator\\\\StaticTranslation\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\StringTranslation\\\\Translator\\\\TranslatorInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TempStore\\\\PrivateTempStore\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TempStore/PrivateTempStore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TempStore\\\\SharedTempStore\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TempStore/SharedTempStore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TempStore\\\\SharedTempStore\\:\\:ensureAnonymousSession\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TempStore/SharedTempStore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TempStore\\\\SharedTempStore\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TempStore/SharedTempStore.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\Attribute\\:\\:storage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/Attribute.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\AttributeValueBase\\:\\:render\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/AttributeValueBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\AttributeValueBase\\:\\:value\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/AttributeValueBase.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Core\\\\Template\\\\TwigEnvironment has an unused parameter \\$root\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigEnvironment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigEnvironment\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigEnvironment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigExtension\\:\\:attachLibrary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigExtension\\:\\:bubbleArgMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigExtension\\:\\:getName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigTransTokenParser\\:\\:checkTransString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigTransTokenParser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigTransTokenParser\\:\\:decideForEnd\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigTransTokenParser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\TwigTransTokenParser\\:\\:decideForFork\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigTransTokenParser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Test\\\\HttpClientMiddleware\\\\TestHttpClientMiddleware\\:\\:__invoke\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Test\\\\PerformanceTestRecorder\\:\\:onRouteBuilderFinish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Test/PerformanceTestRecorder.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Core\\\\Test\\\\TestRunnerKernel has an unused parameter \\$allow_dumping\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Test/TestRunnerKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Component\\\\ComponentMetadata\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Component/ComponentMetadata.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Component\\\\ComponentMetadata\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Component/ComponentMetadata.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ComponentPluginManager\\:\\:alterDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ComponentPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:completeSuggestion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:mergePreprocessFunctions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:postProcessExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:processExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:setCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\Registry\\:\\:setThemeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/Registry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeInitialization\\:\\:loadActiveTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeInitialization.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeInitializationInterface\\:\\:loadActiveTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeInitializationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeManager\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeManager\\:\\:alterForTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeManager\\:\\:initTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$candidate might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$theme_engine in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeManagerInterface\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeManagerInterface\\:\\:alterForTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Transliteration\\\\PhpTransliteration\\:\\:readLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Transliteration/PhpTransliteration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\DataReferenceBase\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/DataReferenceBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\ListDataDefinition\\:\\:setDataType\\(\\) should return static\\(Drupal\\\\Core\\\\TypedData\\\\ListDataDefinition\\) but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/ListDataDefinition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\BinaryData\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\DateTimeIso8601\\:\\:setDateTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\DurationIso8601\\:\\:setDuration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\ItemList\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\ItemList\\:\\:rekey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\ItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Language\\:\\:id\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Language\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Map\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Map\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Map\\:\\:writePropertyValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\TimeSpan\\:\\:setDuration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Plugin\\\\DataType\\\\Timestamp\\:\\:setDateTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\PrimitiveBase\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/PrimitiveBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\PrimitiveInterface\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/PrimitiveInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TranslatableInterface\\:\\:removeTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TranslatableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TraversableTypedDataInterface\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Type\\\\DateTimeInterface\\:\\:setDateTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Type\\\\DurationInterface\\:\\:setDuration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Type/DurationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:\\$value\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:createInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataInterface\\:\\:createInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataInterface\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataInterface\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataManager\\:\\:setValidationConstraintManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataManager\\:\\:setValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataManagerInterface\\:\\:setValidationConstraintManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\TypedDataManagerInterface\\:\\:setValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\Validation\\\\RecursiveContextualValidator\\:\\:validateConstraints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$cache_key in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateBackend\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateBackend\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:bootSession\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:discoverServiceProviders\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:handleAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:setupRequestMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:shutdownSession\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateRegistry\\:\\:filterOutInvokedUpdatesByExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateRegistry\\:\\:loadUpdateFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateRegistry\\:\\:loadUpdateFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateRegistry\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateRegistry\\:\\:scanExtensionsAndLoadUpdateFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Module\\:\\:postUpdateTasks\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Module.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:getBackupDir\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:makeBackup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:makeWorldReadable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:postInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:postUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:prepareInstallDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Updater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\UpdaterInterface\\:\\:getProjectName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/UpdaterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\UpdaterInterface\\:\\:postInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/UpdaterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\UpdaterInterface\\:\\:postUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Updater/UpdaterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\ProjectInfo\\:\\:processInfoList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/ProjectInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\TableSort\\:\\:header\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/TableSort.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\ThemeRegistry\\:\\:has\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/ThemeRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\ThemeRegistry\\:\\:updateCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/ThemeRegistry.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\Token\\:\\:resetInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/Token.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\Token\\:\\:setInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/Token.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\UnroutedUrlAssembler\\:\\:addOptionDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\UnroutedUrlAssembler\\:\\:buildExternalUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Utility\\\\UnroutedUrlAssembler\\:\\:buildLocalUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\ConstraintManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/ConstraintManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\ConstraintManager\\:\\:registerDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/ConstraintManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\DrupalTranslator\\:\\:getLocale\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/DrupalTranslator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\DrupalTranslator\\:\\:getOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/DrupalTranslator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\DrupalTranslator\\:\\:processParameters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/DrupalTranslator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\DrupalTranslator\\:\\:setLocale\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/DrupalTranslator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\DrupalTranslator\\:\\:transChoice\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/DrupalTranslator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\Plugin\\\\Validation\\\\Constraint\\\\AllowedValuesConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\Plugin\\\\Validation\\\\Constraint\\\\EntityBundleExistsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EntityBundleExistsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Core\\\\Validation\\\\Plugin\\\\Validation\\\\Constraint\\\\UniqueFieldValueValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldValueValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\AnnounceRenderer\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/AnnounceRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\AnnounceRenderer\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/AnnounceRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\Hook\\\\AnnouncementsFeedHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\Hook\\\\AnnouncementsFeedHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\Hook\\\\AnnouncementsFeedHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\announcements_feed\\\\Hook\\\\AnnouncementsFeedHooks\\:\\:toolbarAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\announcements_feed\\\\Kernel\\\\AnnounceFetcherUserTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\announcements_feed\\\\Kernel\\\\AnnounceFetcherUserTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function automated_cron_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/automated_cron/automated_cron.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\automated_cron\\\\EventSubscriber\\\\AutomatedCron\\:\\:onTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/automated_cron/src/EventSubscriber/AutomatedCron.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\automated_cron\\\\Hook\\\\AutomatedCronHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/automated_cron/src/Hook/AutomatedCronHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ban_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/ban.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\BanIpManager\\:\\:banIp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/BanIpManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\BanIpManager\\:\\:unbanIp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/BanIpManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\BanIpManagerInterface\\:\\:banIp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/BanIpManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\BanIpManagerInterface\\:\\:unbanIp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/BanIpManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Form\\\\BanAdmin\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Form/BanAdmin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Form\\\\BanAdmin\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Form/BanAdmin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Form\\\\BanAdmin\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Form/BanAdmin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Form\\\\BanDelete\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Form/BanDelete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Form\\\\BanDelete\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Form/BanDelete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ban\\\\Hook\\\\BanHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/src/Hook/BanHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ban\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateBlockedIpsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ban\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateBlockedIpsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ban\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\BlockedIpsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\basic_auth\\\\Hook\\\\BasicAuthHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/basic_auth/src/Hook/BasicAuthHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\basic_auth_test\\\\BasicAuthTestController\\:\\:modifyState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\basic_auth_test\\\\BasicAuthTestController\\:\\:readState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function big_pipe_theme_suggestions_big_pipe_interface_preview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/big_pipe.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\EventSubscriber\\\\HtmlResponseBigPipeSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\EventSubscriber\\\\HtmlResponseBigPipeSubscriber\\:\\:onRespondEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\EventSubscriber\\\\NoBigPipeRouteAlterSubscriber\\:\\:onRoutingRouteAlterSetNoBigPipe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Hook\\\\BigPipeHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Hook/BigPipeHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Hook\\\\BigPipeHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Hook/BigPipeHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:performPostSendTasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendChunk\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendNoJsPlaceholders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendPlaceholders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendPostBody\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:sendPreBody\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipe.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipeResponse\\:\\:populateBasedOnOriginalHtmlResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipeResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipeResponse\\:\\:setBigPipeService\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/src/Render/BigPipeResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_bypass_js\\\\Hook\\\\BigPipeBypassJsHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_bypass_js/src/Hook/BigPipeBypassJsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:largeContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:largeContentBuilder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:multipleReplacements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:regression2678662\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:regression2802923\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_test\\\\BigPipeTestController\\:\\:exception\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_test\\\\EventSubscriber\\\\BigPipeTestSubscriber\\:\\:onRespondSetBigPipeDebugPlaceholderHeaders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_test\\\\EventSubscriber\\\\BigPipeTestSubscriber\\:\\:onRespondTriggerException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_test\\\\Form\\\\BigPipeTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\big_pipe_test\\\\Hook\\\\BigPipeTestHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_test/src/Hook/BigPipeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\big_pipe\\\\Unit\\\\Render\\\\BigPipeResponseAttachmentsProcessorTest\\:\\:attachmentsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\big_pipe\\\\Unit\\\\Render\\\\BigPipeResponseAttachmentsProcessorTest\\:\\:nonHtmlResponseProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\big_pipe\\\\Unit\\\\Render\\\\Placeholder\\\\BigPipeStrategyTest\\:\\:placeholdersProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\big_pipe\\\\Unit\\\\StackMiddleware\\\\ContentLengthTest\\:\\:providerTestSetContentLengthHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function block_theme_initialize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/block.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function block_theme_suggestions_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/block.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function block_themes_installed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/block.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/block.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockAccessControlHandler\\:\\:mergeCacheabilityFromConditions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockAccessControlHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:submitVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:themeSwitch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockForm\\:\\:validateVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockListBuilder\\:\\:systemRegionList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockListBuilder\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\BlockViewBuilder\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/BlockViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Controller\\\\CategoryAutocompleteController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Controller/CategoryAutocompleteController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Entity\\\\Block\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Entity/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Entity\\\\Block\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Entity/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Entity\\\\Block\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Entity/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\EventSubscriber\\\\BlockPageDisplayVariantSubscriber\\:\\:onSelectPageDisplayVariant\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Form\\\\BlockDeleteForm\\:\\:systemRegionList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Form/BlockDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:blockBuildLocalActionsBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:configurableLanguageDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:menuDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:userRoleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\BlockRenderAlterContent\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Controller\\\\TestMultipleFormController\\:\\:testMultipleForms\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Controller/TestMultipleFormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Form\\\\FavoriteAnimalTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Form\\\\TestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Form/TestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Form\\\\TestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Form/TestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Hook\\\\BlockTestHooks\\:\\:blockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Hook\\\\BlockTestHooks\\:\\:blockBuildTestCacheAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Hook\\\\BlockTestHooks\\:\\:blockViewTestCacheAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Plugin\\\\Block\\\\TestBlockInstantiation\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Plugin/Block/TestBlockInstantiation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Plugin\\\\Block\\\\TestSettingsValidationBlock\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Plugin/Block/TestSettingsValidationBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Plugin\\\\Condition\\\\BaloneySpam\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Plugin/Condition/BaloneySpam.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\Plugin\\\\Condition\\\\MissingSchema\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/Plugin/Condition/MissingSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_test\\\\PluginForm\\\\EmptyBlockForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/modules/block_test/src/PluginForm/EmptyBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$position might not be defined\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockRenderOrderTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$edit might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\BlockWeightUpdateTest\\:\\:setDatabaseDumpFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockWeightUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\BlockWeightUpdateTest\\:\\:testRunUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockWeightUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Rest\\\\BlockXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Rest/BlockXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertBlockAppears\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertNoBlockAppears\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Functional\\\\Views\\\\DisplayBlockTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Functional/Views/DisplayBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\FunctionalJavascript\\\\BlockDragTest\\:\\:getDragRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Kernel\\\\BlockConfigSchemaTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Kernel\\\\BlockConfigSchemaTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.coversMethod + 'message' => '#^@covers value \\:\\:block_rebuild references an invalid method\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/BlockRebuildTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\BlockTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\BlockTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\BlockTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Unit\\\\BlockRepositoryTest\\:\\:providerBlocksConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Unit/BlockRepositoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Unit\\\\Menu\\\\BlockLocalTasksTest\\:\\:providerTestBlockAdminDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Unit\\\\Plugin\\\\DisplayVariant\\\\BlockPageVariantTest\\:\\:providerBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block\\\\Unit\\\\Plugin\\\\migrate\\\\process\\\\BlockSettingsTest\\:\\:providerTestTransform\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_block_content_add_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/block_content.pages.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Access\\\\AccessGroupAnd\\:\\:addDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Access/AccessGroupAnd.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Access\\\\AccessGroupAnd\\:\\:getDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Access/AccessGroupAnd.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$dependency in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentAccessControlHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentTypeForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentTypeForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentTypeListBuilder\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/BlockContentTypeListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Entity\\\\BlockContent\\:\\:invalidateBlockPluginCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Entity/BlockContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Entity\\\\BlockContent\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Entity/BlockContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Entity\\\\BlockContent\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Entity/BlockContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Entity\\\\BlockContent\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Entity/BlockContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Entity\\\\BlockContent\\:\\:preSaveRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Entity/BlockContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Event\\\\BlockContentGetDependencyEvent\\:\\:setAccessDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Event/BlockContentGetDependencyEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Hook\\\\BlockContentHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Hook/BlockContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Hook\\\\BlockContentHooks\\:\\:queryEntityReferenceAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Hook/BlockContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Hook\\\\BlockContentHooks\\:\\:themeSuggestionsBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Hook/BlockContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Plugin\\\\Block\\\\BlockContentBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Plugin/Block/BlockContentBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content_test\\\\Hook\\\\BlockContentTestHooks\\:\\:blockContentInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content_test\\\\Hook\\\\BlockContentTestHooks\\:\\:blockContentPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content_test\\\\Hook\\\\BlockContentTestHooks\\:\\:blockContentUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content_test\\\\Hook\\\\BlockContentTestHooks\\:\\:blockContentView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\block_content_test\\\\Plugin\\\\EntityReferenceSelection\\\\TestSelection\\:\\:setTestMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$loaded might not be defined\\.$#', + 'count' => 9, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTranslationUITest\\:\\:getEditValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTranslationUITest\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTypeTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTypeTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\BlockContentTypeTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\PageEditTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/PageEditTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\PageEditTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/PageEditTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\PageEditTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/PageEditTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentTypeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Functional\\\\Rest\\\\BlockContentXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/Rest/BlockContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentAccessHandlerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentAccessHandlerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentEntityReferenceSelectionTest\\:\\:fieldConditionProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\BlockContentTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/BlockContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Migrate\\\\MigrateBlockContentStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\BoxTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\BoxTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\BlockCustomTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\BlockCustomTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Views\\\\RevisionUserTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Kernel\\\\Views\\\\RevisionUserTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Unit\\\\Access\\\\DependentAccessTest\\:\\:providerTestSetFirst\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Unit\\\\Menu\\\\BlockContentLocalTasksTest\\:\\:getBlockContentListingRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\BreakpointManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/BreakpointManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\BreakpointManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/BreakpointManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\BreakpointManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/BreakpointManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\BreakpointManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/BreakpointManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\Hook\\\\BreakpointHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/Hook/BreakpointHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\Hook\\\\BreakpointHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/Hook/BreakpointHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\breakpoint\\\\Hook\\\\BreakpointHooks\\:\\:themesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/breakpoint/src/Hook/BreakpointHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_ckeditor5_html_filter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/ckeditor5.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ckeditor5_filter_format_edit_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/ckeditor5.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ckeditor5_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/ckeditor5.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Annotation\\\\CKEditor5Plugin\\:\\:setClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Annotation/CKEditor5Plugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\EventSubscriber\\\\CKEditor5CacheTag\\:\\:onSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/EventSubscriber/CKEditor5CacheTag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Hook\\\\Ckeditor5Hooks\\:\\:configSchemaInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Hook\\\\Ckeditor5Hooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Hook\\\\Ckeditor5Hooks\\:\\:jsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Hook\\\\Ckeditor5Hooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Alignment\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Alignment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Alignment\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Alignment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Alignment\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Alignment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\CodeBlock\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/CodeBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\CodeBlock\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/CodeBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\CodeBlock\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/CodeBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Heading\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Heading.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Heading\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Heading.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Heading\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Heading.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Image\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Image\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Image\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ImageResize\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ImageResize.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ImageResize\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ImageResize.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ImageResize\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ImageResize.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Language\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Language\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Language\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ListPlugin\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ListPlugin\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\ListPlugin\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Media\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Media\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Media\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\MediaLibrary\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\MediaLibrary\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\SourceEditing\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/SourceEditing.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\SourceEditing\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/SourceEditing.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\SourceEditing\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/SourceEditing.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Style\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Style.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Style\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Style.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Style\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Style.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\CKEditor5MediaAndFilterSettingsInSyncConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5MediaAndFilterSettingsInSyncConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\CKEditor5MediaAndFilterSettingsInSyncConstraintValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5MediaAndFilterSettingsInSyncConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\CKEditor5MediaAndFilterSettingsInSyncConstraintValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5MediaAndFilterSettingsInSyncConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\EnabledConfigurablePluginsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\FundamentalCompatibilityConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/FundamentalCompatibilityConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\SourceEditingRedundantTagsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\SourceEditingRedundantTagsConstraintValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\SourceEditingRedundantTagsConstraintValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\StyleSensibleElementConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$ghs_config_classes in empty\\(\\) always exists and is always falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\ToolbarItemConditionsMetConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConditionsMetConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\ToolbarItemConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\ToolbarItemDependencyConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemDependencyConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\SmartDefaultSettings\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/SmartDefaultSettings.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5\\\\SmartDefaultSettings\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/src/SmartDefaultSettings.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5_plugin_elements_subset\\\\Plugin\\\\CKEditor5Plugin\\\\SneakySuperset\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/modules/ckeditor5_plugin_elements_subset/src/Plugin/CKEditor5Plugin/SneakySuperset.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5_plugin_elements_subset\\\\Plugin\\\\CKEditor5Plugin\\\\SneakySuperset\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/modules/ckeditor5_plugin_elements_subset/src/Plugin/CKEditor5Plugin/SneakySuperset.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor5_plugin_elements_subset\\\\Plugin\\\\CKEditor5Plugin\\\\SneakySuperset\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/modules/ckeditor5_plugin_elements_subset/src/Plugin/CKEditor5Plugin/SneakySuperset.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ckeditor_test\\\\Hook\\\\CkeditorTestHooks\\:\\:editorInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/modules/ckeditor_test/src/Hook/CkeditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\ImageUploadTest\\:\\:drupalLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\ImageUploadTest\\:\\:drupalLogout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\ImageUploadTest\\:\\:rebuildContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\MediaEntityMetadataApiTest\\:\\:drupalLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\MediaEntityMetadataApiTest\\:\\:drupalLogout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Functional\\\\MediaEntityMetadataApiTest\\:\\:rebuildContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5DialogTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5DialogTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5DialogTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5DialogTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5MarkupTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5MarkupTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5MarkupTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5MarkupTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5Test\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5Test\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5Test\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5Test\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5TestBase\\:\\:assertHtmlEsqueFieldValueEquals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5TestBase\\:\\:createNewTextFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5TestBase\\:\\:saveNewTextFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\CKEditor5TestBase\\:\\:triggerKeyUp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\EmphasisTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\EmphasisTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\EmphasisTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\EmphasisTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestBase\\:\\:addImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestBase\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestBase\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestBase\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestBase\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestProviderTest\\:\\:providerAlignment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageTestTestBase\\:\\:addImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\ImageUrlProviderTest\\:\\:providerAlignment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaLibraryTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaLibraryTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaLibraryTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaLibraryTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaPreviewTest\\:\\:previewAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaTestBase\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaTestBase\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaTestBase\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\MediaTestBase\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\SourceEditingTestBase\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\SourceEditingTestBase\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\SourceEditingTestBase\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\SourceEditingTestBase\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\StyleTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\StyleTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\StyleTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\StyleTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\TableTest\\:\\:assertEditorButtonDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\TableTest\\:\\:assertEditorButtonEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\TableTest\\:\\:pressEditorButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\FunctionalJavascript\\\\TableTest\\:\\:waitForEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\CKEditor5PluginManagerTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\CKEditor5PluginManagerTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\CKEditor5PluginManagerTest\\:\\:providerTestPluginSupportingElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\SmartDefaultSettingsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\SmartDefaultSettingsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\ValidatorsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\ckeditor5\\\\Kernel\\\\ValidatorsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function comment_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/comment.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function comment_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/comment.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function comment_preprocess_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/comment.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function comment_uri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/comment.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_comment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/comment.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentBreadcrumbBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentBreadcrumbBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:flagViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:preview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentLazyBuilders\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentLazyBuilders.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentLinkBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentLinkBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentLinkBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentLinkBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentManager\\:\\:addBodyField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentManagerInterface\\:\\:addBodyField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatistics\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatistics.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatistics\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatistics.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatistics\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatistics.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatisticsInterface\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatisticsInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatisticsInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatisticsInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentStatisticsInterface\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentStatisticsInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentTranslationHandler\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentTranslationHandler\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentTypeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentTypeForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\comment\\\\CommentTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentViewBuilder\\:\\:alterBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\CommentViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/CommentViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Entity\\\\Comment\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Entity/Comment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Entity\\\\Comment\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Entity/Comment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Entity\\\\Comment\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Entity/Comment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Entity\\\\Comment\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Entity/Comment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Entity\\\\Comment\\:\\:releaseThreadLock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Entity/Comment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\CommentAdminOverview\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/CommentAdminOverview.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\CommentAdminOverview\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/CommentAdminOverview.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\CommentAdminOverview\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/CommentAdminOverview.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\CommentTypeDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/CommentTypeDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\DeleteForm\\:\\:getDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/DeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Form\\\\DeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Form/DeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityStorageLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:entityViewDisplayPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldConfigCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldInfoEntityTypeUiDefinitionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldStorageConfigInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:fieldTypeCategoryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:nodeLinksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:nodeSearchResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:nodeUpdateIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:nodeViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:ranking\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:userCancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:userPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Hook/CommentViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\EntityReferenceSelection\\\\CommentSelection\\:\\:entityQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/EntityReferenceSelection/CommentSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\Menu\\\\LocalTask\\\\UnapprovedComments\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\Menu\\\\LocalTask\\\\UnapprovedComments\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\Validation\\\\Constraint\\\\CommentNameConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\migrate\\\\destination\\\\EntityComment\\:\\:processStubRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/migrate/destination/EntityComment.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$state might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/migrate/destination/EntityComment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\migrate\\\\source\\\\CommentType\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/migrate/source/CommentType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\CommentEntityTranslation\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\argument\\\\UserUid\\:\\:defaultActions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/argument/UserUid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\argument\\\\UserUid\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/argument/UserUid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\argument\\\\UserUid\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/argument/UserUid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\argument\\\\UserUid\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/argument/UserUid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\EntityLink\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/EntityLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\EntityLink\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/EntityLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\EntityLink\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/EntityLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\LastTimestamp\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/LastTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\StatisticsLastCommentName\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\StatisticsLastUpdated\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\filter\\\\StatisticsLastUpdated\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\filter\\\\UserUid\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/filter/UserUid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\row\\\\Rss\\:\\:buildOptionsForm_summary_options\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\row\\\\Rss\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$comment in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastCommentName\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastUpdated\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\Thread\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/src/Plugin/views/sort/Thread.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment_display_configurable_test\\\\Hook\\\\CommentDisplayConfigurableTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment_display_configurable_test\\\\Hook\\\\CommentDisplayConfigurableTestHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function comment_empty_title_test_preprocess_comment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment_test\\\\Controller\\\\CommentTestController\\:\\:commentReport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/modules/comment_test/src/Controller/CommentTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\comment_test\\\\Hook\\\\CommentTestHooks\\:\\:commentLinksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/modules/comment_test/src/Hook/CommentTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentAccessTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$position might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentCacheTagsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentEntityReferenceTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentLanguageTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentLanguageTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$comment_values might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentLanguageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentNonNodeTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentNonNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentRssTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentRssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentStatusFieldAccessTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:deleteComment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:performCommentOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentAnonymous\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentPreview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentSubject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTestBase\\:\\:setCommentsPerPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$mode_text might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTranslationUITest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\CommentTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentResourceTestBase\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentTypeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Rest\\\\CommentXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Views\\\\CommentTestBase\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Views/CommentTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Views\\\\DefaultViewRecentCommentsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Functional\\\\Views\\\\WizardTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Functional/Views/WizardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentDefaultFormatterCacheTagsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentFieldAccessTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentIntegrationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentIntegrationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentItemTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentOrphanTest\\:\\:providerTestOrphan\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentOrphanTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentUninstallTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentUninstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentValidationTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\CommentValidationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/CommentValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Migrate\\\\MigrateCommentStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateCommentTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateCommentTypeTest\\:\\:providerTestNoCommentTypeMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateCommentTypeTest\\:\\:providerTestNoCommentTypeMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\CommentTypeRequirementsTest\\:\\:providerTestCheckCommentTypeRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\CommentTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\CommentSourceWithHighWaterTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\CommentTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\CommentEntityTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\CommentTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\CommentFieldNameTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\CommentFieldNameTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\CommentFieldNameTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\FilterAndArgumentUserUidTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\FilterAndArgumentUserUidTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Kernel\\\\Views\\\\FilterAndArgumentUserUidTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\comment\\\\history_read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\comment\\\\Unit\\\\CommentLinkBuilderTest\\:\\:getLinkCombinations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\ConfigSubscriber\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/ConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Controller\\\\ConfigController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Controller/ConfigController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Controller\\\\ConfigController\\:\\:downloadExport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Controller/ConfigController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Controller\\\\ConfigController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Controller/ConfigController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Controller\\\\ConfigController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Controller/ConfigController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigExportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigImportForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigImportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigImportForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleExportForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleExportForm\\:\\:findConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleExportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleExportForm\\:\\:updateConfigurationType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleExportForm\\:\\:updateExport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleImportForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleImportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSingleImportForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$data might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSync\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSync.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Form\\\\ConfigSync\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Form/ConfigSync.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Hook\\\\ConfigHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Hook/ConfigHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config\\\\Hook\\\\ConfigHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/src/Hook/ConfigHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_collection_install_test\\\\EventSubscriber\\:\\:addCollections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_collection_install_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_entity_static_cache_test\\\\Hook\\\\ConfigEntityStaticCacheTestHooks\\:\\:configTestLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_entity_static_cache_test/src/Hook/ConfigEntityStaticCacheTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_events_test\\\\EventSubscriber\\:\\:configEventRecorder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_events_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _config_import_test_config_import_steps_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/config_import_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\EventSubscriber\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\EventSubscriber\\:\\:onConfigImporterMissingContentOne\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\EventSubscriber\\:\\:onConfigImporterMissingContentTwo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\EventSubscriber\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\EventSubscriber\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_import_test\\\\Hook\\\\ConfigImportTestHooks\\:\\:configImportStepsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_import_test/src/Hook/ConfigImportTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_install_dependency_test\\\\Hook\\\\ConfigInstallDependencyTestHooks\\:\\:configTestCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_install_dependency_test/src/Hook/ConfigInstallDependencyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_schema_test\\\\Hook\\\\ConfigSchemaTestHooks\\:\\:configSchemaInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_schema_test/src/Hook/ConfigSchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigActionErrorEntity\\\\DuplicatePluralizedMethodName\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedMethodName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigActionErrorEntity\\\\DuplicatePluralizedOtherMethodName\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedOtherMethodName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigActionErrorEntity\\\\DuplicatePluralizedOtherMethodName\\:\\:testMethod2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedOtherMethodName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestForm\\:\\:changeSize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestForm\\:\\:updateSize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestStorage\\:\\:importCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestStorage\\:\\:importDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigTestStorage\\:\\:importUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigTestStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateCatCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateCats\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateGiraffes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateLlama\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\ConfigValidation\\:\\:validateSequence\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/ConfigValidation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Entity\\\\ConfigTest\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Entity/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Entity\\\\ConfigTest\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Entity/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Entity\\\\ConfigTest\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Entity/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooks\\:\\:cacheFlush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:configTestUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\Hook\\\\ConfigTestHooksHooks\\:\\:updateIsSyncingStore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test\\\\SchemaListenerController\\:\\:test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/src/SchemaListenerController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_test\\\\Functional\\\\Rest\\\\ConfigTestXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_transformer_test\\\\EventSubscriber\\:\\:onExportTransform\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_transformer_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_transformer_test\\\\EventSubscriber\\:\\:onImportTransform\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/config_transformer_test/src/EventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\CacheabilityMetadataConfigOverrideIntegrationTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigImportAllTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigImportAllTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigImportAllTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigImportAllTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigInstallProfileUnmetDependenciesTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigInstallProfileUnmetDependenciesTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigInstallProfileUnmetDependenciesTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigInstallProfileUnmetDependenciesTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Functional\\\\ConfigInstallProfileUnmetDependenciesTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config\\\\Unit\\\\Menu\\\\ConfigLocalTasksTest\\:\\:getConfigAdminRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigEntityMapper\\:\\:populateFromRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigEntityMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigEntityMapper\\:\\:processRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigEntityMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperInterface\\:\\:addConfigName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperInterface\\:\\:getLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperInterface\\:\\:populateFromRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperInterface\\:\\:setRouteCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperManager\\:\\:buildDataDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigMapperManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigMapperManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigNamesMapper\\:\\:addConfigName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigNamesMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigNamesMapper\\:\\:getLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigNamesMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigNamesMapper\\:\\:populateFromRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigNamesMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigNamesMapper\\:\\:processRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigNamesMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\ConfigNamesMapper\\:\\:setRouteCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/ConfigNamesMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationAddForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Form\\\\ConfigTranslationFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Form/ConfigTranslationFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\ElementInterface\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/ElementInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\FormElementBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/FormElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\FormElementBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/FormElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\FormElementBase\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/FormElementBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\ListElement\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/ListElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\ListElement\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/ListElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\ListElement\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/ListElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\FormElement\\\\PluralVariants\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/FormElement/PluralVariants.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:configSchemaInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:configTranslationInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:themesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Plugin\\\\Menu\\\\ContextualLink\\\\ConfigTranslationContextualLink\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Plugin/Menu/ContextualLink/ConfigTranslationContextualLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Plugin\\\\Menu\\\\ContextualLink\\\\ConfigTranslationContextualLink\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Plugin/Menu/ContextualLink/ConfigTranslationContextualLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Plugin\\\\Menu\\\\LocalTask\\\\ConfigTranslationLocalTask\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Plugin/Menu/LocalTask/ConfigTranslationLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Plugin\\\\Menu\\\\LocalTask\\\\ConfigTranslationLocalTask\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Plugin/Menu/LocalTask/ConfigTranslationLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation_test\\\\EventSubscriber\\\\ConfigTranslationTestSubscriber\\:\\:addConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation_test\\\\Hook\\\\ConfigTranslationTestHooks\\:\\:configTranslationInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_translation_test\\\\Hook\\\\ConfigTranslationTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Functional\\\\ConfigTranslationUiTestBase\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Functional\\\\ConfigTranslationUiTestBase\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Functional\\\\ConfigTranslationUiTestBase\\:\\:getPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Functional\\\\ConfigTranslationUiTestBase\\:\\:setSiteInformation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserConfigsTranslationTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserConfigsTranslationTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUserConfigsTranslationTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUserConfigsTranslationTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\config_translation\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ProfileFieldTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function contact_form_user_admin_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/contact.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function contact_user_profile_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/contact.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:getEditableConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:getPersonalRecipient\\(\\) should return Drupal\\\\user\\\\UserInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:setCopySender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:setMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:setSenderMail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:setSenderName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:setSubject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:mail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:menuLocalTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:restResourceAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Hook/ContactViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MailHandler\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MailHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MailHandler\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MailHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MailHandler\\:\\:sendMailMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MailHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MailHandlerInterface\\:\\:sendMailMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MailHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageForm\\:\\:preview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\contact\\\\MessageForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/contact/src/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageInterface\\:\\:setCopySender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageInterface\\:\\:setMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageInterface\\:\\:setSenderMail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageInterface\\:\\:setSenderName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\MessageInterface\\:\\:setSubject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/MessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact\\\\Plugin\\\\views\\\\field\\\\ContactLink\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/src/Plugin/views/field/ContactLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function contact_storage_test_contact_form_form_builder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contact_storage_test\\\\Hook\\\\ContactStorageTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/modules/contact_storage_test/src/Hook/ContactStorageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactPersonalTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactPersonalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\ContactSitewideTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/ContactSitewideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\ContactFormXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/ContactFormXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Functional\\\\Rest\\\\MessageXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Functional/Rest/MessageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateContactSettingsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateContactSettingsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ContactCategoryTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ContactSettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contact\\\\Unit\\\\MailHandlerTest\\:\\:getSendMailMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contact/tests/src/Unit/MailHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_moderation_preprocess_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/content_moderation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ContentPreprocess\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ContentPreprocess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ContentPreprocess\\:\\:preprocessNode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ContentPreprocess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\ContentModerationState\\:\\:updateOrCreateFromEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/ContentModerationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\BlockContentModerationHandler\\:\\:enforceRevisionsBundleFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\BlockContentModerationHandler\\:\\:enforceRevisionsEntityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandler\\:\\:enforceRevisionsBundleFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandler\\:\\:enforceRevisionsEntityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandler\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandler\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandler\\:\\:onPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandlerInterface\\:\\:enforceRevisionsBundleFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandlerInterface\\:\\:enforceRevisionsEntityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\ModerationHandlerInterface\\:\\:onPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\NodeModerationHandler\\:\\:enforceRevisionsBundleFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Entity\\\\Handler\\\\NodeModerationHandler\\:\\:enforceRevisionsEntityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityRevisionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:entityView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityOperations\\:\\:updateOrCreateFromEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:bundleFormRedirect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:entityPrepareForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:entityTypeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:formAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EntityTypeInfo\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\EventSubscriber\\\\ConfigImportSubscriber\\:\\:onConfigImporterValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\ContentModerationConfigureEntityTypesForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\ContentModerationConfigureEntityTypesForm\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\ContentModerationConfigureEntityTypesForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\ContentModerationConfigureForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\ContentModerationConfigureForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$state in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationStateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\EntityModerationForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/EntityModerationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Form\\\\EntityModerationForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Form/EntityModerationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:actionInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityBundleFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityBundleInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityFormDisplayAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityPrepareForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityRevisionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:entityView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:viewsPostExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:workflowInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:workflowUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationViewsExecutionHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getAffectedRevisionTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getDefaultRevisionId\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Permissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Permissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\ConfigAction\\\\AddModerationDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/ConfigAction/AddModerationDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\ConfigAction\\\\AddModerationDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/ConfigAction/AddModerationDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Derivative\\\\DynamicLocalTasks\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Derivative/DynamicLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Derivative\\\\DynamicLocalTasks\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Derivative/DynamicLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\FieldWidget\\\\ModerationStateWidget\\:\\:validateElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:generateSampleItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:traitGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Field\\\\ModerationStateFieldItemList\\:\\:updateModeratedEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\Validation\\\\Constraint\\\\ModerationStateConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModeration\\:\\:addEntityTypeAndBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModeration\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModeration\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModeration\\:\\:removeEntityTypeAndBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModerationInterface\\:\\:addEntityTypeAndBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\WorkflowType\\\\ContentModerationInterface\\:\\:removeEntityTypeAndBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\views\\\\field\\\\ModerationStateField\\:\\:clickSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/views/field/ModerationStateField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\views\\\\field\\\\ModerationStateField\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/views/field/ModerationStateField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\views\\\\filter\\\\ModerationStateFilter\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\views\\\\filter\\\\ModerationStateFilter\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Plugin\\\\views\\\\sort\\\\ModerationStateSort\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Plugin/views/sort/ModerationStateSort.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Routing\\\\ContentModerationRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\Routing\\\\ContentModerationRouteSubscriber\\:\\:setLatestRevisionFlag\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ViewsData\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation\\\\ViewsData\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/src/ViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation_test_local_task\\\\Controller\\\\TestLocalTaskController\\:\\:methodWithoutUpcastNode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_local_task/src/Controller/TestLocalTaskController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation_test_resave\\\\Hook\\\\ContentModerationTestResaveHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_resave/src/Hook/ContentModerationTestResaveHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation_test_views\\\\Hook\\\\ContentModerationTestViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_views/src/Hook/ContentModerationTestViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_moderation_test_views\\\\Hook\\\\ContentModerationTestViewsHooks\\:\\:viewsQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_views/src/Hook/ContentModerationTestViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\LayoutBuilderContentModerationIntegrationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/LayoutBuilderContentModerationIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModeratedContentViewTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationActionsTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationContentTranslationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationRevisionRevertTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationStateAccessTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationStateTestBase\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationStateTestBase\\:\\:createContentTypeFromUi\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationStateTestBase\\:\\:enableModerationThroughUi\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ModerationStateTestBase\\:\\:grantUserPermissionToCreateContentOfType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\ViewsModerationStateFilterTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\WorkspaceContentModerationIntegrationTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\WorkspaceContentModerationIntegrationTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\WorkspaceContentModerationIntegrationTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Functional\\\\WorkspaceContentModerationIntegrationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationAccessTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationResaveTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationResaveTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateStorageSchemaTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:basicModerationTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:moderationWithSpecialLanguagesTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationStateTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationSyncingTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ContentModerationWorkflowConfigTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\DefaultRevisionStateTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityOperationsTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityStateChangeValidationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityStateChangeValidationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityStateChangeValidationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityStateChangeValidationTest\\:\\:transitionAccessValidationTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\EntityTypeInfoTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\InitialStateTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/InitialStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationInformationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationInformationTest\\:\\:isDefaultRevisionPublishedTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:entityUnserializeTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:moderatedEntityWithExistingIdTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:moderationStateChangesTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateFieldItemListTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ModerationStateWidgetTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\NodeAccessTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\NodeAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\NodeAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\StateFormatterTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\StateFormatterTest\\:\\:formatterTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ViewsDataIntegrationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ViewsModerationStateFilterTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ViewsModerationStateFilterTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ViewsModerationStateFilterTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\ViewsModerationStateSortTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:basicModerationTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Kernel\\\\WorkspacesContentModerationStateTest\\:\\:traitAddEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\ContentModerationRouteSubscriberTest\\:\\:setLatestRevisionFlagTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\ContentPreprocessTest\\:\\:routeNodeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\LatestRevisionCheckTest\\:\\:accessSituationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\ModerationInformationTest\\:\\:providerWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\StateTransitionValidationTest\\:\\:userTransitionsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _content_translation_preprocess_language_content_settings_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_form_language_content_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_form_language_content_settings_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$checkbox_id might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$locked_languages might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _content_translation_install_field_storage_definitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_enable_widget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_language_configuration_element_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_language_configuration_element_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_preprocess_language_content_settings_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$locked_languages might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/content_translation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\BundleTranslationSettingsInterface\\:\\:setBundleTranslationSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/BundleTranslationSettingsInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:addTranslatabilityClue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormDeleteTranslationUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormSharedElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormSourceChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:entityFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandler\\:\\:retranslate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandlerInterface\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationHandlerInterface\\:\\:retranslate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationManager\\:\\:setBundleTranslationSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationManager\\:\\:setEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationManagerInterface\\:\\:setEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationMetadataWrapper\\:\\:setFieldOnlyIfTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationMetadataWrapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\ContentTranslationPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/ContentTranslationPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Controller\\\\ContentTranslationController\\:\\:prepareTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Controller/ContentTranslationController.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$source_name might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Controller/ContentTranslationController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\FieldTranslationSynchronizer\\:\\:synchronizeFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/FieldTranslationSynchronizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\FieldTranslationSynchronizer\\:\\:synchronizeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/FieldTranslationSynchronizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\FieldTranslationSynchronizerInterface\\:\\:synchronizeFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/FieldTranslationSynchronizerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\FieldTranslationSynchronizerInterface\\:\\:synchronizeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/FieldTranslationSynchronizerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:entityBundleInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:fieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:languageContentSettingsInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:languageContentSettingsUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:languageFallbackCandidatesEntityViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:languageTypesInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Derivative\\\\ContentTranslationContextualLinks\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Derivative\\\\ContentTranslationContextualLinks\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Derivative\\\\ContentTranslationLocalTasks\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Derivative\\\\ContentTranslationLocalTasks\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Validation\\\\Constraint\\\\ContentTranslationSynchronizedFieldsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation\\\\Routing\\\\ContentTranslationRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function content_translation_test_form_node_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation_test\\\\Hook\\\\ContentTranslationTestHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation_test\\\\Hook\\\\ContentTranslationTestHooks\\:\\:entityBundleInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\content_translation_test\\\\Hook\\\\ContentTranslationTestHooks\\:\\:entityTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationLanguageChangeTest\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationPendingRevisionTestBase\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationPendingRevisionTestBase\\:\\:enableContentModeration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationPendingRevisionTestBase\\:\\:getEditorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationPendingRevisionTestBase\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationPendingRevisionTestBase\\:\\:setupBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationSettingsTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:enableTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:getAdministratorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:getEditorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:getTranslatePermission\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:setupBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:setupLanguages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:setupTestFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationTestBase\\:\\:setupUsers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestAuthoringInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestBasicTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestChangedTimeAfterSaveWithoutChanges\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestOutdatedStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestPublishedStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestTranslationChanged\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestTranslationDeletion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestTranslationEdit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:doTestTranslationOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:getEditValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationUITestBase\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\ContentTranslationWorkflowsTest\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Functional\\\\Views\\\\TranslationLinkTest\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\EntityTranslationSettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\content_translation\\\\Unit\\\\Menu\\\\ContentTranslationLocalTasksTest\\:\\:providerTestBlockAdminDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function contextual_preprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/contextual.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\ContextualController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/ContextualController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualHooks\\:\\:contextualLinksViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Plugin\\\\views\\\\field\\\\ContextualLinks\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Plugin/views/field/ContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Plugin\\\\views\\\\field\\\\ContextualLinks\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Plugin/views/field/ContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Plugin\\\\views\\\\field\\\\ContextualLinks\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Plugin/views/field/ContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual\\\\Plugin\\\\views\\\\field\\\\ContextualLinks\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/src/Plugin/views/field/ContextualLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual_test\\\\Hook\\\\ContextualTestHooks\\:\\:blockViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual_test\\\\Hook\\\\ContextualTestHooks\\:\\:contextualLinksViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\contextual_test\\\\Hook\\\\ContextualTestHooks\\:\\:pageAttachmentsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contextual\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\contextual\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$unrestricted_tab_count might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\DateTimeComputed\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/DateTimeComputed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Hook\\\\DatetimeHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Hook/DatetimeHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Hook\\\\DatetimeViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Hook/DatetimeViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldFormatter\\\\DateTimeFormatterBase\\:\\:setTimeZone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldType\\\\DateTimeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldType\\\\DateTimeFieldItemList\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldType\\\\DateTimeItem\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$item in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/Validation/Constraint/DateTimeFormatConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\migrate\\\\field\\\\DateField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/migrate/field/DateField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:opBetween\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\DateTestBase\\:\\:createField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/DateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\DateTestBase\\:\\:massageTestDate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/DateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\DateTestBase\\:\\:setSiteTimezone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/DateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDateOnlyTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateOnlyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDateOnlyTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateOnlyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDatetimeTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDatetimeTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\DateTimeFormInjectionTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\DateTimeItemTest\\:\\:dateOnlyValidationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/DateTimeItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\DateTimeItemTest\\:\\:datetimeValidationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/DateTimeItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\Views\\\\DateTimeHandlerTestBase\\:\\:setSiteTimezone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\Views\\\\DateTimeSchemaTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Kernel\\\\Views\\\\DateTimeSchemaTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime\\\\Unit\\\\Plugin\\\\migrate\\\\field\\\\DateFieldTest\\:\\:providerTestDefineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime_range\\\\Hook\\\\DatetimeRangeHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Hook/DatetimeRangeHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime_range\\\\Hook\\\\DatetimeRangeViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Hook/DatetimeRangeViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeFieldItemList\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeItem\\:\\:\\$end_date\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeItem\\:\\:\\$start_date\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeItem\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldWidget\\\\DateRangeWidgetBase\\:\\:validateStartEnd\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime_range\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDateRangeTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\datetime_range\\\\Functional\\\\EntityResource\\\\EntityTest\\\\EntityTestDateRangeTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function dblog_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/dblog.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Form\\\\DblogClearLogConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Form/DblogClearLogConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Form\\\\DblogClearLogConfirmForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Form/DblogClearLogConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Form\\\\DblogFilterForm\\:\\:resetForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Form/DblogFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Form\\\\DblogFilterForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Form/DblogFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Form\\\\DblogFilterForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Form/DblogFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogHooks\\:\\:viewsPreRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$view in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Hook/DblogViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Plugin\\\\views\\\\field\\\\DblogMessage\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Plugin/views/field/DblogMessage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Plugin\\\\views\\\\field\\\\DblogMessage\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Plugin/views/field/DblogMessage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dblog\\\\Plugin\\\\views\\\\filter\\\\DblogTypes\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/src/Plugin/views/filter/DblogTypes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogResourceTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogResourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogResourceTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogResourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogResourceTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogResourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogResourceTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogResourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Functional\\\\DbLogTest\\:\\:generateLogEntries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Functional/DbLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Kernel\\\\DbLogFormInjectionTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Kernel\\\\DbLogTest\\:\\:generateLogEntries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Kernel/DbLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateDblogConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\dblog\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateDblogConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dynamic_page_cache\\\\EventSubscriber\\\\DynamicPageCacheSubscriber\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dynamic_page_cache\\\\EventSubscriber\\\\DynamicPageCacheSubscriber\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dynamic_page_cache\\\\Hook\\\\DynamicPageCacheHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dynamic_page_cache_test\\\\DynamicPageCacheTestController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dynamic_page_cache_test\\\\DynamicPageCacheTestController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _editor_delete_file_usage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _editor_record_file_usage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function editor_form_filter_admin_form_ajax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function editor_form_filter_admin_format_editor_configure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function editor_form_filter_admin_format_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function editor_form_filter_admin_format_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/editor.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Ajax\\\\EditorDialogSave\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Ajax/EditorDialogSave.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\EditorInterface\\:\\:setEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/EditorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Element\\:\\:preRenderTextFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Element.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Entity\\\\Editor\\:\\:setEditor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Entity/Editor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\EventSubscriber\\\\EditorConfigTranslationSubscriber\\:\\:addConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:entityRevisionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:filterFormatPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Plugin\\\\EditorBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Plugin/EditorBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor\\\\Plugin\\\\EditorBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/src/Plugin/EditorBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Hook\\\\EditorTestHooks\\:\\:editorInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Hook\\\\EditorTestHooks\\:\\:editorJsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Hook\\\\EditorTestHooks\\:\\:editorXssFilterAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Hook\\\\EditorTestHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Hook\\\\EditorTestHooks\\:\\:filePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\editor_test\\\\Plugin\\\\Editor\\\\UnicornEditor\\:\\:validateImageUploadSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Functional\\\\Rest\\\\EditorXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Functional/Rest/EditorXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\editor\\\\Unit\\\\EditorXssFilter\\\\StandardTest\\:\\:providerTestFilterXss\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_form_field_config_edit_form_entity_builder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/field.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_purge_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/field.purge.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_purge_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/field.purge.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_purge_field_storage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/field.purge.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\ConfigImporterFieldPurger\\:\\:initializeSandbox\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/ConfigImporterFieldPurger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\ConfigImporterFieldPurger\\:\\:process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/ConfigImporterFieldPurger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldConfig\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldConfig\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldConfig\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldConfig\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:getFieldItemClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:preSaveNew\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Entity\\\\FieldStorageConfig\\:\\:preSaveUpdated\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Entity/FieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\EntityDisplayRebuilder\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/EntityDisplayRebuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\EntityDisplayRebuilder\\:\\:rebuildEntityTypeDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/EntityDisplayRebuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\FieldConfigStorage\\:\\:importDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/FieldConfigStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\FieldUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/FieldUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\FieldUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/FieldUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:configImportStepsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:entityBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:entityBundleFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:entityFieldStorageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:fieldConfigCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:fieldConfigInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:fieldConfigPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:fieldStorageConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field\\\\Plugin\\\\migrate\\\\field\\\\Email\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/src/Plugin/migrate/field/Email.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_test_entity_info_translatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/field_test.entity.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_test_default_value\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/field_test.field.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _field_test_alter_widget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/field_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_test_field_storage_config_create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/field_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\FieldDefaultValueCallbackProvider\\:\\:calculateDefaultValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Form\\\\NestedEntityTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Form/NestedEntityTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Form\\\\NestedEntityTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Form/NestedEntityTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestFieldHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestFieldHooks\\:\\:fieldStorageConfigUpdateForbid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestFieldHooks\\:\\:fieldWidgetInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:entityBundleFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:entityDisplayBuildAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:entityExtraFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldInfoEntityTypeUiDefinitionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldUiPreconfiguredOptionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldWidgetCompleteFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldWidgetCompleteTestFieldWidgetMultipleFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldWidgetCompleteTestFieldWidgetMultipleSingleValueFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:fieldWidgetSingleElementFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:queryEfqMetadataTestAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Hook\\\\FieldTestHooks\\:\\:queryEfqTablePrefixingTestAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$items in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldEmptySettingFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$items in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldMultipleFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Plugin\\\\Field\\\\FieldFormatter\\\\TestFieldPrepareViewFormatter\\:\\:prepareView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldPrepareViewFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Plugin\\\\Field\\\\FieldType\\\\TestItem\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test\\\\Plugin\\\\Field\\\\FieldWidget\\\\TestFieldWidgetMultiple\\:\\:multipleValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultiple.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_test_boolean_access_denied\\\\Hook\\\\FieldTestBooleanAccessDeniedHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_test_boolean_access_denied/src/Hook/FieldTestBooleanAccessDeniedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_third_party_test\\\\Hook\\\\FieldThirdPartyTestHooks\\:\\:fieldFormatterSettingsSummaryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_third_party_test\\\\Hook\\\\FieldThirdPartyTestHooks\\:\\:fieldFormatterThirdPartySettingsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_third_party_test\\\\Hook\\\\FieldThirdPartyTestHooks\\:\\:fieldWidgetSettingsSummaryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_third_party_test\\\\Hook\\\\FieldThirdPartyTestHooks\\:\\:fieldWidgetThirdPartySettingsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceAutoCreateTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceFieldDefaultValueTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceFieldDefaultValueTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceFieldTranslatedReferenceViewTest\\:\\:createNotTranslatedReferencedEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceFieldTranslatedReferenceViewTest\\:\\:createReferencedEntityWithTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceFieldTranslatedReferenceViewTest\\:\\:createReferrerEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceIntegrationTest\\:\\:assertConfigEntityImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceIntegrationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\EntityReferenceXSSTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\EntityReference\\\\Views\\\\SelectionTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\FieldTestBase\\:\\:assertFieldValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/FieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\MultipleWidgetFormTest\\:\\:widgetAlterTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/MultipleWidgetFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\ReEnableModuleFieldTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/ReEnableModuleFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldConfigXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Rest\\\\FieldStorageConfigXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Views\\\\FieldTestBase\\:\\:setUpFieldStorages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Views/FieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Functional\\\\Views\\\\FieldTestBase\\:\\:setUpFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Functional/Views/FieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\FunctionalJavascript\\\\EntityReference\\\\EntityReferenceAdminTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Entity\\\\Update\\\\SqlContentEntityStorageSchemaColumnTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\EntityReference\\\\EntityReferenceFormatterTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\EntityReference\\\\EntityReferenceItemTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\EntityReference\\\\EntityReferenceSettingsTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\EntityReference\\\\Views\\\\EntityReferenceRelationshipTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\EntityReference\\\\Views\\\\SelectionTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$values might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/FieldAttachStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\FieldKernelTestBase\\:\\:assertFieldValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/FieldKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\FieldKernelTestBase\\:\\:createFieldWithStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/FieldKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\FieldKernelTestBase\\:\\:entityValidateAndSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/FieldKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\KernelString\\\\StringFormatterTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\KernelString\\\\StringFormatterTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\KernelString\\\\UuidFormatterTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\KernelString\\\\UuidFormatterTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldInstanceLabelDescriptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldInstanceOptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldInstancePerFormDisplayTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldInstancePerViewModeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldInstanceTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldOptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FieldTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldInstanceLabelDescriptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldInstancePerFormDisplayTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldInstancePerViewModeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldInstanceTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldOptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FieldTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ViewModeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Unit\\\\DependencyFieldItem\\:\\:calculateDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Unit\\\\DependencyFieldItem\\:\\:onDependencyRemoval\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Unit\\\\TestFieldType\\:\\:calculateStorageDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Unit\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FieldInstanceSettingsTest\\:\\:getSettingsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field\\\\Unit\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FieldSettingsTest\\:\\:getSettingsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Entity\\\\FieldLayoutEntityFormDisplay\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Entity/FieldLayoutEntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Entity\\\\FieldLayoutEntityFormDisplay\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Entity/FieldLayoutEntityFormDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Entity\\\\FieldLayoutEntityViewDisplay\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Entity/FieldLayoutEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Entity\\\\FieldLayoutEntityViewDisplay\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Entity/FieldLayoutEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\FieldLayoutBuilder\\:\\:buildForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/FieldLayoutBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\FieldLayoutBuilder\\:\\:buildView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/FieldLayoutBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\FieldLayoutBuilder\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/FieldLayoutBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:settingsAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:settingsAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityFormDisplayEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:settingsAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:settingsAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Form\\\\FieldLayoutEntityViewDisplayEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Hook\\\\FieldLayoutHooks\\:\\:entityViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Hook/FieldLayoutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout\\\\Hook\\\\FieldLayoutHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/src/Hook/FieldLayoutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout_test\\\\Form\\\\EmbeddedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/tests/modules/field_layout_test/src/Form/EmbeddedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_layout_test\\\\Hook\\\\FieldLayoutTestHooks\\:\\:layoutAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_layout/tests/modules/field_layout_test/src/Hook/FieldLayoutTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_ui_form_manage_field_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/field_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_ui_preprocess_form_element__new_storage_type\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/field_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_field_ui_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/field_ui.module', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$entity_display might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Access/FormModeAccessCheck.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$entity_display might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Access/ViewModeAccessCheck.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\field_ui\\\\FieldUI\\:\\:getOverviewRouteInfo\\(\\) should return Drupal\\\\Core\\\\Url but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/FieldUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\FieldUiPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/FieldUiPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\FieldUiPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/FieldUiPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\FieldUiPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/FieldUiPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:alterSettingsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:multistepAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:multistepSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:saveDisplayStatuses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeAddForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeAddForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeFormBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityFormDisplayEditForm\\:\\:alterSettingsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityFormDisplayEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityFormDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityFormModeAddForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityFormModeAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityViewDisplayEditForm\\:\\:alterSettingsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityViewDisplayEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityViewDisplayEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:afterBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:configureEntityFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:configureEntityViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:fieldStorageSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:processFieldStorageSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:rebuildWithOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:startOver\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:validateFieldType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageAddForm\\:\\:validateGroupOrField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageConfigEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageConfigEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageConfigEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageConfigEditForm\\:\\:validateCardinality\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageConfigEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageReuseForm\\:\\:configureEntityFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageReuseForm\\:\\:configureEntityViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageReuseForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageReuseForm\\:\\:reuseCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageReuseForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityFormModeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityFormModePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityViewModeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:entityViewModePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:localTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalAction\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalAction\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalTask\\:\\:alterLocalTasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalTask\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalTask\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function field_ui_test_region_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/modules/field_ui_test/field_ui_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\field_ui_test\\\\Hook\\\\FieldUiTestHooks\\:\\:fieldConfigAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/modules/field_ui_test/src/Hook/FieldUiTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\FieldUIDeleteTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageDisplayTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsFunctionalTestBase\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Functional\\\\ManageFieldsTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Functional/ManageFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\DisplayModeBundleSelectionTest\\:\\:providerBundleSelection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\FunctionalJavascript\\\\ManageDisplayTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\field_ui\\\\Unit\\\\FieldUiTableTest\\:\\:providerTestReduceOrder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/field_ui/tests/src/Unit/FieldUiTableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_managed_file_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_system_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_file_link\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_file_managed_file\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_file_upload_help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_file_widget_multiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$file_upload in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/file.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\ComputedFileUrl\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/ComputedFileUrl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Controller\\\\FileWidgetAjaxController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Controller/FileWidgetAjaxController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Controller\\\\FileWidgetAjaxController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Controller/FileWidgetAjaxController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Element\\\\ManagedFile\\:\\:preRenderManagedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Element/ManagedFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Element\\\\ManagedFile\\:\\:processManagedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Element/ManagedFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Element\\\\ManagedFile\\:\\:validateManagedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Element/ManagedFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:getDefaultEntityOwner\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:invalidateTagsOnSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setFileUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setFilename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setMimeType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setPermanent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setSize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Entity\\\\File\\:\\:setTemporary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Entity/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\EventSubscriber\\\\FileEventSubscriber\\:\\:sanitizeFilename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/EventSubscriber/FileEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setFileUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setFilename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setMimeType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setPermanent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setSize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileInterface\\:\\:setTemporary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\DatabaseFileUsageBackend\\:\\:add\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/DatabaseFileUsageBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\DatabaseFileUsageBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/DatabaseFileUsageBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\FileUsageBase\\:\\:add\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/FileUsageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\FileUsageBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/FileUsageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\FileUsageInterface\\:\\:add\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/FileUsageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\FileUsage\\\\FileUsageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/FileUsage/FileUsageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:fieldWidgetInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:filePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileViewsHooks\\:\\:fieldViewsDataViewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Hook/FileViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$rows in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldFormatter/TableFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:deleteRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileItem\\:\\:validateDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileItem\\:\\:validateExtensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileItem\\:\\:validateMaxFilesize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:extractFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:flagErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:formMultipleElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:processMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:validateMultipleCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:value\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileExtensionSecureConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileImageDimensionsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileImageDimensionsConstraintValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileImageDimensionsConstraintValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileIsImageConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileIsImageConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Validation\\\\Constraint\\\\FileSizeLimitConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/Validation/Constraint/FileSizeLimitConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\migrate\\\\destination\\\\EntityFile\\:\\:processStubRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/migrate/destination/EntityFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\FileField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/migrate/field/d6/FileField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\FileField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/migrate/field/d7/FileField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\rest\\\\resource\\\\FileUploadResource\\:\\:resourceValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/rest/resource/FileUploadResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\views\\\\field\\\\File\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/views/field/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\views\\\\field\\\\File\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/src/Plugin/views/field/File.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_module_test\\\\Form\\\\FileModuleTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_module_test/src/Form/FileModuleTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _file_test_log_call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/file_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_test_file_scan_callback_reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/file_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_test_reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/file_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_test_set_return\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/file_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function file_test_validator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/file_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestSaveUploadFromForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestSaveUploadFromForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestSaveUploadFromForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestSaveUploadFromForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestSaveUploadFromForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestSaveUploadFromForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileCopy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileMimetypeMappingAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileMove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:filePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\Hook\\\\FileTestHooks\\:\\:fileUrlAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/Hook/FileTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\StreamWrapper\\\\DummyExternalReadOnlyWrapper\\:\\:stream_close\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\StreamWrapper\\\\DummyReadOnlyStreamWrapper\\:\\:getInternalUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_test\\\\StreamWrapper\\\\DummyStreamWrapper\\:\\:getInternalUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\file_validator_test\\\\EventSubscriber\\\\FileSanitizationEventSubscriber\\:\\:onFileSanitization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/modules/file_validator_test/src/EventSubscriber/FileSanitizationEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldDisplayTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:assertFileEntryExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:assertFileEntryNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:assertFileIsPermanent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:getLastFileId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:removeNodeFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:replaceNodeFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldTestBase\\:\\:updateFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileFieldWidgetTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileManagedTestBase\\:\\:assertDifferentFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileManagedTestBase\\:\\:assertFileHookCalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileManagedTestBase\\:\\:assertFileHooksCalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileManagedTestBase\\:\\:assertFileUnchanged\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileManagedTestBase\\:\\:assertSameFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$unexpected in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonBasicAuthTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonCookieTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileResourceTestBase\\:\\:makeCurrentUserFileOwner\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Functional\\\\Rest\\\\FileXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Functional/Rest/FileXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldValidateTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileFieldWidgetTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\FileManagedFileElementTest\\:\\:getLastFileId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\FunctionalJavascript\\\\MaximumFileSizeExceededUploadTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\AccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/AccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\AccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/AccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileItemValidationTest\\:\\:getFileTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileItemValidationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedUnitTestBase\\:\\:assertDifferentFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedUnitTestBase\\:\\:assertFileHookCalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedUnitTestBase\\:\\:assertFileHooksCalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedUnitTestBase\\:\\:assertFileUnchanged\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\FileManagedUnitTestBase\\:\\:assertSameFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$unexpected in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\ManagedFileTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/ManagedFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\ManagedFileTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/ManagedFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\MigrateFileStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateFileConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateFileConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateFileTest\\:\\:migrateDumpAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateFileTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateFileTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateFileConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateFileConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateFileTest\\:\\:assertEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateFileTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigratePrivateFileTest\\:\\:assertEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Migrate\\\\d7\\\\MigratePrivateFileTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Plugin\\\\Validation\\\\Constraint\\\\FileEncodingConstraintValidatorTest\\:\\:getInvalidEncodedPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileEncodingConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FileTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UploadInstanceTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UploadTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FileTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\SaveTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/SaveTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\SaveTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/SaveTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\UsageTest\\:\\:createTempFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/UsageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\UsageTest\\:\\:doTestRemoveUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/UsageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Views\\\\RelationshipUserFileDataTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Kernel\\\\Views\\\\RelationshipUserFileDataTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Unit\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\FileFieldTest\\:\\:getFieldTypeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Unit\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\FileFieldTest\\:\\:getFieldTypeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\file\\\\Unit\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FileUriTest\\:\\:doTransform\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_autop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_html_escape\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_html_image_secure_process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url_escape_comments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url_parse_email_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url_parse_full_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url_parse_partial_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _filter_url_trim\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function filter_formats_reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_filter_guidelines\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_filter_tips\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_text_format_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/filter.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Element\\\\TextFormat\\:\\:currentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Element/TextFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Entity\\\\FilterFormat\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Entity/FilterFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Entity\\\\FilterFormat\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Entity/FilterFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Entity\\\\FilterFormat\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Entity/FilterFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Entity\\\\FilterFormat\\:\\:removeFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Entity/FilterFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Entity\\\\FilterFormat\\:\\:setFilterConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Entity/FilterFormat.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatAddForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatInterface\\:\\:removeFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatInterface\\:\\:setFilterConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterFormatListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterFormatListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPluginCollection\\:\\:getAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterPluginCollection\\:\\:sortHelper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterProcessResult\\:\\:createPlaceholder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterProcessResult.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\FilterUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/FilterUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Form\\\\FilterDisableForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Form/FilterDisableForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Hook\\\\FilterHooks\\:\\:filterSecureImageAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Hook/FilterHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Hook\\\\FilterHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Hook/FilterHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Plugin\\\\Filter\\\\FilterHtml\\:\\:filterElementAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Plugin\\\\Filter\\\\FilterHtml\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/modules/filter/src/Plugin/Filter/FilterHtml\\.php\\:265\\:\\:setTextMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$rows might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter\\\\Plugin\\\\FilterBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/src/Plugin/FilterBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter_test\\\\Form\\\\FilterTestFormatForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/filter_test/src/Form/FilterTestFormatForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter_test\\\\Hook\\\\FilterTestHooks\\:\\:filterFormatDisable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter_test\\\\Hook\\\\FilterTestHooks\\:\\:filterFormatInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\filter_test\\\\Hook\\\\FilterTestHooks\\:\\:filterFormatUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\FilterHtmlImageSecureTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Functional\\\\Rest\\\\FilterFormatXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Functional/Rest/FilterFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\FilterFormatTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\FilterFormatTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Kernel\\\\TextFormatElementFormTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\filter\\\\Kernel\\\\TextFormatElementFormTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function help_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/help.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function help_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/help.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpSectionManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpSectionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpSectionManager\\:\\:setSearchManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpSectionManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpTopicPluginBase\\:\\:getProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpTopicPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpTopicTwigLoader\\:\\:addExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpTopicTwigLoader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpTwigExtension\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpTwigExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\HelpTwigExtension\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/HelpTwigExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:blockViewHelpBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:themesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:indexClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:markForReindex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:removeItemsFromIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:updateIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:updateIndexState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:updateTopicList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help_page_test\\\\Hook\\\\HelpPageTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help_test\\\\Hook\\\\HelpTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help_topics_test\\\\Hook\\\\HelpTopicsTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help_topics_test\\\\Hook\\\\HelpTopicsTestHooks\\:\\:helpTopicsInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\help_topics_twig_tester\\\\HelpTestTwigNodeVisitor\\:\\:setStateValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\more_help_page_test\\\\Hook\\\\MoreHelpPageTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\more_help_page_test\\\\Hook\\\\MoreHelpPageTestHooks\\:\\:helpSectionInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Functional\\\\HelpTopicSearchTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/src/Functional/HelpTopicSearchTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Functional\\\\HelpTopicTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/src/Functional/HelpTopicTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Functional\\\\HelpTopicTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/src/Functional/HelpTopicTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Functional\\\\HelpTopicTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/src/Functional/HelpTopicTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Unit\\\\HelpTopicTwigTest\\:\\:getTwigMock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/help/tests/src/Unit/HelpTopicTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function history_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/history.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function history_write\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/history.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Controller\\\\HistoryController\\:\\:readNode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Controller/HistoryController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:nodeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:nodeViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:userCancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:userDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Hook/HistoryViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\filter\\\\HistoryUserTimestamp\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\filter\\\\HistoryUserTimestamp\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\filter\\\\HistoryUserTimestamp\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\filter\\\\HistoryUserTimestamp\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\filter\\\\HistoryUserTimestamp\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\history\\\\Functional\\\\HistoryTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/history/tests/src/Functional/HistoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image_anchor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image_style_preview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image_formatter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.field.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image_widget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.field.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function image_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function image_path_flush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_image_style\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/image.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ConfigurableImageEffectBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ConfigurableImageEffectBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ConfigurableImageEffectBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ConfigurableImageEffectBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$image_style in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Controller/ImageStyleDownloadController.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$lock_name might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Controller/ImageStyleDownloadController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:getReplacementID\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:replaceImageStyle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageEffectAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageEffectAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageEffectDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageEffectDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageEffectFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageEffectFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageEffectFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageEffectFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleAddForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleDeleteForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:effectSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:effectValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:updateEffectWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleFlushForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFlushForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fieldConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fieldConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fieldStorageConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fieldStorageConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:fileMove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:filePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageViewsHooks\\:\\:fieldViewsDataViewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Hook/ImageViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageEffectBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageEffectBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageEffectBase\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageEffectBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageEffectInterface\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageEffectInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageEffectPluginCollection\\:\\:sortHelper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageEffectPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageStyleInterface\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageStyleInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageStyleStorage\\:\\:clearReplacementId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageStyleStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageStyleStorage\\:\\:setReplacementId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageStyleStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageStyleStorageInterface\\:\\:clearReplacementId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageStyleStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\ImageStyleStorageInterface\\:\\:setReplacementId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/ImageStyleStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:\\$height\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:\\$width\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:defaultImageForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:validateDefaultImageForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:validateResolution\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldWidget\\\\ImageWidget\\:\\:formMultipleElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldWidget\\\\ImageWidget\\:\\:process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldWidget\\\\ImageWidget\\:\\:validateRequiredFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ConvertImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\CropImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/CropImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ResizeImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ResizeImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ResizeImageEffect\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ResizeImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\RotateImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/RotateImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\RotateImageEffect\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/RotateImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\RotateImageEffect\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/RotateImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ScaleImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ScaleImageEffect\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\ImageEffect\\\\ScaleImageEffect\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\ImageField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Plugin/migrate/field/d7/ImageField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image\\\\Routing\\\\ImageStyleRoutes\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/src/Routing/ImageStyleRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_access_test_hidden\\\\Hook\\\\ImageAccessTestHiddenHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function image_module_test_file_download\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/image_module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Hook\\\\ImageModuleTestHooks\\:\\:imageEffectInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Hook\\\\ImageModuleTestHooks\\:\\:imageStyleFlush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Hook\\\\ImageModuleTestHooks\\:\\:imageStylePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Plugin\\\\ImageEffect\\\\AjaxTestImageEffect\\:\\:ajaxCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Plugin\\\\ImageEffect\\\\AjaxTestImageEffect\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Plugin\\\\ImageEffect\\\\NullTestImageEffect\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/NullTestImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_module_test\\\\Plugin\\\\ImageEffect\\\\UriDependentTestImageEffect\\:\\:transformDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/UriDependentTestImageEffect.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageAdminStylesTest\\:\\:createSampleImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageAdminStylesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageAdminStylesTest\\:\\:getImageCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageAdminStylesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldDisplayTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldTestBase\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldTestBase\\:\\:getLastFileId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldTestBase\\:\\:previewNodeImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageFieldTestBase\\:\\:uploadNodeImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$image_that_is_too_small_file might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldValidateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageStyleFlushTest\\:\\:createSampleImage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageStyleFlushTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\ImageStyleFlushTest\\:\\:getImageCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageStyleFlushTest.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$edit in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageStyleFlushTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Functional\\\\Rest\\\\ImageStyleXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\FunctionalJavascript\\\\ImageFieldTestBase\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\FunctionalJavascript\\\\ImageFieldWidgetMultipleTest\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateImageTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateImageTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ImageCachePresetTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ImageStylesTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\image\\\\Unit\\\\ImageStyleTest\\:\\:fileDefaultScheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/image/tests/src/Unit/ImageStyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _inline_form_errors_set_errors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/inline_form_errors.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function inline_form_errors_preprocess_datetime_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/inline_form_errors.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function inline_form_errors_preprocess_details\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/inline_form_errors.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function inline_form_errors_preprocess_fieldset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/inline_form_errors.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function inline_form_errors_preprocess_form_element\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/inline_form_errors.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\FormErrorHandler\\:\\:displayErrorMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\FormErrorHandler\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\FormErrorHandler\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/FormErrorHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\Hook\\\\InlineFormErrorsHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\Hook\\\\InlineFormErrorsHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\InlineFormErrorsServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\inline_form_errors\\\\RenderElementHelper\\:\\:alterElementInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/inline_form_errors/src/RenderElementHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function jsonapi_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/jsonapi.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\EntityAccessChecker\\:\\:setLatestRevisionCheck\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/EntityAccessChecker.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:addConditionFieldPrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:applyAccessConditions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:applyAccessControls\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:buildTree\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:secureQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:setFieldManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Access\\\\TemporaryQueryGuard\\:\\:setModuleHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Access/TemporaryQueryGuard.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$reason in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Context/FieldResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\EntityResource\\:\\:doPatchIndividualRelationship\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\EntityResource\\:\\:doPatchMultipleRelationship\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\EntityResource\\:\\:updateEntityField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\EntityResource\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\FileUpload\\:\\:ensureFileUploadAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/FileUpload.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Controller\\\\FileUpload\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Controller/FileUpload.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\DefaultExceptionSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\DefaultExceptionSubscriber\\:\\:setEventResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\JsonApiRequestValidator\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\JsonApiRequestValidator\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\JsonapiMaintenanceModeSubscriber\\:\\:onMaintenanceModeRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceObjectNormalizationCacher\\:\\:onTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceObjectNormalizationCacher\\:\\:saveOnTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceObjectNormalizationCacher\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceObjectNormalizationCacher\\:\\:setRequestStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceObjectNormalizationCacher\\:\\:setVariationCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceResponseSubscriber\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceResponseSubscriber\\:\\:renderResponseBody\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceResponseValidator\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\EventSubscriber\\\\ResourceResponseValidator\\:\\:setValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Exception\\\\UnprocessableHttpEntityException\\:\\:setViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:entityBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:entityBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:entityCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiBlockContentFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiCommentFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiEntityFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiEntityTestFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiFileFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiMediaFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiNodeFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiShortcutFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiTaxonomyTermFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiUserFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:jsonapiWorkspaceFilterAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\Data\\:\\:getTotalCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/Data.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\Data\\:\\:setHasNextPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/Data.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\Data\\:\\:setTotalCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/Data.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\LabelOnlyResourceObject\\:\\:setEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/LabelOnlyResourceObject.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\ResourceIdentifier\\:\\:getDataReferencePropertyName\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonapiServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonapiServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonapiServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/JsonapiServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$entity in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Normalizer/EntityAccessDeniedHttpExceptionNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Normalizer\\\\FieldItemNormalizer\\:\\:checkForSerializedStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Normalizer\\\\FieldItemNormalizer\\:\\:getFieldItemInstance\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Normalizer\\\\JsonApiDocumentTopLevelNormalizer\\:\\:validateRequestBody\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\ParamConverter\\\\EntityUuidConverter\\:\\:setLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/ParamConverter/EntityUuidConverter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Query\\\\EntityCondition\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Query/EntityCondition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Query\\\\Filter\\:\\:root\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Query/Filter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Query\\\\Sort\\:\\:fields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Query/Sort.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\ResourceType\\\\ResourceType\\:\\:setRelatableResourceTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/ResourceType/ResourceType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\ResourceType\\\\ResourceTypeBuildEvent\\:\\:disableField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\ResourceType\\\\ResourceTypeBuildEvent\\:\\:disableResourceType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\ResourceType\\\\ResourceTypeBuildEvent\\:\\:setPublicFieldName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Revisions\\\\VersionNegotiator\\:\\:addVersionNegotiator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Revisions/VersionNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\jsonapi\\\\Revisions\\\\VersionNegotiator\\:\\:getRevision\\(\\) should return Drupal\\\\Core\\\\Entity\\\\EntityInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Revisions/VersionNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Revisions\\\\VersionNegotiator\\:\\:throwBadRequestHttpException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Revisions/VersionNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Revisions\\\\VersionNegotiator\\:\\:throwNotFoundHttpException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Revisions/VersionNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Routing\\\\Routes\\:\\:addRouteParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Routing/Routes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Routing\\\\Routes\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Routing/Routes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Routing\\\\Routes\\:\\:rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Routing/Routes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Routing\\\\Routes\\:\\:routes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Routing/Routes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi\\\\Serializer\\\\Serializer\\:\\:setFallbackNormalizer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/src/Serializer/Serializer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_field_access\\\\Hook\\\\JsonapiTestFieldAccessHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_field_access/src/Hook/JsonapiTestFieldAccessHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function jsonapi_test_field_filter_access_jsonapi_entity_field_filter_access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_field_filter_access/jsonapi_test_field_filter_access.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_non_cacheable_methods\\\\Hook\\\\JsonapiTestNonCacheableMethodsHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/src/Hook/JsonapiTestNonCacheableMethodsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_non_cacheable_methods\\\\Hook\\\\JsonapiTestNonCacheableMethodsHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/src/Hook/JsonapiTestNonCacheableMethodsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_resource_type_building\\\\EventSubscriber\\\\ResourceTypeBuildEventSubscriber\\:\\:aliasResourceTypeFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_resource_type_building\\\\EventSubscriber\\\\ResourceTypeBuildEventSubscriber\\:\\:disableResourceType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_resource_type_building\\\\EventSubscriber\\\\ResourceTypeBuildEventSubscriber\\:\\:disableResourceTypeFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_resource_type_building\\\\EventSubscriber\\\\ResourceTypeBuildEventSubscriber\\:\\:renameResourceType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jsonapi_test_user\\\\Hook\\\\JsonapiTestUserHooks\\:\\:userFormatNameAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/modules/jsonapi_test_user/src/Hook/JsonapiTestUserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\BlockContentTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/BlockContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\CommentTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/CommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\CommentTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/CommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\EntryPointTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/EntryPointTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\EntryPointTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/EntryPointTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\FileTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/FileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\InternalEntitiesTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\InternalEntitiesTest\\:\\:jsonapiGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiFilterRegressionTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiFunctionalTestBase\\:\\:createDefaultContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiFunctionalTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiFunctionalTestBase\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiPatchRegressionTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\JsonApiRegressionTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\MediaTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/MediaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\MenuLinkContentTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\NodeTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/NodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\NodeTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/NodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:addOmittedObject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:assertResourceErrorResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:assertResourceResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:assertSameDocument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:doTestIncluded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:doTestRelated\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:doTestRelationshipGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:doTestRelationshipMutation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:doTestSparseFieldSets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:getEntityDuplicate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:grantIncludedPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:grantPermissionsToTestedRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:recursiveKsort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:resetOmittedLinkKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:revokePermissionsFromTestedRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:setUpRevisionAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:sortOmittedLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:sortResourceCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$created_entity might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$dynamic_cache might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$parseable_invalid_request_body might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$reason in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\RestJsonApiUnsupported\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\RestJsonApiUnsupported\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\RestJsonApiUnsupported\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ShortcutTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ShortcutTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\TermTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\TermTest\\:\\:providerTestGetIndividualTermWithParent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Context\\\\FieldResolverTest\\:\\:resolveInternalEntityQueryPathErrorProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Context\\\\FieldResolverTest\\:\\:resolveInternalEntityQueryPathProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Context\\\\FieldResolverTest\\:\\:resolveInternalIncludePathErrorProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Context\\\\FieldResolverTest\\:\\:resolveInternalIncludePathProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\JsonapiKernelTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\JsonapiKernelTestBase\\:\\:createTextField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\JsonApiDocumentTopLevelNormalizerTest\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\JsonApiDocumentTopLevelNormalizerTest\\:\\:getNormalizer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\JsonApiDocumentTopLevelNormalizerTest\\:\\:testCacheableMetadataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\LinkCollectionNormalizerTest\\:\\:getNormalizer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\LinkCollectionNormalizerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\LinkCollectionNormalizerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\RelationshipNormalizerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\RelationshipNormalizerTest\\:\\:normalizeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Normalizer\\\\RelationshipNormalizerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Query\\\\FilterTest\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Query\\\\FilterTest\\:\\:getFieldResolverMock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\Query\\\\FilterTest\\:\\:parameterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\ResourceType\\\\RelatedResourceTypesTest\\:\\:getRelatableResourceTypesByFieldProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Kernel\\\\ResourceType\\\\RelatedResourceTypesTest\\:\\:getRelatableResourceTypesProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\JsonApiSpecTest\\:\\:providerTestIsValidCustomQueryParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\JsonApiSpecTest\\:\\:providerTestIsValidMemberName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Normalizer\\\\JsonApiDocumentTopLevelNormalizerTest\\:\\:denormalizeUuidProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\EntityConditionGroupTest\\:\\:constructProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\EntityConditionTest\\:\\:queryParameterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\EntityConditionTest\\:\\:validationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\OffsetPageTest\\:\\:parameterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\SortTest\\:\\:badParameterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/SortTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Query\\\\SortTest\\:\\:parameterProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Query/SortTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Routing\\\\RoutesTest\\:\\:expectedRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Unit\\\\Routing\\\\RoutesTest\\:\\:notExpectedRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_language_content_settings_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/language.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_language_negotiation_configure_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/language.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function language_configuration_element_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/language.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function language_negotiation_url_prefixes_update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/language.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function language_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/language.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverride\\:\\:addCollections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverride\\:\\:installLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverride\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverride\\:\\:onConfigRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverride\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Config\\\\LanguageConfigFactoryOverrideInterface\\:\\:installLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Config/LanguageConfigFactoryOverrideInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManager\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManager\\:\\:rebuildServices\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManager\\:\\:saveLanguageTypesConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManager\\:\\:setNegotiator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManager\\:\\:updateLockedLanguageWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManagerInterface\\:\\:rebuildServices\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManagerInterface\\:\\:saveLanguageTypesConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManagerInterface\\:\\:setNegotiator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\ConfigurableLanguageManagerInterface\\:\\:updateLockedLanguageWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/ConfigurableLanguageManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Element\\\\LanguageConfiguration\\:\\:processLanguageConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Element/LanguageConfiguration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Entity\\\\ConfigurableLanguage\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Entity/ConfigurableLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Entity\\\\ConfigurableLanguage\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Entity/ConfigurableLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Entity\\\\ConfigurableLanguage\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Entity/ConfigurableLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Entity\\\\ConfigurableLanguage\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Entity/ConfigurableLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Entity\\\\ContentLanguageSettings\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Entity/ContentLanguageSettings.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\EventSubscriber\\\\ConfigSubscriber\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/EventSubscriber/ConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\EventSubscriber\\\\ConfigSubscriber\\:\\:setPathProcessorLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/EventSubscriber/ConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\EventSubscriber\\\\LanguageRequestSubscriber\\:\\:onContainerInitializeSubrequestFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\EventSubscriber\\\\LanguageRequestSubscriber\\:\\:onKernelRequestLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\EventSubscriber\\\\LanguageRequestSubscriber\\:\\:setLanguageOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\ContentLanguageSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/ContentLanguageSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\ContentLanguageSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/ContentLanguageSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:validateCustom\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:validatePredefined\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageDeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageFormBase\\:\\:commonForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageFormBase\\:\\:validateCommon\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/LanguageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationBrowserDeleteForm\\:\\:getEditableConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationBrowserDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationBrowserForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationBrowserForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationBrowserForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserForm.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$key might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationConfigureForm\\:\\:configureFormTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationConfigureForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationConfigureForm\\:\\:disableLanguageSwitcher\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationConfigureForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationSelectedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationSelectedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationSessionForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationSessionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationUrlForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationUrlForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationUrlForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationUrlForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Form\\\\NegotiationUrlForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Form/NegotiationUrlForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:entityBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:fieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:languageTypesInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:tourTipsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\HttpKernel\\\\PathProcessorLanguage\\:\\:initConfigSubscriber\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/HttpKernel/PathProcessorLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\HttpKernel\\\\PathProcessorLanguage\\:\\:initProcessors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/HttpKernel/PathProcessorLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\HttpKernel\\\\PathProcessorLanguage\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/HttpKernel/PathProcessorLanguage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageListBuilder\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodBase\\:\\:persist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodBase\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodBase\\:\\:setLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodInterface\\:\\:persist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodInterface\\:\\:setConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodInterface\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiationMethodInterface\\:\\:setLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiationMethodInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:initLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:purgeConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:saveConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiator\\:\\:updateConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$method_id might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiatorInterface\\:\\:purgeConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiatorInterface\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiatorInterface\\:\\:saveConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiatorInterface\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageNegotiatorInterface\\:\\:updateConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\LanguageServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/LanguageServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Plugin\\\\Condition\\\\Language\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/Condition/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Plugin\\\\Condition\\\\Language\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/Condition/Language.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Plugin\\\\Derivative\\\\LanguageBlock\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/Derivative/LanguageBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Plugin\\\\Derivative\\\\LanguageBlock\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/Derivative/LanguageBlock.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$langcode might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language\\\\Plugin\\\\LanguageNegotiation\\\\LanguageNegotiationSession\\:\\:persist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_elements_test\\\\Form\\\\LanguageConfigurationElement\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_elements_test\\\\Form\\\\LanguageConfigurationElementTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_entity_field_access_test\\\\Hook\\\\LanguageEntityFieldAccessTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_entity_field_access_test/src/Hook/LanguageEntityFieldAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function language_test_store_language_negotiation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/language_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Controller\\\\LanguageTestController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Controller/LanguageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Controller\\\\LanguageTestController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Controller/LanguageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Controller\\\\LanguageTestController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Controller/LanguageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Controller\\\\LanguageTestController\\:\\:typeLinkActiveClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Controller/LanguageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageFallbackCandidatesAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageFallbackCandidatesTestAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageNegotiationInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageSwitchLinksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageTypesInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:languageTypesInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:modulePreinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\language_test\\\\Hook\\\\LanguageTestHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\ConfigurableLanguageManagerTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageBreadcrumbTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageBreadcrumbTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageBreadcrumbTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageConfigSchemaTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageConfigSchemaTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageSelectorTranslatableTest\\:\\:getAdministratorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ConfigurableLanguageXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\Rest\\\\ContentLanguageSettingsXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\LanguageTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\LanguageContentSettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\LanguageContentTaxonomyVocabularySettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\LanguageContentSettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\LanguageContentTaxonomyVocabularySettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Views\\\\LanguageTestBase\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Views/LanguageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Views\\\\LanguageTestBase\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Views/LanguageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Kernel\\\\Views\\\\LanguageTestBase\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Kernel/Views/LanguageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Unit\\\\ContentLanguageSettingsUnitTest\\:\\:providerDefaultLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Unit\\\\ContentLanguageSettingsUnitTest\\:\\:providerIsDefaultConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Unit\\\\ContentLanguageSettingsUnitTest\\:\\:providerLanguageAlterable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Unit\\\\ContentLanguageSettingsUnitTest\\:\\:providerLoadByEntityTypeBundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\language\\\\Plugin\\\\LanguageNegotiation\\\\base_path\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Unit\\\\Menu\\\\LanguageLocalTasksTest\\:\\:getLanguageAdminOverviewRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/layout_builder.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/layout_builder.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_preprocess_language_content_settings_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/layout_builder.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_expose_all_field_blocks\\\\Hook\\\\LayoutBuilderExposeAllFieldBlocksHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Annotation\\\\SectionStorage\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Annotation/SectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Cache\\\\ExtraFieldBlockCacheTagInvalidator\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Cache/ExtraFieldBlockCacheTagInvalidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\AddSectionController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/AddSectionController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseBlockController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseBlockController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseBlockController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseBlockController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseBlockController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseBlockController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseSectionController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseSectionController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseSectionController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseSectionController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\ChooseSectionController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/ChooseSectionController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\LayoutBuilderController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/LayoutBuilderController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\LayoutBuilderController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/LayoutBuilderController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Controller\\\\MoveBlockController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Controller/MoveBlockController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Element\\\\LayoutBuilder\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Element/LayoutBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Element\\\\LayoutBuilder\\:\\:prepareLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Element/LayoutBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Entity\\\\LayoutBuilderEntityViewDisplay\\:\\:addSectionField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Entity\\\\LayoutBuilderEntityViewDisplay\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Entity\\\\LayoutBuilderEntityViewDisplay\\:\\:removeSectionField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Entity\\\\LayoutBuilderEntityViewDisplay\\:\\:setSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Event\\\\SectionComponentBuildRenderArrayEvent\\:\\:addCacheableDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Event\\\\SectionComponentBuildRenderArrayEvent\\:\\:getCacheableMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Event\\\\SectionComponentBuildRenderArrayEvent\\:\\:setBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\BlockComponentRenderArray\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\BlockComponentRenderArray\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\BlockComponentRenderArray\\:\\:onBuildRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\PrepareLayout\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/PrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\PrepareLayout\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/PrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\PrepareLayout\\:\\:onPrepareLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/PrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\EventSubscriber\\\\SetInlineBlockDependency\\:\\:onGetDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Field\\\\LayoutSectionItemList\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Field/LayoutSectionItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Field\\\\LayoutSectionItemList\\:\\:setSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Field/LayoutSectionItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureBlockFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureBlockFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureBlockFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureBlockFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureBlockFormBase\\:\\:successfulAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureBlockFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureBlockFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureBlockFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureSectionForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureSectionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureSectionForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureSectionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureSectionForm\\:\\:successfulAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureSectionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\ConfigureSectionForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/ConfigureSectionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\DefaultsEntityForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/DefaultsEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\DefaultsEntityForm\\:\\:layoutBuilderElementGetKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/DefaultsEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\DefaultsEntityForm\\:\\:redirectOnSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/DefaultsEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\DiscardLayoutChangesForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\DiscardLayoutChangesForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutBuilderDisableForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutBuilderDisableForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutBuilderDisableForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutBuilderDisableForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutBuilderEntityViewDisplayForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutBuilderEntityViewDisplayForm\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutBuilderEntityViewDisplayForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutRebuildConfirmFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutRebuildConfirmFormBase\\:\\:handleSectionStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutRebuildConfirmFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\LayoutRebuildConfirmFormBase\\:\\:successfulAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\MoveBlockForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/MoveBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\MoveBlockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/MoveBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\MoveBlockForm\\:\\:successfulAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/MoveBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\OverridesEntityForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/OverridesEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\OverridesEntityForm\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/OverridesEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\OverridesEntityForm\\:\\:redirectOnSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/OverridesEntityForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\RemoveBlockForm\\:\\:handleSectionStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/RemoveBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\RemoveSectionForm\\:\\:handleSectionStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/RemoveSectionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\RevertOverridesForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/RevertOverridesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Form\\\\RevertOverridesForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Form/RevertOverridesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:blockContentAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:entityBuildDefaultsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:entityTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:entityViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:fieldConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:fieldConfigInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:pluginFilterBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:pluginFilterBlockBlockUiAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:pluginFilterBlockLayoutBuilderAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:pluginFilterLayoutAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:pluginFilterLayoutLayoutBuilderAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:systemBreadcrumbAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:themeRegistryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:themeSuggestionsFieldAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:deleteBlocksAndUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:handleEntityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:handlePreSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:removeUnused\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:removeUnusedForEntityOnSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:saveInlineBlockComponent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockEntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsage\\:\\:addUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsage\\:\\:deleteUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsage\\:\\:removeByLayoutEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsageInterface\\:\\:addUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsageInterface\\:\\:deleteUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockUsageInterface\\:\\:removeByLayoutEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/InlineBlockUsageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutBuilderOverridesPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutBuilderOverridesPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutBuilderOverridesPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutBuilderOverridesPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutBuilderOverridesPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutBuilderOverridesPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutBuilderServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutBuilderServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutTempstoreRepository\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutTempstoreRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutTempstoreRepository\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutTempstoreRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutTempstoreRepositoryInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\LayoutTempstoreRepositoryInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\ExtraFieldBlock\\:\\:replaceFieldPlaceholder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\FieldBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/FieldBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\FieldBlock\\:\\:formatterSettingsAjaxCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/FieldBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\FieldBlock\\:\\:formatterSettingsProcessCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/FieldBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\InlineBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/InlineBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\InlineBlock\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/InlineBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Block\\\\InlineBlock\\:\\:saveBlockContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Block/InlineBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\DataType\\\\SectionData\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/DataType/SectionData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\ExtraFieldBlockDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/ExtraFieldBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\ExtraFieldBlockDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/ExtraFieldBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\FieldBlockDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\FieldBlockDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\LayoutBuilderLocalTaskDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Derivative\\\\LayoutBuilderLocalTaskDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Field\\\\FieldWidget\\\\LayoutBuilderWidget\\:\\:extractFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Field\\\\FieldWidget\\\\LayoutBuilderWidget\\:\\:layoutBuilderElementGetKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\Layout\\\\MultiWidthLayoutBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\SectionStorage\\\\DefaultsSectionStorage\\:\\:buildRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\SectionStorage\\\\DefaultsSectionStorage\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\SectionStorage\\\\OverridesSectionStorage\\:\\:buildRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\SectionStorage\\\\SectionStorageBase\\:\\:buildLayoutRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Plugin\\\\SectionStorage\\\\SectionStorageBase\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\Routing\\\\LayoutBuilderRoutes\\:\\:onAlterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/Routing/LayoutBuilderRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder\\\\SectionStorageInterface\\:\\:buildRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/src/SectionStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_element_test\\\\EventSubscriber\\\\TestPrepareLayout\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_element_test\\\\EventSubscriber\\\\TestPrepareLayout\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_element_test\\\\EventSubscriber\\\\TestPrepareLayout\\:\\:onAfterPrepareLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_element_test\\\\EventSubscriber\\\\TestPrepareLayout\\:\\:onBeforePrepareLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_extra_field_test_node_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_extra_field_test/layout_builder_extra_field_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_extra_field_test\\\\Hook\\\\LayoutBuilderExtraFieldTestHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_extra_field_test/src/Hook/LayoutBuilderExtraFieldTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_form_block_test\\\\Plugin\\\\Block\\\\TestFormApiFormBlock\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_form_block_test/src/Plugin/Block/TestFormApiFormBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_form_block_test\\\\Plugin\\\\Block\\\\TestFormApiFormBlock\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_form_block_test/src/Plugin/Block/TestFormApiFormBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_test_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_test_node_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_test_preprocess_layout__onecol\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_test_preprocess_layout__twocol_section\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Hook\\\\LayoutBuilderTestHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Hook\\\\LayoutBuilderTestHooks\\:\\:layoutBuilderEntityFormDisplayAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Hook\\\\LayoutBuilderTestHooks\\:\\:pluginFilterBlockLayoutBuilderAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Hook\\\\LayoutBuilderTestHooks\\:\\:systemBreadcrumbAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\Block\\\\TestAjaxBlock\\:\\:ajaxCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/TestAjaxBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\Layout\\\\LayoutWithoutLabel\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutWithoutLabel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:buildLayoutRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:buildRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\SimpleConfigSectionStorage\\:\\:setSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\TestStateBasedSectionStorage\\:\\:buildRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\TestStateBasedSectionStorage\\:\\:extractIdFromRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\TestStateBasedSectionStorage\\:\\:getSectionListFromId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_builder_theme_suggestions_test_preprocess_item_list__layouts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderAccessTest\\:\\:providerTestAccessWithBundles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderAccessTest\\:\\:providerTestAccessWithoutBundles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderDefaultValuesTest\\:\\:createImageField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderDefaultValuesTest\\:\\:defaultValueCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderFieldBlockEntityReferenceCacheTagsTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTestBase\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderTranslationTest\\:\\:getTranslatorPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutSectionTest\\:\\:providerTestLayoutSectionFormatter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutBuilderEntityViewDisplayXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutRestTestBase\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutRestTestBase\\:\\:assertNormalizationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutRestTestBase\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\Rest\\\\LayoutRestTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\BlockFormMessagesTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\BlockFormMessagesTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContentPreviewToggleTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContentPreviewToggleTest\\:\\:sortableAfter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContentPreviewToggleTest\\:\\:sortableTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContentPreviewToggleTest\\:\\:sortableUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContentPreviewToggleTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockPrivateFilesTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTest\\:\\:layoutNoSaveProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:addInlineBlockToLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:assertDialogClosedAndTextVisible\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:assertSaveLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:configureInlineBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:createBlockContentType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:getLatestBlockEntityId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:removeInlineBlockFromLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\InlineBlockTestBase\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderDisableInteractionsTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderDisableInteractionsTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderTest\\:\\:sortableAfter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderTest\\:\\:sortableTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderTest\\:\\:sortableUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderUiTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\LayoutBuilderUiTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\MoveBlockFormTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\FunctionalJavascript\\\\MoveBlockFormTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\DefaultsSectionStorageTest\\:\\:providerTestAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.covers + 'message' => '#^@covers value layout_builder_entity_view_alter references an invalid class or function\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\FieldBlockTest\\:\\:providerTestBlockAccessEntityAllowedFieldHasValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\FieldBlockTest\\:\\:providerTestBlockAccessNotAllowed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\FieldBlockTest\\:\\:providerTestBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutBuilderCompatibilityTestBase\\:\\:assertFieldAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutBuilderCompatibilityTestBase\\:\\:enableOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutBuilderCompatibilityTestBase\\:\\:installLayoutBuilder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutBuilderEntityViewDisplayTest\\:\\:providerTestIsLayoutBuilderEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutEntityHelperTraitTest\\:\\:providerTestGetSectionStorageForEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\LayoutEntityHelperTraitTest\\:\\:providerTestOriginalEntityUsesDefaultStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\OverridesSectionStorageTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\OverridesSectionStorageTest\\:\\:providerTestAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\OverridesSectionStorageTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\SectionListTestBase\\:\\:assertSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Kernel\\\\SectionListTestBase\\:\\:providerTestRemoveAllSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\BlockComponentRenderArrayTest\\:\\:providerBlockTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\DefaultsSectionStorageTest\\:\\:providerTestExtractEntityFromRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\LayoutBuilderIsActiveCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\LayoutEntityHelperTraitTest\\:\\:providerSectionsWithInlineComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\OverridesSectionStorageTest\\:\\:providerTestExtractEntityFromRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\SectionStorageManagerTest\\:\\:providerTestFindByContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\SectionTest\\:\\:providerTestGetLayout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\SectionTest\\:\\:providerTestGetThirdPartySettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\SectionTest\\:\\:providerTestSetThirdPartySetting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\SectionTest\\:\\:providerTestUnsetThirdPartySetting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function layout_discovery_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_discovery/layout_discovery.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_layout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_discovery/layout_discovery.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_discovery\\\\Hook\\\\LayoutDiscoveryHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_discovery\\\\Kernel\\\\LayoutTest\\:\\:processCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_discovery/tests/src/Kernel/LayoutTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\layout_discovery\\\\Kernel\\\\LayoutTest\\:\\:renderLayoutData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/layout_discovery/tests/src/Kernel/LayoutTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_link_formatter_link_separate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/link.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Hook\\\\LinkHooks\\:\\:fieldTypeCategoryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Hook/LinkHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Hook\\\\LinkHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Hook/LinkHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldType\\\\LinkItem\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Field/FieldType/LinkItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldWidget\\\\LinkWidget\\:\\:flagErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldWidget\\\\LinkWidget\\:\\:validateTitleElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldWidget\\\\LinkWidget\\:\\:validateTitleNoLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldWidget\\\\LinkWidget\\:\\:validateUriElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Validation\\\\Constraint\\\\LinkAccessConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\LinkField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/migrate/field/d6/LinkField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\LinkField\\:\\:alterFieldInstanceMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/migrate/field/d7/LinkField.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\link\\\\Plugin\\\\migrate\\\\process\\\\FieldLink has an unused parameter \\$migration\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/src/Plugin/migrate/process/FieldLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link_test_base_field\\\\Hook\\\\LinkTestBaseFieldHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/modules/link_test_base_field/src/Hook/LinkTestBaseFieldHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Functional\\\\LinkFieldUITest\\:\\:providerTestFieldUI\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Functional/LinkFieldUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\FunctionalJavascript\\\\LinkFieldFormStatesTest\\:\\:linkFieldFormStatesData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Unit\\\\Plugin\\\\Validation\\\\Constraint\\\\LinkExternalProtocolsConstraintValidatorTest\\:\\:providerValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\link\\\\Unit\\\\Plugin\\\\migrate\\\\process\\\\FieldLinkTest\\:\\:canonicalizeUriDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_fetch_download\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_fetch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_fetch_import\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_status_check\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_status_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_batch_version_check\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.batch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_config_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_config_batch_refresh_name\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_config_batch_set_config_langcodes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Function locale_config_batch_update_components\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translate_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translate_batch_import\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translate_batch_import_save\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translate_batch_refresh\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_check_projects\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_check_projects_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_check_projects_local\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_flush_projects\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_update_10300\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _locale_parse_js_file\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _locale_refresh_configuration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _locale_refresh_translations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_form_language_admin_add_form_alter_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_form_language_admin_edit_form_alter_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_preprocess_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_string_is_safe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_system_file_system_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_system_remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_system_set_config_langcodes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_system_update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_clear_status\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_file_history_delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_get_status\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_language_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_status_delete_languages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_status_delete_projects\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_status_save\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_locale_translation_last_check\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.pages.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_locale_translation_update_info\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.pages.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_cron_fill_queue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.translation.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function locale_translation_clear_cache_projects\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/locale.translation.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\EventSubscriber\\\\LocaleTranslationCacheTag\\:\\:saveTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\ExportForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\ExportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$item in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ExportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\ImportForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\ImportForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\ImportForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/ImportForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\LocaleSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/LocaleSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\LocaleSettingsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/LocaleSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateFilterForm\\:\\:resetForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateFilterForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslateFormBase\\:\\:translateFilters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslationStatusForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslationStatusForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslationStatusForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslationStatusForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Form\\\\TranslationStatusForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Form/TranslationStatusForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:cacheFlush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:configurableLanguageDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:configurableLanguageInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:configurableLanguageUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:jsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:modulePreuninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:themesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:deleteLanguageTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:deleteTranslationOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:saveTranslationActive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:saveTranslationOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:updateDefaultConfigLangcodes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:onOverrideChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:processTranslatableData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:resetExistingTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:saveCustomizedTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigSubscriber\\:\\:updateLocaleStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\locale\\\\LocaleDefaultConfigStorage\\:\\:read\\(\\) should return array but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/locale/src/LocaleDefaultConfigStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:deleteAll\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:disableAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:disableAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorageInterface\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleTranslation\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\LocaleTranslation\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/LocaleTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\Plugin\\\\QueueWorker\\\\LocaleTranslation\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PluralFormula\\:\\:loadFormulae\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PluralFormula.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:getOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:loadStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:readItem\\(\\) should return Drupal\\\\Component\\\\Gettext\\\\PoItem but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:readString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:setOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:getOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:getReport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:importString\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:setLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:setOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:setReport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:writeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:writeItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$plural in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:checkVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:dbExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:dbStringTable\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:deleteStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:deleteTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:updateLocation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringStorageInterface\\:\\:deleteStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale\\\\StringStorageInterface\\:\\:deleteTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/src/StringStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:countriesAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:languageFallbackCandidatesLocaleLookupAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:localeTranslationProjectsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test\\\\Hook\\\\LocaleTestHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test_development_release\\\\Hook\\\\LocaleTestDevelopmentReleaseHooks\\:\\:localeTranslationProjectsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test_development_release\\\\Hook\\\\LocaleTestDevelopmentReleaseHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test_translate\\\\Hook\\\\LocaleTestTranslateHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\locale_test_translate\\\\Hook\\\\LocaleTestTranslateHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleExportTest\\:\\:getCustomPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleExportTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleExportTest\\:\\:getPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleExportTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getBadPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getCustomOverwritePoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getCustomPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getEmptyPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getInvalidEncodedPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getOverwritePoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFileWithConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFileWithConfigDe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFileWithContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFileWithEmptyMsgstr\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleImportFunctionalTest\\:\\:getPoFileWithMsgstr\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleLocaleLookupTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePathTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePathTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePluralFormatTest\\:\\:getPoFileWithBrokenPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePluralFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePluralFormatTest\\:\\:getPoFileWithComplexPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePluralFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePluralFormatTest\\:\\:getPoFileWithMissingPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePluralFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePluralFormatTest\\:\\:getPoFileWithSimplePlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocalePluralFormatTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleTranslatedSchemaDefinitionTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleTranslatedSchemaDefinitionTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleTranslatedSchemaDefinitionTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleTranslatedSchemaDefinitionTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleTranslatedSchemaDefinitionTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:addLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:assertTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:makePoFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:setCurrentTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:setTranslationFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateBase\\:\\:setTranslationsDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleUpdateCronTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Kernel\\\\Migrate\\\\MigrateLocaleConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Kernel\\\\Migrate\\\\MigrateLocaleConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Unit\\\\LocaleLookupTest\\:\\:getCidProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Unit/LocaleLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Unit\\\\LocaleLookupTest\\:\\:providerFixOldPluralTranslationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Unit/LocaleLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Unit\\\\LocaleLookupTest\\:\\:resolveCacheMissWithFallbackProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Unit/LocaleLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Unit\\\\Menu\\\\LocaleLocalTasksTest\\:\\:getLocalePageRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.install', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$error in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_filter_format_edit_form_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_preprocess_media_reference_help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_theme_suggestions_media\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_media\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/media.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Controller\\\\MediaFilterController\\:\\:checkCsrf\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Controller/MediaFilterController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Controller\\\\MediaFilterController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Controller/MediaFilterController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Controller\\\\OEmbedIframeController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Controller/OEmbedIframeController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:getRequestTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:preSaveRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\Media\\:\\:prepareSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/Media.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Entity\\\\MediaType\\:\\:getStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Entity/MediaType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\EventSubscriber\\\\MediaConfigSubscriber\\:\\:onSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/EventSubscriber/MediaConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Form\\\\MediaSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Form/MediaSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Form\\\\MediaTypeDeleteConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Form/MediaTypeDeleteConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:fieldTypeCategoryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:fieldUiPreconfiguredOptionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:fieldWidgetCompleteFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:fieldWidgetSingleElementFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceBase\\:\\:prepareFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceBase\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceInterface\\:\\:prepareFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaSourceInterface\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaSourceInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:ajaxHandlerData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$source in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\OEmbed\\\\Resource\\:\\:setDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/OEmbed/Resource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\OEmbed\\\\Resource\\:\\:setThumbnailDimensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/OEmbed/Resource.php', +]; +$ignoreErrors[] = [ + // identifier: nullCoalesce.variable + 'message' => '#^Variable \\$resource_url on left side of \\?\\? always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/OEmbed/UrlResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Derivative\\\\DynamicLocalTasks\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Derivative/DynamicLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Derivative\\\\DynamicLocalTasks\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Derivative/DynamicLocalTasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Filter\\\\MediaEmbed\\:\\:applyPerEmbedMediaOverrides\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Filter/MediaEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Filter\\\\MediaEmbed\\:\\:renderIntoDomNode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Filter/MediaEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Filter\\\\MediaEmbed\\:\\:replaceNodeContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Filter/MediaEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Filter\\\\MediaEmbed\\:\\:validateOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Filter/MediaEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\QueueWorker\\\\ThumbnailDownloader\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Validation\\\\Constraint\\\\OEmbedResourceConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\Validation\\\\Constraint\\\\OEmbedResourceConstraintValidator\\:\\:handleException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\AudioFile\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/AudioFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\Image\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/Image.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbed\\:\\:prepareFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbed\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbed\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbed\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbedDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbedDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\OEmbedDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/OEmbedDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\media\\\\Source\\\\VideoFile\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/media/Source/VideoFile.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_test_embed_preprocess_media_embed_error\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_embed/media_test_embed.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_embed\\\\Hook\\\\MediaTestEmbedHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_embed\\\\Hook\\\\MediaTestEmbedHooks\\:\\:entityViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_embed\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_embed/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_test_oembed_preprocess_media_oembed_iframe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/media_test_oembed.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\Controller\\\\ResourceController\\:\\:setResource404\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/Controller/ResourceController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\Controller\\\\ResourceController\\:\\:setResourceUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/Controller/ResourceController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\Hook\\\\MediaTestOembedHooks\\:\\:oembedResourceUrlAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/Hook/MediaTestOembedHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\MediaTestOembedServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\ProviderRepository\\:\\:setProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/ProviderRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_oembed\\\\UrlResolver\\:\\:setEndpointUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_oembed/src/UrlResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_source\\\\Plugin\\\\media\\\\Source\\\\TestDifferentDisplays\\:\\:prepareFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestDifferentDisplays.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_source\\\\Plugin\\\\media\\\\Source\\\\TestDifferentDisplays\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestDifferentDisplays.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_source\\\\Plugin\\\\media\\\\Source\\\\TestWithHiddenSourceField\\:\\:prepareFormDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithHiddenSourceField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_test_source\\\\Plugin\\\\media\\\\Source\\\\TestWithHiddenSourceField\\:\\:prepareViewDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithHiddenSourceField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\FieldFormatter\\\\OEmbedFormatterTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\FieldFormatter\\\\OEmbedFormatterTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\FieldFormatter\\\\OEmbedFormatterTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaAccessTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaTypeCreationTest\\:\\:providerMediaTypeCreationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaTypeCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiFunctionalTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\MediaUiReferenceWidgetTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\ResourceFetcherTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/ResourceFetcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\ResourceFetcherTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/ResourceFetcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\ResourceFetcherTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/ResourceFetcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaResourceTestBase\\:\\:uploadFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaTypeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\Rest\\\\MediaXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/Rest/MediaXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\UrlResolverTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/UrlResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\UrlResolverTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/UrlResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Functional\\\\UrlResolverTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Functional/UrlResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaEmbedFilterTestBase\\:\\:showHiddenFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaJavascriptTestBase\\:\\:waitUntilVisible\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceOEmbedVideoTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceOEmbedVideoTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceOEmbedVideoTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceTestBase\\:\\:createMediaTypeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceTestBase\\:\\:createMediaTypeFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaSourceTestBase\\:\\:hideMediaTypeFieldWidget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaStandardProfileTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaStandardProfileTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\FunctionalJavascript\\\\MediaStandardProfileTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaAccessControlHandlerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaAccessControlHandlerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTest\\:\\:providerAccessUnpublished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTest\\:\\:providerFilterIntegration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTest\\:\\:providerMissingEntityIndicator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTest\\:\\:providerOverridesAltAndTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTest\\:\\:providerTestBasics\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTestBase\\:\\:assertHasAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTestBase\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTestBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaEmbedFilterTranslationTest\\:\\:providerTranslationSituations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\MediaThumbnailFormatterTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest\\.php\\:107\\:\\:getEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\Views\\\\RevisionUserTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/Views/RevisionUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Kernel\\\\Views\\\\RevisionUserTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Kernel/Views/RevisionUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media\\\\Unit\\\\ResourceTest\\:\\:setDimensionsTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media/tests/src/Unit/ResourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _media_library_media_type_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _media_library_views_form_media_library_after_build\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_library_preprocess_media\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_library_preprocess_views_view__media_library\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_library_preprocess_views_view_fields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_media_library_item\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_media_library_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/media_library.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Ajax\\\\UpdateSelectionCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Ajax/UpdateSelectionCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:prepareMediaEntityForSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:processInputValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:removeButtonSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\AddFormBase\\:\\:validateMediaEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/AddFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\FileUploadForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/FileUploadForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\FileUploadForm\\:\\:prepareMediaEntityForSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/FileUploadForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\FileUploadForm\\:\\:removeButtonSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/FileUploadForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\FileUploadForm\\:\\:uploadButtonSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/FileUploadForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\OEmbedForm\\:\\:addButtonSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/OEmbedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\OEmbedForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/OEmbedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\OEmbedForm\\:\\:validateUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/OEmbedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Form\\\\SettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Form/SettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:fieldUiPreconfiguredOptionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:imageStyleAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:localTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:mediaSourceInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:viewsPostRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:viewsPreRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/MediaLibraryServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryState\\:\\:validateRequiredParameters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/MediaLibraryState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryUiBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/MediaLibraryUiBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryUiBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/MediaLibraryUiBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:addItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:extractFormValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:removeItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:setFieldState\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:validateItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryWidget\\:\\:validateRequired\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\views\\\\field\\\\MediaLibrarySelectForm\\:\\:viewsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Plugin\\\\views\\\\field\\\\MediaLibrarySelectForm\\:\\:viewsFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function media_library_form_overwrite_test_media_source_info_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library_test\\\\Form\\\\TestNodeFormOverride\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_test/src/Form/TestNodeFormOverride.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library_test\\\\Hook\\\\MediaLibraryTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library_test\\\\Hook\\\\MediaLibraryTestHooks\\:\\:fieldWidgetInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library_test\\\\Hook\\\\MediaLibraryTestHooks\\:\\:mediaCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\media_library_test_widget\\\\Plugin\\\\Field\\\\FieldWidget\\\\MediaLibraryInceptionWidget\\:\\:elementValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/modules/media_library_test_widget/src/Plugin/Field/FieldWidget/MediaLibraryInceptionWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\ContentModerationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\ContentModerationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$jpg_image might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\EntityReferenceWidgetTest\\:\\:sortableAfter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\EntityReferenceWidgetTest\\:\\:sortableTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:addMediaFileToField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:assertMediaAdded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:assertMediaLibraryGrid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:assertMediaLibraryTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:assertNoMediaAdded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:assertSelectedMediaCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:pressInsertSelected\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:pressSaveButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:saveAnd\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:selectMediaItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:switchToMediaLibraryGrid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:switchToMediaLibraryTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:switchToMediaType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:waitForElementTextContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:waitForElementsCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:waitForNoText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\MediaLibraryTestBase\\:\\:waitForText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\TranslationsTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\WidgetOEmbedTest\\:\\:hijackProviderEndpoints\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\WidgetOEmbedTest\\:\\:lockHttpClientToFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\FunctionalJavascript\\\\WidgetOEmbedTest\\:\\:useFixtureProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryAccessTest\\:\\:editorOpenerAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryAddFormTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryAddFormTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryWidgetTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\media_library\\\\Kernel\\\\MediaLibraryWidgetTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _menu_link_content_update_path_alias\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/menu_link_content.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Entity\\\\MenuLinkContent\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Entity/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Entity\\\\MenuLinkContent\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Entity/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Entity\\\\MenuLinkContent\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Entity/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Entity\\\\MenuLinkContent\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Entity/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Entity\\\\MenuLinkContent\\:\\:setInsidePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Entity/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Form\\\\MenuLinkContentDeleteForm\\:\\:getDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Form\\\\MenuLinkContentForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Form\\\\MenuLinkContentForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Form\\\\MenuLinkContentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:menuDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:pathAliasDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:pathAliasInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:pathAliasUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\MenuLinkContentInterface\\:\\:setInsidePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/MenuLinkContentInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Plugin\\\\Menu\\\\MenuLinkContent\\:\\:deleteLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$uuid might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content\\\\Plugin\\\\Validation\\\\Constraint\\\\MenuTreeHierarchyConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_link_content_dynamic_route\\\\Routes\\:\\:dynamic\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/menu_link_content_dynamic_route/src/Routes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_operations_link_test\\\\Hook\\\\MenuOperationsLinkTestHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_operations_link_test\\\\Hook\\\\MenuOperationsLinkTestHooks\\:\\:entityOperationAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Functional\\\\Rest\\\\MenuLinkContentXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\MenuLinkContentCacheabilityBubblingTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\MenuLinkContentCacheabilityBubblingTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\MenuLinksTest\\:\\:createLinkHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\MigrateMenuLinkContentStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/MigrateMenuLinkContentStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkLocalizedTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkLocalizedTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkTranslationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateMenuLinkTranslationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateMenuLinkTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateMenuLinkTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\PathAliasMenuLinkContentTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\PathAliasMenuLinkContentTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\process\\\\LinkUriTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\process\\\\LinkUriTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\MenuLinkTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\MenuLinkTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\MenuLinkLocalizedTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_link_content\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\MenuLinkTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _menu_ui_node_save\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function menu_ui_form_node_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function menu_ui_form_node_type_form_builder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function menu_ui_form_node_type_form_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function menu_ui_node_builder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function menu_ui_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/menu_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuDeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuLinkEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuLinkEditForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuLinkEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuLinkResetForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkResetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Form\\\\MenuLinkResetForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkResetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Hook\\\\MenuUiHooks\\:\\:blockViewSystemMenuBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Hook/MenuUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Hook\\\\MenuUiHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Hook/MenuUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Hook\\\\MenuUiHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Hook/MenuUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\Hook\\\\MenuUiHooks\\:\\:systemBreadcrumbAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/Hook/MenuUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:buildOverviewForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:submitOverviewForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\Functional\\\\MenuUiContentModerationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\Functional\\\\MenuUiLanguageTest\\:\\:assertMenuLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\Functional\\\\MenuUiTest\\:\\:assertMenuLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/Functional/MenuUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\FunctionalJavascript\\\\MenuUiJavascriptTest\\:\\:assertMenuLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\FunctionalJavascript\\\\MenuUiJavascriptTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\FunctionalJavascript\\\\MenuUiJavascriptTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\Kernel\\\\MenuBlockTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\menu_ui\\\\Kernel\\\\MenuBlockTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Annotation\\\\MigrateSource\\:\\:setProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Annotation/MigrateSource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Annotation\\\\MultipleProviderAnnotationInterface\\:\\:setProviders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Annotation/MultipleProviderAnnotationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Audit\\\\IdAuditor\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Audit/IdAuditor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Audit\\\\IdAuditor\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Audit/IdAuditor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Event\\\\EventBase\\:\\:logMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Event/EventBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Event\\\\ImportAwareInterface\\:\\:postImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Event/ImportAwareInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Event\\\\ImportAwareInterface\\:\\:preImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Event/ImportAwareInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Event\\\\RollbackAwareInterface\\:\\:postRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Event/RollbackAwareInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Event\\\\RollbackAwareInterface\\:\\:preRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Event/RollbackAwareInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Form\\\\MessageForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Form/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Form\\\\MessageForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Form/MessageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Hook\\\\MigrateHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Hook/MigrateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\migrate\\\\MigrateException has an unused parameter \\$code\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateException.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\migrate\\\\MigrateException has an unused parameter \\$previous\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:checkStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:handleException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:processPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:processRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutable\\:\\:saveMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutableInterface\\:\\:processRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutableInterface\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateExecutableInterface\\:\\:saveMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateExecutableInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateMessage\\:\\:display\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateMessage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\MigrateMessageInterface\\:\\:display\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/MigrateMessageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Discovery\\\\AnnotatedClassDiscoveryAutomatedProviders\\:\\:prepareAnnotationDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Discovery/AnnotatedClassDiscoveryAutomatedProviders.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateDestinationInterface\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateDestinationInterface.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:clearMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:deleteDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:getQualifiedMapTableName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:prepareUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:saveIdMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:saveMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:setMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateIdMapInterface\\:\\:setUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateIdMapInterface.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateSourcePluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrateValidatableEntityInterface\\:\\:validateEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateValidatableEntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Migration\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Migration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Migration\\:\\:clearInterruptionResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Migration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Migration\\:\\:interruptMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Migration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Migration\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Migration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\Migration\\:\\:setStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/Migration.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrationInterface\\:\\:clearInterruptionResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrationInterface\\:\\:interruptMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrationInterface\\:\\:setStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\migrate\\\\Plugin\\\\MigrationPluginManager has an unused parameter \\$language_manager\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\MigrationPluginManager\\:\\:addDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\PluginEventSubscriber\\:\\:invoke\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/PluginEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\PluginEventSubscriber\\:\\:postImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/PluginEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\PluginEventSubscriber\\:\\:postRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/PluginEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\PluginEventSubscriber\\:\\:preImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/PluginEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\PluginEventSubscriber\\:\\:preRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/PluginEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\RequirementsInterface\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/RequirementsInterface.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\ComponentEntityDisplayBase\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Config\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Config.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Config\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Config.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Config\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Config.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\DestinationBase\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\DestinationBase\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\DestinationBase\\:\\:setRollbackAction\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:processStubRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityConfigBase\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityConfigBase\\:\\:updateEntityProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$config might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityContentBase\\:\\:isTranslationDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityContentBase\\:\\:processStubRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityContentBase\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityContentBase\\:\\:validateEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityContentComplete\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityContentComplete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityFieldStorageConfig\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\EntityViewMode\\:\\:rollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityViewMode.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\NullDestination\\:\\:import\\(\\) should return array\\|bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/NullDestination.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:clearMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:deleteDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:getQualifiedMapTableName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:prepareUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:saveIdMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:saveMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:setMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\NullIdMap\\:\\:setUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:clearMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:deleteDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:ensureTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:prepareUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:saveIdMapping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:saveMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:setMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\id_map\\\\Sql\\:\\:setUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/id_map/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\process\\\\MigrationLookup\\:\\:skipInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SourcePluginBase\\:\\:fetchNextRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SourcePluginBase\\:\\:getCurrentIds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SourcePluginBase\\:\\:postRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SourcePluginBase\\:\\:preRollback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SourcePluginBase\\:\\:saveHighWater\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SqlBase\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SqlBase\\:\\:fetchNextBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SqlBase\\:\\:fetchNextRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\source\\\\SqlBase\\:\\:select\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/source/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:rehash\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:removeDestinationProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:setDestinationProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:setEmptyDestinationProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:setIdMap\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate\\\\Row\\:\\:setSourceProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/src/Row.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_prepare_row_test\\\\Hook\\\\MigratePrepareRowTestHooks\\:\\:migratePrepareRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/modules/migrate_prepare_row_test/src/Hook/MigratePrepareRowTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_skip_all_rows_test\\\\Hook\\\\MigrateSkipAllRowsTestHooks\\:\\:migratePrepareRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/modules/migrate_skip_all_rows_test/src/Hook/MigrateSkipAllRowsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\HighWaterNotJoinableTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateDumpAlterInterface\\:\\:migrateDumpAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateDumpAlterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateEntityContentBaseTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.dataProviderMethod + 'message' => '#^@dataProvider providerSource related method not found\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.dataProviderMethod + 'message' => '#^@dataProvider providerSource related method not found\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateSqlSourceTestBase\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: staticMethod.notFound + 'message' => '#^Call to an undefined static method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:migrateDumpAlter\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:cleanupMigrateConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:createMigrationConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:display\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:executeMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:executeMigrations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:mockFailure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:prepareMigrations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:setTestLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:startCollectingMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:stopCollectingMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrationPluginManagerTest\\:\\:providerCreateInstanceByTag\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\Plugin\\\\MigrationPluginConfigurationTest\\:\\:mergeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\Plugin\\\\MigrationPluginListTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\Plugin\\\\id_map\\\\SqlTest\\:\\:providerTestEnsureTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\Plugin\\\\id_map\\\\SqlTest\\:\\:providerTestFailEnsureTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\Plugin\\\\source\\\\MigrateSqlSourceCountCacheTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\QueryBatchTest\\:\\:queryDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/QueryBatchTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\process\\\\ExtractTest\\:\\:multipleValueProviderSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/process/ExtractTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\process\\\\FileCopyTest\\:\\:providerSuccessfulReuse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/process/FileCopyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\process\\\\RouteTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/process/RouteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\process\\\\RouteTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/process/RouteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\Exception\\\\RequirementsExceptionTest\\:\\:getRequirementsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrateLookupTest\\:\\:providerExceptionOnMigrationNotFound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrateLookupTest\\:\\:providerExceptionOnMultipleMigrationsNotFound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateLookupTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\StubSourceGeneratorPlugin\\:\\:getCacheCounts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateSourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\StubSourceGeneratorPlugin\\:\\:getSkipCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateSourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\StubSourceGeneratorPlugin\\:\\:getTrackChanges\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateSourceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrateTestCase\\:\\:queryResultTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateTestCase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrateTestCase\\:\\:retrievalAssertHelper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateTestCase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrationPluginManagerTest\\:\\:dependencyProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrationTest\\:\\:getInvalidMigrationDependenciesProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\MigrationTest\\:\\:getValidMigrationDependenciesProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestSqlBase\\:\\:calculateDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/SqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:handleException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:setMemoryLimit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:setMemoryThreshold\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:setMemoryUsage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:setSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestMigrateExecutable\\:\\:setSourceIdValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestMigrateExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\TestSqlIdMap\\:\\:ensureTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/TestSqlIdMap.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\destination\\\\TestPerComponentEntityDisplay\\:\\:getTestValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\destination\\\\TestPerComponentEntityFormDisplay\\:\\:getTestValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\CallbackTest\\:\\:providerCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/CallbackTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\CallbackTest\\:\\:providerCallbackArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/CallbackTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\CallbackTest\\:\\:providerCallbackExceptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/CallbackTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\ExplodeTest\\:\\:providerExplodeWithNonStrictAndEmptySource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/ExplodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\ExtractTest\\:\\:providerExtractDefault\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/ExtractTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\ExtractTest\\:\\:providerTestExtractInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/ExtractTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\FileCopyTest\\:\\:providerFileProcessBaseConstructor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/FileCopyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\FlattenTest\\:\\:providerTestFlatten\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/FlattenTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\FlattenTest\\:\\:providerTestFlattenInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/FlattenTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\MakeUniqueEntityFieldTest\\:\\:providerTestMakeUniqueEntityField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\MenuLinkParentTest\\:\\:providerMenuLinkParent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\MenuLinkParentTest\\:\\:providerTransformException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\NullCoalesceTest\\:\\:transformDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\NullCoalesceTest\\:\\:transformWithDefaultProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\SubProcessTest\\:\\:providerTestNotFoundSubProcess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubProcessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\SubProcessTest\\:\\:providerTestSourceNotArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubProcessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\SubProcessTest\\:\\:providerTestSubProcess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubProcessTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$sub_process_plugins might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubProcessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\process\\\\SubstrTest\\:\\:providerTestSubstr\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubstrTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscovery\\:\\:addAllFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscovery\\:\\:addBundleFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscovery\\:\\:addEntityFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscovery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscoveryInterface\\:\\:addAllFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscoveryInterface\\:\\:addBundleFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\FieldDiscoveryInterface\\:\\:addEntityFieldProcesses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscoveryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Hook\\\\MigrateDrupalHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Hook\\\\MigrateDrupalHooks\\:\\:migrationPluginsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrateDrupalServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationPluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationPluginManager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationState\\:\\:buildDeclaredStateBySource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationState\\:\\:buildDiscoveredDestinationsBySource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationState\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationState\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrationState\\:\\:setMessenger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationState.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\NodeMigrateType\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/NodeMigrateType.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/NodeMigrateType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldInterface\\:\\:alterFieldFormatterMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldInterface\\:\\:alterFieldInstanceMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldInterface\\:\\:alterFieldMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldInterface\\:\\:alterFieldWidgetMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldInterface\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldPluginManager\\:\\:processDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\MigrateFieldPluginManager\\:\\:sortDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\EntityReferenceTranslationDeriver has an unused parameter \\$base_plugin_id\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\EntityReferenceTranslationDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\EntityReferenceTranslationDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\FieldPluginBase\\:\\:alterFieldFormatterMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\FieldPluginBase\\:\\:alterFieldInstanceMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\FieldPluginBase\\:\\:alterFieldMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\FieldPluginBase\\:\\:alterFieldWidgetMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\FieldPluginBase\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\ReferenceBase\\:\\:alterFieldInstanceMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/ReferenceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\ReferenceBase\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/ReferenceBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\UserReference\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\UserReference\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/field/d7/UserReference.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\ContentEntityDeriver has an unused parameter \\$base_plugin_id\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\DrupalSqlBase\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\DrupalSqlBase\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\EmptySource\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/EmptySource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\VariableTranslation\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\MigrateDrupalTestBase\\:\\:loadFixture\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\NodeMigrationTypePluginAlterTest\\:\\:makeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\NodeMigrationTypePluginAlterTest\\:\\:providerMigrationPluginAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\NodeMigrationTypePluginAlterTest\\:\\:removeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ContentEntityConstructorTest\\:\\:providerTestConstructor\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ContentEntityTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ContentEntityTest\\:\\:migrationConfigurationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\VariableMultiRowTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\VariableTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\VariableTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\VariableTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d8\\\\ConfigTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\StateFileExistsTest\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\FieldDiscoveryTest\\:\\:assertFieldProcess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\FieldDiscoveryTest\\:\\:assertFieldProcessKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\FieldDiscoveryTest\\:\\:assertSourcePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6AuditIdsTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6AuditIdsTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6AuditIdsTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6AuditIdsTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:getFixtureFilePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:makeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:migrateContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:migrateContentTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:migrateFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:migrateTaxonomy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:migrateUsers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\MigrateDrupal6TestBase\\:\\:removeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\ValidateMigrationStateTest\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d6\\\\ValidateMigrationStateTest\\:\\:enableAllModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FieldDiscoveryTest\\:\\:assertFieldProcess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FieldDiscoveryTest\\:\\:assertFieldProcessKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FieldDiscoveryTest\\:\\:assertSourcePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FollowUpMigrationsTest\\:\\:assertEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FollowUpMigrationsTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\FollowUpMigrationsTest\\:\\:providerTestEntityReferenceTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7AuditIdsTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7AuditIdsTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7AuditIdsTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7AuditIdsTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:getFixtureFilePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:makeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateCommentTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateContentTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateTaxonomyTerms\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:migrateUsers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\MigrateDrupal7TestBase\\:\\:removeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\ValidateMigrationStateTest\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Kernel\\\\d7\\\\ValidateMigrationStateTest\\:\\:enableAllModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\MigrationConfigurationTraitTest\\:\\:providerTestGetLegacyDrupalVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\TestMigrationConfigurationTrait\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$statement might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\MigrationStateUnitTest\\:\\:providerGetUpgradeStates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\source\\\\DrupalSqlBaseTest\\:\\:providerMinimumVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\source\\\\d6\\\\TestDrupal6SqlBase\\:\\:getModuleSchemaVersionWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\source\\\\d6\\\\TestDrupal6SqlBase\\:\\:moduleExistsWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal\\\\Unit\\\\source\\\\d6\\\\TestDrupal6SqlBase\\:\\:variableGetWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateMessageCapture\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateMessageCapture.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateMessageCapture\\:\\:display\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateMessageCapture.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onIdMapMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onMapDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onMapSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onPostImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onPostRowDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:onPostRowSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Batch\\\\MigrateUpgradeImportBatch\\:\\:run\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\CredentialForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\CredentialForm\\:\\:setupMigrations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\CredentialForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\CredentialForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\CredentialForm\\:\\:validatePaths\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$version might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\IdConflictForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/IdConflictForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\IncrementalForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/IncrementalForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\IncrementalForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/IncrementalForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\MigrateUpgradeFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\MigrateUpgradeFormBase\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\OverviewForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/OverviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\ReviewForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/ReviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Form\\\\ReviewForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/ReviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Hook\\\\MigrateDrupalUiHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Routing\\\\MigrateDrupalUiRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Routing/MigrateDrupalUiRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:installEntitySchema\\(\\)\\.$#', + 'count' => 8, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:providerCredentialForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:installEntitySchema\\(\\)\\.$#', + 'count' => 8, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:assertEntityRevisionsCount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:doUpgradeAndIncremental\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:useTestMailCollector\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:installEntitySchema\\(\\)\\.$#', + 'count' => 8, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:getManagedFiles\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertEmailsSent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertFileMigrations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertIdConflictForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertReviewForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:assertUserLogIn\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:createDatabaseStateSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:createMigrationConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:loadFixture\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:submitCredentialForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$patterns might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:installEntitySchema\\(\\)\\.$#', + 'count' => 8, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:prepare\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\SourceProviderTest\\:\\:providerSourceProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\d6\\\\NodeClassicTest\\:\\:makeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\d6\\\\NodeClassicTest\\:\\:removeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\d7\\\\FilePathTest\\:\\:getSourcePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\FunctionalJavascript\\\\SettingsTest\\:\\:providerTestCredentialForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function mysql_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/mysql.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Connection\\:\\:createDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$last_insert_id might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Insert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Install\\\\Tasks\\:\\:ensureInnoDbAvailable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:addPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:changeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:createFieldSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:createKeySql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:createKeysSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:getComment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:processField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:renameTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Driver\\\\Database\\\\mysql\\\\Schema\\:\\:shortenIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mysql\\\\Hook\\\\MysqlHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/src/Hook/MysqlHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\mysql\\\\Kernel\\\\mysql\\\\DbDumpTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\mysql\\\\Kernel\\\\mysql\\\\DbDumpTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$string_ascii_check might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$string_check might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation_top_bar\\\\Hook\\\\NavigationTopBarHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function navigation_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/navigation.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function navigation_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/navigation.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function navigation_post_update_set_logo_dimensions_default\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/navigation.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function navigation_post_update_update_permissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/navigation.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Form\\\\LayoutForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Form/LayoutForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Form\\\\LayoutForm\\:\\:redirectOnSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Form/LayoutForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Form\\\\SettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Form/SettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:blockBuildLocalTasksBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:pluginFilterBlockLayoutBuilderAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:pluginFilterLayoutLayoutBuilderAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\NavigationContentLinks\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/NavigationContentLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\NavigationContentLinks\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/NavigationContentLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\NavigationContentLinks\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/NavigationContentLinks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Plugin\\\\SectionStorage\\\\NavigationSectionStorage\\:\\:buildLayoutRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\Plugin\\\\SectionStorage\\\\NavigationSectionStorage\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\UserLazyBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/UserLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\navigation\\\\UserLazyBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/src/UserLazyBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function navigation_test_preprocess_block__navigation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/navigation_test/navigation_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Functional\\\\NavigationShortcutsBlockTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\FunctionalJavascript\\\\NavigationBlockUiTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\FunctionalJavascript\\\\NavigationBlockUiTest\\:\\:sortableAfter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\FunctionalJavascript\\\\NavigationBlockUiTest\\:\\:sortableTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\FunctionalJavascript\\\\NavigationBlockUiTest\\:\\:sortableUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\FunctionalJavascript\\\\NavigationBlockUiTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\navigation\\\\Kernel\\\\NavigationMenuBlockTest\\:\\:testHtmlMarkup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/navigation/tests/src/Kernel/NavigationMenuBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _node_mass_update_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _node_mass_update_batch_process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_mass_update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _node_access_rebuild_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _node_access_rebuild_batch_operation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_access_rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_form_system_themes_admin_form_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_preprocess_field__node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_reindex_node_search\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_theme_suggestions_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_node_add_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/node.module', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\node\\\\ConfigTranslation\\\\NodeTypeMapper\\:\\:setEntity\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/node/src/ConfigTranslation/NodeTypeMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\ContextProvider\\\\NodeRouteContext\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/ContextProvider/NodeRouteContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\ContextProvider\\\\NodeRouteContext\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/ContextProvider/NodeRouteContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Controller\\\\NodePreviewController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Controller/NodePreviewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Controller\\\\NodeViewController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Controller/NodeViewController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\Node\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\Node\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\Node\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\Node\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\Node\\:\\:preSaveRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\NodeType\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/NodeType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\NodeType\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/NodeType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\NodeType\\:\\:setDisplaySubmitted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/NodeType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\NodeType\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/NodeType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Entity\\\\NodeType\\:\\:setPreviewMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Entity/NodeType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\EventSubscriber\\\\NodeAdminRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\EventSubscriber\\\\NodeAdminRouteSubscriber\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\EventSubscriber\\\\NodeTranslationExceptionSubscriber\\:\\:onException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\EventSubscriber\\\\NodeTranslationMigrateSubscriber\\:\\:onPostImport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\EventSubscriber\\\\NodeTranslationMigrateSubscriber\\:\\:onPostRowSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeDeleteForm\\:\\:getDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeDeleteForm\\:\\:logDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodePreviewForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodePreviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodePreviewForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodePreviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeRevisionDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeRevisionDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeRevisionRevertForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionRevertForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeRevisionRevertForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionRevertForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeRevisionRevertTranslationForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionRevertTranslationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Form\\\\RebuildPermissionsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Form/RebuildPermissionsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:commentDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:commentInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:commentUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:configTranslationInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:configurableLanguageDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:entityViewDisplayAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:nodeAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:queryNodeAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:ranking\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:userPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeViewsExecutionHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeViewsHooks\\:\\:viewsAnalyze\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Hook/NodeViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:deleteGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:deleteGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeForm\\:\\:preview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\node\\\\NodeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/node/src/NodeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:alterQuery\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:deleteNodeRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:write\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:writeDefault\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorageInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorageInterface\\:\\:deleteNodeRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorageInterface\\:\\:write\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorageInterface\\:\\:writeDefault\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodePermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodePermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodePermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodePermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeStorage\\:\\:clearRevisionsLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeStorageInterface\\:\\:clearRevisionsLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTranslationHandler\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTranslationHandler\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeInterface\\:\\:setDisplaySubmitted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeInterface\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeTypeInterface\\:\\:setPreviewMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeTypeInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\NodeViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/NodeViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:addNodeRankings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:indexClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:markForReindex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:searchFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\Search\\\\NodeSearch\\:\\:updateIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/Search/NodeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\D6NodeDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/D6NodeDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\D6NodeDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/D6NodeDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\D7NodeDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/D7NodeDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\D7NodeDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/D7NodeDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\Node\\:\\:handleTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/source/d6/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeRevision\\:\\:handleTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\Node\\:\\:handleTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/source/d7/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\NodeComplete\\:\\:handleTranslations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/migrate/source/d7/NodeComplete.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\argument\\\\Type\\:\\:node_type\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/argument/Type.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\argument\\\\Type\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/argument/Type.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\argument\\\\Type\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/argument/Type.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\argument\\\\UidRevision\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/argument/UidRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\argument_default\\\\Node\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/argument_default/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\field\\\\Node\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/field/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\field\\\\Node\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/field/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Access\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Access.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Access\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Access.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Access\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Access.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Access\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Access.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\Status\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/Status.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\filter\\\\UidRevision\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/filter/UidRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\row\\\\Rss\\:\\:buildOptionsForm_summary_options\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\row\\\\Rss\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\row\\\\Rss\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$node in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/row/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\wizard\\\\Node\\:\\:buildFilters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/wizard/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Plugin\\\\views\\\\wizard\\\\Node\\:\\:display_options_row\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Plugin/views/wizard/Node.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/src/Routing/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function node_access_test_add_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test/node_access_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test\\\\Hook\\\\NodeAccessTestHooks\\:\\:nodeAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test\\\\Hook\\\\NodeAccessTestHooks\\:\\:nodeAccessRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test\\\\Hook\\\\NodeAccessTestHooks\\:\\:nodeGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test_empty\\\\Hook\\\\NodeAccessTestEmptyHooks\\:\\:nodeAccessRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test_empty/src/Hook/NodeAccessTestEmptyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test_empty\\\\Hook\\\\NodeAccessTestEmptyHooks\\:\\:nodeGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test_empty/src/Hook/NodeAccessTestEmptyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test_language\\\\Hook\\\\NodeAccessTestLanguageHooks\\:\\:nodeAccessRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test_language/src/Hook/NodeAccessTestLanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_access_test_language\\\\Hook\\\\NodeAccessTestLanguageHooks\\:\\:nodeGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_access_test_language/src/Hook/NodeAccessTestLanguageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_display_configurable_test\\\\Hook\\\\NodeDisplayConfigurableTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_display_configurable_test/src/Hook/NodeDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_display_configurable_test\\\\Hook\\\\NodeDisplayConfigurableTestHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_display_configurable_test/src/Hook/NodeDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:entityViewModeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeAccessRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeAccessRecordsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeBuildDefaultsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeGrants\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeGrantsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test\\\\Hook\\\\NodeTestHooks\\:\\:nodeView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test_exception\\\\Hook\\\\NodeTestExceptionHooks\\:\\:nodeInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test_exception/src/Hook/NodeTestExceptionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\node_test_views\\\\Hook\\\\NodeTestViewsViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/modules/node_test_views/src/Hook/NodeTestViewsViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessBaseTableTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessCacheabilityWithNodeGrants\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeAccessPagerTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeAccessPagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeBlockFunctionalTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.covers + 'message' => '#^@covers value node_local_tasks_alter references an invalid class or function\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeRevisionsUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTestBase\\:\\:assertNodeAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTestBase\\:\\:assertNodeCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTitleTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTitleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTitleTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTitleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTitleTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTitleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTitleTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTitleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTranslationUITest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\NodeTypeTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\PagePreviewTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/PagePreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\PagePreviewTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/PagePreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeTypeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeTypeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Rest\\\\NodeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Functional\\\\Views\\\\FrontPageTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Functional/Views/FrontPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\FunctionalJavascript\\\\ContextualLinksTest\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\MigrateNodeStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeCompleteTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeCompleteTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeCompleteTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeCompleteTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeCompleteTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateNodeTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\NodeTranslationRedirectTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d6\\\\NodeTranslationRedirectTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:assertEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:createContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:createContentPostUpgrade\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:installEntitySchemas\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:makeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeCompleteTest\\:\\:removeNodeMigrateMapTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeRevisionTest\\:\\:assertEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeRevisionTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeSettingsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeSettingsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateNodeTest\\:\\:fileMigrationSetup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$changed in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\NodeTranslationRedirectTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Migrate\\\\d7\\\\NodeTranslationRedirectTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\NodeAccessTestBase\\:\\:assertNodeAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/NodeAccessTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\NodeAccessTestBase\\:\\:assertNodeCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/NodeAccessTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\NodeAccessTestBase\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/NodeAccessTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\NodeAccessTestBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/NodeAccessTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeByNodeTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeRevisionByNodeTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeRevisionTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\NodeTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ViewModeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\NodeEntityTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\NodeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\NodeTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\NodeTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\SummaryLengthTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/SummaryLengthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\SummaryLengthTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/SummaryLengthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\ArgumentUidRevisionTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\ArgumentUidRevisionTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\FilterUidRevisionTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\FilterUidRevisionTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\PathPluginTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/PathPluginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\PathPluginTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/PathPluginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\RevisionUidTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/RevisionUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\RevisionUidTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/RevisionUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\RowPluginTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/RowPluginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\node\\\\Kernel\\\\Views\\\\RowPluginTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Views/RowPluginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _options_values_in_use\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/options.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsHooks\\:\\:fieldStorageConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsHooks\\:\\:fieldStorageConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsHooks\\:\\:fieldStorageConfigUpdateForbid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Hook/OptionsViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListFloatItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListIntegerItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListIntegerItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:\\$value\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:addMoreAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:addMoreSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:deleteAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:deleteSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:submitFieldStorageUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:validateAllowedValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListStringItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListStringItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\NumberListField\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/NumberListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\NumberListField\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/NumberListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\NumberListField\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/NumberListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\StringListField\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/StringListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\StringListField\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/StringListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\argument\\\\StringListField\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/argument/StringListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\views\\\\filter\\\\ListField\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/src/Plugin/views/filter/ListField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function options_test_allowed_values_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/options_test/options_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function options_test_dynamic_values_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/options_test/options_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\options_test\\\\Hook\\\\OptionsTestHooks\\:\\:optionsListAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/options_test/src/Hook/OptionsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\options\\\\FunctionalJavascript\\\\OptionsFieldUIAllowedValuesTest\\:\\:assertNodeFormOrder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\options\\\\FunctionalJavascript\\\\OptionsFieldUIAllowedValuesTest\\:\\:assertOrder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\options\\\\FunctionalJavascript\\\\OptionsFieldUIAllowedValuesTest\\:\\:createOptionsField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\options\\\\Kernel\\\\Views\\\\OptionsTestBase\\:\\:mockStandardInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/options/tests/src/Kernel/Views/OptionsTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\ComposerInspector\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/ComposerInspector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\ComposerInspector\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/ComposerInspector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\EventSubscriber\\\\ChangeLogger\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/EventSubscriber/ChangeLogger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\EventSubscriber\\\\ChangeLogger\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/EventSubscriber/ChangeLogger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\PackageManagerUninstallValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/PackageManagerUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\PackageManagerUninstallValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/PackageManagerUninstallValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\PathExcluder\\\\UnknownPathExcluder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/PathExcluder/UnknownPathExcluder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\PathExcluder\\\\UnknownPathExcluder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/PathExcluder/UnknownPathExcluder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\StageBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/StageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\StageBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/StageBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\AllowedScaffoldPackagesValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/AllowedScaffoldPackagesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\AllowedScaffoldPackagesValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/AllowedScaffoldPackagesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerMinimumStabilityValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerMinimumStabilityValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerMinimumStabilityValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerMinimumStabilityValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerPatchesValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerPatchesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerPatchesValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerPatchesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerPluginsValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerPluginsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerPluginsValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerPluginsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\ComposerValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/ComposerValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\DiskSpaceValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/DiskSpaceValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\DiskSpaceValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/DiskSpaceValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\DuplicateInfoFileValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/DuplicateInfoFileValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\DuplicateInfoFileValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/DuplicateInfoFileValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\EnabledExtensionsValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/EnabledExtensionsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\EnabledExtensionsValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/EnabledExtensionsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\EnvironmentSupportValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/EnvironmentSupportValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\EnvironmentSupportValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/EnvironmentSupportValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\LockFileValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/LockFileValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\LockFileValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/LockFileValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\MultisiteValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/MultisiteValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\MultisiteValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/MultisiteValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\OverwriteExistingPackagesValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/OverwriteExistingPackagesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\OverwriteExistingPackagesValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/OverwriteExistingPackagesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PendingUpdatesValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PendingUpdatesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PendingUpdatesValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PendingUpdatesValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PhpExtensionsValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PhpExtensionsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PhpExtensionsValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PhpExtensionsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PhpTufValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PhpTufValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\PhpTufValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/PhpTufValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\RsyncValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/RsyncValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\RsyncValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/RsyncValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\SettingsValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/SettingsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\SettingsValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/SettingsValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\StageNotInActiveValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/StageNotInActiveValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\StageNotInActiveValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/StageNotInActiveValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\StagedDBUpdateValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/StagedDBUpdateValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\StagedDBUpdateValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/StagedDBUpdateValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\SupportedReleaseValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/SupportedReleaseValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\SupportedReleaseValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/SupportedReleaseValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\WritableFileSystemValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/WritableFileSystemValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\package_manager\\\\Validator\\\\WritableFileSystemValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/src/Validator/WritableFileSystemValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\package_manager\\\\Functional\\\\FailureMarkerRequirementTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\package_manager\\\\Functional\\\\FailureMarkerRequirementTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\package_manager\\\\Kernel\\\\StageOwnershipTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\package_manager\\\\Kernel\\\\StageOwnershipTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\page_cache\\\\Hook\\\\PageCacheHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/src/Hook/PageCacheHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\page_cache\\\\StackMiddleware\\\\PageCache\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/src/StackMiddleware/PageCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTagsIntegrationTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\page_cache\\\\Functional\\\\PageCacheTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Form\\\\PathFilterForm\\:\\:resetForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Form/PathFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Form\\\\PathFilterForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Form/PathFilterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:entityTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:fieldWidgetSingleElementFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\path\\\\PathAliasForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/PathAliasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathFieldItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathFieldItemList\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathFieldItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathFieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$alias\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$langcode\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound + 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$pid\\.$#', + 'count' => 5, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldWidget\\\\PathWidget\\:\\:validateFormElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Validation\\\\Constraint\\\\PathAliasConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathAliasTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathContentModerationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathContentModerationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathTestBase\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathTestBase\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathWithNodeAccessGrantsTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathWithNodeAccessGrantsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUrlAliasTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUrlAliasTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUrlAliasTestBase\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUrlAliasTestBase\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UrlAliasTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\UrlAliasTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManager\\:\\:cacheClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManager\\:\\:pathAliasPrefixListRebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManager\\:\\:pathAliasWhitelistRebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManager\\:\\:setCacheKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManager\\:\\:writeCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasManagerInterface\\:\\:cacheClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasPrefixList\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasPrefixList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasPrefixList\\:\\:lazyLoadCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasPrefixList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasPrefixList\\:\\:loadMenuPathRoots\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasPrefixList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\AliasRepository\\:\\:addLanguageFallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/AliasRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\Entity\\\\PathAlias\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/Entity/PathAlias.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\Entity\\\\PathAlias\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/Entity/PathAlias.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\Entity\\\\PathAlias\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/Entity/PathAlias.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\EventSubscriber\\\\PathAliasSubscriber\\:\\:onKernelController\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\path_alias\\\\EventSubscriber\\\\PathAliasSubscriber\\:\\:onKernelTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\Rest\\\\PathAliasXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\UrlAlterFunctionalTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Functional\\\\UrlAlterFunctionalTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Kernel\\\\AliasTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Kernel/AliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Kernel\\\\AliasTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Kernel/AliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Kernel\\\\AliasTest\\:\\:testPrefixListCacheDeletionMidRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Kernel/AliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Kernel\\\\EntityAliasTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Kernel/EntityAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Kernel\\\\EntityAliasTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Kernel/EntityAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\path_alias\\\\Unit\\\\AliasManagerTest\\:\\:testGetAliasByPathPrefixList\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/path_alias/tests/src/Unit/AliasManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function pgsql_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/pgsql.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Connection\\:\\:addSavepoint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Connection\\:\\:createDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Connection\\:\\:releaseSavepoint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Connection\\:\\:rollbackSavepoint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Connection\\:\\:setPrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkBinaryOutput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkBinaryOutputSuccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkEncoding\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkExtensions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkStandardConformingStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:checkStandardConformingStringsSuccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Install\\\\Tasks\\:\\:initializeDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:_createIndexSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:_createKeySql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:_createKeys\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:addPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:changeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:createFieldSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:createPrimaryKeySql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:getComment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:processField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:renameTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Schema\\:\\:resetTableInformation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$table_field might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Select.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Upsert\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Upsert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pgsql\\\\Hook\\\\PgsqlHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/src/Hook/PgsqlHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\pgsql\\\\Unit\\\\SchemaTest\\:\\:providerComputedConstraintName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/pgsql/tests/src/Unit/SchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\phpass\\\\Hook\\\\PhpassHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/phpass/src/Hook/PhpassHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\phpass\\\\Unit\\\\PasswordVerifyTest\\:\\:providerLongPasswords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/phpass/tests/src/Unit/PasswordVerifyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _responsive_image_image_style_url\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/responsive_image.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_responsive_image\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/responsive_image.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_responsive_image_formatter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/responsive_image.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\responsive_image\\\\Hook\\\\ResponsiveImageHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/Hook/ResponsiveImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\responsive_image\\\\Hook\\\\ResponsiveImageHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/Hook/ResponsiveImageHooks.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$responsive_image_styles in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\responsive_image\\\\ResponsiveImageStyleForm\\:\\:breakpointMappingFormAjax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/ResponsiveImageStyleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\responsive_image\\\\ResponsiveImageStyleForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/ResponsiveImageStyleForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\responsive_image\\\\ResponsiveImageStyleForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/responsive_image/src/ResponsiveImageStyleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\responsive_image\\\\ResponsiveImageStyleForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/src/ResponsiveImageStyleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Functional\\\\Rest\\\\ResponsiveImageStyleXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\responsive_image\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ResponsiveImageStylesTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Entity\\\\ConfigDependencies\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Entity/ConfigDependencies.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Entity\\\\RestResourceConfig\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Entity/RestResourceConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Entity\\\\RestResourceConfig\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Entity/RestResourceConfig.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\EventSubscriber\\\\EntityResourcePostRouteSubscriber\\:\\:onDynamicRouteEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\EventSubscriber\\\\ResourceResponseSubscriber\\:\\:onResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\EventSubscriber\\\\ResourceResponseSubscriber\\:\\:renderResponseBody\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Hook\\\\RestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Hook/RestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\rest\\\\resource\\\\EntityResource\\:\\:addLinkHeaders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/rest/resource/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\rest\\\\resource\\\\EntityResource\\:\\:checkEditFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/rest/resource/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\rest\\\\resource\\\\EntityResource\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/rest/resource/EntityResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:collectRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:displaysExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:initDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:setContentType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:setMimeType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\display\\\\RestExport\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/display/RestExport.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataEntityRow\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataFieldRow\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataFieldRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataFieldRow\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataFieldRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataFieldRow\\:\\:validateAliasName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataFieldRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\row\\\\DataFieldRow\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/row/DataFieldRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\style\\\\Serializer\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/style/Serializer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\style\\\\Serializer\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/style/Serializer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\views\\\\style\\\\Serializer\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Plugin/views/style/Serializer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\RequestHandler\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/RequestHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\RestPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/RestPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest\\\\Routing\\\\ResourceRoutes\\:\\:onDynamicRouteEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/src/Routing/ResourceRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\config_test_rest\\\\Hook\\\\ConfigTestRestHooks\\:\\:configTestAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/modules/config_test_rest/src/Hook/ConfigTestRestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest_test\\\\Hook\\\\RestTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest_test\\\\Hook\\\\RestTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\rest_test_views\\\\Hook\\\\RestTestViewsHooks\\:\\:viewsPostExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/modules/rest_test_views/src/Hook/RestTestViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assert406Response\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assertEntityArraySubset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assertNormalizationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assertPatchProtectedFieldNamesStructure\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assertResourceNotAvailable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:assertStoredEntityMatchesSentNormalization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\EntityResourceTestBase\\:\\:provisionEntityResource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$created_entity might not be defined\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeResourceTestBase\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\EntityResource\\\\ModeratedNode\\\\ModeratedNodeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\FileUploadResourceTestBase\\:\\:assertNormalizationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\FileUploadResourceTestBase\\:\\:assertResponseData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\FileUploadResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:assertNormalizationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:assertResourceErrorResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:assertResourceResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:grantPermissionsToAnonymousRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:grantPermissionsToAuthenticatedRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:grantPermissionsToTestedRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:provisionResource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:recursiveKSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:refreshTestStateAfterRestConfigChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\ResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/ResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Rest\\\\RestResourceConfigXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerEntityTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Functional\\\\Views\\\\StyleSerializerTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Kernel\\\\StubRequestHandlerResourcePlugin\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Kernel/RequestHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Kernel\\\\StubRequestHandlerResourcePlugin\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Kernel/RequestHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Kernel\\\\StubRequestHandlerResourcePlugin\\:\\:patch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Kernel/RequestHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Kernel\\\\StubRequestHandlerResourcePlugin\\:\\:post\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Kernel/RequestHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Unit\\\\EntityResourceValidationTraitTestClass\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\rest\\\\Unit\\\\EventSubscriber\\\\ResourceResponseSubscriberTest\\:\\:providerTestSerialization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_theme_suggestions_search_result\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.module', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$working_to might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_search_result\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.pages.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_post_update_block_with_empty_page_id\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/search.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Entity\\\\SearchPage\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Entity/SearchPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Entity\\\\SearchPage\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Entity/SearchPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Entity\\\\SearchPage\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Entity/SearchPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Entity\\\\SearchPage\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Entity/SearchPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Entity\\\\SearchPage\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Entity/SearchPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\ReindexConfirm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/ReindexConfirm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchBlockForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchBlockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Hook\\\\SearchHooks\\:\\:blockPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Hook/SearchHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Hook\\\\SearchHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Hook/SearchHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Hook\\\\SearchHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Hook/SearchHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\Block\\\\SearchBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/Block/SearchBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\ConfigurableSearchPluginBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/ConfigurableSearchPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\ConfigurableSearchPluginBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/ConfigurableSearchPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchIndexingInterface\\:\\:indexClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchIndexingInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchIndexingInterface\\:\\:markForReindex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchIndexingInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchIndexingInterface\\:\\:updateIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchIndexingInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchInterface\\:\\:searchFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchPluginBase\\:\\:searchFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\SearchPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/SearchPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\argument\\\\Search\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/argument/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\argument\\\\Search\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/argument/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\argument\\\\Search\\:\\:queryParseSearchExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/argument/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\field\\\\Score\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/field/Score.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:queryParseSearchExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:validateExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\filter\\\\Search\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/filter/Search.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\row\\\\SearchRow\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/row/SearchRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\views\\\\sort\\\\Score\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Plugin/views/sort/Score.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\Routing\\\\SearchPageRoutes\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/Routing/SearchPageRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndex\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndex.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndex\\:\\:markForReindex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndex.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndex\\:\\:updateWordWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndex.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndexInterface\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndexInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndexInterface\\:\\:markForReindex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndexInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchIndexInterface\\:\\:updateWordWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchIndexInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageInterface\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:getEditableConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:searchAdminReindexSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:submitAddSearchPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:validateAddSearchPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageListBuilder\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageRepository\\:\\:clearDefaultSearchPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageRepository.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\search\\\\SearchPageRepository\\:\\:setDefaultSearchPage\\(\\) should return static\\(Drupal\\\\search\\\\SearchPageRepository\\) but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageRepository.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchPageRepositoryInterface\\:\\:clearDefaultSearchPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchPageRepositoryInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchQuery\\:\\:parseSearchExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchQuery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\SearchQuery\\:\\:parseWord\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/SearchQuery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\ViewsSearchQuery\\:\\:conditionReplaceString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/ViewsSearchQuery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search\\\\ViewsSearchQuery\\:\\:publicParseSearchExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/src/ViewsSearchQuery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search_date_query_alter\\\\Hook\\\\SearchDateQueryAlterHooks\\:\\:querySearchNodeSearchAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_date_query_alter/src/Hook/SearchDateQueryAlterHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function search_embedded_form_preprocess_search_result\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_embedded_form/search_embedded_form.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search_embedded_form\\\\Form\\\\SearchEmbeddedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_embedded_form/src/Form/SearchEmbeddedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search_extra_type\\\\Plugin\\\\Search\\\\SearchExtraTypeSearch\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search_langcode_test\\\\Hook\\\\SearchLangcodeTestHooks\\:\\:searchPreprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_langcode_test/src/Hook/SearchLangcodeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\search_query_alter\\\\Hook\\\\SearchQueryAlterHooks\\:\\:querySearchNodeSearchAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/modules/search_query_alter/src/Hook/SearchQueryAlterHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Rest\\\\SearchPageXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Rest/SearchPageXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchCommentCountToggleTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchCommentTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchCommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchCommentTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchCommentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchNumberMatchingTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchNumberMatchingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchNumbersTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchNumbersTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchPageCacheTagsTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchRankingTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchRankingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\SearchRankingTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/SearchRankingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Update\\\\SearchBlockPageIdUpdatePathTest\\:\\:setDatabaseDumpFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Update/SearchBlockPageIdUpdatePathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Functional\\\\Update\\\\SearchBlockPageIdUpdatePathTest\\:\\:testRunUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Functional/Update/SearchBlockPageIdUpdatePathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateSearchSettingsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateSearchSettingsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\Migrate\\\\d6\\\\SearchPageTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\Migrate\\\\d7\\\\SearchPageTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\SearchMatchTest\\:\\:getText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchMatchTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\SearchMatchTest\\:\\:getText2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchMatchTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\SearchSetLocaleTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchSetLocaleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\SearchSetLocaleTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchSetLocaleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\search\\\\Kernel\\\\SearchTokenizerTest\\:\\:code2utf\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchTokenizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Encoder\\\\XmlEncoder\\:\\:setBaseEncoder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Encoder/XmlEncoder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\EntityResolver\\\\ChainEntityResolver\\:\\:addResolver\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/EntityResolver/ChainEntityResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\EntityResolver\\\\ChainEntityResolverInterface\\:\\:addResolver\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/EntityResolver/ChainEntityResolverInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\EventSubscriber\\\\DefaultExceptionSubscriber\\:\\:on4xx\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\EventSubscriber\\\\UserRouteAlterSubscriber\\:\\:onRoutingAlterAddFormats\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Hook\\\\SerializationHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Hook/SerializationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\serialization\\\\Normalizer\\\\EntityNormalizer\\:\\:getCustomSerializedPropertyNames\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/EntityNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\EntityNormalizer\\:\\:denormalizeFieldData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/EntityNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\EntityReferenceFieldItemNormalizer\\:\\:normalizeRootReferenceValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\FieldItemNormalizer\\:\\:checkForSerializedStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/FieldItemNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\FieldItemNormalizer\\:\\:denormalizeFieldData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/FieldItemNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\NormalizerBase\\:\\:addCacheableDependency\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/NormalizerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\PrimitiveDataNormalizer\\:\\:checkForSerializedStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/Normalizer/PrimitiveDataNormalizer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\serialization\\\\SerializationServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/src/SerializationServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_serialization_test\\\\Hook\\\\EntitySerializationTestHooks\\:\\:entityFieldAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/modules/entity_serialization_test/src/Hook/EntitySerializationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Kernel\\\\MapDataNormalizerTest\\:\\:buildExampleTypedData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Kernel\\\\MapDataNormalizerTest\\:\\:buildExampleTypedDataWithProperties\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Unit\\\\Encoder\\\\TestObject\\:\\:getA\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Unit\\\\Normalizer\\\\DateTimeIso8601NormalizerTestDrupalDateTime\\:\\:setTimezone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Unit\\\\Normalizer\\\\DateTimeNormalizerTestDrupalDateTime\\:\\:setTimezone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Unit\\\\Normalizer\\\\PrimitiveDataNormalizerTest\\:\\:dataProviderPrimitiveData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\serialization\\\\Unit\\\\Normalizer\\\\TimestampNormalizerTestDrupalDateTime\\:\\:setTimezone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function settings_tray_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/settings_tray.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Block\\\\BlockEntitySettingTrayForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Block\\\\BlockEntitySettingTrayForm\\:\\:submitVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Block\\\\BlockEntitySettingTrayForm\\:\\:successfulAjaxSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Block\\\\BlockEntitySettingTrayForm\\:\\:validateVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:blockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:blockViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:contextualLinksViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:cssAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:toolbarAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray_test\\\\Form\\\\SettingsTrayFormAnnotationIsClassBlockForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/modules/settings_tray_test/src/Form/SettingsTrayFormAnnotationIsClassBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray_test\\\\Plugin\\\\Block\\\\ValidationErrorBlock\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/ValidationErrorBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\settings_tray_test_css\\\\Hook\\\\SettingsTrayTestCssHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/modules/settings_tray_test_css/src/Hook/SettingsTrayTestCssHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayBlockFormTest\\:\\:getBlockTests\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:assertEditModeDisabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:assertEditModeEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:assertOffCanvasBlockFormIsValid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:clickContextualLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:disableEditMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:enableEditMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:openBlockForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:pressToolbarEditButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\FunctionalJavascript\\\\SettingsTrayTestBase\\:\\:toggleContextualTriggerVisibility\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\settings_tray\\\\Unit\\\\Access\\\\BlockPluginHasSettingsTrayFormAccessCheckTest\\:\\:providerTestAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function shortcut_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/shortcut.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function shortcut_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/shortcut.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function shortcut_preprocess_page_title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/shortcut.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Entity\\\\Shortcut\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Entity/Shortcut.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Entity\\\\ShortcutSet\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Entity/ShortcutSet.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Entity\\\\ShortcutSet\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Entity/ShortcutSet.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SetCustomize\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/SetCustomize.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SetCustomize\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/SetCustomize.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\ShortcutSetDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/ShortcutSetDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SwitchShortcutSet\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/SwitchShortcutSet.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SwitchShortcutSet\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/SwitchShortcutSet.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SwitchShortcutSet\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Form/SwitchShortcutSet.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Hook\\\\ShortcutHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Hook/ShortcutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Hook\\\\ShortcutHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Hook/ShortcutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Hook\\\\ShortcutHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Hook/ShortcutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\Hook\\\\ShortcutHooks\\:\\:userDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/Hook/ShortcutHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetStorage\\:\\:assignUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetStorage\\:\\:deleteAssignedShortcutSets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetStorageInterface\\:\\:assignUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetStorageInterface\\:\\:deleteAssignedShortcutSets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutSetXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\Rest\\\\ShortcutXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutCacheTagsTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutLinksTest\\:\\:assertBlockAppears\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutLinksTest\\:\\:assertNoBlockAppears\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutLinksTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutLinksTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutTestBase\\:\\:generateShortcutSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Functional\\\\ShortcutTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Kernel\\\\Migrate\\\\MigrateShortcutStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ShortcutSetTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ShortcutSetUsersTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ShortcutTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\shortcut\\\\Unit\\\\Menu\\\\ShortcutLocalTasksTest\\:\\:getShortcutPageRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:createDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionConcat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionConcatWs\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionGreatest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionIf\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionLeast\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionLikeBinary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionRand\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionRegexp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionSubstring\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Connection\\:\\:sqlFunctionSubstringIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$args might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$statement might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:addPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:alterTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:changeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:createColumnsSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:createFieldSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:createIndexSql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:createKeySql\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:mapKeyDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:processField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Driver\\\\Database\\\\sqlite\\\\Schema\\:\\:renameTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sqlite\\\\Hook\\\\SqliteHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/sqlite/src/Hook/SqliteHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\syslog\\\\Hook\\\\SyslogHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/src/Hook/SyslogHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\syslog\\\\Logger\\\\SysLog\\:\\:openConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/src/Logger/SysLog.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\syslog\\\\Logger\\\\SysLog\\:\\:syslogWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/src/Logger/SysLog.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function syslog_logging_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/syslog.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\syslog_test\\\\Logger\\\\SysLogTest\\:\\:syslogWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\syslog\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateSyslogConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\syslog\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateSyslogConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\syslog\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateSyslogConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\syslog\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateSyslogConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\BatchController\\:\\:batchPage\\(\\) should return array\\|Symfony\\\\Component\\\\HttpFoundation\\\\Response but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/BatchController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\BatchController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/BatchController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\BatchController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/BatchController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\BatchController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/BatchController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\CsrfTokenController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/CsrfTokenController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\DbUpdateController\\:\\:batchFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/DbUpdateController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\DbUpdateController\\:\\:triggerBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/DbUpdateController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\LinksetController\\:\\:processCustomLinkAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/LinksetController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\SystemController\\:\\:systemAdminMenuBlockPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/SystemController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\SystemInfoController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/SystemInfoController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\SystemInfoController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/SystemInfoController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\SystemInfoController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Controller/SystemInfoController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Element\\\\StatusReportPage\\:\\:preRenderCounters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Element/StatusReportPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Element\\\\StatusReportPage\\:\\:preRenderGeneralInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Element/StatusReportPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Element\\\\StatusReportPage\\:\\:preRenderRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Element/StatusReportPage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Action\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Action.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Action\\:\\:getPluginDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Action.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Action\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Action.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Action\\:\\:sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Action.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Menu\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Menu.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Entity\\\\Menu\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Entity/Menu.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\EventSubscriber\\\\AccessRouteAlterSubscriber\\:\\:accessAdminMenuBlockPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/EventSubscriber/AccessRouteAlterSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\EventSubscriber\\\\AdminRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/EventSubscriber/AdminRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\EventSubscriber\\\\ConfigCacheTag\\:\\:onSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/EventSubscriber/ConfigCacheTag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ClearCacheForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ClearCacheForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\CronForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/CronForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\CronForm\\:\\:getEditableConfigNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/CronForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\CronForm\\:\\:runCron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/CronForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\CronForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/CronForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DevelopmentSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DevelopmentSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DevelopmentSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/DevelopmentSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\FileSystemForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/FileSystemForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ImageToolkitForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ImageToolkitForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ImageToolkitForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ImageToolkitForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ImageToolkitForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ImageToolkitForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\MenuLinksetSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/MenuLinksetSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\MenuLinksetSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/MenuLinksetSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListConfirmForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListConfirmForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListConfirmForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListNonStableConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListNonStableConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListNonStableConfirmForm\\:\\:getQuestion\\(\\) should return Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesListNonStableConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallConfirmForm\\:\\:addDependencyListsToForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallConfirmForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesUninstallForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ModulesUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PerformanceForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PerformanceForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PerformanceForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PerformanceForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PrepareModulesEntityUninstallForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PrepareModulesEntityUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PrepareModulesEntityUninstallForm\\:\\:deleteContentEntities\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PrepareModulesEntityUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PrepareModulesEntityUninstallForm\\:\\:moduleBatchFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PrepareModulesEntityUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\PrepareModulesEntityUninstallForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/PrepareModulesEntityUninstallForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\RegionalForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/RegionalForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SiteInformationForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SiteInformationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SiteInformationForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SiteInformationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SiteInformationForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SiteInformationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SiteMaintenanceModeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SiteMaintenanceModeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SiteMaintenanceModeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SiteMaintenanceModeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemBrandingOffCanvasForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemBrandingOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemBrandingOffCanvasForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemBrandingOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemBrandingOffCanvasForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemBrandingOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemBrandingOffCanvasForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemBrandingOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemBrandingOffCanvasForm\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemBrandingOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\SystemMenuOffCanvasForm\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/SystemMenuOffCanvasForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeAdminForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeAdminForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeExperimentalConfirmForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeExperimentalConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeExperimentalConfirmForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeExperimentalConfirmForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ThemeSettingsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$default_theme in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:archiverInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:blockViewSystemMainBlockAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:fileDownload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:filetransferInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:jsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:jsSettingsBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:mail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:queryEntityReferenceAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:themeRegistryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:updaterInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Hook/SystemTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\PathBasedBreadcrumbBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/PathBasedBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\PathBasedBreadcrumbBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/PathBasedBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\PhpStorage\\\\MockPhpStorage\\:\\:getConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/PhpStorage/MockPhpStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\PhpStorage\\\\MockPhpStorage\\:\\:getConfigurationValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/PhpStorage/MockPhpStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Block\\\\SystemBrandingBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Block/SystemBrandingBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Block\\\\SystemMainBlock\\:\\:setMainContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Block/SystemMainBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Block\\\\SystemMenuBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Block/SystemMenuBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Block\\\\SystemMenuBlock\\:\\:processMenuLevelParents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Block/SystemMenuBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Condition\\\\CurrentThemeCondition\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Condition/CurrentThemeCondition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Condition\\\\CurrentThemeCondition\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Condition/CurrentThemeCondition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Condition\\\\RequestPath\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Condition/RequestPath.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Condition\\\\RequestPath\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Condition/RequestPath.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\Condition\\\\RequestPath\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/Condition/RequestPath.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\ImageToolkit\\\\GDToolkit\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/ImageToolkit/GDToolkit.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Plugin\\\\migrate\\\\destination\\\\EntityDateFormat\\:\\:updateEntityProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$theme_settings in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Routing\\\\AssetRoutes\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Routing/AssetRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Routing\\\\MenuLinksetRoutes\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Routing/MenuLinksetRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Routing\\\\MenuLinksetRoutes\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Routing/MenuLinksetRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Routing\\\\MenuLinksetRoutes\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Routing/MenuLinksetRoutes.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$violation_messages might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SecurityAdvisories/SecurityAdvisory.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\SystemConfigSubscriber\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SystemConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\SystemConfigSubscriber\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SystemConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\SystemConfigSubscriber\\:\\:onConfigImporterValidateNotEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SystemConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\SystemConfigSubscriber\\:\\:onConfigImporterValidateSiteUUID\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SystemConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\SystemConfigSubscriber\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/SystemConfigSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Tests\\\\Routing\\\\MockAliasManager\\:\\:addAlias\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Tests/Routing/MockAliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Tests\\\\Routing\\\\MockAliasManager\\:\\:cacheClear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Tests/Routing/MockAliasManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Tests\\\\Routing\\\\MockRouteProvider\\:\\:preLoadRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Tests/Routing/MockRouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\Tests\\\\Routing\\\\MockRouteProvider\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/Tests/Routing/MockRouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\TimeZoneResolver\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/TimeZoneResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system\\\\TimeZoneResolver\\:\\:setDefaultTimeZone\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/src/TimeZoneResolver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_admin_block_content\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_admin_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_system_admin_index\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_system_modules_details\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_system_modules_uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_system_themes_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.install', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$directories might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.install', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$pdo_message might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.install', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$site_path might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _system_page_attachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_authorized_batch_process\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_authorized_init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_authorized_run\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_check_directory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_hook_info\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_preprocess_toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_sort_themes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_theme_suggestions_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_theme_suggestions_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_theme_suggestions_maintenance_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_theme_suggestions_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_theme_suggestions_region\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_entity_add_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function system_post_update_sdc_uninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/system.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\accept_header_routing_test\\\\AcceptHeaderRoutingTestServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderRoutingTestServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\action_test\\\\Plugin\\\\Action\\\\NoType\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\action_test\\\\Plugin\\\\Action\\\\SaveEntity\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\advisory_feed_test\\\\AdvisoryTestClientMiddleware\\:\\:__invoke\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/advisory_feed_test/src/AdvisoryTestClientMiddleware.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\advisory_feed_test\\\\Hook\\\\AdvisoryFeedTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/advisory_feed_test/src/Hook/AdvisoryFeedTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_add_css_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_after_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_alert_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_announce_assertive_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_announce_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_announce_polite_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_append_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_before_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_changed_asterisk_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_changed_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_css_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_data_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_double_announce_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_html_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_insert_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_invoke_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_prepend_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_remove_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_restripe_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_advanced_commands_settings_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_lazy_load_form_ajax\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_validation_form_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function ajax_forms_test_validation_number_form_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:checkboxCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:checkboxGroupCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:dateCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:datetimeCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:imageButtonCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Callbacks\\:\\:selectCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestAjaxElementsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestAjaxElementsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestCommandsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestImageButtonForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestImageButtonForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestLazyLoadForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestSimpleForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestSimpleForm\\:\\:textfieldCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Form\\\\AjaxFormsTestValidationForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Plugin\\\\Block\\\\AjaxFormBlock\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_forms_test\\\\Plugin\\\\Block\\\\AjaxFormBlock\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Ajax\\\\AjaxTestCommandReturnPromise\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Controller\\\\AjaxTestController\\:\\:dialog\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Controller\\\\AjaxTestController\\:\\:order\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Controller\\\\AjaxTestController\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Controller\\\\AjaxTestController\\:\\:theme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Controller\\\\AjaxTestController\\:\\:throwException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestDialogForm\\:\\:modal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestDialogForm\\:\\:modalFromUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestDialogForm\\:\\:nonModal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestDialogForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestDialogForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestFocusFirstForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFocusFirstForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestFocusFirstForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFocusFirstForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestFormPromise\\:\\:executeCommands\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFormPromise.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestFormPromise\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFormPromise.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestMessageCommandForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestMessageCommandForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\ajax_test\\\\Form\\\\AjaxTestMessageCommandForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/ajax_test/src/Form/AjaxTestMessageCommandForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_callback_1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_callback_2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_callback_5\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_callback_6\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_callback_7\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_0\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_1_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_3\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_4\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_5\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_6\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_7\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_finished_helper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_nested_batch_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$messages might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_0\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_3\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_4\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_5\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_6\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_batch_7\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_nested_drupal_form_submit_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_theme_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _batch_test_title_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function batch_test_stack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestChainedForm\\:\\:batchTestChainedFormSubmit1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestChainedForm\\:\\:batchTestChainedFormSubmit2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestChainedForm\\:\\:batchTestChainedFormSubmit3\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestChainedForm\\:\\:batchTestChainedFormSubmit4\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestChainedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestMockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestMockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestMultiStepForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestMultiStepForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\batch_test\\\\Form\\\\BatchTestSimpleForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/src/Form/BatchTestSimpleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cache_test\\\\Controller\\\\CacheTestController\\:\\:urlBubbling\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function common_test_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function common_test_preprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function common_test_preprocess_common_test_render_element\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function olivero_drupal_alter_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Controller\\\\CommonTestController\\:\\:typeLinkActiveClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:blockDrupalAlterFooAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:drupalAlterAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:jsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:jsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:libraryInfoBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test\\\\Hook\\\\CommonTestHooks\\:\\:pageAttachmentsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\common_test_cron_helper\\\\Hook\\\\CommonTestCronHelperHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/common_test_cron_helper/src/Hook/CommonTestCronHelperHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\FormController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/FormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\FormController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/FormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\FormController\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/FormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\FormController\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/FormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\Plugin\\\\Condition\\\\ConditionTestDualUser\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestDualUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\Plugin\\\\Condition\\\\ConditionTestNoExistingType\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\condition_test\\\\Plugin\\\\Condition\\\\OptionalContextCondition\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/condition_test/src/Plugin/Condition/OptionalContextCondition.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\container_rebuild_test\\\\ContainerRebuildTestServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/container_rebuild_test/src/ContainerRebuildTestServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestDatabaseDelayException\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestDatabaseDelayException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestDeriverQueue\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestDeriverQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestException\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestLeaseTime\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestLeaseTime.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestMemoryDelayException\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestMemoryDelayException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestRequeueException\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestRequeueException.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\cron_queue_test\\\\Plugin\\\\QueueWorker\\\\CronQueueTestSuspendQueue\\:\\:processItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/cron_queue_test/src/Plugin/QueueWorker/CronQueueTestSuspendQueue.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\css_disable_transitions_test\\\\Hook\\\\CssDisableTransitionsTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function database_test_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/database_test/database_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\database_test\\\\Form\\\\DatabaseTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/database_test/src/Form/DatabaseTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\database_test\\\\Hook\\\\DatabaseTestHooks\\:\\:queryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/database_test/src/Hook/DatabaseTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\database_test\\\\Hook\\\\DatabaseTestHooks\\:\\:queryDatabaseTestAlterRemoveRangeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/database_test/src/Hook/DatabaseTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\decoupled_menus_test\\\\Hook\\\\DecoupledMenusTestHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\default_format_test\\\\DefaultFormatTestController\\:\\:content\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\delay_cache_tags_invalidation\\\\Hook\\\\DelayCacheTagsInvalidationHooks\\:\\:entityTestInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\delay_cache_tags_invalidation\\\\Hook\\\\DelayCacheTagsInvalidationHooks\\:\\:userInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dependency_version_test\\\\Hook\\\\DependencyVersionTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/dependency_version_test/src/Hook/DependencyVersionTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\deprecated_module_test\\\\Hook\\\\DeprecatedModuleTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/deprecated_module_test/src/Hook/DeprecatedModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function deprecation_test_deprecated_alter_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/deprecation_test/deprecation_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function deprecation_test_deprecated_hook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/deprecation_test/deprecation_test.module', +]; +$ignoreErrors[] = [ + // identifier: function.deprecated + 'message' => '#^Call to deprecated function deprecation_test_function\\(\\)\\: +in drupal\\:8\\.4\\.0 and is removed from drupal\\:9\\.0\\.0\\. This is + the deprecation message for deprecated_test_function\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\destructable_test\\\\Destructable\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/destructable_test/src/Destructable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\dialog_renderer_test\\\\Form\\\\TestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/dialog_renderer_test/src/Form/TestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\display_variant_test\\\\EventSubscriber\\\\TestPageDisplayVariantSubscriber\\:\\:onSelectPageDisplayVariant\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:ajaxResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:ajaxResponseEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:cacheableDomainObject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:cacheableDomainObjectEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:cacheableResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:cacheableResponseEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:domainObject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:domainObjectEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:domainObjectWithAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:domainObjectWithAttachmentsEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:earlyRenderContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:renderArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:renderArrayEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:response\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:responseEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:responseWithAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\EarlyRenderingTestController\\:\\:responseWithAttachmentsEarly\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\early_rendering_controller_test\\\\TestDomainObjectViewSubscriber\\:\\:onViewTestDomainObject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObjectViewSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\element_info_test\\\\Hook\\\\ElementInfoTestHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\element_info_test\\\\Hook\\\\ElementInfoTestHooks\\:\\:elementPluginAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:blockUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:commentUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityPreload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:fileCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:fileDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:fileInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:fileLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:filePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:filePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:fileUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodeInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodeLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodePresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:nodeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyTermUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:taxonomyVocabularyUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_crud_hook_test\\\\Hook\\\\EntityCrudHookTestHooks\\:\\:userUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_reference_test\\\\Hook\\\\EntityReferenceTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_reference_test/src/Hook/EntityReferenceTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_reference_test\\\\Hook\\\\EntityReferenceTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_reference_test/src/Hook/EntityReferenceTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_schema_test\\\\Hook\\\\EntitySchemaTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_schema_test\\\\Hook\\\\EntitySchemaTestHooks\\:\\:entityBundleCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_schema_test\\\\Hook\\\\EntitySchemaTestHooks\\:\\:entityBundleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_schema_test\\\\Hook\\\\EntitySchemaTestHooks\\:\\:entityBundleFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_schema_test\\\\Hook\\\\EntitySchemaTestHooks\\:\\:entityFieldStorageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _entity_test_record_hooks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_create_bundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_delete_bundle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_form_entity_test_form_validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_form_entity_test_form_validate_check\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Controller\\\\EntityTestController\\:\\:testAdmin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Entity\\\\EntityTest\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:enableEventTracking\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:enableLiveDefinitionUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onEntityTypeEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldStorageDefinitionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldStorageDefinitionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldStorageDefinitionEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldStorageDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:storeDefinitionUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestDefinitionSubscriber\\:\\:storeEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\EntityTestViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/EntityTestViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityBundleInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityBundleInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityDisplayBuildAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityFieldAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityFormDisplayAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityFormModeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityFormModeInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityOperationAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityPrepareView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityRevisionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulChangedTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulChangedTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulChangedTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulLangcodeKeyTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulLangcodeKeyTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulLangcodeKeyTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevChangedTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevChangedTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevChangedTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevRevisionCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTestMulrevTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTranslationCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTranslationDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityTranslationInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:entityViewModeInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestHooks\\:\\:queryEntityTestAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Hook\\\\EntityTestViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Hook/EntityTestViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedReferenceTestFieldItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedReferenceTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedReferenceTestFieldItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedReferenceTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedReferenceTestFieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedReferenceTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestBundleFieldItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestBundleFieldItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestBundleFieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableIntegerItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableIntegerItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableIntegerItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableIntegerItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableIntegerItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableIntegerItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableStringItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableStringItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableStringItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableStringItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestCacheableStringItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestCacheableStringItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestFieldItemList\\:\\:computeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestFieldItemList\\:\\:ensureComputedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\ComputedTestFieldItemList\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\FieldType\\\\AutoIncrementingTestItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\FieldType\\\\ChangedTestItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\FieldType\\\\FieldTestItem\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\Plugin\\\\Field\\\\FieldType\\\\FieldTestItem\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test\\\\TypedData\\\\ComputedString\\:\\:getCastedValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestBundleXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestComputedFieldNormalizerTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestComputedFieldNormalizerTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestComputedFieldNormalizerTest\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonInternalPropertyNormalizerTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonInternalPropertyNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestJsonInternalPropertyNormalizerTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonInternalPropertyNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestLabelXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestMapFieldJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestMapFieldJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestMapFieldResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestResourceTestBase\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestTextItemNormalizerTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestTextItemNormalizerTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestTextItemNormalizerTest\\:\\:providerTestGetWithFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestTextItemNormalizerTest\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\entity_test\\\\Functional\\\\Rest\\\\EntityTestXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/update/entity_definition_updates_8001.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/update/entity_definition_updates_8002.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/update/status_report_8001.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function entity_test_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/update/status_report_8002.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Entity\\\\EntityTestBundleClass\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Entity\\\\EntityTestBundleClass\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Entity\\\\EntityTestBundleClass\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Entity\\\\EntityTestBundleClass\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Entity\\\\EntityTestBundleClass\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_bundle_class\\\\Hook\\\\EntityTestBundleClassHooks\\:\\:entityBundleInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_bundle_class/src/Hook/EntityTestBundleClassHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_constraints\\\\Hook\\\\EntityTestConstraintsHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_constraints/src/Hook/EntityTestConstraintsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_extra\\\\Hook\\\\EntityTestExtraHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_extra\\\\Hook\\\\EntityTestExtraHooks\\:\\:entityBundleFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_extra\\\\Hook\\\\EntityTestExtraHooks\\:\\:entityFieldStorageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_operation\\\\Hook\\\\EntityTestOperationHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\Entity\\\\EntityTestUpdate\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EntityTestUpdateStorage\\:\\:saveToDedicatedTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\Hook\\\\EntityTestUpdateHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\Hook\\\\EntityTestUpdateHooks\\:\\:entityFieldStorageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\entity_test_update\\\\Hook\\\\EntityTestUpdateHooks\\:\\:viewPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100000\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100101\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100201\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100301\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100302\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100400\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100401\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100402\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function equivalent_update_test_update_100501\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_service_test\\\\Controller\\\\LonelyMonkeyController\\:\\:testBrokenClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_service_test\\\\ErrorServiceTestServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_service_test/src/ErrorServiceTestServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_test\\\\Controller\\\\ErrorTestController\\:\\:generateFatalErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_test\\\\Controller\\\\ErrorTestController\\:\\:generateWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_test\\\\Controller\\\\ErrorTestController\\:\\:triggerPDOException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\error_test\\\\Controller\\\\ErrorTestController\\:\\:triggerRendererException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function experimental_module_requirements_test_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\experimental_module_requirements_test\\\\Hook\\\\ExperimentalModuleRequirementsTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\experimental_module_test\\\\Hook\\\\ExperimentalModuleTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _form_test_tableselect_get_data\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/form_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function form_test_tableselect_ajax_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/form_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function form_test_user_register_form_rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/form_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Callbacks\\:\\:validateName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Callbacks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\ConfirmFormTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/ConfirmFormTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Controller\\\\FormTestController\\:\\:storageLegacyHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Controller/FormTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\EventSubscriber\\\\FormTestEventSubscriber\\:\\:onKernelRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\EventSubscriber\\\\FormTestEventSubscriber\\:\\:onKernelResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestAlterForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestAlterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestButtonClassForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestButtonClassForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestCheckboxForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestCheckboxForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestCheckboxTypeJugglingForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestCheckboxTypeJugglingForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestCheckboxesRadiosForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestCheckboxesRadiosForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestCheckboxesZeroForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestCheckboxesZeroForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestClickedButtonForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestClickedButtonForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestClickedButtonForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestClickedButtonForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestColorForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestDescriptionForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestDescriptionForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestDetailsContainsRequiredTextfieldForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestDetailsContainsRequiredTextfieldForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestDetailsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestDetailsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestDetailsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestDetailsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestDisabledElementsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestDisabledElementsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestEmailForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestEmailForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestEmptySelectForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestEmptySelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestFileForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestFileForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestFormStateValuesCleanAdvancedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestFormStateValuesCleanAdvancedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestFormStateValuesCleanForm\\:\\:cleanValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestFormStateValuesCleanForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestFormStateValuesCleanForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestFormStateValuesCleanForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGetForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGroupContainerForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGroupContainerForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGroupDetailsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGroupDetailsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGroupFieldsetForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGroupFieldsetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGroupVerticalTabsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGroupVerticalTabsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestGroupVerticalTabsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestGroupVerticalTabsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestInputForgeryForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestInputForgeryForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestLabelForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestLabelForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestLanguageSelectForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestLanguageSelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestLimitValidationErrorsForm\\:\\:elementValidateLimitValidationErrors\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestLimitValidationErrorsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestLimitValidationErrorsForm\\:\\:partialSubmitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestLimitValidationErrorsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestLimitValidationErrorsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestLimitValidationErrorsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestMachineNameForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestMachineNameValidationForm\\:\\:buildAjaxSnackConfigureForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestMachineNameValidationForm\\:\\:buildAjaxSnackConfigureFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestMachineNameValidationForm\\:\\:buildAjaxSnackConfigureFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestMachineNameValidationForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestNumberForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestNumberForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestOptionalContainerForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestOptionalContainerForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestPatternForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestPatternForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestPlaceholderForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestPlaceholderForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestProgrammaticForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestProgrammaticForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestProgrammaticForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestProgrammaticForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRadiosCheckedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRadiosCheckedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRangeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRangeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRangeInvalidForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRangeInvalidForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRebuildPreserveValuesForm\\:\\:addMoreSubmitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRebuildPreserveValuesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRebuildPreserveValuesForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRebuildPreserveValuesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRedirectForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRedirectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestRequiredAttributeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestRequiredAttributeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestResponseForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestResponseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestSelectForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestSelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStatePersistForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStatePersistForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStorageForm\\:\\:continueSubmitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStorageForm\\:\\:elementValidateValueCached\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStorageForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStorageForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStoragePageCacheForm\\:\\:form_test_storage_page_cache_old_build_id\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStoragePageCacheForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStoragePageCacheForm\\:\\:form_test_storage_page_cache_rebuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStoragePageCacheForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStoragePageCacheForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStoragePageCacheForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestStoragePageCacheForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestStoragePageCacheForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectColspanForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectColspanForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectDisabledRowsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectDisabledRowsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectEmptyForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectEmptyForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectJsSelectForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectJsSelectForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectMultipleFalseForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectMultipleFalseForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestTableSelectMultipleTrueForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectMultipleTrueForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestUrlForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestUrlForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateNoToken\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateRequiredForm\\:\\:elementValidateRequired\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateRequiredForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateRequiredForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateRequiredForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestValidateRequiredNoTitleForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestValidateRequiredNoTitleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestVerticalTabsAccessForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsAccessForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestVerticalTabsAccessForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsAccessForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\FormTestVerticalTabsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\JavascriptStatesForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\Form\\\\RedirectBlockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/Form/RedirectBlockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestArgumentsObject\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestArgumentsObject\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestAutocompleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestAutocompleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestControllerObject\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestControllerObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestControllerObject\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestControllerObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestControllerObject\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestControllerObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestObject\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestObject\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestServiceObject\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestServiceObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\form_test\\\\FormTestServiceObject\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/form_test/src/FormTestServiceObject.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function hold_test_request\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/hold_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function hold_test_response\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/hold_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\hold_test\\\\EventSubscriber\\\\HoldTestSubscriber\\:\\:hold\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\hold_test\\\\EventSubscriber\\\\HoldTestSubscriber\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\hold_test\\\\EventSubscriber\\\\HoldTestSubscriber\\:\\:onRespond\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\http_kernel_test\\\\Controller\\\\TestController\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_test\\\\Plugin\\\\ImageToolkit\\\\TestToolkit\\:\\:logCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_test\\\\Plugin\\\\ImageToolkit\\\\TestToolkit\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\image_test\\\\Plugin\\\\ImageToolkit\\\\TestToolkit\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jquery_keyevent_polyfill_test\\\\Hook\\\\JqueryKeyeventPolyfillTestHooks\\:\\:libraryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jquery_keyevent_polyfill_test/src/Hook/JqueryKeyeventPolyfillTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\js_deprecation_test\\\\Hook\\\\JsDeprecationTestHooks\\:\\:jsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_deprecation_test/src/Hook/JsDeprecationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function js_displace_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_displace/js_displace.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\js_interaction_test\\\\Controller\\\\JSInteractionTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\js_testing_ajax_request_test\\\\Hook\\\\JsTestingAjaxRequestTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_testing_ajax_request_test/src/Hook/JsTestingAjaxRequestTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\js_testing_log_test\\\\Hook\\\\JsTestingLogTestHooks\\:\\:jsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_testing_log_test/src/Hook/JsTestingLogTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\js_testing_log_test\\\\Hook\\\\JsTestingLogTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/js_testing_log_test/src/Hook/JsTestingLogTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Controller\\\\TestController\\:\\:page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Controller/TestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addAssertWaitOnAjaxRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:addWaitForElementVisible\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\jswebassert_test\\\\Form\\\\JsWebAssertTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_layout_test_2col\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/layout_test/layout_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_test\\\\Plugin\\\\Layout\\\\LayoutTestPlugin\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\layout_test\\\\Plugin\\\\Layout\\\\LayoutTestPlugin\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\lazy_route_provider_install_test\\\\Hook\\\\LazyRouteProviderInstallTestHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/Hook/LazyRouteProviderInstallTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\lazy_route_provider_install_test\\\\PluginManager has an unused parameter \\$cache_backend\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\lazy_route_provider_install_test\\\\PluginManager has an unused parameter \\$url_generator\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\link_generation_test\\\\Hook\\\\LinkGenerationTestHooks\\:\\:linkAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/link_generation_test/src/Hook/LinkGenerationTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mail_cancel_test\\\\Hook\\\\MailCancelTestHooks\\:\\:mailAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/mail_cancel_test/src/Hook/MailCancelTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\mail_html_test\\\\Hook\\\\MailHtmlTestHooks\\:\\:mail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\many_assets_test\\\\Hook\\\\ManyAssetsTestHooks\\:\\:libraryInfoBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/many_assets_test/src/Hook/ManyAssetsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Access\\\\AccessCheck\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Access/AccessCheck.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Hook\\\\MenuTestHooks\\:\\:menuLinksDiscoveredAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Hook\\\\MenuTestHooks\\:\\:menuLocalTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Plugin\\\\Menu\\\\LocalAction\\\\TestLocalAction4\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction4.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Plugin\\\\Menu\\\\LocalAction\\\\TestLocalAction4\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction4.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Plugin\\\\Menu\\\\LocalTask\\\\TestTasksSettingsSub1\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalTask/TestTasksSettingsSub1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\Plugin\\\\Menu\\\\LocalTask\\\\TestTasksSettingsSub1\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalTask/TestTasksSettingsSub1.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\TestControllers\\:\\:test1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\TestControllers\\:\\:test2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\TestControllers\\:\\:testContextual\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\TestControllers\\:\\:testDerived\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\menu_test\\\\TestControllers\\:\\:testLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/menu_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\module_autoload_test\\\\SomeClass\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_autoload_test/src/SomeClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\module_required_test\\\\Hook\\\\ModuleRequiredTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_required_test/src/Hook/ModuleRequiredTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_test_hook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.file.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_altered_test_hook\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.implementations.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_hook_info\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_load\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_module_implements_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_modules_installed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_modules_uninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_system_info_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function module_test_post_update_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\module_test\\\\PluginManagerCacheClearer\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/src/PluginManagerCacheClearer.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/module_test/src/PluginManagerCacheClearer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function new_dependency_test_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/new_dependency_test/new_dependency_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\new_dependency_test\\\\SetterInjection\\:\\:setter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/new_dependency_test/src/SetterInjection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\off_canvas_test\\\\Hook\\\\OffCanvasTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/off_canvas_test/src/Hook/OffCanvasTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function olivero_test_preprocess_field_multiple_value_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/olivero_test/olivero_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function olivero_test_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/olivero_test/olivero_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function pager_test_preprocess_pager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/pager_test/pager_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pager_test\\\\Controller\\\\PagerTestController\\:\\:multiplePagers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pager_test\\\\Controller\\\\PagerTestController\\:\\:queryParameters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\pager_test\\\\Controller\\\\PagerTestController\\:\\:showPagerCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\paramconverter_test\\\\TestControllers\\:\\:testEntityLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/paramconverter_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\paramconverter_test\\\\TestControllers\\:\\:testNodeSetParent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/paramconverter_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\paramconverter_test\\\\TestControllers\\:\\:testUserNodeFoo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/paramconverter_test/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:deleteAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:deleteMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:invalidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:invalidateAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:invalidateMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:removeBin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheBackendDecorator\\:\\:setMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheTagsChecksumDecorator\\:\\:invalidateTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\Cache\\\\CacheTagsChecksumDecorator\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\PerformanceDataCollector\\:\\:addCacheOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/PerformanceDataCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\performance_test\\\\PerformanceDataCollector\\:\\:addCacheTagOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/performance_test/src/PerformanceDataCollector.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function pgsql_test_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/pgsql_test/pgsql_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Hook\\\\PluginTestHooks\\:\\:pluginTestAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Hook/PluginTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Hook\\\\PluginTestHooks\\:\\:testPluginInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Hook/PluginTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\Annotation\\\\PluginExample\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/DefaultsTestPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\MockBlockManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\MockBlockManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\TestLazyPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/TestPluginManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockComplexContextBlock\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockComplexContextBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockComplexContextBlock\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockComplexContextBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockComplexContextBlock\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockComplexContextBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockComplexContextBlock\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockComplexContextBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockComplexContextBlock\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockComplexContextBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockLayoutBlockDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockLayoutBlockDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockMenuBlock\\:\\:getContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockMenuBlockDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockMenuBlockDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserLoginBlock\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserNameBlock\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserNameBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserNameBlock\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserNameBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserNameBlock\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserNameBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserNameBlock\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserNameBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\MockUserNameBlock\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserNameBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\TypedDataStringBlock\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/TypedDataStringBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\TypedDataStringBlock\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/TypedDataStringBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\TypedDataStringBlock\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/TypedDataStringBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\TypedDataStringBlock\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/TypedDataStringBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\plugin_test\\\\Plugin\\\\plugin_test\\\\mock_block\\\\TypedDataStringBlock\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/TypedDataStringBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function post_update_test_failing_post_update_exception\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/post_update_test_failing/post_update_test_failing.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\render_placeholder_message_test\\\\RenderPlaceholderMessageTestController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function requirements1_test_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/requirements1_test/requirements1_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_installer_test\\\\Hook\\\\RouterInstallerTestHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_installer_test/src/Hook/RouterInstallerTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function router_test_preprocess_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/router_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\RouteTestSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/RouteTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\RouterTestServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestContent\\:\\:subrequestTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestContent\\:\\:test1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestContent\\:\\:testAccount\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestContent.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:removeExceptionLogger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test10\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test18\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test21\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test23\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test24\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test25\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test3\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test4\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test5\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test6\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test7\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test8\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:test9\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:testRouteName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\router_test\\\\TestControllers\\:\\:throwException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/src/TestControllers.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sdc_other_node_visitor\\\\Twig\\\\Extension\\\\TestProfilerExtension\\:\\:enter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\sdc_other_node_visitor\\\\Twig\\\\Extension\\\\TestProfilerExtension\\:\\:leave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\ServiceProviderTestServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/ServiceProviderTestServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\TestClass\\:\\:destruct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/TestClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\TestClass\\:\\:onKernelRequestTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/TestClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\TestClass\\:\\:onKernelResponseTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/TestClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\TestFileUsage\\:\\:add\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\service_provider_test\\\\TestFileUsage\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\services_defaults_test\\\\TestService\\:\\:getTestInjection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/services_defaults_test/src/TestService.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\services_defaults_test\\\\TestService\\:\\:getTestInjection2\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/services_defaults_test/src/TestService.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_exists_cache_context_test\\\\Hook\\\\SessionExistsCacheContextTestHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_exists_cache_context_test/src/Hook/SessionExistsCacheContextTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\Controller\\\\SessionTestController\\:\\:triggerWriteException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\EventSubscriber\\\\SessionTestSubscriber\\:\\:onKernelRequestSessionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\EventSubscriber\\\\SessionTestSubscriber\\:\\:onKernelResponseSessionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\Form\\\\SessionTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/Form/SessionTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\Hook\\\\SessionTestHooks\\:\\:userLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/Hook/SessionTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\Session\\\\TestSessionBag\\:\\:clearFlag\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\session_test\\\\Session\\\\TestSessionBag\\:\\:setFlag\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_module_test\\\\Hook\\\\SystemModuleTestHooks\\:\\:pageAttachmentsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_module_test/src/Hook/SystemModuleTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:authorizeInit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:getCacheableResponseWithCustomCacheControl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:getInstallProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:lockAcquire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:lockExit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:preRenderCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:respondWithCacheableResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:respondWithPublicResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:respondWithResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:setHeader\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:shutdownFunctions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:system_test_cache_max_age_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Controller\\\\SystemTestController\\:\\:system_test_cache_tags_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Form\\\\CopyFieldValueTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Form/CopyFieldValueTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:filetransferInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:modulePreinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:modulePreuninstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:pageAttachments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\system_test\\\\MockFileTransfer\\:\\:getSettingsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/MockFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _system_test_first_shutdown_function\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/system_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _system_test_second_shutdown_function\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/system_test/system_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\tabledrag_test\\\\Form\\\\TableDragTestForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\tabledrag_test\\\\Form\\\\TableDragTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _test_batch_test_callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_batch_test/test_batch_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:deprecations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:error\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:escapedCharacters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:escapedScript\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:httpResponseException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:metaRefresh\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:unEscapedScript\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\TestPageTestController\\:\\:testPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\TestPageTestController\\:\\:testPageVarDump\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_page_test\\\\Form\\\\TestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Form/TestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_page_test\\\\Hook\\\\ThemePageTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_page_test/src/Hook/ThemePageTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_region_test_preprocess_region\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_region_test/theme_region_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_suggestions_test\\\\Hook\\\\ThemeSuggestionsTestHooks\\:\\:themeSuggestionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_suggestions_test\\\\Hook\\\\ThemeSuggestionsTestHooks\\:\\:themeSuggestionsThemeTestSpecificSuggestionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_suggestions_test\\\\Hook\\\\ThemeSuggestionsTestHooks\\:\\:themeSuggestionsThemeTestSuggestionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\EventSubscriber\\\\ThemeTestSubscriber\\:\\:onRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\EventSubscriber\\\\ThemeTestSubscriber\\:\\:onView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\Hook\\\\ThemeTestHooks\\:\\:pageBottom\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\Hook\\\\ThemeTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\Hook\\\\ThemeTestHooks\\:\\:themeRegistryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\Hook\\\\ThemeTestHooks\\:\\:themeSuggestionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\Hook\\\\ThemeTestHooks\\:\\:themeSuggestionsThemeTestSuggestionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:generalSuggestionAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:preprocessCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:preprocessSuggestions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:specificSuggestionAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:suggestionAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:suggestionProvided\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:testThemeClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestPreprocess\\:\\:preprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_theme_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_theme_test_deprecations_preprocess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_theme_test_registered_by_module\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_theme_test_render_element\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_preprocess_theme_test_preprocess_suggestions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_preprocess_theme_test_preprocess_suggestions__monkey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_theme_suggestions_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_theme_suggestions_theme_test_preprocess_suggestions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function theme_test_theme_suggestions_theme_test_suggestion_provided\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\trusted_hosts_test\\\\Controller\\\\TrustedHostsTestController\\:\\:bagType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/trusted_hosts_test/src/Controller/TrustedHostsTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\trusted_hosts_test\\\\Controller\\\\TrustedHostsTestController\\:\\:fakeRequestHost\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/trusted_hosts_test/src/Controller/TrustedHostsTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_extension_test\\\\TwigExtensionTestController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_extension_test\\\\TwigExtensionTestController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_extension_test\\\\TwigExtensionTestController\\:\\:testFilterRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_extension_test\\\\TwigExtensionTestController\\:\\:testFunctionRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:attachLibraryRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:dump\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:embedTagRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:fileUrlRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:linkGeneratorRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:phpVariablesRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:placeholderOutsideTransRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:registryLoaderRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:renderable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:transBlockRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:urlGeneratorRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:urlToStringRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _test_theme_twig_php_values\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/twig_theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function twig_theme_test_preprocess_status_messages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/twig_theme_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\unique_field_constraint_test\\\\Hook\\\\UniqueFieldConstraintTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/unique_field_constraint_test/src/Hook/UniqueFieldConstraintTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\unique_field_constraint_test\\\\Hook\\\\UniqueFieldConstraintTestHooks\\:\\:queryEntityTestAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/unique_field_constraint_test/src/Hook/UniqueFieldConstraintTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function unversioned_assets_test_library_info_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_script_test\\\\Controller\\\\UpdateScriptTestController\\:\\:databaseUpdatesMenuItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/src/Controller/UpdateScriptTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_script_test\\\\Hook\\\\UpdateScriptTestHooks\\:\\:cacheFlush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_script_test\\\\Hook\\\\UpdateScriptTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_script_test_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_script_test_update_7200\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_script_test_update_7201\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_script_test_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_0_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_0/update_test_0.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_0_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_0/update_test_0.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_0_update_8003\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_0/update_test_0.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_1_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_1/update_test_1.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_1_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_1/update_test_1.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_1_update_8003\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_1/update_test_1.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_1_update_dependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_1/update_test_1.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_2_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_2/update_test_2.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_2_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_2/update_test_2.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_2_update_8003\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_2/update_test_2.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_2_update_dependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_2/update_test_2.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_3_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_3/update_test_3.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_3_update_dependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_3/update_test_3.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_description_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_description/update_test_description.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_description_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_description/update_test_description.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_failing_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_failing/update_test_failing.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_failing_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_failing/update_test_failing.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_failing_post_update_first\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_failing/update_test_failing.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_invalid_hook_update_8000\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_invalid_hook/update_test_invalid_hook.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_last_removed_update_8003\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_no_preexisting_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_no_preexisting/update_test_no_preexisting.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_post_update_first\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_post_update_second\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_post_update_test0\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_post_update_test1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_postupdate_post_update_test_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_schema_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_schema/update_test_schema.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_schema_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_schema/update_test_schema.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_schema_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_schema/update_test_schema.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_schema_update_8002\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_schema/update_test_schema.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_schema_update_8003\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_schema/update_test_schema.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_semver_update_n_update_8001\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_semver_update_n/update_test_semver_update_n.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_with_7x_update_7200\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_test_with_7x_update_7201\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Batch\\\\ProcessingTest\\:\\:_resultMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Batch/ProcessingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Batch\\\\ProcessingTest\\:\\:_resultStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Batch/ProcessingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Cache\\\\CacheTestBase\\:\\:assertCacheExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Cache/CacheTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Cache\\\\CacheTestBase\\:\\:assertCacheRemoved\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Cache/CacheTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Cache\\\\PageCacheTagsTestBase\\:\\:verifyDynamicPageCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Cache\\\\PageCacheTagsTestBase\\:\\:verifyPageCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Common\\\\RenderWebTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Common/RenderWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityCacheTagsTestBase\\:\\:selectViewMode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityCacheTagsTestBase\\:\\:verifyRenderCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityFormTest\\:\\:loadEntityByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityOperationsTest\\:\\:createRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Entity\\\\EntityReferenceFieldCreationTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\FileTransferTest\\:\\:_buildFakeModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\FileTransferTest\\:\\:_getFakeModuleFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\MockTestConnection\\:\\:flushCommands\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\MockTestConnection\\:\\:run\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:chmodJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:connect\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:copyFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:createDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:removeDirectoryJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\FileTransfer\\\\TestFileTransfer\\:\\:removeFileJailed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$form_output in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Form/FormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Form\\\\StubForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Form/StubForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbFrontCacheContextsTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbFrontCacheContextsTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbFrontCacheContextsTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\BreadcrumbTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$parent might not be defined\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\LinksetControllerTestBase\\:\\:assertDrupalResponseCacheability\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\LinksetControllerTestBase\\:\\:enableEndpoint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\LinksetControllerTestBase\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\LinksetControllerTestBase\\:\\:rebuildIfNeeded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Menu\\\\LinksetControllerTestBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertLogMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertModuleConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertModuleTablesDoNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertModuleTablesExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Module\\\\ModuleTestBase\\:\\:assertNoModuleConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Module/ModuleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Pager\\\\PagerTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Pager/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$test_meta in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Render\\\\UrlBubbleableMetadataBubblingTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\ActionXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/ActionXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Rest\\\\MenuXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Rest/MenuXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\SecurityAdvisories\\\\SecurityAdvisoryTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/SecurityAdvisories/SecurityAdvisoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\AccessDeniedTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/AccessDeniedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\CronRunTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/CronRunTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\CronRunTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/CronRunTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/DateTimeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PageNotFoundTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PageNotFoundTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PhpRequirementTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PhpRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PhpRequirementTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PhpRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PhpRequirementTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PhpRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PhpRequirementTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PhpRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\PhpRequirementTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/PhpRequirementTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\SiteMaintenanceTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\SiteMaintenanceTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\TokenReplaceWebTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EngineTwigTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EngineTwigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\EntityFilteringThemeTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\MaintenanceThemeUpdateRegistryTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\MaintenanceThemeUpdateRegistryTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\MaintenanceThemeUpdateRegistryTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\MaintenanceThemeUpdateRegistryTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\MaintenanceThemeUpdateRegistryTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$expected_required_list_items might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Theme\\\\ThemeUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\BrokenCacheUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EntityUpdateInitialTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EquivalentUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EquivalentUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EquivalentUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EquivalentUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\EquivalentUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\InvalidUpdateHookTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\InvalidUpdateHookTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\InvalidUpdateHookTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\InvalidUpdateHookTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\InvalidUpdateHookTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\NoPreExistingSchemaUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\NoPreExistingSchemaUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\NoPreExistingSchemaUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\NoPreExistingSchemaUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\NoPreExistingSchemaUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateCacheTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateCacheTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateCacheTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateCacheTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateCacheTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathLastRemovedTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathNewDependencyTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathTestJavaScriptTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePathWithBrokenRoutingTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateExceptionTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateFailingTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatePostUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateRemovedPostUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateSchemaTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateSchemaTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateSchemaTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateSchemaTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateSchemaTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:getSystemSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:providerExtensionCompatibilityChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdateScriptTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatesWith7xTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatesWith7xTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatesWith7xTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatesWith7xTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\UpdateSystem\\\\UpdatesWith7xTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:assertAllContextualLinksLoaded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:assertElementVisibleAfterWait\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:assertPageLoadComplete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:enableTheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:themeDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:waitForOffCanvasToClose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\OffCanvasTestBase\\:\\:waitForOffCanvasToOpen\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\FunctionalJavascript\\\\ThemeSettingsFormTest\\:\\:providerTestFormSettingsSubmissionHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Common\\\\AddFeedTest\\:\\:urlToRSSLinkPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Common/AddFeedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\DateFormatAccessControlHandlerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\DateFormatAccessControlHandlerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\DateFormatAccessControlHandlerTest\\:\\:testAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Entity\\\\EntityReferenceSelection\\\\EntityReferenceSelectionAccessTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Entity\\\\EntityReferenceSelection\\\\EntityReferenceSelectionAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Entity\\\\EntityReferenceSelection\\\\EntityReferenceSelectionAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Entity\\\\EntityReferenceSelectionReferenceableTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Form\\\\ElementsFieldsetTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Form\\\\ElementsFieldsetTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Form\\\\FormElementMaxlengthTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Form\\\\FormElementMaxlengthTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\MenuAccessControlHandlerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\MenuAccessControlHandlerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\MenuAccessControlHandlerTest\\:\\:testAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateActionConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateActionConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateActionConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateActionConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Module\\\\PrepareModulesEntityUninstallFormTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Module/PrepareModulesEntityUninstallFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Module\\\\PrepareModulesEntityUninstallFormTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Module/PrepareModulesEntityUninstallFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\ModuleAdminLinksHelperTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/ModuleAdminLinksHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\ModuleAdminLinksHelperTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/ModuleAdminLinksHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ActionTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Plugin/migrate/source/ActionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ExtensionTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\MenuTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\MenuTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\ThemeSettingsTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\TimezoneResolverTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/TimezoneResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\TimezoneResolverTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Kernel/TimezoneResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Unit\\\\Menu\\\\MenuLinkTreeTest\\:\\:providerTestBuildCacheability\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Unit\\\\Menu\\\\SystemLocalTasksTest\\:\\:getSystemAdminRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Unit\\\\Routing\\\\AdminRouteSubscriberTest\\:\\:providerTestAlterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function nyan_cat_extension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function nyan_cat_render_template\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_subsubtheme_preprocess_theme_test_template_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_subtheme_preprocess_theme_test_template_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_subtheme/test_subtheme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_subtheme_views_post_render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_subtheme/test_subtheme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_subtheme_views_pre_render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_subtheme/test_subtheme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_element_info_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_library_info_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_preprocess_suggestions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_preprocess_suggestions__kitten\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_preprocess_suggestions__kitten__flamingo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_preprocess_suggestions__kitten__meerkat__tarsier__moose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_preprocess_suggestions__suggestion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_theme_test_theme_class\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_preprocess_twig_theme_test_php_variables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_registry_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_suggestions_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_suggestions_node_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_suggestions_theme_test_suggestions_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_test_alter_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme/test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\test_module_required_by_theme\\\\Hook\\\\TestModuleRequiredByThemeHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/src/Hook/TestModuleRequiredByThemeHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_depending_on_modules_post_update_module_install\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_depending_on_modules/test_theme_depending_on_modules.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_nyan_cat_engine_preprocess_theme_test_template_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_nyan_cat_engine/test_theme_nyan_cat_engine.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_settings_form_system_theme_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_settings/theme-settings.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_theme_form_system_theme_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_theme/test_theme_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function test_theme_updates_post_update_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/system/tests/themes/test_theme_updates/test_theme_updates.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\ContextProvider\\\\TermRouteContext\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/ContextProvider/TermRouteContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\ContextProvider\\\\TermRouteContext\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/ContextProvider/TermRouteContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Entity\\\\Term\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Entity/Term.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Entity\\\\Term\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Entity/Term.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Entity\\\\Vocabulary\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Entity/Vocabulary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Entity\\\\Vocabulary\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Entity/Vocabulary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Entity\\\\Vocabulary\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Entity/Vocabulary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\OverviewTerms\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/OverviewTerms.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\OverviewTerms\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/OverviewTerms.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\OverviewTerms\\:\\:submitReset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/OverviewTerms.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\TermDeleteForm\\:\\:getDeletionMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/TermDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\VocabularyResetForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/VocabularyResetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Form\\\\VocabularyResetForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Form/VocabularyResetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:localTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:nodeInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:nodePredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:nodeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:taxonomyTermDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyViewsHooks\\:\\:fieldViewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\Validation\\\\Constraint\\\\TaxonomyTermHierarchyConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/Validation/Constraint/TaxonomyTermHierarchyConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\migrate\\\\D7TaxonomyTermDeriver\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\migrate\\\\D7TaxonomyTermDeriver\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\migrate\\\\field\\\\TaxonomyTermReference\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermTranslation\\:\\:prepareRow\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTid\\:\\:titleQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepth\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepth\\:\\:defaultActions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepth\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepth\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$inner_count might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepthModifier\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepthModifier\\:\\:preQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument\\\\IndexTidDepthModifier\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument_default\\\\Tid\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument_default/Tid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument_default\\\\Tid\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument_default/Tid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument_default\\\\Tid\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument_default/Tid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument_validator\\\\TermName\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\argument_validator\\\\TermName\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:addSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:documentSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TaxonomyIndexTid\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\field\\\\TermName\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/field/TermName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:buildExtraOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:hasExtraOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:validateExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:valueSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTid\\:\\:valueValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTidDepth\\:\\:buildExtraOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTidDepth\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\filter\\\\TaxonomyIndexTidDepth\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$inner_count might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\relationship\\\\NodeTermData\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\relationship\\\\NodeTermData\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\views\\\\relationship\\\\NodeTermData\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TaxonomyPermissions\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TaxonomyPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TaxonomyPermissions\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TaxonomyPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TaxonomyPermissions\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TaxonomyPermissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermBreadcrumbBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermBreadcrumbBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermBreadcrumbBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:flagViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:validateForm\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermStorage\\:\\:resetCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermStorage\\:\\:resetWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermStorageInterface\\:\\:resetWeights\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermTranslationHandler\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermTranslationHandler\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\TermTranslationHandler\\:\\:entityFormSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/TermTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyInterface\\:\\:setNewRevision\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function taxonomy_build_node_index\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/taxonomy.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function taxonomy_delete_node_index\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/taxonomy.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function taxonomy_term_is_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/taxonomy.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function taxonomy_theme_suggestions_taxonomy_term\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/taxonomy.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_taxonomy_term\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/taxonomy.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_crud\\\\Hook\\\\TaxonomyCrudHooks\\:\\:taxonomyVocabularyPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_crud/src/Hook/TaxonomyCrudHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_term_display_configurable_test\\\\Hook\\\\TaxonomyTermDisplayConfigurableTestHooks\\:\\:entityBaseFieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_term_display_configurable_test\\\\Hook\\\\TaxonomyTermDisplayConfigurableTestHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_test\\\\Hook\\\\TaxonomyTestHooks\\:\\:queryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_test\\\\Hook\\\\TaxonomyTestHooks\\:\\:queryTaxonomyTermAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_test\\\\Hook\\\\TaxonomyTestHooks\\:\\:queryTermAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\taxonomy_test\\\\Hook\\\\TaxonomyTestHooks\\:\\:taxonomyTermLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\vocabulary_serialization_test\\\\VocabularyResponse\\:\\:setVocabulary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/vocabulary_serialization_test/src/VocabularyResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\vocabulary_serialization_test\\\\VocabularySerializationTestController\\:\\:vocabularyResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/modules/vocabulary_serialization_test/src/VocabularySerializationTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermResourceTestBase\\:\\:providerTestGetTermWithParent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\TermXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Rest\\\\VocabularyXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TaxonomyTermContentModerationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TaxonomyTermContentModerationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TaxonomyTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermAccessTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationFieldViewTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationFieldViewTest\\:\\:enableTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationFieldViewTest\\:\\:setUpTermReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationFieldViewTest\\:\\:setupLanguages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:assertBreadcrumbParts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:assertMenuActiveTrail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:enableTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:setUpTermReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationTest\\:\\:setupLanguages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationUITest\\:\\:getEditValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\TermTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TaxonomyIndexTidUiTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TaxonomyTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TaxonomyTestBase\\:\\:mockStandardInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TermTranslationViewsTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TermTranslationViewsTest\\:\\:enableTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TermTranslationViewsTest\\:\\:setUpTermReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Functional\\\\Views\\\\TermTranslationViewsTest\\:\\:setupLanguages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Migrate\\\\MigrateTaxonomyConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Migrate\\\\MigrateTaxonomyConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Migrate\\\\MigrateTaxonomyTermStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\PendingRevisionTest\\:\\:getTaxonomyIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\TermLocalizedTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\TermNodeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\TermSourceWithVocabularyFilterTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\TermTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\TermTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\VocabularyPerTypeTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\VocabularyTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\VocabularyTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermEntityTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermLocalizedTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermSourceWithVocabularyFilterTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\VocabularyTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\VocabularyTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\TermKernelTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/TermKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\TermKernelTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/TermKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\TokenReplaceTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyFieldTidTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyFieldTidTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyFieldVidTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyFieldVidTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyTestBase\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyTestBase\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyTestBase\\:\\:mockStandardInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Kernel\\\\Views\\\\TaxonomyTestBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\taxonomy\\\\Unit\\\\Menu\\\\TaxonomyLocalTasksTest\\:\\:getTaxonomyPageRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\telephone\\\\Hook\\\\TelephoneHooks\\:\\:fieldFormatterInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/telephone/src/Hook/TelephoneHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\telephone\\\\Hook\\\\TelephoneHooks\\:\\:fieldTypeCategoryInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/telephone/src/Hook/TelephoneHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\telephone\\\\Hook\\\\TelephoneHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/telephone/src/Hook/TelephoneHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\Hook\\\\TextHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/Hook/TextHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\Plugin\\\\Field\\\\FieldType\\\\TextFieldItemList\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/Plugin/Field/FieldType/TextFieldItemList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\Plugin\\\\Field\\\\FieldType\\\\TextItemBase\\:\\:onChange\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/Plugin/Field/FieldType/TextItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\Plugin\\\\Field\\\\FieldType\\\\TextItemBase\\:\\:validateAllowedFormats\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/Plugin/Field/FieldType/TextItemBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\TextField\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/Plugin/migrate/field/d6/TextField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\text\\\\TextProcessed\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/src/TextProcessed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Kernel\\\\Migrate\\\\MigrateTextConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Kernel\\\\Migrate\\\\MigrateTextConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Kernel\\\\TextItemBaseTest\\:\\:providerTextFieldSampleValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Kernel/TextItemBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Kernel\\\\TextSummaryTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Kernel/TextSummaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Kernel\\\\TextSummaryTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Kernel/TextSummaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Unit\\\\Plugin\\\\migrate\\\\field\\\\d6\\\\TextFieldTest\\:\\:getFieldTypeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\text\\\\Unit\\\\Plugin\\\\migrate\\\\field\\\\d7\\\\TextFieldTest\\:\\:getFieldFormatterTypeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar\\\\Ajax\\\\SetSubtreesCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/src/Ajax/SetSubtreesCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar\\\\Controller\\\\ToolbarController\\:\\:preRenderGetRenderedSubtrees\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/src/Controller/ToolbarController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar\\\\Hook\\\\ToolbarHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/src/Hook/ToolbarHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar\\\\Hook\\\\ToolbarHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/src/Hook/ToolbarHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar\\\\Hook\\\\ToolbarHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/src/Hook/ToolbarHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar_disable_user_toolbar\\\\Hook\\\\ToolbarDisableUserToolbarHooks\\:\\:toolbarAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\toolbar_test\\\\Hook\\\\ToolbarTestHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/modules/toolbar_test/src/Hook/ToolbarTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function toolbar_test_preprocess_menu\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/toolbar.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function toolbar_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/toolbar/toolbar.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Controller\\\\UpdateController\\:\\:updateStatusManually\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Controller/UpdateController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateManagerUpdate\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateManagerUpdate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateManagerUpdate\\:\\:removeCheckboxFromRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateManagerUpdate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateManagerUpdate\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateManagerUpdate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateManagerUpdate\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateManagerUpdate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateReady\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateReady.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Form\\\\UpdateReady\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Form/UpdateReady.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:mail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:modulesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:pageTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:themesInstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:themesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:verifyUpdateArchive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\ProjectCoreCompatibility\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectCoreCompatibility.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\ProjectCoreCompatibility\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectCoreCompatibility.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\ProjectCoreCompatibility\\:\\:setReleaseMessage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectCoreCompatibility.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$violation_messages might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectRelease.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\ProjectSecurityRequirement\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectSecurityRequirement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\ProjectSecurityRequirement\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/ProjectSecurityRequirement.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\Routing\\\\UpdateRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/Routing/UpdateRouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManager\\:\\:fetchDataBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManager\\:\\:refreshUpdateData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManagerInterface\\:\\:fetchDataBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateManagerInterface\\:\\:refreshUpdateData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessor\\:\\:createFetchTask\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessor\\:\\:deleteQueueItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessor\\:\\:fetchData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessor.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessorInterface\\:\\:createFetchTask\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessorInterface\\:\\:deleteQueueItem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateProcessorInterface\\:\\:fetchData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateProcessorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update\\\\UpdateSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/src/UpdateSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_test\\\\Hook\\\\UpdateTestHooks\\:\\:filetransferInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_test\\\\Hook\\\\UpdateTestHooks\\:\\:systemInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\update_test\\\\Hook\\\\UpdateTestHooks\\:\\:updateStatusAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateContribTest\\:\\:securityUpdateAvailabilityProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateContribTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateMiscTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateMiscTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverContribSecurityAvailabilityTest\\:\\:securityUpdateAvailabilityProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverContribSecurityAvailabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverContribTestBase\\:\\:setProjectInstalledVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverContribTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverCoreSecurityAvailabilityTest\\:\\:securityUpdateAvailabilityProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverCoreSecurityAvailabilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverCoreSecurityCoverageTest\\:\\:securityCoverageMessageProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverCoreTestBase\\:\\:setProjectInstalledVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverCoreTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverTestBase\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverTestBase\\:\\:refreshUpdateStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateSemverTestBase\\:\\:setProjectInstalledVersion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateSemverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertSecurityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertUpdateTableElementContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertUpdateTableElementNotContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertUpdateTableTextContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertUpdateTableTextNotContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:assertVersionUpdateLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:confirmRevokedStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:confirmUnsupportedStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:refreshUpdateStatus\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Functional\\\\UpdateTestBase\\:\\:standardTests\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Functional/UpdateTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUpdateConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUpdateConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Kernel\\\\UpdateReportTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Kernel/UpdateReportTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Kernel\\\\UpdateReportTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Kernel/UpdateReportTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Unit\\\\Menu\\\\UpdateLocalTasksTest\\:\\:getUpdateModuleRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Unit\\\\Menu\\\\UpdateLocalTasksTest\\:\\:getUpdateReportRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Unit\\\\Menu\\\\UpdateLocalTasksTest\\:\\:getUpdateThemeRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\update\\\\Unit\\\\ProjectCoreCompatibilityTest\\:\\:providerSetProjectCoreCompatibilityRanges\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.covers + 'message' => '#^@covers value \\\\update_mail references an invalid class or function\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/tests/src/Unit/UpdateMailTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_authorize_clear_update_status\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.authorize.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_batch_create_message\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.authorize.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_authorize_batch_copy_project\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.authorize.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_authorize_update_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.authorize.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_calculate_project_update_status\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_process_project_info\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.compare.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_cron_notify\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.fetch.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_manager_batch_project_get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.manager.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_manager_download_batch_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.manager.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_no_data\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _update_project_status_sort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_update_last_check\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_clear_update_disk_cache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_create_fetch_task\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_fetch_data\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_fetch_data_finished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_refresh\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_storage_clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function update_remove_post_updates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_update_project_status\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.report.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_update_report\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.report.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_update_version\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/update/update.report.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountForm\\:\\:flagViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountForm\\:\\:syncUserLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\AccountSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/AccountSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Authentication\\\\Provider\\\\Cookie\\:\\:addCheckToUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Authentication/Provider/Cookie.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Authentication\\\\Provider\\\\Cookie\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Authentication/Provider/Cookie.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Authentication\\\\Provider\\\\Cookie\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Authentication/Provider/Cookie.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ContextProvider\\\\CurrentUserContext\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ContextProvider/CurrentUserContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ContextProvider\\\\CurrentUserContext\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ContextProvider/CurrentUserContext.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Controller\\\\UserAuthenticationController\\:\\:floodControl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Controller/UserAuthenticationController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Controller\\\\UserAuthenticationController\\:\\:userLoginFinalize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Controller/UserAuthenticationController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Controller\\\\UserAuthenticationController\\:\\:userLogout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Controller/UserAuthenticationController.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$users might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Controller/UserAuthenticationController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Entity\\\\Role\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Entity/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Entity\\\\Role\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Entity/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Entity\\\\User\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Entity/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Entity\\\\User\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Entity/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Entity\\\\User\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Entity/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\EventSubscriber\\\\MaintenanceModeSubscriber\\:\\:onMaintenanceModeRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\EventSubscriber\\\\UserFloodSubscriber\\:\\:blockedIp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/EventSubscriber/UserFloodSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\EventSubscriber\\\\UserFloodSubscriber\\:\\:blockedUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/EventSubscriber/UserFloodSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\EventSubscriber\\\\UserRequestSubscriber\\:\\:onKernelTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/EventSubscriber/UserRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\EntityPermissionsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/EntityPermissionsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\RoleSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/RoleSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\RoleSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/RoleSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserCancelForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserCancelForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserLoginForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserLoginForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserLoginForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserLoginForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserLoginForm\\:\\:validateAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserLoginForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserLoginForm\\:\\:validateFinal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserLoginForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserMultipleCancelConfirm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserMultipleCancelConfirm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserMultipleCancelConfirm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserMultipleCancelConfirm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPasswordForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPasswordForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPasswordForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPasswordForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPasswordForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPasswordForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPasswordResetForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPasswordResetForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPermissionsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPermissionsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Form\\\\UserPermissionsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Form/UserPermissionsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:elementInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:entityExtraFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:entityOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:filterFormatDisable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:jsSettingsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:mail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:modulesUninstalled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:templatePreprocessDefaultVariablesAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userLogout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userRoleDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userRoleInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:userViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserViewsExecutionHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserViewsHooks\\:\\:viewsPluginsArgumentValidatorAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Hook/UserViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ModulePermissionsLinkHelper\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ModulePermissionsLinkHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ModulePermissionsLinkHelper\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ModulePermissionsLinkHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\PermissionHandler\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/PermissionHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\PermissionHandler\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/PermissionHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\AddRoleUser\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/AddRoleUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\BlockUser\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/BlockUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\CancelUser\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/CancelUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\CancelUser\\:\\:executeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/CancelUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\ChangeUserRoleBase\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/ChangeUserRoleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\ChangeUserRoleBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/ChangeUserRoleBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\RemoveRoleUser\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/RemoveRoleUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\UnblockUser\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Action/UnblockUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Condition\\\\UserRole\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Condition/UserRole.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Condition\\\\UserRole\\:\\:summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Condition/UserRole.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Derivative\\\\UserLocalTask\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Derivative/UserLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Derivative\\\\UserLocalTask\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Derivative/UserLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\EntityReferenceSelection\\\\UserSelection\\:\\:entityQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$route_object might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Validation\\\\Constraint\\\\ProtectedUserFieldConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$account in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$account in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$items in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\migrate\\\\destination\\\\EntityUser\\:\\:processStubRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/migrate/destination/EntityUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\migrate\\\\source\\\\ProfileField\\:\\:checkRequirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/migrate/source/ProfileField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\migrate\\\\source\\\\ProfileField\\:\\:setTableNames\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/migrate/source/ProfileField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\rest\\\\resource\\\\UserRegistrationResource\\:\\:checkEditFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\rest\\\\resource\\\\UserRegistrationResource\\:\\:ensureAccountCanRegister\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\rest\\\\resource\\\\UserRegistrationResource\\:\\:sendEmailNotifications\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\rest\\\\resource\\\\UserRegistrationResource\\:\\:validate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Permission\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Permission.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Permission\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Permission.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Permission\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Permission.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Role\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Role\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Role\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\access\\\\Role\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/access/Role.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument\\\\RolesRid\\:\\:titleQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument/RolesRid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_default\\\\CurrentUser\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_default/CurrentUser.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_default\\\\User\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_default/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_default\\\\User\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_default/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_validator\\\\User\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_validator/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_validator\\\\User\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_validator/User.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_validator\\\\UserName\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_validator/UserName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_validator\\\\UserName\\:\\:processSummaryArguments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_validator/UserName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\argument_validator\\\\UserName\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/argument_validator/UserName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Permissions\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Permissions\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Permissions\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Roles\\:\\:addSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Roles.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Roles\\:\\:documentSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Roles.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Roles\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Roles.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Roles\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Roles.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\Roles\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/Roles.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\UserBulkForm\\:\\:viewsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/UserBulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\UserData\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/UserData.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\UserData\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/UserData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Current\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Current.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Current\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Current.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Name.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:validateExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Name.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Name.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:valueSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Name.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:valueValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Name.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Permissions\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/Plugin/views/filter/Permissions.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\user\\\\ProfileForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ProfileForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ProfileTranslationHandler\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ProfileTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ProfileTranslationHandler\\:\\:entityFormSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ProfileTranslationHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\RegisterForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/RegisterForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\user\\\\RegisterForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/modules/user/src/RegisterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\RegisterForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/RegisterForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\RoleForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/RoleForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\user\\\\RoleForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/RoleForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\RoleListBuilder\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/RoleListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ToolbarLinkBuilder\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ToolbarLinkBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\ToolbarLinkBuilder\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/ToolbarLinkBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserData\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserData\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserDataInterface\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserDataInterface\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserDataInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserFloodControl\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserFloodControl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserFloodControl\\:\\:garbageCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserFloodControl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserFloodControl\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserFloodControl.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorage\\:\\:deleteRoleReferences\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorage\\:\\:doSaveFieldItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorage\\:\\:updateLastAccessTimestamp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorage\\:\\:updateLastLoginTimestamp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorage.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorageInterface\\:\\:deleteRoleReferences\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorageInterface\\:\\:updateLastAccessTimestamp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user\\\\UserStorageInterface\\:\\:updateLastLoginTimestamp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/src/UserStorageInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_access_test\\\\Hook\\\\UserAccessTestHooks\\:\\:entityCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_access_test\\\\Hook\\\\UserAccessTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_access_test\\\\Hook\\\\UserAccessTestHooks\\:\\:userAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_language_test\\\\Controller\\\\UserLanguageTestController\\:\\:buildPostResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/modules/user_language_test/src/Controller/UserLanguageTestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_language_test\\\\Form\\\\UserLanguageTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/modules/user_language_test/src/Form/UserLanguageTestForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\RoleXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/RoleXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserResourceTestBase\\:\\:assertRpcLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Rest\\\\UserXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserAdminTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserAdminTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserAdminTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserCancelTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserCancelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserCreateTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserCreateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserCreateTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserCreateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserLoginHttpTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserLoginHttpTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$name in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$pass in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserLoginTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserLoginTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPasswordResetTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPasswordResetTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPasswordResetTest\\:\\:getResetURL\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPermissionsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPictureTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPictureTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserPictureTest\\:\\:saveUserPicture\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserPictureTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserTranslationUITest\\:\\:getNewEntityValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserTranslationUITest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Functional\\\\Views\\\\AccessRoleTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Functional/Views/AccessRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\FunctionalJavascript\\\\UserPasswordResetTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\FunctionalJavascript\\\\UserPasswordResetTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\FunctionalJavascript\\\\UserPasswordResetTest\\:\\:getResetURL\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Controller\\\\UserControllerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Controller/UserControllerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Controller\\\\UserControllerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Controller/UserControllerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\MigrateUserStubTest\\:\\:performStubTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserConfigsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserPictureD6FileTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserPictureD6FileTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserRoleTest\\:\\:providerTestUserRole\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserTest\\:\\:prepareMigration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateUserTest\\:\\:setUpMigratedFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUserSettingsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateUserSettingsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\ModulePermissionsLinkHelperTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/ModulePermissionsLinkHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\ModulePermissionsLinkHelperTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/ModulePermissionsLinkHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\ProfileFieldTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\UserPictureInstanceTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ProfileFieldOptionTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\ProfileFieldValuesTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\RoleTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UserPictureFileTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UserPictureTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d6\\\\UserTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\RoleTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\UserEntityTranslationTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\UserTest\\:\\:providerSource\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserActionConfigSchemaTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserActionConfigSchemaTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserDeleteTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserDeleteTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserEntityLabelTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserEntityLabelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserEntityLabelTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserEntityLabelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserEntityReferenceTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserMailNotifyTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserMailNotifyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserMailNotifyTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserMailNotifyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserPassRehashTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserPassRehashTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\UserPassRehashTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/UserPassRehashTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\AccessPermissionTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\AccessPermissionTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\ArgumentDefaultTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\ArgumentDefaultTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\ArgumentValidateTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\ArgumentValidateTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\HandlerArgumentUserUidTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\HandlerArgumentUserUidTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\RelationshipRepresentativeNodeTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\RelationshipRepresentativeNodeTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\Views\\\\UserKernelTestBase\\:\\:setupPermissionTestData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\WhoIsOnlineBlockTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Kernel\\\\WhoIsOnlineBlockTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Menu\\\\UserLocalTasksTest\\:\\:getUserAdminRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Menu\\\\UserLocalTasksTest\\:\\:getUserLoginRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Menu\\\\UserLocalTasksTest\\:\\:getUserPageRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\TestPermissionCallbacks\\:\\:singleDescription\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/PermissionHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\TestPermissionCallbacks\\:\\:titleDescription\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/PermissionHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\TestPermissionCallbacks\\:\\:titleDescriptionRestrictAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/PermissionHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\TestPermissionCallbacks\\:\\:titleProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/PermissionHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Plugin\\\\Validation\\\\Constraint\\\\ProtectedUserFieldConstraintValidatorTest\\:\\:createValidator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Plugin\\\\Validation\\\\Constraint\\\\UserMailRequiredValidatorTest\\:\\:providerTestValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\Theme\\\\AdminNegotiatorTest\\:\\:getThemes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:NonExistingFieldAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:adminFieldAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:createdAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:hiddenUserSettingsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:passwordAccessProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\user\\\\Unit\\\\UserAccessControlHandlerTest\\:\\:userNameProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _user_cancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _user_cancel_session_regenerate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_user\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_username\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_cancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_cookie_delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_cookie_save\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_form_process_password_confirm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_form_system_regional_settings_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_login_finalize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_logout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_mail_tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_picture_enabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_role_change_permissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_role_grant_permissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function user_role_revoke_permissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/user/user.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Ajax\\\\HighlightCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Ajax/HighlightCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Ajax\\\\ReplaceTitleCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Ajax/ReplaceTitleCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Ajax\\\\ShowButtonsCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Ajax/ShowButtonsCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Ajax\\\\TriggerPreviewCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Ajax/TriggerPreviewCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Ajax\\\\ViewAjaxResponse\\:\\:setView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Ajax/ViewAjaxResponse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Analyzer\\:\\:formatMessages\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Analyzer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Controller\\\\ViewAjaxController\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Controller/ViewAjaxController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\DisplayPluginCollection\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/DisplayPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\DisplayPluginCollection\\:\\:initializePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/DisplayPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\DisplayPluginCollection\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/DisplayPluginCollection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Element\\\\View\\:\\:preRenderViewElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Element/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityFieldRenderer\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityFieldRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityTranslationRendererBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityTranslationRendererBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\EntityTranslationRendererBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/EntityTranslationRendererBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\RendererBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/RendererBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\RendererBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/RendererBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\Render\\\\TranslationLanguageRenderer\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/Render/TranslationLanguageRenderer.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:addCacheMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:invalidateCaches\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:mergeDefaultDisplaysOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Entity\\\\View\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Entity/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:addEntityLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:mapFieldDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:processViewsDataForEntityReference\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:processViewsDataForLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:processViewsDataForTextLong\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EntityViewsData\\:\\:processViewsDataForUuid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EntityViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\RouteSubscriber\\:\\:getApplicableViews\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\RouteSubscriber\\:\\:getViewsDisplayIDsWithRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\RouteSubscriber\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\RouteSubscriber\\:\\:routeRebuildFinished\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/RouteSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:baseTableRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:dataTableAddition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:dataTableRemoval\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:dataTableRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onEntityTypeEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:processHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriber\\:\\:revisionRemoval\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ExposedFormCache\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ExposedFormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ExposedFormCache\\:\\:setForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ExposedFormCache.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsExposedForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsExposedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsExposedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsExposedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsExposedForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsExposedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:getFormId\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:baseFieldOverrideDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:baseFieldOverrideInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:baseFieldOverrideUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:fieldConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:fieldConfigInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:fieldConfigUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:localTasksAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:queryViewsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:themeSuggestionsCommentAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:themeSuggestionsContainerAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:themeSuggestionsNodeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:viewPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:viewsPreRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsTokensHooks\\:\\:tokenInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsTokensHooks\\:\\:tokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsTokensHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsExecutionHooks\\:\\:viewsFormSubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsExecutionHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:addFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:addTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:defineOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:getField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:getJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:placeholder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:summaryJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ManyToOneHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Block\\\\ViewsBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Block/ViewsBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Block\\\\ViewsBlock\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Block/ViewsBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Block\\\\ViewsBlockBase\\:\\:addContextualLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Block/ViewsBlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Block\\\\ViewsBlockBase\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Block/ViewsBlockBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$display in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsEntityArgumentValidator\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsEntityArgumentValidator\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsEntityRow\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsEntityRow\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsEntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsExposedFilterBlock\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsExposedFilterBlock\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Derivative\\\\ViewsLocalTask\\:\\:alterLocalTasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsLocalTask.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\EntityReferenceSelection\\\\ViewsSelection\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\EntityReferenceSelection\\\\ViewsSelection\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\EntityReferenceSelection\\\\ViewsSelection\\:\\:settingsFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\Menu\\\\ViewsMenuLink\\:\\:deleteLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/Menu/ViewsMenuLink.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method \\$this\\(Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\)\\:\\:getFormula\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:acceptExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:buildExposedForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:buildExtraOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:buildGroupByForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:defineExtraOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:displayExposedForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:exposedInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:getField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:getJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:getTableJoin\\(\\) should return Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\JoinPluginBase but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:hasExtraOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:isAGroup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:multipleExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:preQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:setModuleHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:setRelationship\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:setViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:showExposeButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:showExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:storeExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:submitExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:submitExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:submitExtraOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:submitGroupByForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:submitTemporaryForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:validateExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:validateExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:validateExtraOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$group_types might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:doFilterByDefinedOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:filterByDefinedOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:globalTokenForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:pluginTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:setOptionDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:themeFunctions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:unpackOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:usesOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\PluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/PluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:getField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:getJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:preQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:setRelationship\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsHandlerInterface\\:\\:showExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:filterByDefinedOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:globalTokenForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:pluginTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:themeFunctions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:unpackOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:usesOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\ViewsPluginInterface\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/ViewsPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\access\\\\AccessPluginBase\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/access/AccessPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\access\\\\AccessPluginBase\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/access/AccessPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\access\\\\None\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/access/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\access\\\\None\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/access/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\AreaPluginBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/AreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\AreaPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/AreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\AreaPluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/AreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\AreaPluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/AreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\AreaPluginBase\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/AreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\DisplayLink\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/DisplayLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Entity\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Entity\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Entity\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\HTTPStatusCode\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/HTTPStatusCode.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\HTTPStatusCode\\:\\:render\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/HTTPStatusCode.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Result\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Result.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Result\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Result.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Text\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Text.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Text\\:\\:preQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Text.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\TextCustom\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/TextCustom.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\TextCustom\\:\\:renderTextarea\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/TextCustom.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Title\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Title.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\Title\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Title.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\TokenizeAreaPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\TokenizeAreaPluginBase\\:\\:tokenForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\View\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/View.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultAccessDenied\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultActions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultArgumentForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultDefault\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultIgnore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultNotFound\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:defaultSummaryForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:exceptionTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:getDefaultArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:getPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:getTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:getValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:hasDefaultArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:isException\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:preRenderMoveArgumentOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:processContainerRadios\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:processSummaryArguments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summaryArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summaryBasics\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summaryNameField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summaryQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:summarySort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:unpackArgumentValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:validateFail\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:validateMenuArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ArgumentPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$validate_types might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Date\\:\\:defaultArgumentForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Date\\:\\:getDefaultArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Date\\:\\:getFormula\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Date\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\DayDate\\:\\:summaryArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/DayDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\DayDate\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/DayDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\DayDate\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/DayDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\EntityReferenceArgument\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/EntityReferenceArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Formula\\:\\:getFormula\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Formula.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Formula\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Formula.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Formula\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Formula.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\Formula\\:\\:summaryQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Formula.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\FullDate\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/FullDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\FullDate\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/FullDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\GroupByNumeric\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\GroupByNumeric\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\GroupByNumeric\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\LanguageArgument\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/LanguageArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\LanguageArgument\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/LanguageArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:summaryArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:summaryQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\ManyToOne\\:\\:titleQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\MonthDate\\:\\:summaryArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/MonthDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\MonthDate\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/MonthDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\MonthDate\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/MonthDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NullArgument\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NullArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NullArgument\\:\\:defaultActions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NullArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NullArgument\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NullArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NumericArgument\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NumericArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NumericArgument\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NumericArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NumericArgument\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NumericArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\NumericArgument\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/NumericArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:getFormula\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:getSortName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:summaryArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:summaryQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\StringArgument\\:\\:titleQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/StringArgument.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\WeekDate\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/WeekDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\YearMonthDate\\:\\:summaryName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/YearMonthDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument\\\\YearMonthDate\\:\\:title\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/YearMonthDate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:checkAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:setArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\Fixed\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/Fixed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\Fixed\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/Fixed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\QueryParameter\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/QueryParameter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\QueryParameter\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/QueryParameter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\Raw\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/Raw.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_default\\\\Raw\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_default/Raw.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:checkAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:processSummaryArguments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:setArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\Entity\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\Entity\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\Entity\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/Entity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\None\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\argument_validator\\\\NumericArgumentValidator\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:alterCacheMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheFlush\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheGet\\(\\) should return bool but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheSetMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:getDefaultCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:postRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\None\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\None\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Tag\\:\\:cacheExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Tag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Tag\\:\\:getDefaultCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Tag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Tag\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Tag.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:cacheExpire\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:cacheSetMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:getDefaultCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:getLifespan\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:attachmentPositions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:displaysExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:renderPager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Attachment\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Attachment.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:blockSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:blockValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:preBlockBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Block\\:\\:usesExposedFormInBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Block.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DefaultDisplay\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DefaultDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DefaultDisplay\\:\\:isDefaultDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DefaultDisplay.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase has an unused parameter \\$configuration\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:applyDisplayCacheabilityMetadata\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:defaultableSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:displaysExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getArgumentsTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getAttachedDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getLinkDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:getSpecialBlocks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:hasPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:initDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:isDefaultDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:mergeDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:mergeHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:mergePlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:newDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:optionLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:optionsOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:overrideOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:renderFilters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:renderMoreLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:renderPager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:setOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:setOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:useGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:useMoreAlways\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:useMoreText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:usesExposedFormInBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:usesLinkDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$pager in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$style in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:defaultableSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:displaysExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getArgumentsTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getAttachedDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getLinkDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:getSpecialBlocks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:hasPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:initDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:isDefaultDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:mergeDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:newDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:optionLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:optionsOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:overrideOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:renderFilters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:renderMoreLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:renderPager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:setOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:setOverride\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:useGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:useMoreAlways\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:useMoreText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:usesExposedFormInBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:usesLinkDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginInterface\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayRouterInterface\\:\\:collectRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayRouterInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\EntityReference\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\EntityReference\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\EntityReference\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\EntityReference\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:defaultableSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:newDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Feed\\:\\:usesLinkDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Feed.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Page\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Page.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Page\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Page.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Page\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Page.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Page\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Page.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\Page\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/Page.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:collectRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:getPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:hasPath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\PathPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$access_plugin in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:defaultableSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:defineOptionsAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:exposedFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:exposedFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:exposedFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:postRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginBase\\:\\:resetForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:exposedFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:exposedFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:exposedFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:postRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\ExposedFormPluginInterface\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\InputRequired\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/InputRequired.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\InputRequired\\:\\:exposedFilterApplied\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/InputRequired.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\InputRequired\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/InputRequired.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\InputRequired\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/InputRequired.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\exposed_form\\\\InputRequired\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/exposed_form/InputRequired.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Boolean\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Boolean.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Boolean\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Boolean.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$options might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Boolean.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:viewsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:viewsFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\BulkForm\\:\\:viewsFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$entity in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Counter\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Counter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Counter\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Counter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Counter\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Counter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Custom\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Custom.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Custom\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Custom.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Custom\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Custom.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Date\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Date.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Date\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Date.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$custom_format might not be defined\\.$#', + 'count' => 9, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:addDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:addSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:add_field_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:buildGroupByForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:clickSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:documentSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:multiple_options_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:renderItems\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:submitGroupByForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$field_item_list in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityLabel\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityLabel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityLabel\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityLabel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityLabel\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityLabel.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityLink\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityLink.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityOperations\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:clickSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementLabelClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementLabelType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementWrapperClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:elementWrapperType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:getElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:label\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldHandlerInterface\\:\\:tokenizeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldHandlerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:addAdditionalFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:addSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:allowAdvancedRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:clickSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:documentSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementLabelClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementLabelType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementWrapperClasses\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:elementWrapperType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:getElements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:label\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:renderAltered\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:renderAsLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:themeFunctions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FieldPluginBase\\:\\:tokenizeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$options in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$raw_items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$style in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\FileSize\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FileSize.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LanguageField\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LanguageField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:addLangcode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\LinkBase\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/LinkBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Links\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Links.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Links\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Links.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Links\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Links.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\MachineName\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/MachineName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\MachineName\\:\\:getValueOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/MachineName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\MachineName\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/MachineName.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Markup\\:\\:elementType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Markup.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Markup\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Markup.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Markup\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Markup.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\NumericField\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/NumericField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\NumericField\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/NumericField.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\PrerenderList\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/PrerenderList.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\PrerenderList\\:\\:renderItems\\(\\) should return string but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/PrerenderList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\RenderedEntity\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/RenderedEntity.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Serialized\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Serialized.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Serialized\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Serialized.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\TimeInterval\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/TimeInterval.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Url\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Url.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:getValueOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:queryOpBoolean\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperator\\:\\:valueValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\BooleanOperatorString\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/BooleanOperatorString.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Bundle\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Bundle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Bundle\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Bundle.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opContainsWord\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opEndsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opEqual\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opNotEndsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opNotLike\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opNotStartsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opRegex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:opStartsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Combine\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Combine.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:opBetween\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:validateExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:validateValidTime\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Date\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\EntityReference\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Equality\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Equality.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\Equality\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Equality.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:addGroupForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildExposedFiltersGroupForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildExposedForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildGroupForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildGroupOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildGroupSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildGroupValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:buildValueWrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:canBuildGroup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:convertExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:exposedTranslate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:groupForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:groupMultipleExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:isAGroup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:multipleExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:operatorSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:operatorValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:prepareFilterSelectOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:showBuildGroupButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:showBuildGroupForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:showExposeButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:showOperatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:showValueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:storeExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:storeGroupInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:validateExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:valueSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\FilterPluginBase\\:\\:valueValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$groups might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\GroupByNumeric\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\GroupByNumeric\\:\\:opBetween\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\GroupByNumeric\\:\\:opEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\GroupByNumeric\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\GroupByNumeric\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:opEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:operatorValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:reduceValueOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator\\:\\:valueSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$source might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LanguageFilter\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LanguageFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestRevision\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestRevision\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestRevision\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestRevision\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestTranslationAffectedRevision\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestTranslationAffectedRevision\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestTranslationAffectedRevision\\:\\:operatorForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\LatestTranslationAffectedRevision\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\ManyToOne\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\ManyToOne\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\ManyToOne\\:\\:opHelper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\ManyToOne\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/ManyToOne.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:opBetween\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:opEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:opNotRegex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:opRegex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:opSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:operatorValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\NumericFilter\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$source might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opContainsWord\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opEndsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opEqual\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opLongerThan\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opNotEndsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opNotLike\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opNotRegex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opNotStartsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opRegex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opShorterThan\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:opStartsWith\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:operatorOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:operatorValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\StringFilter\\:\\:valueForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$source might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\CastedIntFieldJoin\\:\\:buildJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/CastedIntFieldJoin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\FieldOrLanguageJoin\\:\\:joinAddExtra\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\JoinPluginBase\\:\\:buildJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/JoinPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\JoinPluginBase\\:\\:joinAddExtra\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/JoinPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$left in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/JoinPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\JoinPluginInterface\\:\\:buildJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/JoinPluginInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\Subquery\\:\\:buildJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/Subquery.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Full\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Full.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Full\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Full.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Full\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Full.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Mini\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Mini.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Mini\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Mini.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Mini\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Mini.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Mini\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Mini.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Mini\\:\\:useCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Mini.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:executeCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:getItemsPerPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:useCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\None\\:\\:usePager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/None.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:executeCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:exposedFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:exposedFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:exposedFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:getCurrentPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:getItemsPerPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:getOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:getPagerId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:getTotalItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:hasMoreRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:isOffsetExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:itemsPerPageExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:setCurrentPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:setItemsPerPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:setOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:updatePageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:useCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:usePager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\PagerPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/PagerPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Some\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Some.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Some\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Some.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Some\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Some.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Some\\:\\:useCountQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Some.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\Some\\:\\:usePager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/Some.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:exposedFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:exposedFormValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:getPagerTotal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:isOffsetExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:itemsPerPageExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:setCurrentPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:updatePageInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:usesExposed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\pager\\\\SqlBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/pager/SqlBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\DateSqlInterface\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/DateSqlInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\DateSqlInterface\\:\\:setTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/DateSqlInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\MysqlDateSql\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/MysqlDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\MysqlDateSql\\:\\:setTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/MysqlDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\PostgresqlDateSql\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/PostgresqlDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\PostgresqlDateSql\\:\\:setTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/PostgresqlDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:addSignature\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:build\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:getAggregationInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:getLimit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:loadEntities\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:setGroupOperator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:setLimit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:setOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/QueryPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addHavingExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addOrderBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addRelationship\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addSignature\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addTag\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addWhere\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:addWhereExpression\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:adjustJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:aggregationMethodDistinct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:aggregationMethodSimple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:build\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:buildCondition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:clearFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:compileFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:ensurePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:getAggregationInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:getFieldAlias\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:getTableInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:getWhereArgs\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:loadEntities\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:markTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:placeholder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:setCountField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:setDistinct\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\Sql\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$join in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\SqliteDateSql\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/SqliteDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\SqliteDateSql\\:\\:setTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/SqliteDateSql.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\EntityReverse\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/EntityReverse.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:alterSubqueryCondition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:conditionNamespace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:getTemporaryView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\GroupwiseMax\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$sort_field might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$sort_table might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\RelationshipPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\RelationshipPluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\RelationshipPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\relationship\\\\RelationshipPluginBase\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityReference\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityReference\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:getEntityRepository\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:getEntityTypeId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:getEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:getLanguageManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:getView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\EntityRow\\:\\:summaryTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/EntityRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\Fields\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/Fields.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\Fields\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/Fields.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\OpmlFields\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/OpmlFields.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RowPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RowPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RowPluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RowPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RowPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RowPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RowPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RowPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RowPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RowPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RssFields\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RssFields.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RssPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RssPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\row\\\\RssPluginBase\\:\\:buildOptionsForm_summary_options\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/row/RssPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Broken\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Broken\\:\\:broken\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Broken\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Broken\\:\\:ensureMyTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Broken\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$items might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Date\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Date\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Date.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\GroupByNumeric\\:\\:adminLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\GroupByNumeric\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\GroupByNumeric\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/GroupByNumeric.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Random\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Random.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Random\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Random.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\Random\\:\\:usesGroupBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Random.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:adminSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:buildExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:canExpose\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:defaultExposeOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:showExposeButton\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:showSortForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:sortOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:sortSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:sortValidate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:validateExposeForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\SortPluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/SortPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\DefaultSummary\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/DefaultSummary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\DefaultSummary\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/DefaultSummary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\DefaultSummary\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/DefaultSummary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\EntityReference\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\EntityReference\\:\\:evenEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\EntityReference\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/EntityReference.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Grid\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Grid.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\GridResponsive\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/GridResponsive.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\HtmlList\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/HtmlList.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Mapping\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Mapping.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Mapping\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Mapping.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Opml\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Opml.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Opml\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Opml.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Rss\\:\\:attachTo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Rss\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Rss\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Rss.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:buildSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:buildSortPost\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:evenEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:getFieldValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:getRowClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:preRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:renderFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:tokenizeValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:usesTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\StylePluginBase\\:\\:wizardSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$plugin in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Table\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Table\\:\\:buildSort\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Table\\:\\:buildSortPost\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Table\\:\\:evenEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\Table\\:\\:wizardSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/Table.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\style\\\\UnformattedSummary\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/UnformattedSummary.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:addDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:alterDisplayOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:buildFilters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:buildFormStyle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:buildSorts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:setDefaultOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:setOverrideOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\wizard\\\\WizardPluginBase\\:\\:setValidatedView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$created_column in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$default_field might not be defined\\.$#', + 'count' => 6, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$sorts in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$style_plugin in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$view in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ResultRow\\:\\:resetEntityData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ResultRow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Tests\\\\TestHelperPlugin\\:\\:testSetOptionDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Tests/TestHelperPlugin.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Tests\\\\ViewTestData\\:\\:createTestViews\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Tests/ViewTestData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Tests\\\\ViewTestData\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Tests/ViewTestData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Tests\\\\ViewTestData\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Tests/ViewTestData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Tests\\\\ViewTestData\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Tests/ViewTestData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewEntityInterface\\:\\:mergeDefaultDisplaysOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewEntityInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:_build\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:_initHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:_postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:_preQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:attachDisplays\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:buildTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:createDuplicate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:destroy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:initHandlers\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:initPager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:mergeDefaults\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:postExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:removeHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:save\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setAjaxEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setArguments\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setCurrentPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setExposedInput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setHandlerOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setItemsPerPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setResponse\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewExecutable\\:\\:setShowAdminLinks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewExecutable.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Views\\:\\:getEnabledDisplayExtenders\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Views.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\Views\\:\\:t\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/Views.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewsConfigUpdater\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewsConfigUpdater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewsConfigUpdater\\:\\:setDeprecationsEnabled\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewsConfigUpdater.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewsData\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewsData\\:\\:clear\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views\\\\ViewsData\\:\\:processEntityTypes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/src/ViewsData.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_batch_action_test\\\\Plugin\\\\Action\\\\BatchUserAction\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_batch_action_test\\\\Plugin\\\\Action\\\\BatchUserAction\\:\\:executeMultiple\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_batch_action_test\\\\Plugin\\\\Action\\\\BatchUserAction\\:\\:finishBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\user_batch_action_test\\\\Plugin\\\\Action\\\\BatchUserAction\\:\\:processBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_entity_test\\\\Hook\\\\ViewsEntityTestHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_entity_test\\\\Hook\\\\ViewsEntityTestHooks\\:\\:entityFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_entity_test\\\\Hook\\\\ViewsEntityTestHooks\\:\\:entityLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_cacheable_metadata_calculation\\\\Plugin\\\\views\\\\access\\\\CacheableMetadataCalculationTest\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_cacheable_metadata_calculation\\\\Plugin\\\\views\\\\access\\\\CacheableMetadataCalculationTest\\:\\:cacheableMetadataHasBeenAccessed\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_config\\\\Hook\\\\ViewsTestConfigHooks\\:\\:viewLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_config\\\\Hook\\\\ViewsTestConfigHooks\\:\\:viewsPostRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Controller\\\\ViewsTestDataController\\:\\:errorFormPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Controller\\\\ViewsTestDataController\\:\\:placeholderLazyBuilder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Controller\\\\ViewsTestFormMultipleController\\:\\:testPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestFormMultipleController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Form\\\\ViewsTestDataElementEmbedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Form/ViewsTestDataElementEmbedForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Form\\\\ViewsTestDataElementForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Form/ViewsTestDataElementForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Form\\\\ViewsTestDataErrorForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Form/ViewsTestDataErrorForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Form\\\\ViewsTestDataErrorForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Form/ViewsTestDataErrorForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataHooks\\:\\:viewUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:fieldViewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsFormSubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPostBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPostExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPostRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPreBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPreExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPreRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsPreView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsQuerySubstitutions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$view in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsAnalyze\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsInvalidateCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\access\\\\StaticTest\\:\\:alterRouteDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\area\\\\TestExample\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\argument_default\\\\ArgumentDefaultTest\\:\\:getArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_default/ArgumentDefaultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\argument_validator\\\\ArgumentValidatorTest\\:\\:validateArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_validator/ArgumentValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display\\\\DisplayTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display\\\\DisplayTest\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display\\\\DisplayTest\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display\\\\DisplayTest\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display\\\\DisplayTest\\:\\:validateOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:defaultableSections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:optionsSummary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:preExecute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\display_extender\\\\DisplayExtenderTest\\:\\:submitOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\field\\\\FieldFormButtonTest\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldFormButtonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\field\\\\FieldFormButtonTest\\:\\:viewsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldFormButtonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\field\\\\FieldFormButtonTest\\:\\:viewsFormSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldFormButtonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\field\\\\FieldTest\\:\\:addSelfTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\field\\\\FieldTest\\:\\:setTestValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\filter\\\\FilterBooleanOperatorDefaultTest\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterBooleanOperatorDefaultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\filter\\\\FilterExceptionTest\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\filter\\\\FilterTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\filter\\\\FilterTest\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\filter\\\\ViewsTestCacheContextFilter\\:\\:query\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/ViewsTestCacheContextFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\join\\\\JoinTest\\:\\:buildJoin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\join\\\\JoinTest\\:\\:setJoinValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:addOrderBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:addWhere\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:build\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:ensureTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:execute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:setAllItems\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\query\\\\QueryTest\\:\\:setFieldTimezoneOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\row\\\\RowTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/row/RowTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\row\\\\RowTest\\:\\:setOutput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/row/RowTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\style\\\\MappingTest\\:\\:filterNumericFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/style/MappingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\style\\\\StyleTest\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\style\\\\StyleTest\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\style\\\\StyleTest\\:\\:setOutput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_data\\\\Plugin\\\\views\\\\style\\\\StyleTest\\:\\:setUsesRowPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_test_data_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_mapping_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_test_data_preprocess_views_view_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_entity_reference\\\\Hook\\\\ViewsTestEntityReferenceHooks\\:\\:viewsDataAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_entity_reference/src/Hook/ViewsTestEntityReferenceHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_modal\\\\Controller\\\\TestController\\:\\:modal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_modal/src/Controller/TestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_query_access\\\\Hook\\\\ViewsTestQueryAccessHooks\\:\\:queryBlockContentAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_query_access/src/Hook/ViewsTestQueryAccessHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_test_query_access\\\\Hook\\\\ViewsTestQueryAccessHooks\\:\\:queryMediaAccessAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_query_access/src/Hook/ViewsTestQueryAccessHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _views_test_query_access_restrict_by_uuid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_query_access/views_test_query_access.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_test_rss_preprocess_views_view_rss\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/modules/views_test_rss/views_test_rss.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\DefaultViewsTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/DefaultViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\DefaultViewsTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/DefaultViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\DefaultViewsTest\\:\\:createTerm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/DefaultViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\GlossaryTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/GlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\AreaTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/AreaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FieldWebTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FieldWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FilterDateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FilterDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\FilterDateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/FilterDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\HandlerTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/HandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Handler\\\\HandlerTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Handler/HandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\CacheWebTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/CacheWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ContextualFiltersBlockContextTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayEntityReferenceTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTranslationTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTranslationTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTranslationTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormCheckboxesTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\ExposedFormTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\FilterTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/FilterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:createTranslation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\PagerTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/PagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Rest\\\\ViewXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Rest/ViewXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\SearchIntegrationTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/SearchIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\SearchMultilingualTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/SearchMultilingualTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$link might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:enableViewsTestModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:executeView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:helperButtonHasLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewTestBase\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\ViewsFormMultipleTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/ViewsFormMultipleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Wizard\\\\TaggedWithTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\FunctionalJavascript\\\\Plugin\\\\views\\\\Handler\\\\FieldTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\FunctionalJavascript\\\\Plugin\\\\views\\\\Handler\\\\FieldTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Entity\\\\FieldEntityTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Entity/FieldEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\EventSubscriber\\\\ViewsEntitySchemaSubscriberIntegrationTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\AreaEmptyTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\AreaTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/AreaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\ArgumentDateTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\ArgumentNullTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\ArgumentSummaryTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/ArgumentSummaryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldBooleanTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldBooleanTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldCustomTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldDateTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldDateTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldDateTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldDateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldDropbuttonTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldDropbuttonTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldEntityLinkTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldEntityLinkTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldFieldAccessTestBase\\:\\:assertFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldFieldTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldFieldTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldFileSizeTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldFileSizeTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldKernelTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldTimeIntervalTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldTimeIntervalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldTimeIntervalTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldTimeIntervalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldTimeIntervalTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldTimeIntervalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FieldUrlTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorDefaultTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorStringTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorStringTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorStringTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterBooleanOperatorTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterCombineTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterCombineTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterEntityReferenceTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterEntityReferenceTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterEntityReferenceTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterEntityReferenceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterEqualityTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterInOperatorTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterInOperatorTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterInOperatorTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterNumericTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterStringTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterStringTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\FilterStringTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/FilterStringTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\HandlerAliasTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\HandlerAllTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/HandlerAllTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\SortRandomTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/SortRandomTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Handler\\\\SortRandomTest\\:\\:getBasicRandomView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Handler/SortRandomTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\CacheTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/CacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\CastedIntFieldJoinTestBase\\:\\:setUpFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\QueryTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinInTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinInTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinInTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinTestBase\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinTestBase\\:\\:setUpFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipJoinTestBase\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RelationshipTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RowRenderCacheTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RowRenderCacheTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RssFieldsTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\RssFieldsTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\SqlQueryTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$rand1 might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$rand2 might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$rand3 might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\StyleTestBase\\:\\:storeViewPreview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\Plugin\\\\ViewsSqlExceptionTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\TestViewsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/TestViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\TestViewsTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/TestViewsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewExecutableTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewExecutableTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewsKernelTestBase\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewsKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewsKernelTestBase\\:\\:executeView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewsKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewsKernelTestBase\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewsKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewsKernelTestBase\\:\\:setUpFixtures\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewsKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Kernel\\\\ViewsKernelTestBase\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Kernel/ViewsKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\EventSubscriber\\\\TestRouteSubscriber\\:\\:getApplicableViews\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\views\\\\Plugin\\\\Block\\\\views_add_contextual_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\HandlerBaseTest\\:\\:setupDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\HandlerBaseTest\\:\\:setupExecutableAndView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\HandlerBaseTest\\:\\:setupViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\base_path\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\field\\\\FieldTest\\:\\:providerTestPrepareItemsByDelta\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\field\\\\FieldTest\\:\\:setupDisplay\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\field\\\\FieldTest\\:\\:setupExecutableAndView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\field\\\\FieldTest\\:\\:setupViewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\field\\\\FieldTestEntityField\\:\\:executePrepareItemsByDelta\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/field/FieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\pager\\\\PagerPluginBaseTest\\:\\:providerTestHasMoreRecords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\views\\\\query\\\\MysqlDateSqlTest\\:\\:providerTestGetDateFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\views\\\\query\\\\PostgresqlDateSqlTest\\:\\:providerTestGetDateFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\Plugin\\\\views\\\\query\\\\SqliteDateSqlTest\\:\\:providerTestGetDateFormat\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\PluginBaseTest\\:\\:providerTestFilterByDefinedOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/PluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\views\\\\Routing\\\\views_add_contextual_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\ViewsDataTest\\:\\:providerTestGetEmptyKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/ViewsDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\ViewsDataTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/ViewsDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Unit\\\\WizardPluginBaseTest\\:\\:providerTestGetSelected\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/tests/src/Unit/WizardPluginBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function _views_query_tag_alter_condition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_add_contextual_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_disable_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_element_validate_tags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_enable_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_hook_info\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_invalidate_cache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_preprocess_comment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_preprocess_node\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_exposed_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_mini_pager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_fields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_grid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_grid_responsive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_grouping\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_opml\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_row_opml\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_row_rss\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_rss\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_summary_unformatted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_view_unformatted\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_entity_field_label\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views/views.views.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_add_ajax_trigger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_add_ajax_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_add_limited_validation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_form_button_was_clicked\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_nojs_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_standard_display_dropdown\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/admin.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Ajax\\\\SetFormCommand\\:\\:render\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Ajax/SetFormCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\AdvancedSettingsForm\\:\\:cacheSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/AdvancedSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\AdvancedSettingsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/AdvancedSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\Analyze\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Analyze.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandler\\:\\:remove\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandler\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandler\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandler.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$relationship_handler in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandler.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandlerExtra\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandlerExtra\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ConfigHandlerGroup\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php', +]; +$ignoreErrors[] = [ + // identifier: unset.offset + 'message' => '#^Cannot unset offset \'\\#title\' on array\\{\\#theme_wrappers\\: array\\{\'container\'\\}, \\#attributes\\: array\\{class\\: array\\{\'scroll\'\\}, data\\-drupal\\-views\\-scroll\\: true\\}\\}\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Display.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\Display\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Display.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\Display\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Display.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\EditDetails\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/EditDetails.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\Rearrange\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Rearrange.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\RearrangeFilter\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/RearrangeFilter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ReorderDisplays\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ReorderDisplays.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ViewsFormBase\\:\\:setID\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ViewsFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ViewsFormBase\\:\\:setType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ViewsFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ViewsFormBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ViewsFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\Ajax\\\\ViewsFormBase\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ViewsFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\BasicSettingsForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/BasicSettingsForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\BreakLockForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/BreakLockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Form\\\\BreakLockForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Form/BreakLockForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:contextualLinksViewAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:viewsAnalyze\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:viewsPluginsDisplayAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:cancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewDuplicateForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewDuplicateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewDuplicateForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewDuplicateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewDuplicateForm\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewDuplicateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewDuplicateForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewDuplicateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:buildOptionForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:cancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:getDisplayTab\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:getFormBucket\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:rebuildCurrentTab\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:renderDisplayTop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDelayDestination\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayAdd\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayDisable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayDuplicate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayEnable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDisplayUndoDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:submitDuplicateDisplayAsType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$group_info might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewFormBase\\:\\:getDisplayLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewFormBase\\:\\:init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewFormBase\\:\\:isDefaultDisplayShown\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewFormBase\\:\\:prepareEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: empty.variable + 'message' => '#^Variable \\$display_plugin in empty\\(\\) always exists and is not falsy\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewPreviewForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewPreviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewPreviewForm\\:\\:submitPreview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewPreviewForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:__call\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:addFormToStack\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:cacheSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:endQueryCapture\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:getOverrideValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:getStandardButtons\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:getTypedData\\(\\) should return Drupal\\\\Core\\\\TypedData\\\\ComplexDataInterface but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:mergeDefaultDisplaysOptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:postCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:postLoad\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:postSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:preCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:renderPreview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:set\\(\\) should return \\$this\\(Drupal\\\\views_ui\\\\ViewUI\\) but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:setSyncing\\(\\) should return \\$this\\(Drupal\\\\views_ui\\\\ViewUI\\) but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:setUninstalling\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:standardCancel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:standardSubmit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:startQueryCapture\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:submitItemAdd\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui_test\\\\Hook\\\\ViewsUiTestHooks\\:\\:viewsPreviewInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/modules/views_ui_test/src/Hook/ViewsUiTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\views_ui_test_field\\\\Hook\\\\ViewsUiTestFieldViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldViewsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\CustomBooleanTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/CustomBooleanTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\CustomBooleanTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/CustomBooleanTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\DisplayPathTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/DisplayPathTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\FilterNumericWebTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\FilterNumericWebTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\HandlerTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/HandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\HandlerTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/HandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\QueryTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/QueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\UITestBase\\:\\:randomView\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Functional/UITestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\FunctionalJavascript\\\\PreviewTest\\:\\:dataSet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\FunctionalJavascript\\\\PreviewTest\\:\\:schemaDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\FunctionalJavascript\\\\PreviewTest\\:\\:viewsData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$message in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Kernel\\\\ViewsBlockTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Kernel\\\\ViewsBlockTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_test_theme_views_ui_display_tab_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/themes/views_ui_test_theme/views_ui_test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_test_theme_views_ui_display_top_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/tests/themes/views_ui_test_theme/views_ui_test_theme.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_contextual_links_suppress\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_contextual_links_suppress_pop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_contextual_links_suppress_push\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_preprocess_views_view\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_theme_suggestions_views_ui_view_preview_section\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_view_preview_section_display_category_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_view_preview_section_handler_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function views_ui_view_preview_section_rows_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_build_group_filter_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_display_tab_bucket\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_display_tab_setting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_rearrange_filter_form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_style_plugin_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_view_preview_section\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function template_preprocess_views_ui_views_listing_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/views_ui/views_ui.theme.inc', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Entity\\\\Workflow\\:\\:preSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Entity/Workflow.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowAddForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionDeleteForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:copyFormValuesToEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Hook\\\\WorkflowsHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Hook/WorkflowsHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeConfigureFormBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeConfigureFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeConfigureFormBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeConfigureFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeConfigureFormBase\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeConfigureFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeConfigureFormBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeConfigureFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeStateFormBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeStateFormBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeStateFormBase\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeStateFormBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeStateFormBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeTransitionFormBase\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeTransitionFormBase\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeTransitionFormBase\\:\\:setPlugin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeTransitionFormBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeTransitionFormBase\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflows\\\\WorkflowListBuilder\\:\\:getFormId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/src/WorkflowListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Form\\\\ComplexTestTypeConfigureForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Form/ComplexTestTypeConfigureForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Hook\\\\WorkflowTypeTestHooks\\:\\:workflowAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Hook\\\\WorkflowTypeTestHooks\\:\\:workflowTypeInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Plugin\\\\WorkflowType\\\\ComplexTestType\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Plugin\\\\WorkflowType\\\\ComplexTestType\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Plugin\\\\WorkflowType\\\\RequiredStateTestType\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/RequiredStateTestType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Plugin\\\\WorkflowType\\\\RequiredStateTestType\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/RequiredStateTestType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workflow_type_test\\\\Plugin\\\\WorkflowType\\\\WorkflowCustomAccessType\\:\\:workflowAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/WorkflowCustomAccessType.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function workflow_type_test_set_definitions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/modules/workflow_type_test/workflow_type_test.module', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Functional\\\\Rest\\\\WorkflowXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Functional/Rest/WorkflowXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Kernel\\\\WorkflowAccessControlHandlerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Kernel\\\\WorkflowAccessControlHandlerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Unit\\\\WorkflowStateTransitionOperationsAccessCheckTest\\:\\:accessTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workflows\\\\Unit\\\\WorkflowStateTransitionOperationsAccessCheckTest\\:\\:invalidOperationNameTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Controller\\\\WorkspacesHtmlEntityFormController\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Controller\\\\WorkspacesHtmlEntityFormController\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Entity\\\\Workspace\\:\\:postDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Entity/Workspace.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Entity\\\\Workspace\\:\\:preDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Entity/Workspace.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Entity\\\\Workspace\\:\\:publish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Entity/Workspace.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityAccess\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityAccess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityAccess\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityAccess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityAccess\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityAccess.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityFormAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityFormEntityBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityPreload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityOperations\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityQuery\\\\Query\\:\\:traitPrepare\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityQuery/Query.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityQuery\\\\QueryAggregate\\:\\:traitPrepare\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityQuery/QueryAggregate.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:entityBaseFieldInfo\\(\\) should return array\\<Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\> but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:entityTypeAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:fieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:addRevisionMetadataField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeEvent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onFieldableEntityTypeCreate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\EntitySchemaSubscriber\\:\\:onFieldableEntityTypeUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\EventSubscriber\\\\WorkspaceRequestSubscriber\\:\\:onKernelRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\SwitchToLiveForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/SwitchToLiveForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\SwitchToLiveForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/SwitchToLiveForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceActivateForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceActivateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceActivateForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceActivateForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceDeleteForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceDeleteForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceForm\\:\\:flagViolations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceForm\\:\\:form\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceForm.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceMergeForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceMergeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceMergeForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceMergeForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspacePublishForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspacePublishForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspacePublishForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspacePublishForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceSwitcherForm\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceSwitcherForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceSwitcherForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceSwitcherForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceSwitcherForm\\:\\:submitSwitchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceSwitcherForm.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\FormOperations\\:\\:addWorkspaceValidation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/FormOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\FormOperations\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/FormOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\FormOperations\\:\\:formAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/FormOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\FormOperations\\:\\:validateDefaultWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/FormOperations.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:cron\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityBaseFieldInfo\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityCreateAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityPredelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityPreload\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityPresave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityRevisionDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityTypeBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:entityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:fieldInfoAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:menuLinkContentUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:modulePreinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Hook\\\\WorkspacesHooks\\:\\:viewsQueryAlter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Hook/WorkspacesHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Negotiator\\\\SessionWorkspaceNegotiator\\:\\:getActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Negotiator\\\\SessionWorkspaceNegotiator\\:\\:setActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Negotiator\\\\SessionWorkspaceNegotiator\\:\\:unsetActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Negotiator\\\\WorkspaceNegotiatorInterface\\:\\:setActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Negotiator/WorkspaceNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Negotiator\\\\WorkspaceNegotiatorInterface\\:\\:unsetActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Negotiator/WorkspaceNegotiatorInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Plugin\\\\Validation\\\\Constraint\\\\DeletedWorkspaceConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/DeletedWorkspaceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/DeletedWorkspaceConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Plugin\\\\Validation\\\\Constraint\\\\EntityReferenceSupportedNewEntitiesConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\Plugin\\\\Validation\\\\Constraint\\\\EntityWorkspaceConflictConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$entity in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraintValidator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\ViewsQueryAlter\\:\\:alterQuery\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/ViewsQueryAlter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\ViewsQueryAlter\\:\\:alterQueryForEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/ViewsQueryAlter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\ViewsQueryAlter\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/ViewsQueryAlter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\ViewsQueryAlter\\:\\:moveEntityTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/ViewsQueryAlter.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociation\\:\\:deleteAssociations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociation\\:\\:initializeWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociation\\:\\:trackEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociation\\:\\:workspaceInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociationInterface\\:\\:deleteAssociations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociationInterface\\:\\:initializeWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociationInterface\\:\\:trackEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceAssociationInterface\\:\\:workspaceInsert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociationInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceInterface\\:\\:publish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceListBuilder\\:\\:offCanvasRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceListBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceManager\\:\\:doSwitchWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceManager\\:\\:purgeDeletedWorkspacesBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceManager.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceManagerInterface\\:\\:purgeDeletedWorkspacesBatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceManagerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceMerger\\:\\:checkConflictsOnTarget\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMerger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceMerger\\:\\:merge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMerger.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMerger.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceMergerInterface\\:\\:merge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMergerInterface.php', +]; +$ignoreErrors[] = [ + // identifier: return.missing + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisher\\:\\:checkConflictsOnTarget\\(\\) should return array but return statement is missing\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisher\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisher\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisher\\:\\:publish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisher.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisherInterface\\:\\:publish\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisherInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceViewBuilder\\:\\:buildComponents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceViewBuilder.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacesLazyBuilders\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacesLazyBuilders.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacesLazyBuilders\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacesLazyBuilders.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacesServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/src/WorkspacesServiceProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspace_access_test\\\\Hook\\\\WorkspaceAccessTestHooks\\:\\:workspaceAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/modules/workspace_access_test/src/Hook/WorkspaceAccessTestHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspace_update_test\\\\Negotiator\\\\TestWorkspaceNegotiator\\:\\:getActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspace_update_test\\\\Negotiator\\\\TestWorkspaceNegotiator\\:\\:setActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\workspace_update_test\\\\Negotiator\\\\TestWorkspaceNegotiator\\:\\:unsetActiveWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function workspace_update_test_post_update_check_active_workspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/modules/workspace_update_test/workspace_update_test.post_update.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\Rest\\\\WorkspaceXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\UpdateSystem\\\\ActiveWorkspaceUpdateTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceBypassTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceBypassTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceBypassTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceBypassTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceCacheContextTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceConcurrentEditingTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceConcurrentEditingTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceConcurrentEditingTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceConcurrentEditingTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceEntityDeleteTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceEntityDeleteTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceEntityDeleteTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceEntityDeleteTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceMenuLinkContentIntegrationTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceMenuLinkContentIntegrationTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceMenuLinkContentIntegrationTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceMenuLinkContentIntegrationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspacePermissionsTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspacePermissionsTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspacePermissionsTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspacePermissionsTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceSwitcherTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewsBulkFormTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewsBulkFormTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewsBulkFormTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\WorkspaceViewsBulkFormTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\FunctionalJavascript\\\\WorkspacesLayoutBuilderIntegrationTest\\:\\:isLabelInContentOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\FunctionalJavascript\\\\WorkspacesLayoutBuilderIntegrationTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\FunctionalJavascript\\\\WorkspacesLayoutBuilderIntegrationTest\\:\\:switchToLive\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\FunctionalJavascript\\\\WorkspacesLayoutBuilderIntegrationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityReferenceSupportedNewEntitiesConstraintValidatorTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\EntityWorkspaceConflictConstraintValidatorTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAccessTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAccessTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceAssociationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceCRUDTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceContentTranslationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceEntityDeleteTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceInformationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.coversMethod + 'message' => '#^@covers value \\:\\:workspaces_entity_delete references an invalid method\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.coversMethod + 'message' => '#^@covers value \\:\\:workspaces_entity_insert references an invalid method\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.coversMethod + 'message' => '#^@covers value \\:\\:workspaces_entity_presave references an invalid method\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: phpunit.coversMethod + 'message' => '#^@covers value \\:\\:workspaces_entity_revision_delete references an invalid method\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:providerTestAllowedEntityCrudInNonDefaultWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceIntegrationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceMergerTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceQueryParameterNegotiatorTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceQueryParameterNegotiatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceQueryParameterNegotiatorTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceQueryParameterNegotiatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspaceViewsIntegrationTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspaceViewsIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:assertWorkspaceAssociation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:createWorkspaceHierarchy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:initializeWorkspacesModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Kernel\\\\WorkspacesFileItemTest\\:\\:switchToWorkspace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/tests/src/Kernel/WorkspacesFileItemTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function workspaces_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/workspaces.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function workspaces_schema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/modules/workspaces/workspaces.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function demo_umami_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function demo_umami_form_install_configure_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.profile', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function demo_umami_help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.profile', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function demo_umami_set_users_passwords\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.profile', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function demo_umami_toolbar\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.profile', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\Hook\\\\DemoUmamiContentHooks\\:\\:modulePreinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:importContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:saveMediaImageId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:saveNodePath\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:saveTermId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:storeCreatedContentUuids\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$keyed_content might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$structured_content might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami_content\\\\Functional\\\\DefaultContentFilesAccessTest\\:\\:testAccessDeniedToFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/DefaultContentFilesAccessTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami_content\\\\Functional\\\\UninstallDefaultContentTest\\:\\:expectedBlocks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami_content\\\\Functional\\\\UninstallDefaultContentTest\\:\\:testReinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami\\\\Functional\\\\DemoUmamiProfileTest\\:\\:assertConfigDiff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami\\\\Functional\\\\DemoUmamiProfileTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\demo_umami\\\\Functional\\\\DemoUmamiProfileTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_block__bundle__banner_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_block__bundle__footer_promo_block\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_breadcrumb\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_field\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_html\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_image_widget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_links\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_links__media_library_menu\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_preprocess_menu_local_task\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function umami_theme_suggestions_block_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/demo_umami/themes/umami/umami.theme', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\minimal\\\\Functional\\\\MinimalTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/minimal/tests/src/Functional/MinimalTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function standard_form_install_configure_submit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/standard.profile', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\Functional\\\\StandardTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/Functional/StandardTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\standard\\\\FunctionalJavascript\\\\StandardPerformanceTest\\:\\:refreshVariables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\drupal_system_listing_compatible_test\\\\Kernel\\\\SystemListingCrossProfileCompatibleTest\\:\\:testSystemListing\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function testing_requirements_requirements\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/profiles/testing_requirements/testing_requirements.install', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_execute_batch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_format_result\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_help\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_print\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_print_alternatives\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_print_error\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_reporter_display_results\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_reporter_display_summary\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_reporter_init\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_reporter_timer_stop\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_reporter_write_xml_results\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_run_one_test\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_run_phpunit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_setup_database\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function simpletest_script_setup_test_run_results_storage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function sort_tests_by_type_and_methods\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/scripts/run-tests.sh', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Composer\\\\ComposerValidateTest\\:\\:provideComposerJson\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Composer/ComposerValidateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Composer\\\\Template\\\\ComposerProjectTemplatesTest\\:\\:provideTemplateCreateProject\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$project_stabilities might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertCommandExitCode\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertCommandOutputContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertCommandSuccessful\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertDrupalVisit\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertErrorOutputContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:assertErrorOutputNotContains\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:copyCodebase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:standUpServer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\Framework\\\\BuildTestBase\\:\\:stopServer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/Framework/BuildTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\QuickStart\\\\QuickStartTestBase\\:\\:formLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\BuildTests\\\\QuickStart\\\\QuickStartTestBase\\:\\:installQuickStart\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxFormPageCacheTest\\:\\:getFormBuildId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:assertFieldDoesNotExistOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:assertFieldExistsOnOverview\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:fieldUIAddExistingField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:fieldUIAddNewField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\AjaxMaintenanceModeTest\\:\\:fieldUIDeleteField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Ajax\\\\FormValuesTest\\:\\:formModeProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\EntityReference\\\\EntityReferenceAutocompleteWidgetTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:assertEscaped\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:assertNoElementAfterWait\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:assertNoEscaped\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:assertNotVisibleInViewport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:assertVisibleInViewport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\JSWebAssert\\:\\:waitOnAutocomplete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\PerformanceTestBase\\:\\:doInstallModulesFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\PerformanceTestBase\\:\\:installModulesFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\PerformanceTestBase\\:\\:prepareEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\Tests\\\\DrupalSelenium2DriverTest\\:\\:attachFileField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverCurlService\\:\\:disableRetry\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverCurlService\\:\\:enableRetry\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverTestBase\\:\\:assertJsCondition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverTestBase\\:\\:createScreenshot\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverTestBase\\:\\:initFrontPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverTestBase\\:\\:initMink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalJavascriptTests\\\\WebDriverTestBase\\:\\:installModulesFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\BrowserTestBaseTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\BrowserTestBaseTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\BrowserTestBaseTest\\:\\:cronRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Core\\\\Recipe\\\\StandardRecipeInstallTest\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\DefaultContent\\\\ContentImportTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/DefaultContent/ContentImportTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:assertCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:assertCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:assertNoCacheContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:assertPageCacheContextsAndTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Entity\\\\EntityBundleListCacheTest\\:\\:enablePageCaching\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\ConfigAfterInstallerTestBase\\:\\:assertConfigDiff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\ConfigAfterInstallerTestBase\\:\\:assertInstalledConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerConfigDirectoryTestBase\\:\\:prepareEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectoryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerConfigDirectoryTestBase\\:\\:setUpProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectoryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigProfileHookInstall\\:\\:setUpRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigProfileHookInstall\\:\\:setUpSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigProfileHookInstall\\:\\:setUpSite\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigProfileHookInstall\\:\\:visitInstaller\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryMultilingualTest\\:\\:setUpProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryProfileHookInstall\\:\\:setUpProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryProfileHookInstall\\:\\:setUpRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryProfileHookInstall\\:\\:setUpSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryProfileHookInstall\\:\\:setUpSite\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigSyncDirectoryProfileHookInstall\\:\\:visitInstaller\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigTestBase\\:\\:prepareEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerExistingConfigTestBase\\:\\:setUpProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerSiteConfigProfileTest\\:\\:setUpSite\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:initFrontPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:installDrupal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:refreshVariables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:setUpLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:setUpProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:setUpRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:setUpSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:setUpSite\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\InstallerTestBase\\:\\:visitInstaller\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Installer\\\\MinimalInstallerTest\\:\\:assertConfigDiff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\MailCaptureTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/MailCaptureTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\MailCaptureTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/MailCaptureTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\BaseFieldOverrideXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\DateFormatXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormDisplayXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityFormModeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewDisplayXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeJsonCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeResourceTestBase\\:\\:setUpAuthorization\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlAnonTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlAnonTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlBasicAuthTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlBasicAuthTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlCookieTest\\:\\:assertAuthenticationEdgeCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlCookieTest\\:\\:assertResponseWhenMissingAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Rest\\\\EntityViewModeXmlCookieTest\\:\\:initAuthentication\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Routing\\\\PathEncodedTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Routing\\\\PathEncodedTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Routing\\\\RouteCachingLanguageTest\\:\\:providerLanguage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Routing\\\\RouteCachingNonPathLanguageNegotiationTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Routing\\\\RouteCachingNonPathLanguageNegotiationTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:assertErrorSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:assertRequirementSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:assertWarningSummaries\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:continueOnExpectedWarnings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:doInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:doRunUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:doSelectionTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:ensureUpdatesToRun\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:initFrontPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:installDrupal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:prepareSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:replaceUser1\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:runDbTasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:runUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:setDatabaseDumpFiles\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:testDatabaseLoaded\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\FunctionalTests\\\\Update\\\\UpdatePathTestBase\\:\\:updateRequirementsProblem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Components\\\\ComponentRenderTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Components/ComponentRenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Components\\\\ComponentRenderTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Components/ComponentRenderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Config\\\\DefaultConfigTest\\:\\:assertConfigDiff\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Config/DefaultConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Action\\\\EmailActionTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Action\\\\EmailActionTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Archiver\\\\ArchiverTestBase\\:\\:assertArchiveContainsFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Archiver/ArchiverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Archiver\\\\ArchiverTestBase\\:\\:assertArchiveNotContainsFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Archiver/ArchiverTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$found might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Cache\\\\CacheCollectorTest\\:\\:providerTestInvalidCharacters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Cache\\\\CacheContextOptimizationTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Cache\\\\CacheContextOptimizationTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Cache\\\\GenericCacheBackendUnitTestBase\\:\\:setUpCacheBackend\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Cache\\\\GenericCacheBackendUnitTestBase\\:\\:tearDownCacheBackend\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\ConfigDependencyTest\\:\\:providerConfigEntityUninstallComplex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\CachedStorageTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\ConfigStorageTestBase\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\ConfigStorageTestBase\\:\\:insert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\ConfigStorageTestBase\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\ConfigStorageTestBase\\:\\:update\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\DatabaseStorageTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\FileStorageTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\ManagedStorageTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\MemoryStorageTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Config\\\\Storage\\\\StorageReplaceDataWrapperTest\\:\\:read\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DatabaseTestBase\\:\\:ensureSampleDataNull\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$expected_driver might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificSchemaTestBase\\:\\:assertIndexOnColumns\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificSchemaTestBase\\:\\:assertNoIndexOnColumns\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificTransactionTestBase\\:\\:cleanUp\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificTransactionTestBase\\:\\:executeDDLStatement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificTransactionTestBase\\:\\:insertRow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificTransactionTestBase\\:\\:transactionInnerLayer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\DriverSpecificTransactionTestBase\\:\\:transactionOuterLayer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\SelectLeastTest\\:\\:selectLeastProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\SelectTest\\:\\:makeCommentsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/SelectTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\TemporaryQueryTestBase\\:\\:countTableRows\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Database\\\\TemporaryQueryTestBase\\:\\:getConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\DatelistElementFormTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\DatelistElementFormTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\DatetimeElementFormTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\DatetimeElementFormTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\Element\\\\TimezoneTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Datetime\\\\Element\\\\TimezoneTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\DefaultContent\\\\AdminAccountSwitcherTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/DefaultContent/AdminAccountSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\DefaultContent\\\\AdminAccountSwitcherTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/DefaultContent/AdminAccountSwitcherTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Element\\\\PathElementFormTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Element\\\\PathElementFormTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ContentEntityNonRevisionableFieldTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$title might not be defined\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\DefaultTableMappingIntegrationTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\Element\\\\EntityAutocompleteElementFormTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\Element\\\\EntityAutocompleteElementFormTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityAccessControlHandlerTest\\:\\:providerTestFieldAccess\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityCrudHookTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDecoupledTranslationRevisionsTest\\:\\:dataTestDecoupledPendingRevisions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDecoupledTranslationRevisionsTest\\:\\:dataTestUntranslatableFields\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$previous_untranslatable_field_value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:baseFieldDeleteWithExistingDataTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:initialValueFromFieldTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateProviderTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDefinitionUpdateTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDeriverTest\\:\\:derivativesProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:drupalGrantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:drupalSetCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:installModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:refreshServices\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:uninstallModule\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKeysTest\\:\\:multipleKeysCacheTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityLanguageTestBase\\:\\:toggleFieldTranslatability\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityQueryRelationshipTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityQueryTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityReferenceFieldTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityReferenceFieldTest\\:\\:assertConfigSchemaByName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityReferenceFieldTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityRepositoryTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityRepositoryTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntitySchemaTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityTypedDataDefinitionTest\\:\\:entityDefinitionIsInternalProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityViewBuilderTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addLongNameBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:addRevisionableBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:applyEntityUpdates\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:deleteEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:doEntityUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:doFieldUpdate\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:enableNewEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:makeBaseFieldEntityKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:modifyBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:modifyBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:removeBaseField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:removeBaseFieldIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:removeBundleField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:removeEntityIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:renameBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:renameDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:renameRevisionBaseTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:renameRevisionDataTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:resetEntityType\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:updateEntityTypeToNotRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:updateEntityTypeToNotTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:updateEntityTypeToRevisionable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:updateEntityTypeToRevisionableAndTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\FieldableEntityDefinitionUpdateTest\\:\\:updateEntityTypeToTranslatable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$e might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$new_field_schema_data might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\RevisionRouteProviderTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\RevisionRouteProviderTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\RouteProviderTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\RouteProviderTest\\:\\:httpKernelHandle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\RouteProviderTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\ValidReferenceConstraintValidatorTest\\:\\:createEntityReferenceField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Extension\\\\ModuleInstallerTest\\:\\:providerTestInvalidCoreInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Field\\\\Entity\\\\BaseFieldOverrideTest\\:\\:getClassTestCases\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\FileTestBase\\:\\:assertDirectoryPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/FileTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\FileTestBase\\:\\:assertFilePermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/FileTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\FileTestBase\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/FileTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\FileTestBase\\:\\:setUpFilesystem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/FileTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\FileUrlGeneratorTest\\:\\:providerGenerateURI\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\File\\\\UrlTransformRelativeTest\\:\\:providerFileUrlTransformRelative\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\ExternalFormUrlTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\ExternalFormUrlTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\FormActionXssTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\FormActionXssTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\FormValidationMessageOrderTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\FormValidationMessageOrderTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Form\\\\TriggeringElementProgrammedTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\KeyValueStore\\\\StorageTestBase\\:\\:createStorage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Layout\\\\IconBuilderTest\\:\\:providerTestBuild\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\ParamConverter\\\\EntityConverterLatestRevisionTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\ParamConverter\\\\EntityConverterLatestRevisionTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\ParamConverter\\\\EntityConverterTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\ParamConverter\\\\EntityConverterTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Path\\\\PathValidatorTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Path\\\\PathValidatorTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Condition\\\\ResponseStatusTest\\:\\:providerTestConditions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestConfigurableContextAwarePlugin\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestConfigurableContextAwarePlugin\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestConfigurableContextAwarePlugin\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestConfigurableContextAwarePlugin\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestConfigurableContextAwarePlugin\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestContextAwarePlugin\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestContextAwarePlugin\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestContextAwarePlugin\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Context\\\\TestContextAwarePlugin\\:\\:setContextTrait\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\TestContextAwarePlugin\\:\\:getCacheContexts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\TestContextAwarePlugin\\:\\:getCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\TestContextAwarePlugin\\:\\:getCacheTags\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\TestContextAwarePlugin\\:\\:setContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\ContextTypedDataTest\\:\\:providerHasContextValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Plugin\\\\Discovery\\\\DiscoveryTestBase\\:\\:assertDefinitionIdentical\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Queue\\\\QueueSerializationTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Queue\\\\QueueTest\\:\\:queueScore\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Queue/QueueTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Recipe\\\\EntityCloneConfigActionTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Recipe\\\\EntityCloneConfigActionTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Recipe\\\\PermissionsPerBundleTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Recipe\\\\PermissionsPerBundleTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\Element\\\\ActionsTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\Element\\\\ActionsTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\Element\\\\MachineNameTest\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\Element\\\\MachineNameTest\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\RenderCacheTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Render\\\\RenderCacheTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\ContentNegotiationRoutingTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\ContentNegotiationRoutingTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\RouteProviderTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\RouteProviderTest\\:\\:assertPathAliasNotExists\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\RouteProviderTest\\:\\:providerDuplicateRoutePaths\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Routing\\\\RouteProviderTest\\:\\:providerMixedCaseRoutePaths\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Session\\\\SuperUserPermissionsTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Session/SuperUserPermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Session\\\\SuperUserPermissionsTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Session/SuperUserPermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Session\\\\UserRolesPermissionsTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Session/UserRolesPermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Session\\\\UserRolesPermissionsTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Session/UserRolesPermissionsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\StreamWrapper\\\\StreamWrapperManagerTest\\:\\:providerTestUriScheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Test\\\\AssertMailTraitTest\\:\\:assertMailPattern\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Test\\\\AssertMailTraitTest\\:\\:assertMailString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Theme\\\\ThemeInstallerTest\\:\\:providerTestInstallThemeWithUnmetModuleDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Theme\\\\SafeMarkupTestMarkup\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Theme\\\\TwigMarkupInterfaceTest\\:\\:providerTestMarkupInterfaceEmpty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\TypedData\\\\TypedDataTest\\:\\:createTypedData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Validation\\\\UniqueValuesConstraintValidatorTest\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\Core\\\\Validation\\\\UniqueValuesConstraintValidatorTest\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertNoTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertOption\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertOptionByText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertOptionWithDrupalSelector\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertThemeOutput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:assertTitle\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:bootEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:bootKernel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:copyConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:disableModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:enableModules\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:getDrupalSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:getRawContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:getTextContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:initFileCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:installConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:installEntitySchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:installSchema\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:register\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:removeWhiteSpace\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setDrupalSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setInstallProfile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setRawContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setSetting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setUpFilesystem\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:tearDownCloseDatabaseConnection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:vfsDump\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\RouteProvider\\:\\:getCandidateOutlines\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\RouteProvider\\:\\:preLoadRoutes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\RouteProvider\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\KernelTests\\\\RouteProvider\\:\\:routeProviderRouteCompare\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/KernelTests/RouteProvider.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:assertTrue\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound + 'message' => '#^Call to an undefined method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:fail\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:changeDatabasePrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:changeDatabasePrefixTrait\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:doInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:ensureDirectory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:executePreinstallClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:executeSetupClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:generateSessionName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:initConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:initSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:initUserSession\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:installDefaultThemeFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:installDrupal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:installModulesFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:installParameters\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:prepareDatabasePrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:prepareEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:prepareSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:rebuildAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:rebuildContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:refreshVariables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:resetAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:setContainerParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:setupBaseUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:writeSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestPreinstallInterface\\:\\:preinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestPreinstallInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSetupInterface\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSetupInterface.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSiteClaroInstallTestScript\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSiteInstallTestScript\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSiteInstallTestScript.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSiteMultilingualInstallTestScript\\:\\:preinstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSiteMultilingualInstallTestScript\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestSite\\\\TestSiteOliveroInstallTestScript\\:\\:setup\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestTools\\\\TestVarDumper\\:\\:cliHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestTools/TestVarDumper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\TestTools\\\\TestVarDumper\\:\\:htmlHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/TestTools/TestVarDumper.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getConfig\\(\\) of class GuzzleHttp\\\\Client\\: +Client\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:changeDatabasePrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:cleanupEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:click\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:clickLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:copyConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:doInstall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:drupalLogin\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:drupalLogout\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:filePreDeleteCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:generateSessionName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:getTextContent\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:grantPermissions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:htmlOutput\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initBrowserOutputFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initConfig\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initFrontPage\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initMink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:initUserSession\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:installDefaultThemeFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:installDrupal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:installModulesFromClassProperty\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:prepareDatabasePrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:prepareEnvironment\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:prepareRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:prepareSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:rebuildAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:rebuildContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:refreshVariables\\(\\) has no return type specified\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:registerSessions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:resetAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:setContainerParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:setCurrentUser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:setupBaseUrl\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:writeSettings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\AnnotationBaseStub\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\DocParserTest\\:\\:createTestParser\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\DocParserTest\\:\\:getAnnotationVarTypeArrayProviderInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\DocParserTest\\:\\:getAnnotationVarTypeProviderInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\DocParserTest\\:\\:getAnnotationVarTypeProviderValid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\DocParserTest\\:\\:getConstantsProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\Fixtures\\\\AnnotationWithAttributes\\:\\:getInteger\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/AnnotationWithAttributes.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\Fixtures\\\\ClassWithInvalidAnnotationTargetAtMethod\\:\\:functionName\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Doctrine\\\\Fixtures\\\\ClassWithValidAnnotationTarget\\:\\:someFunction\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/ClassWithValidAnnotationTarget.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Annotation\\\\Plugin\\\\Discovery\\\\TestAnnotation\\:\\:get\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Assertion\\\\InspectorTest\\:\\:callMe\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Assertion/InspectorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Assertion\\\\InspectorTest\\:\\:callMeStatic\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Assertion/InspectorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Assertion\\\\InspectorTest\\:\\:providerTestAssertAllStrings\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Assertion/InspectorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getIterator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getParameterCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getPrivateServiceCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getRaw\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getServiceCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\ContainerTest\\:\\:getServiceClosureCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\MockConfiguratorInterface\\:\\:configureService\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Symfony\\\\Component\\\\ExpressionLanguage\\\\Expression has an unused parameter \\$expression\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getIterator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getParameterCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getPrivateServiceCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getRaw\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getServiceCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:getServiceClosureCall\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:publicPrivateDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\OptimizedPhpArrayDumperTest\\:\\:serializeDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\Dumper\\\\PhpArrayDumperTest\\:\\:getCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\DependencyInjection\\\\PhpArrayContainerTest\\:\\:getCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\FileCache\\\\FileCacheFactoryTest\\:\\:configurationDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\FileCache\\\\StaticFileCacheBackend\\:\\:delete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/FileCache/StaticFileCacheBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\FileCache\\\\StaticFileCacheBackend\\:\\:reset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/FileCache/StaticFileCacheBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\FileCache\\\\StaticFileCacheBackend\\:\\:store\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/FileCache/StaticFileCacheBackend.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\FileSystem\\\\RegexDirectoryIteratorTest\\:\\:providerTestRegexDirectoryIterator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\PhpStorage\\\\PhpStorageTestBase\\:\\:additionalAssertCRUD\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\PhpStorage\\\\PhpStorageTestBase\\:\\:assertCRUD\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Context\\\\ContextTest\\:\\:providerGetContextValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Context\\\\ContextTest\\:\\:providerHasContextValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\AnnotatedClassDiscoveryTest\\:\\:provideBadAnnotations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\DiscoveryCachedTraitMockableClass\\:\\:getDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\DiscoveryCachedTraitMockableClass\\:\\:hasDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\DiscoveryTraitMockableClass\\:\\:getDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\DiscoveryTraitMockableClass\\:\\:hasDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Discovery\\\\StaticDiscoveryDecoratorTestMockInterface\\:\\:registerDefinitionsCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$charismatic\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$delightful\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$demure\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$electrostatic\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsConfigArrayKey has an unused parameter \\$config_name\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$configuration\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$foo\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$plugin_definition\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$plugin_id\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$what_am_i_doing_here\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsPluginId has an unused parameter \\$plugin_id\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\PluginManagerBaseTest\\:\\:createInstanceCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Plugin\\\\PluginManagerBaseTest\\:\\:getMockFactoryInterface\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/StubPluginManagerBaseWithMapper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestInterface\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceMethodWithParameter\\:\\:methodWithParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceReturnReference\\:\\:returnReference\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceSimpleMethod\\:\\:method\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceWithInterface\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceWithProtectedMethods\\:\\:privateMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceWithProtectedMethods\\:\\:protectedMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceWithProtectedMethods\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\ProxyBuilder\\\\TestServiceWithPublicStaticMethod\\:\\:testMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Render\\\\HtmlEscapedTextTest\\:\\:providerToString\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Render\\\\PlainTextOutputTest\\:\\:providerRenderFromHtml\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Serialization\\\\YamlTestBase\\:\\:providerBoolTest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Serialization\\\\YamlTestBase\\:\\:providerDecodeTests\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Serialization\\\\YamlTestBase\\:\\:providerEncodeDecodeTests\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Component\\\\Utility\\\\test_access_arguments_resolver_access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\ArgumentsResolverTest\\:\\:providerTestGetArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\ArgumentsResolverTest\\:\\:providerTestHandleUnresolvedArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\TestClass\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\TestStaticMethodClass\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\ColorTest\\:\\:providerTestValidateHex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ColorTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\HtmlTest\\:\\:providerDecodeEntities\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/HtmlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\HtmlTest\\:\\:providerEscape\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/HtmlTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\NestedArrayTest\\:\\:providerTestFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\NumberTest\\:\\:providerTestValidStep\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/NumberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\NumberTest\\:\\:providerTestValidStepOffset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/NumberTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\ReflectionTest\\:\\:existsForTesting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/ReflectionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\UrlHelperTest\\:\\:providerTestExternalIsLocal\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\UrlHelperTest\\:\\:providerTestExternalIsLocalInvalid\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Component\\\\Utility\\\\XssTest\\:\\:providerTestAttributes\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Utility/XssTest.php', +]; +$ignoreErrors[] = [ + // identifier: staticMethod.void + 'message' => '#^Result of static method Drupal\\\\Composer\\\\Composer\\:\\:ensureComposerVersion\\(\\) \\(void\\) is used\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/ComposerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Generator\\\\BuilderTest\\:\\:builderTestData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Generator/BuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Generator\\\\MetapackageUpdateTest\\:\\:updatedTestData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Generator\\\\OverlapWithTopLevelDependenciesTest\\:\\:templateProjectPathProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\ProjectMessage\\\\ConfigTest\\:\\:provideGetMessageText\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Fixtures\\:\\:cloneFixtureProjects\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Fixtures\\:\\:createIsolatedComposerCacheDir\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Fixtures\\:\\:tearDown\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ComposerHookTest\\:\\:assertScaffoldedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ComposerHookTest\\:\\:assertScaffoldedFileDoesNotContain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ManageGitIgnoreTest\\:\\:assertScaffoldedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ManageGitIgnoreTest\\:\\:assertScaffoldedFileDoesNotContain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldTest\\:\\:assertScaffoldedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldTest\\:\\:assertScaffoldedFileDoesNotContain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldTest\\:\\:scaffoldExpectedExceptionTestValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldTest\\:\\:scaffoldOverridingSettingsExcludingHtaccessValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldTest\\:\\:scaffoldSut\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldUpgradeTest\\:\\:assertScaffoldedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\Scaffold\\\\Functional\\\\ScaffoldUpgradeTest\\:\\:assertScaffoldedFileDoesNotContain\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Composer\\\\Plugin\\\\VendorHardening\\\\VendorHardeningPluginTest\\:\\:providerFindBinOverlap\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\AccessManagerTest\\:\\:setupAccessArgumentsResolverFactory\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/AccessManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestAccessCheckInterface\\:\\:access\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/AccessManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\AccessResultTest\\:\\:andOrCacheabilityPropagationProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/AccessResultTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestController\\:\\:accessAllow\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestController\\:\\:accessDeny\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestController\\:\\:accessParameter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestController\\:\\:accessRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Ajax\\\\AjaxCommandsTest\\:\\:announceCommandProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Annotation\\\\PluralTranslationTest\\:\\:providerTestGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Annotation\\\\PluralTranslationTest\\:\\:providerTestMissingData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Annotation\\\\TranslationTest\\:\\:providerTestGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Annotation/TranslationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\AssetResolverTest\\:\\:providerAttachedCssAssets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\AssetResolverTest\\:\\:providerAttachedJsAssets\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\TestMemoryBackend\\:\\:getAllCids\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\CssCollectionRendererUnitTest\\:\\:providerTestRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Core\\\\Asset\\\\file_uri_scheme\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\CssOptimizerUnitTest\\:\\:providerTestOptimize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\LibraryDependencyResolverTest\\:\\:providerTestGetLibrariesWithDependencies\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\LibraryDependencyResolverTest\\:\\:providerTestGetMinimalRepresentativeSubset\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\LibraryDiscoveryParserTest\\:\\:providerTestCssAssert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\TestLibraryDiscoveryParser\\:\\:fileValidUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Authentication\\\\AuthenticationManagerTest\\:\\:providerTestDefaultFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Batch\\\\BatchBuilderTest\\:\\:finishedCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Batch\\\\BatchBuilderTest\\:\\:operationCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Block\\\\BlockBaseTest\\:\\:providerTestGetMachineNameSuggestion\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Block\\\\BlockManagerTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Block\\\\BlockManagerTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\CacheCollectorHelper\\:\\:set\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\CacheCollectorHelper\\:\\:setCacheMissData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\CacheableMetadataTest\\:\\:providerSetCacheMaxAge\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\CacheContextsManagerTest\\:\\:getMockContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\CacheContextsManagerTest\\:\\:providerTestInvalidCalculatedContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\CacheContextsManagerTest\\:\\:providerTestOptimizeTokens\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\CookieCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\HeadersCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\PathParentCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\ProtocolVersionCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\Context\\\\QueryArgsCacheContextTest\\:\\:providerTestGetContext\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\DatabaseBackendFactoryTest\\:\\:getProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Condition\\\\ConditionAccessResolverTraitTest\\:\\:providerTestResolveConditions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\Checkpoint\\\\CheckpointStorageTest\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigDependencyManagerTest\\:\\:providerTestSortAll\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigFactoryOverrideBaseTest\\:\\:providerTestFilterNestedArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\TestConfigFactoryOverrideBase\\:\\:addCollections\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\TestConfigFactoryOverrideBase\\:\\:doFilterNestedArray\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\TestConfigFactoryOverrideBase\\:\\:onConfigDelete\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\TestConfigFactoryOverrideBase\\:\\:onConfigRename\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\TestConfigFactoryOverrideBase\\:\\:onConfigSave\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:mergeDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:nestedDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:overrideDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:setNameProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:simpleDataProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:validateNameProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityTypeTest\\:\\:providerGetPropertiesToExport\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\Entity\\\\ConfigEntityTypeTest\\:\\:providerTestGetConfigPrefix\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ReadOnlyStorageTest\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\StorageComparerTest\\:\\:getConfigData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/StorageComparerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\StorageCopyTraitTest\\:\\:providerTestReplaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\StorageCopyTraitTest\\:\\:replaceStorageContents\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\ControllerResolverTest\\:\\:providerTestCreateController\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\ControllerResolverTest\\:\\:providerTestGetController\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\ControllerResolverTest\\:\\:providerTestGetControllerFromDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockContainerInjection\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockContainerInjection\\:\\:getResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockController\\:\\:getControllerWithRequestAndRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockController\\:\\:getResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockControllerPsr7\\:\\:getControllerWithRequestAndRouteMatch\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockControllerPsr7\\:\\:getResult\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\MockInvokeController\\:\\:__invoke\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Controller\\\\TestController\\:\\:content\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Controller/TestController.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\CronTest\\:\\:processQueuesTestData\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/CronTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\ConditionTest\\:\\:providerTestCompileWithSqlInjectionForOperator\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/ConditionTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubConnection\\:\\:createDatabase\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:addField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:addIndex\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:addPrimaryKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:addUniqueKey\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:changeField\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Database\\\\Stub\\\\StubSchema\\:\\:renameTable\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Database/Stub/StubSchema.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Datetime\\\\DateHelperTest\\:\\:providerTestWeekDaysOrdered\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Datetime\\\\DateTest\\:\\:providerTestFormatInterval\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Datetime/DateTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\InvalidConsumer\\:\\:addHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\TaggedHandlersPassTest\\:\\:buildContainer\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumer\\:\\:addHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumer\\:\\:addNoPriority\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumer\\:\\:addWithId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumerWithExtraArguments\\:\\:addHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumerWithExtraArguments\\:\\:addNoPriority\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumerWithExtraArguments\\:\\:addWithDifferentOrder\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Compiler\\\\ValidConsumerWithExtraArguments\\:\\:addWithId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\DependencySerializationTestDummy\\:\\:getServiceIds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\Fixture\\\\BarClass\\:\\:setBaz\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DependencyInjection\\\\YamlFileLoaderTest\\:\\:providerTestExceptions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Display\\\\DisplayVariantTest\\:\\:providerTestGetConfiguration\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DrupalKernel\\\\DrupalKernelTest\\:\\:providerTestTrustedHosts\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DrupalKernel\\\\FakeAutoloader\\:\\:findFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DrupalKernel\\\\FakeAutoloader\\:\\:loadClass\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\DrupalKernel\\\\ValidateHostnameTest\\:\\:providerTestValidateHostname\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityFormTest\\:\\:providerTestFormIds\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityFormTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityLinkTest\\:\\:providerTestLink\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Entity\\\\test_function_controller\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Entity\\\\test_function_controller_entity_upcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Entity\\\\test_function_controller_no_upcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Entity\\\\test_function_controller_with_argument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicControllerClass\\:\\:exampleControllerMethod\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicControllerClass\\:\\:exampleControllerMethodWithArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicControllerClass\\:\\:exampleControllerWithEntityNoUpcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicControllerClass\\:\\:exampleControllerWithEntityUpcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicFormNoContainerInjectionInterface\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicFormNoContainerInjectionInterface\\:\\:validateForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\BasicFormNoUpcasting\\:\\:submitForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityResolverManagerTest\\:\\:providerTestSetRouteOptionsWithContentController\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityResolverManagerTest\\:\\:providerTestSetRouteOptionsWithEntityTypeNoUpcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityResolverManagerTest\\:\\:providerTestSetRouteOptionsWithEntityTypeUpcasting\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityResolverManagerTest\\:\\:providerTestSetRouteOptionsWithStandardRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityResolverManagerTest\\:\\:providerTestSetRouteOptionsWithStandardRouteWithArgument\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityStorageBaseTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityForm\\:\\:getBaseFormId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityForm\\:\\:getFormId\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityForm\\:\\:setEntity\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityForm\\:\\:setEntityTypeManager\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityForm\\:\\:setOperation\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\TestEntityFormInjected\\:\\:create\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', +]; +$ignoreErrors[] = [ + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$revision_query might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeTest\\:\\:providerTestGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeTest\\:\\:providerTestGetBundleLabel\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$initial_storage_value in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeTest\\:\\:providerTestGetKeys\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$minor_version might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeTest\\:\\:providerTestSet\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ExtensionVersion.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^The "module_installer\\.uninstall_validators" service is deprecated in drupal\\:11\\.1\\.0 and is removed from drupal\\:12\\.0\\.0\\. Inject "\\!tagged_iterator module_install\\.uninstall_validator" instead\\. See https\\://www\\.drupal\\.org/node/3432595$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\FieldDefinitionTest\\:\\:factoryTypeProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Extension/ModuleInstaller.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$callback in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueEntityStorageTest\\:\\:testSaveConfigEntity\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldDefinition.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:generateSampleValue\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Routing\\\\DefaultHtmlRouteProviderTest\\:\\:providerTestGetAddFormRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemBase\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Routing\\\\DefaultHtmlRouteProviderTest\\:\\:providerTestGetAddPageRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\FieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Routing\\\\DefaultHtmlRouteProviderTest\\:\\:providerTestGetCanonicalRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$values might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Routing\\\\DefaultHtmlRouteProviderTest\\:\\:providerTestGetCollectionRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldItemList.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchemaTest\\:\\:providerSchemaCastValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageTestEntityInterface\\:\\:postLoad\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/FieldTypePluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\EntityReferenceItem\\:\\:generateSampleValue\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\ActiveLinkResponseFilterTest\\:\\:providerTestSetLinkActiveClass\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldType\\\\NumericItemBase\\:\\:\\$value\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\ExceptionJsonSubscriberTest\\:\\:providerTestOn4xx\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:__get\\(\\) should return bool\\|string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\ModuleRouteSubscriberTest\\:\\:providerTestRemoveRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/FileTransfer/FileTransfer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormBuilder\\:\\:setInvalidTokenError\\(\\) should return \\$this\\(Drupal\\\\Core\\\\Form\\\\FormBuilder\\) but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\OptionsRequestSubscriberTest\\:\\:providerTestOnRequestWithOptionsRequest\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$form_id in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriberTest\\:\\:providerTestDestinationRedirect\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$input in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriberTest\\:\\:providerTestDestinationRedirectToExternalUrl\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormBuilder.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$form in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriberTest\\:\\:providerTestDestinationRedirectWithInvalidUrl\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormCache.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Form\\\\FormValidator\\:\\:setInvalidTokenError\\(\\) should return \\$this\\(Drupal\\\\Core\\\\Form\\\\FormValidator\\) but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\EventSubscriber\\\\RssResponseRelativeUrlFilterTest\\:\\:providerTestOnResponse\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$is_empty_multiple might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\DependencyTest\\:\\:providerCreateFromString\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/DependencyTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$is_empty_null might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\ExtensionListTest\\:\\:providerCheckIncompatibility\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$is_empty_string might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\InfoParserUnitTest\\:\\:providerCoreIncompatibility\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Form/FormValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setIfNotExists\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\InfoParserUnitTest\\:\\:providerInvalidLifecycle\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\KeyValueStore\\\\NullStorageExpirable\\:\\:setWithExpireIfNotExists\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\InfoParserUnitTest\\:\\:providerLifecycleLink\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Lock\\\\NullLockBackend\\:\\:wait\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Extension\\\\InfoParserUnitTest\\:\\:providerValidLifecycle\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Lock/NullLockBackend.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$parent in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_hook_include\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:getInstance\\(\\) should return object\\|false but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_hook\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Menu\\\\MenuLinkManager\\:\\:menuNameInUse\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_hook_info\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_added_hook\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuLinkManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_added_helper\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Menu/MenuTreeStorage.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.module', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_all1_hook\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Plugin/DefaultPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Core\\\\Queue\\\\Memory has an unused parameter \\$name\\.$#', + // identifier: missingType.return + 'message' => '#^Function module_handler_test_all2_hook\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Queue/Memory.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$sort in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Field\\\\FieldFilteredMarkupTest\\:\\:providerTestCreate\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$output in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Field\\\\FieldInputValueNormalizerTraitTest\\:\\:keyValueByDeltaTestCases\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$page_bottom in empty\\(\\) always exists and is always falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Field\\\\FieldItemListTest\\:\\:providerTestEquals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Field/FieldItemListTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$page_top in empty\\(\\) always exists and is always falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\File\\\\FileSystemTest\\:\\:providerTestBasename\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/File/FileSystemTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$elements in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\ConfiguredTrait\\:\\:getEditableConfigNames\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Render/Renderer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\ConfirmFormHelperTest\\:\\:providerTestCancelLinkDestination\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Routing/MatcherDumper.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$current might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormBuilderTest\\:\\:formStateResponseProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Site/SettingsEditor.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$index might not be defined\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/lib/Drupal/Core/Site/SettingsEditor.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormBuilderTest\\:\\:providerTestBuildFormWithTriggeringElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Template\\\\AttributeValueBase\\:\\:render\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormBuilderTest\\:\\:providerTestInvalidToken\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Template/AttributeValueBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Core\\\\Template\\\\TwigEnvironment has an unused parameter \\$root\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormBuilderTest\\:\\:providerTestValueCallableIsSafe\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Template/TwigEnvironment.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Core\\\\Test\\\\TestRunnerKernel has an unused parameter \\$allow_dumping\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\TestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Test/TestRunnerKernel.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$candidate might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\TestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$theme_engine in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\TestFormInjected\\:\\:create\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\TypedData\\\\ListDataDefinition\\:\\:setDataType\\(\\) should return static\\(Drupal\\\\Core\\\\TypedData\\\\ListDataDefinition\\) but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormElementHelperTest\\:\\:getElementByNameProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/ListDataDefinition.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\Core\\\\TypedData\\\\TypedData\\:\\:\\$value\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/TypedData.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormElementHelperTest\\:\\:getElementTitleProvider\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$cache_key in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormHelperTest\\:\\:providerElements\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormHelperTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:discoverServiceProviders\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerGetRedirect\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Update/UpdateKernel.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\Core\\\\Updater\\\\Module\\:\\:postUpdateTasks\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerGetTemporaryValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/lib/Drupal/Core/Updater/Module.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$position might not be defined\\.$#', - 'count' => 4, - 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockRenderOrderTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerHasTemporaryValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$edit might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerIsMethodType\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/block/tests/src/Functional/BlockUiTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$dependency in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerLimitValidationErrors\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/block_content/src/BlockContentAccessControlHandler.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/block_content/src/BlockContentForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerLoadInclude\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\block_content\\\\BlockContentTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerSetRequestMethod\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/block_content/src/BlockContentTypeForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$loaded might not be defined\\.$#', - 'count' => 9, - 'path' => __DIR__ . '/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerSetTemporaryValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$ghs_config_classes in empty\\(\\) always exists and is always falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateDecoratorBaseTest\\:\\:providerSingleBooleanArgument\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\comment\\\\CommentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateTest\\:\\:providerTestGetError\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/src/CommentForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\comment\\\\CommentTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateTest\\:\\:providerTestIsCached\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/src/CommentTypeForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$state might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateTest\\:\\:providerTestIsMethodType\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/src/Plugin/migrate/destination/EntityComment.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\NodeNewComments\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateTest\\:\\:providerTestSetErrorByName\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/src/Plugin/views/field/NodeNewComments.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$comment in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateTest\\:\\:testAddCleanValueKey\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/src/Plugin/views/row/Rss.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$position might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\PrepareCallbackTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentBlockTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$comment_values might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\PrepareCallbackTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentLanguageTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$mode_text might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:getValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/comment/tests/src/Functional/CommentTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$data might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/config/src/Form/ConfigSingleImportForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:getValues\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:hasValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/contact/src/ContactFormEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\contact\\\\Entity\\\\Message\\:\\:getPersonalRecipient\\(\\) should return Drupal\\\\user\\\\UserInterface but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:isValueEmpty\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/contact/src/Entity/Message.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\contact\\\\MessageForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/contact/src/MessageForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:setValue\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$state in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/modules/content_moderation/src/Form/ContentModerationStateForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:setValueForElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getAffectedRevisionTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:setValues\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getDefaultRevisionId\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormStateValuesTraitStub\\:\\:unsetValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_moderation/src/ModerationInformation.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$checkbox_id might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormSubmitterTest\\:\\:providerTestHandleFormSubmissionWithResponses\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$locked_languages might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormTestBase\\:\\:assertFormElement\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormTestBase.php', +]; +$ignoreErrors[] = [ + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTest\\:\\:providerTestHandleErrorsWithLimitedValidation\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$locked_languages might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTest\\:\\:providerTestPerformRequiredValidation\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_translation/content_translation.module', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$source_name might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTest\\:\\:providerTestRequiredErrorMessage\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/content_translation/src/Controller/ContentTranslationController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$unrestricted_tab_count might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTestMockInterface\\:\\:element_validate\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldType\\\\DateTimeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTestMockInterface\\:\\:hash_validate\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$item in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTestMockInterface\\:\\:validate_handler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/datetime/src/Plugin/Validation/Constraint/DateTimeFormatConstraintValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\SubformStateTest\\:\\:providerTestGetValue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeFieldItemList.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/SubformStateTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeItem\\:\\:\\$end_date\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\SubformStateTest\\:\\:providerTestGetValueBroken\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/SubformStateTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeItem\\:\\:\\$start_date\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\SubformStateTest\\:\\:providerTestSetValues\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/SubformStateTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$view in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Http\\\\CacheableExceptionTest\\:\\:providerTestExceptions\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/dblog/dblog.module', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$items in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getConfig\\(\\) of class GuzzleHttp\\\\Client\\: +Client\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldEmptySettingFormatter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$items in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Layout\\\\LayoutDefaultTest\\:\\:providerTestBuild\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldMultipleFormatter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$values might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Logger\\\\LogMessageParserTest\\:\\:providerTestParseMessagePlaceholders\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field/tests/src/Kernel/FieldAttachStorageTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$entity_display might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\LocalActionManagerTest\\:\\:getActionsForRouteProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/Access/FormModeAccessCheck.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$entity_display might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\TestLocalTaskDefault\\:\\:setRouteProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/Access/ViewModeAccessCheck.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\field_ui\\\\FieldUI\\:\\:getOverviewRouteInfo\\(\\) should return Drupal\\\\Core\\\\Url but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\LocalTaskIntegrationTestBase\\:\\:assertLocalTasks\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/FieldUI.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\EntityDisplayModeFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\LocalTaskIntegrationTestBase\\:\\:getLocalTaskManager\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/Form/EntityDisplayModeFormBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldConfigEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\MenuLinkMock\\:\\:create\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldConfigEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\field_ui\\\\Form\\\\FieldStorageConfigEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\MenuTreeParametersTest\\:\\:providerTestSetMinDepth\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageConfigEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$file_upload in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\StaticMenuLinkOverridesTest\\:\\:providerTestDeleteOverrides\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/file.module', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$rows in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\StaticMenuLinkOverridesTest\\:\\:providerTestLoadOverride\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldFormatter/TableFormatter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\EntityConverterTest\\:\\:providerTestApplies\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\EntityConverterTest\\:\\:providerTestConvert\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$unexpected in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\EntityRevisionParamConverterTest\\:\\:getTestRoute\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileManagedTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonBasicAuthTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\EntityRevisionParamConverterTest\\:\\:providerTestConvert\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\file\\\\Functional\\\\FileUploadJsonCookieTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\ParamConverterManagerTest\\:\\:providerTestSetRouteParameterConverters\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$unexpected in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Password\\\\PhpPasswordTest\\:\\:providerLongPasswords\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$rows might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\PathProcessor\\\\PathProcessorFrontTest\\:\\:providerProcessInbound\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + // identifier: class.notFound + 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$image_style in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: class.notFound + 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/image/src/Controller/ImageStyleDownloadController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$lock_name might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\CategorizingPluginManager\\:\\:formatPlural\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/image/src/Controller/ImageStyleDownloadController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\CategorizingPluginManager\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\image\\\\Form\\\\ImageStyleFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\CategorizingPluginManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFormBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:\\$height\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', + 'message' => '#^Missing cache backend declaration for performance\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\image\\\\Plugin\\\\Field\\\\FieldType\\\\ImageItem\\:\\:\\$width\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/image/src/Plugin/Field/FieldType/ImageItem.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\ContextDefinitionIsSatisfiedTest\\:\\:providerTestIsSatisfiedBy\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$image_that_is_too_small_file might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageFieldValidateTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\ContextDefinitionTest\\:\\:providerGetConstraint\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$edit in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\ContextDefinitionTest\\:\\:providerGetDataDefinition\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/image/tests/src/Functional/ImageStyleFlushTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$reason in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\EntityContextDefinitionIsSatisfiedTest\\:\\:providerTestIsSatisfiedBy\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/src/Context/FieldResolver.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\ResourceIdentifier\\:\\:getDataReferencePropertyName\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\EntityContextDefinitionIsSatisfiedTest\\:\\:providerTestIsSatisfiedByGenerateBundledEntity\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$entity in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Context\\\\EntityContextDefinitionIsSatisfiedTest\\:\\:providerTestIsSatisfiedByPassBundledEntity\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/src/Normalizer/EntityAccessDeniedHttpExceptionNormalizer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\jsonapi\\\\Revisions\\\\VersionNegotiator\\:\\:getRevision\\(\\) should return Drupal\\\\Core\\\\Entity\\\\EntityInterface but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\ContextHandlerTest\\:\\:providerTestCheckRequirements\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/src/Revisions/VersionNegotiator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$created_entity might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\ContextHandlerTest\\:\\:providerTestFilterPluginDefinitionsByContexts\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$dynamic_cache might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\ContextHandlerTest\\:\\:providerTestGetMatchingContexts\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$parseable_invalid_request_body might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\DefaultPluginManagerTest\\:\\:providerTestProcessDefinition\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$reason in empty\\(\\) always exists and is not falsy\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginForm\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Discovery\\\\TestContainerDerivativeDiscovery has an unused parameter \\$example_service\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/language/src/Form/LanguageAddForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\language\\\\Form\\\\LanguageEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\FilteredPluginManagerTraitTest\\:\\:providerTestGetFilteredDefinitions\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/language/src/Form/LanguageEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$key might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/language/src/Form/NegotiationBrowserForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestFilteredPluginManager\\:\\:contextHandler\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$method_id might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestFilteredPluginManager\\:\\:getDefinitionsForContexts\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/language/src/LanguageNegotiator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$langcode might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestFilteredPluginManager\\:\\:moduleHandler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\link\\\\Plugin\\\\migrate\\\\process\\\\FieldLink has an unused parameter \\$migration\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestFilteredPluginManager\\:\\:themeManager\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/link/src/Plugin/migrate/process/FieldLink.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Function locale_config_batch_update_components\\(\\) should return array but return statement is missing\\.$#', + 'message' => '#^Missing cache backend declaration for performance\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/locale.bulk.inc', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$item in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Fixtures\\\\TestConfigurablePlugin\\:\\:setConfiguration\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/Form/ExportForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Fixtures/TestConfigurablePlugin.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\locale\\\\LocaleDefaultConfigStorage\\:\\:read\\(\\) should return array but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/locale/src/LocaleDefaultConfigStorage.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\LazyPluginCollectionTestBase\\:\\:setupPluginCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:deleteAll\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\PluginDependencyTraitTest\\:\\:providerTestPluginDependencies\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/LocaleProjectStorage.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseReader\\:\\:readItem\\(\\) should return Drupal\\\\Component\\\\Gettext\\\\PoItem but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginDependency\\:\\:addDependencies\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/PoDatabaseReader.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\locale\\\\PoDatabaseWriter\\:\\:importString\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginDependency\\:\\:calculatePluginDependencies\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$plural in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginDependency\\:\\:moduleHandler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/PoDatabaseWriter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\locale\\\\StringDatabaseStorage\\:\\:dbStringTable\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginDependency\\:\\:themeHandler\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/locale/src/StringDatabaseStorage.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$error in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestClass\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/media/media.install', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\media\\\\MediaTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestClass\\:\\:validateConfigurationForm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$source in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: constructor.unusedParameter + 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginManager has an unused parameter \\$namespaces\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/media/src/MediaTypeForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/TestPluginManager.php', ]; $ignoreErrors[] = [ - // identifier: nullCoalesce.variable - 'message' => '#^Variable \\$resource_url on left side of \\?\\? always exists and is not nullable\\.$#', + 'message' => '#^Missing cache backend declaration for performance\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/media/src/OEmbed/UrlResolver.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/TestPluginManager.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$jpg_image might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ProxyBuilder\\\\TestServiceComplexMethod\\:\\:complexMethod\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\menu_link_content\\\\Form\\\\MenuLinkContentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubbleableMetadataTest\\:\\:providerTestAddAttachments\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$uuid might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\HtmlTagTest\\:\\:providerPreRenderHtmlTag\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\MachineNameTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/menu_ui/src/MenuForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\migrate\\\\MigrateException has an unused parameter \\$code\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\PasswordConfirmTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/MigrateException.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\migrate\\\\MigrateException has an unused parameter \\$previous\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\PasswordTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/MigrateException.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\TextareaTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\TextfieldTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrateSourcePluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\migrate\\\\Plugin\\\\MigrationPluginManager has an unused parameter \\$language_manager\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\Element\\\\TokenTest\\:\\:providerTestValueCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/MigrationPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/Element/TokenTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\ComponentEntityDisplayBase\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\ElementTest\\:\\:dataProviderIsRenderArray\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/ElementTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Config\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\ElementTest\\:\\:providerTestIsEmpty\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Config.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/ElementTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:fields\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\ElementTest\\:\\:providerTestSetAttributes\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/Entity.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/ElementTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$config might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\MetadataBubblingUrlGeneratorTest\\:\\:providerUrlBubbleableMetadataBubbling\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\NullDestination\\:\\:import\\(\\) should return array\\|bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubblingTest\\:\\:bubblingCacheOverwritePrerender\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/NullDestination.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - // identifier: phpunit.dataProviderMethod - 'message' => '#^@dataProvider providerSource related method not found\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubblingTest\\:\\:bubblingNestedPreRenderCached\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - // identifier: phpunit.dataProviderMethod - 'message' => '#^@dataProvider providerSource related method not found\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubblingTest\\:\\:bubblingNestedPreRenderUncached\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - // identifier: staticMethod.notFound - 'message' => '#^Call to an undefined static method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:migrateDumpAlter\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubblingTest\\:\\:bubblingPlaceholder\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$sub_process_plugins might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubProcessTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\BubblingTest\\:\\:bubblingPreRender\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererBubblingTest\\:\\:providerTestContextBubblingEdgeCases\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/src/MigrationPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Render\\\\callback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/src/NodeMigrateType.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererCallbackTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\EntityReferenceTranslationDeriver has an unused parameter \\$base_plugin_id\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererCallbackTest\\:\\:__invoke\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererCallbackTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\migrate_drupal\\\\Plugin\\\\migrate\\\\source\\\\ContentEntityDeriver has an unused parameter \\$base_plugin_id\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererCallbackTest\\:\\:renderCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererCallbackTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTest\\:\\:providerTestAddCacheableDependency\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTest\\:\\:providerTestRenderCacheMaxAge\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\TestAccessClass\\:\\:accessFalse\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\TestAccessClass\\:\\:accessResultAllowed\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\TestAccessClass\\:\\:accessResultForbidden\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$statement might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\TestAccessClass\\:\\:accessTrue\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$version might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\TestCallables\\:\\:preRenderPrinted\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/CredentialForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTestBase\\:\\:assertRenderCacheItem\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTestBase.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\CredentialFormTest\\:\\:installEntitySchema\\(\\)\\.$#', - 'count' => 8, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTestBase\\:\\:setUpMemoryCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTestBase.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeExecuteTestBase\\:\\:installEntitySchema\\(\\)\\.$#', - 'count' => 8, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTestBase\\:\\:setUpRequest\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTestBase.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeFormStepsTest\\:\\:installEntitySchema\\(\\)\\.$#', - 'count' => 8, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Render\\\\RendererTestBase\\:\\:setUpUnusedCache\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Render/RendererTestBase.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Route\\\\RoleAccessCheckTest\\:\\:roleAccessProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MigrateUpgradeTestBase\\:\\:getManagedFiles\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\AcceptHeaderMatcherTest\\:\\:acceptFilterProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$patterns might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\MockRouterInterface\\:\\:add\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\migrate_drupal_ui\\\\Functional\\\\MultilingualReviewPageTestBase\\:\\:installEntitySchema\\(\\)\\.$#', - 'count' => 8, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\ContentTypeHeaderMatcherTest\\:\\:providerTestSafeRequestFilter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$last_insert_id might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\RedirectDestinationTest\\:\\:providerGet\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Insert.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$string_ascii_check might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\RequestFormatRouteFilterTest\\:\\:filterProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$string_check might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\TestRouteSubscriber\\:\\:routesFromArray\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\node\\\\ConfigTranslation\\\\NodeTypeMapper\\:\\:setEntity\\(\\) should return bool but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/node/src/ConfigTranslation/NodeTypeMapper.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\TestRouteSubscriber\\:\\:routesFromCollection\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\node\\\\NodeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/node/src/NodeForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\RoutingFixtures\\:\\:createTables\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:alterQuery\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\RoutingFixtures\\:\\:dropTables\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/node/src/NodeGrantDatabaseStorage.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\node\\\\NodeTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\RoutingFixtures\\:\\:staticSampleRouteCollection\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/node/src/NodeTypeForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$node in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\UrlGeneratorTest\\:\\:providerTestAliasGenerationWithOptions\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/node/src/Plugin/views/row/Rss.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$changed in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Routing\\\\UrlGeneratorTest\\:\\:providerTestNoPath\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListFloatItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\DoTrustedCallbackTraitTest\\:\\:errorTypeProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListIntegerItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\DoTrustedCallbackTraitTest\\:\\:providerTestTrustedCallbacks\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListIntegerItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:\\$value\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\DoTrustedCallbackTraitTest\\:\\:providerTestUntrustedCallbacks\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\InvokableUntrustedObject\\:\\:__invoke\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListItemBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListStringItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\TrustedMethods\\:\\:attributeCallback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/options/src/Plugin/Field/FieldType/ListStringItem.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\path\\\\PathAliasForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\TrustedMethods\\:\\:callback\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/path/src/PathAliasForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$alias\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\TrustedMethods\\:\\:unTrustedCallback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$langcode\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\TrustedObject\\:\\:callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: property.notFound - 'message' => '#^Access to an undefined property Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:\\$pid\\.$#', - 'count' => 5, - 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\UntrustedObject\\:\\:callback\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\path\\\\Plugin\\\\Field\\\\FieldType\\\\PathItem\\:\\:postSave\\(\\) should return bool but return statement is missing\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/modules/path/src/Plugin/Field/FieldType/PathItem.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\RequestSanitizerTest\\:\\:providerTestAcceptableDestinations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$table_field might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Security\\\\RequestSanitizerTest\\:\\:providerTestSanitizedDestinations\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Select.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\pgsql\\\\Driver\\\\Database\\\\pgsql\\\\Upsert\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\StackMiddleware\\\\ContentLengthTest\\:\\:providerTestSetContentLengthHeader\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Upsert.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$responsive_image_styles in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\StackMiddleware\\\\ReverseProxyMiddlewareTest\\:\\:reverseProxyEnabledProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\responsive_image\\\\ResponsiveImageStyleForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/responsive_image/src/ResponsiveImageStyleForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\State\\\\StateTest\\:\\:testSetBeforeGet\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/State/StateTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$created_entity might not be defined\\.$#', - 'count' => 4, - 'path' => __DIR__ . '/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\StringTranslation\\\\ByteSizeMarkupTest\\:\\:providerTestCommonFormatSize\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$working_to might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\StringTranslation\\\\PluralTranslatableMarkupTest\\:\\:providerPluralTranslatableMarkupSerialization\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/search/search.module', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest\\.php\\:40\\:\\:formatPlural\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/search/src/Form/SearchPageAddForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest\\.php\\:40\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/search/src/Form/SearchPageEditForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\search\\\\Form\\\\SearchPageFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Template\\\\AttributeTest\\:\\:providerTestAttributeValues\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Template/AttributeTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\search\\\\SearchPageRepository\\:\\:setDefaultSearchPage\\(\\) should return static\\(Drupal\\\\search\\\\SearchPageRepository\\) but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Template\\\\TwigExtensionTest\\:\\:providerTestRenderVar\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/search/src/SearchPageRepository.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\serialization\\\\Normalizer\\\\EntityNormalizer\\:\\:getCustomSerializedPropertyNames\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Template\\\\TwigExtensionTest\\:\\:providerTestRenderVarEarlyReturn\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/serialization/src/Normalizer/EntityNormalizer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\shortcut\\\\Form\\\\SetCustomize\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertNoTitle\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/shortcut/src/Form/SetCustomize.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertOption\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/shortcut/src/ShortcutForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutSetForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertOptionByText\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/shortcut/src/ShortcutSetForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$args might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertOptionWithDrupalSelector\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$statement might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertThemeOutput\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Connection.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\system\\\\Controller\\\\BatchController\\:\\:batchPage\\(\\) should return array\\|Symfony\\\\Component\\\\HttpFoundation\\\\Response but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:assertTitle\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/Controller/BatchController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\system\\\\Form\\\\DateFormatFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:getDrupalSettings\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/Form/DateFormatFormBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\system\\\\Form\\\\ModulesListNonStableConfirmForm\\:\\:getQuestion\\(\\) should return Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:getRawContent\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/Form/ModulesListNonStableConfirmForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$default_theme in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:getTextContent\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$theme_settings in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:removeWhiteSpace\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$violation_messages might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:setDrupalSettings\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/src/SecurityAdvisories/SecurityAdvisory.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$directories might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\AssertContentTraitTest\\:\\:setRawContent\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/system.install', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$pdo_message might not be defined\\.$#', + // identifier: isset.variable + 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/system.install', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$site_path might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\BrowserTestBaseTest\\:\\:mockBrowserTestBaseWithDriver\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/system.install', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$messages might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\PhpUnitTestRunnerTest\\:\\:providerTestSummarizeResults\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/batch_test/batch_test.callbacks.inc', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php', ]; $ignoreErrors[] = [ - // identifier: function.deprecated - 'message' => '#^Call to deprecated function deprecation_test_function\\(\\)\\: -in drupal\\:8\\.4\\.0 and is removed from drupal\\:9\\.0\\.0\\. This is - the deprecation message for deprecated_test_function\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\RunTests\\\\TestFileParserTest\\:\\:provideTestFileContents\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\lazy_route_provider_install_test\\\\PluginManager has an unused parameter \\$cache_backend\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestDatabaseTest\\:\\:providerTestConstructor\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\lazy_route_provider_install_test\\\\PluginManager has an unused parameter \\$url_generator\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestDiscoveryTest\\:\\:getTestDiscoveryMock\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestDiscoveryTest\\:\\:infoParserProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestDiscoveryTest\\:\\:providerTestGetPhpunitTestSuite\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/module_test/src/PluginManagerCacheClearer.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest\\.php\\:39\\:\\:changeDatabasePrefix\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/DefaultsTestPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method class@anonymous/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest\\.php\\:39\\:\\:prepareDatabasePrefix\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Theme\\\\AjaxBasePageNegotiatorTest\\:\\:providerTestApplies\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/plugin_test/src/Plugin/TestPluginManager.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$form_output in empty\\(\\) always exists and is not falsy\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/system/tests/src/Functional/Form/FormTest.php', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Core\\\\Theme\\\\get_defined_functions\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Theme/RegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$parent might not be defined\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Theme\\\\RegistryTest\\:\\:providerTestPostProcessExtension\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Theme/RegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$test_meta in empty\\(\\) always exists and is not falsy\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UnroutedUrlTest\\:\\:providerFromInvalidUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UnroutedUrlTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$expected_required_list_items might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/system/tests/src/Functional/Theme/ThemeUiTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UnroutedUrlTest\\:\\:providerFromUri\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UnroutedUrlTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\migrate\\\\source\\\\d7\\\\TermTranslation\\:\\:prepareRow\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\bad_3\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$inner_count might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\failed_22_update\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$inner_count might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\under_test_update_1\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\under_test_update_1234_failed\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\taxonomy\\\\TermForm\\:\\:validateForm\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/taxonomy/src/TermForm.php', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\under_test_update_20\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function Drupal\\\\Tests\\\\Core\\\\Update\\\\under_test_update_3000\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/taxonomy/src/VocabularyForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$violation_messages might not be defined\\.$#', + // identifier: includeOnce.fileNotFound + 'message' => '#^Path in include_once\\(\\) "vfs\\://drupal/sites/default/modules/module_a/module_a\\.post_update\\.php" is not a file or it does not exist\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/update/src/ProjectRelease.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$users might not be defined\\.$#', + // identifier: includeOnce.fileNotFound + 'message' => '#^Path in include_once\\(\\) "vfs\\://drupal/sites/default/modules/module_b/module_b\\.post_update\\.php" is not a file or it does not exist\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Controller/UserAuthenticationController.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$route_object might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:accessProvider\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$account in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerFromInvalidInternalUri\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$account in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerFromValidInternalUri\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$items in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerTestEntityUris\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\views\\\\field\\\\UserData\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerTestToUriStringForEntity\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/Plugin/views/field/UserData.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\user\\\\ProfileForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerTestToUriStringForInternal\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/ProfileForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\user\\\\RegisterForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 4, - 'path' => __DIR__ . '/modules/user/src/RegisterForm.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:providerTestToUriStringForRoute\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\user\\\\RoleForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\UrlTest\\:\\:testUrlFromRequest\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/src/RoleForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/UrlTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$name in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\CallableResolverTest\\:\\:callableResolverExceptionHandlingTestCases\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$pass in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\MockContainerInjection\\:\\:create\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserLoginHttpTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\Tests\\\\user\\\\Functional\\\\UserRegistrationRestTest\\:\\:getExpectedUnauthorizedEntityAccessCacheability\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\MockContainerInjection\\:\\:getResult\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/tests/src/Functional/UserRegistrationRestTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\NoInstantiationMockStaticCallable\\:\\:staticMethod\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Form\\\\ViewsFormMainForm\\:\\:getFormId\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\TokenTest\\:\\:providerTestReplaceEscaping\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/TokenTest.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$display in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\UnroutedUrlAssemblerTest\\:\\:providerTestAssembleWithExternalUrl\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/Derivative/ViewsBlock.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method \\$this\\(Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\)\\:\\:getFormula\\(\\)\\.$#', + // identifier: method.deprecated + 'message' => '#^Call to deprecated method getConfig\\(\\) of interface GuzzleHttp\\\\ClientInterface\\: +ClientInterface\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/DrupalTestBrowser.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\HandlerBase\\:\\:getTableJoin\\(\\) should return Drupal\\\\views\\\\Plugin\\\\views\\\\join\\\\JoinPluginBase but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\DrupalTestBrowser\\:\\:addPostFields\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/DrupalTestBrowser.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$group_types might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\DrupalTestBrowser\\:\\:addPostFiles\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/HandlerBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/DrupalTestBrowser.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\PerformanceData\\:\\:setScriptCount\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/Broken.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/PerformanceData.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\area\\\\HTTPStatusCode\\:\\:render\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:assert\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/area/HTTPStatusCode.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$validate_types might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:assertEscaped\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:assertNoEscaped\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/argument/Broken.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheGet\\(\\) should return bool but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:buttonNotExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\views\\\\Plugin\\\\views\\\\display\\\\DisplayPluginBase has an unused parameter \\$configuration\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:hiddenFieldNotExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$pager in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:hiddenFieldValueEquals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$style in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:hiddenFieldValueNotEquals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/DisplayPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$access_plugin in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkByHrefExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/display/PathPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$options might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkByHrefNotExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Boolean.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Broken.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$entity in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkExistsExact\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/BulkForm.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Date\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkNotExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Date.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$custom_format might not be defined\\.$#', - 'count' => 9, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Date.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:linkNotExistsExact\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\EntityField\\:\\:renderItems\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:optionNotExists\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$field_item_list in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:pageContainsNoDuplicateId\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/EntityField.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$options in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:pageTextContainsOnce\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$raw_items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\Tests\\\\WebAssert\\:\\:titleEquals\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', + 'path' => __DIR__ . '/tests/Drupal/Tests/WebAssert.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$style in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function drupal_phpunit_populate_class_loader\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/FieldPluginBase.php', + 'path' => __DIR__ . '/tests/bootstrap.php', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\Markup\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function test_stable_preprocess_theme_test_render_element\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/Markup.php', + 'path' => __DIR__ . '/tests/fixtures/test_stable/test_stable.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\field\\\\PrerenderList\\:\\:renderItems\\(\\) should return string but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function _claro_preprocess_file_and_image_widget\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/field/PrerenderList.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_element_info_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/Broken.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$groups might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_page_attachments_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/FilterPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$source might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_admin_block\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/InOperator.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$source might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_admin_block_content\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$source might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_block\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/StringFilter.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$left in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_block_content_add_list\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/join/JoinPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$join in empty\\(\\) always exists and is not falsy\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/query/Sql.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_datetime_wrapper\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_details\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/Broken.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$sort_field might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_entity_add_list\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$sort_table might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_field_multiple_value_form\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/relationship/GroupwiseMax.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$items might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_field_ui_table\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/sort/Broken.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$plugin in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_fieldset\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/style/StylePluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$created_column in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_fieldset__media_library_widget\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$default_field might not be defined\\.$#', - 'count' => 6, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_file_managed_file\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$sorts in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_file_widget_multiple\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$style_plugin in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_filter_tips\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$view in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_form_element\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/src/Plugin/views/wizard/WizardPluginBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$view in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_form_element__password\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$link might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_form_element__password_confirm\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$rand1 might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_image_widget\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$rand2 might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_input\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$rand3 might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/tests/src/Kernel/Plugin/StyleTest.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_install_page\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_item_list__media_library_add_form_media_list\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_links\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_links__action_links\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_links__dropbutton\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_links__media_library_menu\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$relationship_handler in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_maintenance_page\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/ConfigHandler.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: unset.offset - 'message' => '#^Cannot unset offset \'\\#title\' on array\\{\\#theme_wrappers\\: array\\{\'container\'\\}, \\#attributes\\: array\\{class\\: array\\{\'scroll\'\\}, data\\-drupal\\-views\\-scroll\\: true\\}\\}\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_media_library_item__small\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/Form/Ajax/Display.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views_ui\\\\ViewEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_media_library_item__widget\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$group_info might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views_ui/src/ViewEditForm.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_menu_local_action\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: empty.variable - 'message' => '#^Variable \\$display_plugin in empty\\(\\) always exists and is not falsy\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_menu_local_task\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/ViewFormBase.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:getTypedData\\(\\) should return Drupal\\\\Core\\\\TypedData\\\\ComplexDataInterface but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_menu_local_task__views_ui\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:set\\(\\) should return \\$this\\(Drupal\\\\views_ui\\\\ViewUI\\) but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_menu_local_tasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:setSyncing\\(\\) should return \\$this\\(Drupal\\\\views_ui\\\\ViewUI\\) but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_node_add_list\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$message in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_select\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_status_messages\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowEditForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_system_themes_page\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateAddForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowStateEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_table\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowStateEditForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_text_format_wrapper\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionAddForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workflows\\\\Form\\\\WorkflowTransitionEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_toolbar\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workspaces\\\\EntityTypeInfo\\:\\:entityBaseFieldInfo\\(\\) should return array\\<Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\> but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_views_exposed_form\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/EntityTypeInfo.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workspaces\\\\Form\\\\WorkspaceForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/modules/workspaces/src/Form/WorkspaceForm.php', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_views_ui_display_tab_bucket\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_views_view_fields__media_library\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/DeletedWorkspaceConstraintValidator.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$entity in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_preprocess_views_view_table\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraintValidator.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_system_module_invoked_library_info_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceAssociation.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspaceMerger\\:\\:checkConflictsOnTarget\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_system_module_invoked_theme_registry_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMerger.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$transaction in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_theme_registry_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/WorkspaceMerger.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: return.missing - 'message' => '#^Method Drupal\\\\workspaces\\\\WorkspacePublisher\\:\\:checkConflictsOnTarget\\(\\) should return array but return statement is missing\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_theme_suggestions_details_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/src/WorkspacePublisher.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$keyed_content might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_theme_suggestions_form_element_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$structured_content might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_theme_suggestions_maintenance_page_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$project_stabilities might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_views_pre_render\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$found might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Function claro_views_ui_display_tab_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php', + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$expected_driver might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Database/DriverSpecificKernelTestBase.php', + // identifier: missingType.return + 'message' => '#^Function claro_views_ui_display_top_alter\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/claro.theme', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$title might not be defined\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\claro\\\\ClaroPreRender\\:\\:managedFile\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/src/ClaroPreRender.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$previous_untranslatable_field_value in isset\\(\\) always exists and is not nullable\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\claro\\\\ClaroPreRender\\:\\:operations\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/claro/src/ClaroPreRender.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$e might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\claro\\\\ClaroPreRender\\:\\:textFormat\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', + 'path' => __DIR__ . '/themes/claro/src/ClaroPreRender.php', ]; $ignoreErrors[] = [ - // identifier: variable.undefined - 'message' => '#^Variable \\$new_field_schema_data might not be defined\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\claro\\\\ClaroPreRender\\:\\:verticalTabs\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php', + 'path' => __DIR__ . '/themes/claro/src/ClaroPreRender.php', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function twig_extension\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/KernelTests/KernelTestBase.php', + 'path' => __DIR__ . '/themes/engines/twig/twig.engine', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:assertTrue\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Function twig_render_template\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', + 'path' => __DIR__ . '/themes/engines/twig/twig.engine', ]; $ignoreErrors[] = [ - // identifier: method.notFound - 'message' => '#^Call to an undefined method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:fail\\(\\)\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_element_info_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getConfig\\(\\) of class GuzzleHttp\\\\Client\\: -Client\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_block\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/BrowserTestBase.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Symfony\\\\Component\\\\ExpressionLanguage\\\\Expression has an unused parameter \\$expression\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_checkboxes\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$charismatic\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_comment\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$delightful\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_field\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$demure\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_field__comment\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$electrostatic\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_field__node__created\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsConfigArrayKey has an unused parameter \\$config_name\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_field_multiple_value_form\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$configuration\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_fieldset\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$foo\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_filter_caption\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$plugin_definition\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_form_element\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$plugin_id\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_form_element_label\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsMany has an unused parameter \\$what_am_i_doing_here\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_html\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsPluginId has an unused parameter \\$plugin_id\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_input\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_item_list__search_results\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Component/Plugin/StubPluginManagerBaseWithMapper.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: staticMethod.void - 'message' => '#^Result of static method Drupal\\\\Composer\\\\Composer\\:\\:ensureComposerVersion\\(\\) \\(void\\) is used\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_links__comment\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Composer/ComposerTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_maintenance_page\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_menu\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityFormTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityStorageBaseTest.php', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_menu_local_task\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_menu_local_tasks\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_node\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_page_title\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: phpunit.mockMethod - 'message' => '#^Trying to mock an undefined method getRevisionId\\(\\) on class Drupal\\\\Tests\\\\Core\\\\Entity\\\\UrlTestEntity\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_radios\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: phpunit.mockMethod - 'message' => '#^Trying to mock an undefined method isDefaultRevision\\(\\) on class Drupal\\\\Tests\\\\Core\\\\Entity\\\\UrlTestEntity\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_search_result\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\TestCase\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_select\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getMockForAbstractClass\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\.$#', - 'count' => 3, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_table\\(\\) has no return type specified\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getConfig\\(\\) of class GuzzleHttp\\\\Client\\: -Client\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_text_format_wrapper\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_preprocess_textarea\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: class.notFound - 'message' => '#^Call to method getSortedDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_theme_suggestions_block_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_theme_suggestions_form_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Discovery\\\\TestContainerDerivativeDiscovery has an unused parameter \\$example_service\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_theme_suggestions_menu_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function olivero_theme_suggestions_user_alter\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php', + 'path' => __DIR__ . '/themes/olivero/olivero.theme', ]; $ignoreErrors[] = [ - // identifier: constructor.unusedParameter - 'message' => '#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginManager has an unused parameter \\$namespaces\\.$#', + // identifier: missingType.return + 'message' => '#^Method Drupal\\\\olivero\\\\OliveroPreRender\\:\\:textFormat\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/TestPluginManager.php', + 'path' => __DIR__ . '/themes/olivero/src/OliveroPreRender.php', ]; $ignoreErrors[] = [ - 'message' => '#^Missing cache backend declaration for performance\\.$#', + // identifier: missingType.return + 'message' => '#^Function stable9_preprocess_item_list__search_results\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Plugin/TestPluginManager.php', + 'path' => __DIR__ . '/themes/stable9/stable9.theme', ]; $ignoreErrors[] = [ - // identifier: isset.variable - 'message' => '#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#', + // identifier: missingType.return + 'message' => '#^Function stable9_preprocess_views_view\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php', + 'path' => __DIR__ . '/themes/stable9/stable9.theme', ]; $ignoreErrors[] = [ - // identifier: method.deprecated - 'message' => '#^Call to deprecated method getConfig\\(\\) of interface GuzzleHttp\\\\ClientInterface\\: -ClientInterface\\:\\:getConfig will be removed in guzzlehttp/guzzle\\:8\\.0\\.$#', + // identifier: missingType.return + 'message' => '#^Function starterkit_theme_preprocess_image_widget\\(\\) has no return type specified\\.$#', 'count' => 1, - 'path' => __DIR__ . '/tests/Drupal/Tests/DrupalTestBrowser.php', + 'path' => __DIR__ . '/themes/starterkit_theme/starterkit_theme.theme', ]; return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; diff --git a/core/MAINTAINERS.txt b/core/MAINTAINERS.txt index 9e145bb3cf3cd48c1828fc6cb389b09ce661454d..364299e0520f639fab3c00adf66f2fc1d14382ba 100644 --- a/core/MAINTAINERS.txt +++ b/core/MAINTAINERS.txt @@ -296,7 +296,6 @@ Menu UI Migrate - Benji Fisher 'benjifisher' https://www.drupal.org/u/benjifisher -- Adam Globus-Hoenich 'phenaproxima' https://www.drupal.org/u/phenaproxima - Lucas Hedding 'heddn' https://www.drupal.org/u/heddn - Michael Lutz 'mikelutz' https://www.drupal.org/u/mikelutz - Victoria Spagnolo 'quietone' https://www.drupal.org/u/quietone diff --git a/core/assets/scaffold/files/default.services.yml b/core/assets/scaffold/files/default.services.yml index ba416885b93d5b8ea284b23b69dfb01d4ac01771..1243d06008988bc493548e8f4396ba4bf513376f 100644 --- a/core/assets/scaffold/files/default.services.yml +++ b/core/assets/scaffold/files/default.services.yml @@ -51,23 +51,6 @@ parameters: # information. # @default no value cookie_samesite: Lax - # - # 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 # By default, Drupal generates a session cookie name based on the full # domain name. Set the name_suffix to a short random string to ensure this # session cookie name is unique on different installations on the same diff --git a/core/composer.json b/core/composer.json index 35eb5464ecd97b55f9bb70d42c114c996e8845cb..10613497278e91b86d656c16386ea067d1774daf 100644 --- a/core/composer.json +++ b/core/composer.json @@ -19,36 +19,38 @@ "ext-xml": "*", "ext-zlib": "*", "php": ">=8.3.0", - "symfony/console": "^7.1", - "symfony/dependency-injection": "^7.1", - "symfony/event-dispatcher": "^7.1", - "symfony/filesystem": "^7.1", - "symfony/finder": "^7.1", - "symfony/http-foundation": "^7.1", - "symfony/http-kernel": "^7.1", - "symfony/mailer": "^7.1", - "symfony/mime": "^7.1", - "symfony/routing": "^7.1", - "symfony/serializer": "^7.1", - "symfony/validator": "^7.1", - "symfony/process": "^7.1", + "symfony/console": "^7.2@beta", + "symfony/dependency-injection": "^7.2@beta", + "symfony/event-dispatcher": "^7.2@beta", + "symfony/filesystem": "^7.2@beta", + "symfony/finder": "^7.2@beta", + "symfony/http-foundation": "^7.2@beta", + "symfony/http-kernel": "^7.2@beta", + "symfony/mailer": "^7.2@beta", + "symfony/mime": "^7.2@beta", + "symfony/routing": "^7.2@beta", + "symfony/serializer": "^7.2@beta", + "symfony/validator": "^7.2@beta", + "symfony/process": "^7.2@beta", "symfony/polyfill-iconv": "^1.26", - "symfony/yaml": "^7.1", - "twig/twig": "^3.14.0", + "symfony/yaml": "^7.2@beta", + "revolt/event-loop": "^1.0", + "twig/twig": "^3.14.2", "doctrine/annotations": "^2.0", "doctrine/lexer": "^2.0", "guzzlehttp/guzzle": "^7.5", "guzzlehttp/psr7": "^2.4.5", "egulias/email-validator": "^3.2.1|^4.0", "masterminds/html5": "^2.7", - "symfony/psr-http-message-bridge": "^7.1", + "symfony/psr-http-message-bridge": "^7.2@beta", "composer-runtime-api": "^2.1", "composer/semver": "^3.3", "asm89/stack-cors": "^2.1", "pear/archive_tar": "^1.4.14", "psr/log": "^3.0", "mck89/peast": "^1.14", - "sebastian/diff": "^4|^5" + "sebastian/diff": "^4|^5", + "php-tuf/composer-stager": "^2-rc5" }, "conflict": { "drush/drush": "<12.4.3" diff --git a/core/core.api.php b/core/core.api.php index 20ae75cd126e7fba6310edb31547ec1585f1d9af..548dc409ffd2131265e77d39df453b11ba859e41 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -1596,7 +1596,7 @@ * Define functions that alter the behavior of Drupal core. * * One way for modules to alter the core behavior of Drupal (or another module) - * is to use hooks. Hooks are specially-named functions that a module defines + * is to use hooks. Hooks are functions or methods that a module defines * (this is known as "implementing the hook"), which are discovered and called * at specific times to alter or add to the base behavior or data (this is * known as "invoking the hook"). Each hook has a name (example: @@ -1605,15 +1605,73 @@ * modules that they interact with. Your modules can also define their own * hooks, in order to let other modules interact with them. * - * To implement a hook: - * - Locate the documentation for the hook. Hooks are documented in *.api.php - * files, by defining functions whose name starts with "hook_" (these - * files and their functions are never loaded by Drupal -- they exist solely - * for documentation). The function should have a documentation header, as - * well as a sample function body. For example, in the core file form.api.php, - * you can find hooks such as hook_batch_alter(). Also, if you are viewing - * this documentation on an API reference site, the Core hooks will be listed - * in this topic. + * @section implementing Implementing a hook + * + * There are two ways to implement a hook: + * - Class method, by adding an attribute to a class or a method. This is the + * preferred method. + * - Procedural, by defining a specially-named function. Some hooks can only be + * implemented as procedural. + * + * In both cases, first locate the documentation for the hook. Hooks are + * documented in *.api.php files, by defining functions whose name starts with + * "hook_" (these files and their functions are never loaded by Drupal -- they + * exist solely for documentation). The function should have a documentation + * header, as well as a sample function body. For example, in the core file + * form.api.php, you can find hooks such as hook_batch_alter(). Also, if you are + * viewing this documentation on an API reference site, the Core hooks will be + * listed in this topic. + * + * @subsection oo-hooks Class method hook implementation + * + * Class method hooks use the attribute \Drupal\Core\Hook\Attribute\Hook to + * declare a method as being the hook implementation. The first parameter to the + * attribute is the short hook name, that is, with the 'hook_' prefix removed. + * + * The Hook attribute can be used in any of the following ways: + * - On a method, use the attribute with the hook name: + * @code + * #[Hook('user_cancel')] + * public method userCancel(...) + * @endcode + * - On a class, specify the method name as well as the hook name: + * @code + * #[Hook('user_cancel', method: 'userCancel')] + * class Hooks { + * method userCancel(...) {} + * } + * @endcode + * - On a class with an __invoke method, which is taken to be the hook + * implementation: + * @code + * #[Hook('user_cancel')] + * class Hooks { + * method __invoke(...) {} + * } + * @endcode + * + * The following hooks can not be implemented as a class method, and must be + * implemented as procedural: + * + * Legacy meta hooks: + * - hook_hook_info() + * - hook_module_implements_alter() + * + * Install hooks: + * - hook_install() + * - hook_post_update_NAME() + * - hook_schema() + * - hook_uninstall() + * - hook_update_last_removed() + * - hook_update_N() + * + * Theme hooks: + * - hook_preprocess_HOOK() + * - hook_process_HOOK() + * + * @subsection procedural-hooks Procedural hook implementation + * + * Procedural implementation should use the following technique: * - Copy the function to your module's .module file. * - Change the name of the function, substituting your module's short name * (name of the module's directory, and .info.yml file without the extension) @@ -1624,6 +1682,8 @@ * - Edit the body of the function, substituting in what you need your module * to do. * + * @section defining Defining a hook + * * To define a hook: * - Choose a unique name for your hook. It should start with "hook_", followed * by your module's short name. @@ -1632,6 +1692,8 @@ * should contain (parameters, return value, and sample function body). * - Invoke the hook in your module's code. * + * @section invoking Invoking a hook + * * To invoke a hook, use methods on * \Drupal\Core\Extension\ModuleHandlerInterface such as alter(), invoke(), * and invokeAll(). You can obtain a module handler by calling @@ -1642,6 +1704,7 @@ * @see themeable * @see callbacks * @see \Drupal\Core\Extension\ModuleHandlerInterface + * @see \Drupal\Core\Hook\Attribute\Hook * @see \Drupal::moduleHandler() * * @} diff --git a/core/core.services.yml b/core/core.services.yml index 8b9d1119c30006e599b5b086aede0ce4f207c456..78f26e4ac51f57e58cb3c4c75625bad3226bf79b 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -15,8 +15,6 @@ parameters: gc_maxlifetime: 200000 cookie_lifetime: 2000000 cookie_samesite: Lax - sid_length: 48 - sid_bits_per_character: 6 name_suffix: '' twig.config: debug: false @@ -642,9 +640,7 @@ services: arguments: ['@container.namespaces', '@cache.discovery', '@module_handler'] module_handler: class: Drupal\Core\Extension\ModuleHandler - arguments: ['%app.root%', '%container.modules%', '@cache.bootstrap'] - tags: - - { name: needs_destruction } + arguments: ['%app.root%', '%container.modules%', '@event_dispatcher', '%hook_implementations_map%'] Drupal\Core\Extension\ModuleHandlerInterface: '@module_handler' module_installer: class: Drupal\Core\Extension\ModuleInstaller diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 881d695b4aeee7009cf360380a2c8de5cf12b1fd..3554cd4cc1e44ccfbb42c3bc4b41fa93aced8aac 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -441,7 +441,7 @@ function drupal_static_reset($name = NULL) { * * @param callable $callback * The shutdown function to register. - * @param ... + * @param ...$args * Additional arguments to pass to the shutdown function. * * @return array @@ -450,7 +450,7 @@ function drupal_static_reset($name = NULL) { * @see register_shutdown_function() * @ingroup php_wrappers */ -function &drupal_register_shutdown_function($callback = NULL) { +function &drupal_register_shutdown_function($callback = NULL, ...$args) { // We cannot use drupal_static() here because the static cache is reset during // batch processing, which breaks batch handling. static $callbacks = []; @@ -460,9 +460,6 @@ function &drupal_register_shutdown_function($callback = NULL) { if (empty($callbacks)) { register_shutdown_function('_drupal_shutdown_function'); } - $args = func_get_args(); - // Remove $callback from the arguments. - unset($args[0]); // Save callback and arguments $callbacks[] = ['callback' => $callback, 'arguments' => $args]; } diff --git a/core/includes/common.inc b/core/includes/common.inc index fcd9df954beb4ccbace93e66febbdaf412d029ed..0e6af7f9bbe04ae0bbab3ebef1b8f4b353ef64f9 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -439,6 +439,9 @@ function drupal_flush_all_caches($kernel = NULL) { // Rebuild module data that is stored in state. \Drupal::service('extension.list.module')->reset(); + // Reload modules. + \Drupal::moduleHandler()->reload(); + // Rebuild all information based on new module data. \Drupal::moduleHandler()->invokeAll('rebuild'); diff --git a/core/includes/theme.inc b/core/includes/theme.inc index a79870057c34aac3ae613b870b5bd87263db22c8..9fb42d56c0148dc3feaddf59f1ac2855340c3ad9 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -103,10 +103,10 @@ function drupal_find_theme_templates($cache, $extension, $path) { $theme_paths[$theme_info->base_theme][$theme_info->getName()] = $theme_info->getPath(); } } - foreach ($theme_paths as $basetheme => $subthemes) { + foreach ($theme_paths as $base_theme => $subthemes) { foreach ($subthemes as $subtheme => $subtheme_path) { if (isset($theme_paths[$subtheme])) { - $theme_paths[$basetheme] = array_merge($theme_paths[$basetheme], $theme_paths[$subtheme]); + $theme_paths[$base_theme] = array_merge($theme_paths[$base_theme], $theme_paths[$subtheme]); } } } @@ -385,26 +385,6 @@ function template_preprocess_datetime_form(&$variables) { $variables['content'] = $element; - // Add instructional text describing the required date and time formats. - // This will be hidden on JavaScript-enabled browsers that have a native - // datepicker. - if (!empty($element['#date_date_format'])) { - $placeholder_date = 'YYYY-MM-DD'; - $variables['attributes']['data-drupal-field-elements'] = 'date' . ($element['#date_time_element'] === 'none' ? '' : '-time'); - $date_format = is_array($element['#date_date_format']) ? $element['#date_date_format'][0] : date($element['#date_date_format']); - $variables['content']['date']['#attributes']['placeholder'] = $placeholder_date; - $help_date = t('Enter the date using the format @placeholder_date (e.g., @date_format).', ['@date_format' => $date_format, '@placeholder_date' => $placeholder_date]); - $variables['content']['date']['#attributes']['data-help'] = $help_date; - - // Include time formatting instructions when a time input is present. - if (!empty($element['#date_time_format'])) { - $placeholder_time = 'hh:mm:ss'; - $time_format = is_array($element['#date_time_format']) ? $element['#date_time_format'][0] : date($element['#date_time_format']); - $variables['content']['time']['#attributes']['placeholder'] = $placeholder_time; - $help_time = t('Enter the time using the format @placeholder_time (e.g., @time_format).', ['@time_format' => $time_format, '@placeholder_time' => $placeholder_time]); - $variables['content']['time']['#attributes']['data-help'] = $help_time; - } - } } /** diff --git a/core/includes/update.inc b/core/includes/update.inc index e65da109dd6ed29eea34a9d09389e99f78d5caab..1adf0b5ff2aacbfda6a67642f7572e0f1c0bf620 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -101,7 +101,8 @@ function _update_fix_missing_schema() { // If the module implements hook_update_last_removed() use the // value of that if it's higher than the schema versions found so // far. - if ($last_removed = $module_handler->invoke($module, 'update_last_removed')) { + $function = $module . '_update_last_removed'; + if (function_exists($function) && ($last_removed = $function())) { $last_update = max($last_update, $last_removed); } $update_registry->setInstalledVersion($module, $last_update); diff --git a/core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php b/core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php index ce1aa0c083e115c65e21ba8335423640fc110291..16600936f33d1fa9ff03d0248ff092ee4aeedc89 100644 --- a/core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php +++ b/core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php @@ -139,6 +139,13 @@ class StaticReflectionParser */ protected array $classAttributes = []; + /** + * Method attributes + * + * @var string[][] + */ + protected array $methodAttributes = []; + /** * Parses a class residing in a PSR-0 hierarchy. * @@ -205,10 +212,11 @@ protected function parse() break; case T_CLASS: // Convert the attributes to fully qualified names. - $this->classAttributes = array_map(fn($name) => $this->fullySpecifyName($name), $attributeNames); + $this->classAttributes = array_map([$this, 'fullySpecifyName'], $attributeNames); if ($last_token !== T_PAAMAYIM_NEKUDOTAYIM && $last_token !== T_NEW) { $this->docComment['class'] = $docComment; $docComment = ''; + $attributeNames = []; } break; case T_VAR: @@ -219,6 +227,7 @@ protected function parse() if ($token[0] === T_VARIABLE) { $propertyName = substr($token[1], 1); $this->docComment['property'][$propertyName] = $docComment; + $attributeNames = []; continue 2; } if ($token[0] !== T_FUNCTION) { @@ -239,6 +248,8 @@ protected function parse() $methodName = $token[1]; $this->docComment['method'][$methodName] = $docComment; $docComment = ''; + $this->methodAttributes[$methodName] = array_map([$this, 'fullySpecifyName'], $attributeNames); + $attributeNames = []; break; case T_EXTENDS: $this->parentClassName = $this->fullySpecifyName($tokenParser->parseClass()); @@ -314,6 +325,12 @@ public function getDocComment($type = 'class', $name = '') return $name ? $this->docComment[$type][$name] : $this->docComment[$type]; } + public function getMethodAttributes(): array { + $this->parse(); + + return $this->methodAttributes; + } + /** * Gets the PSR-0 parser for the declaring class. * @@ -346,8 +363,13 @@ public function getStaticReflectionParserForDeclaringClass($type, $name) public function hasClassAttribute(string $attribute): bool { $this->parse(); - foreach ($this->classAttributes as $classAttribute) { - if (is_a($classAttribute, $attribute, TRUE)) { + return static::hasAttribute($this->classAttributes, $attribute); + } + + public static function hasAttribute(array $existingAttributes, string $attributeLookingFor): bool + { + foreach ($existingAttributes as $existingAttribute) { + if (is_a($existingAttribute, $attributeLookingFor, TRUE)) { return TRUE; } } diff --git a/core/lib/Drupal/Component/Assertion/Inspector.php b/core/lib/Drupal/Component/Assertion/Inspector.php index 25402077dabd9324bb14fd40490554e3046cfe32..945272f9de78da70e88f5cfd08acca79063ded45 100644 --- a/core/lib/Drupal/Component/Assertion/Inspector.php +++ b/core/lib/Drupal/Component/Assertion/Inspector.php @@ -184,7 +184,7 @@ public static function assertAllStrictArrays($traversable) { * * @param mixed $traversable * Variable to be examined. - * @param string ... + * @param ...$keys * Keys to be searched for. * * @return bool @@ -370,7 +370,7 @@ public static function assertAllRegularExpressionMatch($pattern, $traversable) { * * @param mixed $traversable * Variable to be examined. - * @param string ... + * @param ...$classes * Classes and interfaces to test objects against. * * @return bool diff --git a/core/lib/Drupal/Component/DependencyInjection/composer.json b/core/lib/Drupal/Component/DependencyInjection/composer.json index bc9edd4e8a2c401f357469f2687c943d116049ec..4dfe0f4b652230da5f7a6728123e481601f81595 100644 --- a/core/lib/Drupal/Component/DependencyInjection/composer.json +++ b/core/lib/Drupal/Component/DependencyInjection/composer.json @@ -14,7 +14,7 @@ }, "require": { "php": ">=8.3.0", - "symfony/dependency-injection": "^7.1", + "symfony/dependency-injection": "^7.2@beta", "symfony/service-contracts": "v3.5.0" }, "suggest": { diff --git a/core/lib/Drupal/Component/EventDispatcher/composer.json b/core/lib/Drupal/Component/EventDispatcher/composer.json index a4a011470b50342ee5d481ab17b12aed831f7d8a..6f9c7217d5367f0915639a487300ce07796764bf 100644 --- a/core/lib/Drupal/Component/EventDispatcher/composer.json +++ b/core/lib/Drupal/Component/EventDispatcher/composer.json @@ -8,8 +8,8 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.3.0", - "symfony/dependency-injection": "^7.1", - "symfony/event-dispatcher": "^7.1", + "symfony/dependency-injection": "^7.2@beta", + "symfony/event-dispatcher": "^7.2@beta", "symfony/event-dispatcher-contracts": "v3.5.0" }, "autoload": { diff --git a/core/lib/Drupal/Component/Gettext/PoStreamInterface.php b/core/lib/Drupal/Component/Gettext/PoStreamInterface.php index 59992991294713a0651e4147e31e1b08a7e5dbb7..0e2ac8b5a7c54821ac85c0b50825b8bcfdc497d8 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamInterface.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamInterface.php @@ -31,7 +31,7 @@ public function getURI(); /** * Set the URI of the PO stream that is going to be read or written. * - * @param $uri + * @param string $uri * URI string to set for this stream. */ public function setURI($uri); diff --git a/core/lib/Drupal/Component/Gettext/PoStreamReader.php b/core/lib/Drupal/Component/Gettext/PoStreamReader.php index 0644b25e8647a26de850685ece67b7003c2b1b3a..46a18498aee6680159d432a16871b80d89f877e5 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php @@ -541,7 +541,7 @@ public function setItemFromArray($value) { /** * Parses a string in quotes. * - * @param $string + * @param string $string * A string specified with enclosing quotes. * * @return bool|string @@ -572,7 +572,7 @@ public function parseQuoted($string) { /** * Generates a short, one-string version of the passed comment array. * - * @param $comment + * @param string[] $comment * An array of strings containing a comment. * * @return string diff --git a/core/lib/Drupal/Component/Gettext/PoWriterInterface.php b/core/lib/Drupal/Component/Gettext/PoWriterInterface.php index f81d567adfedf1e1d466f31fdb1c18326ccf4518..fac4ee8216377b85709f5733b7fc7235bbd0d844 100644 --- a/core/lib/Drupal/Component/Gettext/PoWriterInterface.php +++ b/core/lib/Drupal/Component/Gettext/PoWriterInterface.php @@ -20,7 +20,7 @@ public function writeItem(PoItem $item); * * @param PoReaderInterface $reader * Reader to read PoItems from. - * @param $count + * @param int $count * Amount of items to read from $reader to write. If -1, all items are * read from $reader. */ diff --git a/core/lib/Drupal/Component/Graph/Graph.php b/core/lib/Drupal/Component/Graph/Graph.php index 6fe9cf21b0045461cbc0d095be6d49493d9e4ce6..1242decf647a6de2e0a405a63d5f131a857f7d31 100644 --- a/core/lib/Drupal/Component/Graph/Graph.php +++ b/core/lib/Drupal/Component/Graph/Graph.php @@ -15,7 +15,7 @@ class Graph { /** * Instantiates the depth first search object. * - * @param $graph + * @param array $graph * A three dimensional associated array, with the first keys being the names * of the vertices, these can be strings or numbers. The second key is * 'edges' and the third one are again vertices, each such key representing @@ -87,13 +87,13 @@ public function searchAndSort() { /** * Performs a depth-first search on a graph. * - * @param $state + * @param array $state * An associative array. The key 'last_visit_order' stores a list of the * vertices visited. The key components stores list of vertices belonging * to the same the component. - * @param $start + * @param string|int $start * An arbitrary vertex where we started traversing the graph. - * @param $component + * @param string|int|null $component * The component of the last vertex. * * @see \Drupal\Component\Graph\Graph::searchAndSort() diff --git a/core/lib/Drupal/Component/HttpFoundation/composer.json b/core/lib/Drupal/Component/HttpFoundation/composer.json index 20e011f744f3357d876c600b04fee04bbfa0bb8a..8c694b5f103e481e0bfe0be93c0b1dd6fe7a52c3 100644 --- a/core/lib/Drupal/Component/HttpFoundation/composer.json +++ b/core/lib/Drupal/Component/HttpFoundation/composer.json @@ -8,7 +8,7 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.3.0", - "symfony/http-foundation": "^7.1" + "symfony/http-foundation": "^7.2@beta" }, "autoload": { "psr-4": { diff --git a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php index ca74d602fba3ac23c9178ff818e6ce07507669ec..7c0e45dd19d9993653fde56bf9aa76f5989cd2fa 100644 --- a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php @@ -17,7 +17,7 @@ class FileReadOnlyStorage implements PhpStorageInterface { /** * Constructs this FileStorage object. * - * @param $configuration + * @param string[] $configuration * An associative array, containing at least two keys (the rest are ignored): * - directory: The directory where the files should be stored. * - bin: The storage bin. Multiple storage objects can be instantiated with diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php index 1db14568a433c7fc2eae1d7f0d1f95f757287cb4..c304e7736cef1c3cff62c48b48c10f44b45150a0 100644 --- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php @@ -217,9 +217,9 @@ protected function getUncachedMTime($directory) { /** * A brute force tempnam implementation supporting streams. * - * @param $directory + * @param string $directory * The directory where the temporary filename will be created. - * @param $prefix + * @param string $prefix * The prefix of the generated temporary filename. * * @return string diff --git a/core/lib/Drupal/Component/Plugin/Factory/ReflectionFactory.php b/core/lib/Drupal/Component/Plugin/Factory/ReflectionFactory.php index 37e3519983cf1ed9fd18b2ef022db521b8fd724a..4ce80eeaa21d2a6b134eaf402f1e3300d581b69f 100644 --- a/core/lib/Drupal/Component/Plugin/Factory/ReflectionFactory.php +++ b/core/lib/Drupal/Component/Plugin/Factory/ReflectionFactory.php @@ -42,7 +42,7 @@ public function createInstance($plugin_id, array $configuration = []) { * @param string $plugin_id * The identifier of the plugin implementation. * @param mixed $plugin_definition - * The definition associated with the plugin_id. + * The definition associated with the plugin ID. * @param array $configuration * An array of configuration that may be passed to the instance. * diff --git a/core/lib/Drupal/Component/Plugin/PluginBase.php b/core/lib/Drupal/Component/Plugin/PluginBase.php index add0b7a27c010d3e44f6a8934e2eb0b71a6d660b..93c7b7b8cdb6c54ba6906f730ea358351097df01 100644 --- a/core/lib/Drupal/Component/Plugin/PluginBase.php +++ b/core/lib/Drupal/Component/Plugin/PluginBase.php @@ -13,7 +13,7 @@ abstract class PluginBase implements PluginInspectionInterface, DerivativeInspec const DERIVATIVE_SEPARATOR = ':'; /** - * The plugin_id. + * The plugin ID. * * @var string */ @@ -46,7 +46,7 @@ abstract class PluginBase implements PluginInspectionInterface, DerivativeInspec * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php b/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php index 9924c2b09782535a9de300944ced126faeb2301a..555e9daa4b8659f5c81d9e77c9f7c179b851e79f 100644 --- a/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php +++ b/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php @@ -13,10 +13,10 @@ interface PluginInspectionInterface { /** - * Gets the plugin_id of the plugin instance. + * Gets the plugin ID of the plugin instance. * * @return string - * The plugin_id of the plugin instance. + * The plugin ID of the plugin instance. */ public function getPluginId(); diff --git a/core/lib/Drupal/Component/Plugin/composer.json b/core/lib/Drupal/Component/Plugin/composer.json index 56c34c6f1f1947c4e012c24ed74021818a0ee51b..6aabee9f7f54a3e1646f0c2433db71988c1574b9 100644 --- a/core/lib/Drupal/Component/Plugin/composer.json +++ b/core/lib/Drupal/Component/Plugin/composer.json @@ -10,7 +10,7 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.3.0", - "symfony/validator": "^7.1" + "symfony/validator": "^7.2@beta" }, "autoload": { "psr-4": { diff --git a/core/lib/Drupal/Component/Render/HtmlEscapedText.php b/core/lib/Drupal/Component/Render/HtmlEscapedText.php index 6ca9538089e62d688429fb52ac618a2878e0a0a7..be27ba85a3edab0a9cbbfda814f303a57444e32c 100644 --- a/core/lib/Drupal/Component/Render/HtmlEscapedText.php +++ b/core/lib/Drupal/Component/Render/HtmlEscapedText.php @@ -24,7 +24,7 @@ class HtmlEscapedText implements MarkupInterface, \Countable { /** * Constructs an HtmlEscapedText object. * - * @param $string + * @param string $string * The string to escape. This value will be cast to a string. */ public function __construct($string) { diff --git a/core/lib/Drupal/Component/Serialization/composer.json b/core/lib/Drupal/Component/Serialization/composer.json index f5e45290297dd2b04eee84ddb252302a7474f91b..f5cd0469b713d35048d01a60f0f5976925da1de1 100644 --- a/core/lib/Drupal/Component/Serialization/composer.json +++ b/core/lib/Drupal/Component/Serialization/composer.json @@ -8,7 +8,7 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.3.0", - "symfony/yaml": "^7.1" + "symfony/yaml": "^7.2@beta" }, "autoload": { "psr-4": { diff --git a/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php b/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php index 3bce69b4c4b8362dbafc63a97de6a05da82521b5..ab111e1872e58c196e2f850a0d3e1a2b825bcd56 100644 --- a/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php +++ b/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php @@ -246,7 +246,7 @@ protected function replace($code, $langcode, $unknown_character) { /** * Look up the generic replacement for a UTF-8 character code. * - * @param $code + * @param int $code * The UTF-8 character code. * @param string $unknown_character * (optional) The character to substitute for characters without entries in @@ -277,7 +277,7 @@ protected function lookupReplacement($code, $unknown_character = '?') { * transliterations in this language. The character codes can be for any valid * Unicode character, independent of the number of bytes. * - * @param $langcode + * @param string $langcode * Code for the language to read. */ protected function readLanguageOverrides($langcode) { @@ -304,7 +304,7 @@ protected function readLanguageOverrides($langcode) { * transliterations of these characters into US-ASCII. Note that the maximum * Unicode character that can be encoded in this way is 4 bytes. * - * @param $bank + * @param int $bank * First two bytes of the Unicode character, or 0 for the ASCII range. */ protected function readGenericData($bank) { diff --git a/core/lib/Drupal/Component/Utility/Color.php b/core/lib/Drupal/Component/Utility/Color.php index 49d0aa2560332946b26be9a69e2c1102f4a6da81..fa06da8f7c843e9d213693108f92b405861f0abd 100644 --- a/core/lib/Drupal/Component/Utility/Color.php +++ b/core/lib/Drupal/Component/Utility/Color.php @@ -10,7 +10,7 @@ class Color { /** * Validates whether a hexadecimal color value is syntactically correct. * - * @param $hex + * @param string $hex * The hexadecimal string to validate. May contain a leading '#'. May use * the shorthand notation (e.g., '123' for '112233'). * diff --git a/core/lib/Drupal/Component/Utility/Crypt.php b/core/lib/Drupal/Component/Utility/Crypt.php index f76cd8b8ca3eb59c9d180da9b7f3d1a10193847b..42fde05cd75953e179fb9229fa5c79422dc3ca77 100644 --- a/core/lib/Drupal/Component/Utility/Crypt.php +++ b/core/lib/Drupal/Component/Utility/Crypt.php @@ -54,7 +54,7 @@ public static function hashBase64($data) { /** * Returns a URL-safe, base64 encoded string of highly randomized bytes. * - * @param $count + * @param int $count * The number of random bytes to fetch and base64 encode. * * @return string diff --git a/core/lib/Drupal/Component/Utility/DeprecatedArray.php b/core/lib/Drupal/Component/Utility/DeprecatedArray.php index 6f93c7c68d08eba42d092445dfb6088eb9d226d6..6d7ef5d484c340d4f51ada5c14b50932cc4b9e77 100644 --- a/core/lib/Drupal/Component/Utility/DeprecatedArray.php +++ b/core/lib/Drupal/Component/Utility/DeprecatedArray.php @@ -19,7 +19,7 @@ class DeprecatedArray extends \ArrayObject { * * @param array $values * The array values. - * @param $message + * @param string $message * The deprecation message. */ public function __construct(array $values, $message) { diff --git a/core/lib/Drupal/Component/Utility/Environment.php b/core/lib/Drupal/Component/Utility/Environment.php index 6028183c6f45e6ba559c38524127e1947bd967ae..5fd7441c79c1cb03c4310dabf68bef767a1ba941 100644 --- a/core/lib/Drupal/Component/Utility/Environment.php +++ b/core/lib/Drupal/Component/Utility/Environment.php @@ -14,7 +14,7 @@ class Environment { * The memory required for the operation, expressed as a number of bytes with * optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8bytes, * 9mbytes). - * @param $memory_limit + * @param string|null $memory_limit * (optional) The memory limit for the operation, expressed as a number of * bytes with optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, * 6GiB, 8bytes, 9mbytes). If no value is passed, the current PHP diff --git a/core/lib/Drupal/Component/Utility/FilterArray.php b/core/lib/Drupal/Component/Utility/FilterArray.php new file mode 100644 index 0000000000000000000000000000000000000000..172348df11638edc41479ee6edf787f5b32e6bc3 --- /dev/null +++ b/core/lib/Drupal/Component/Utility/FilterArray.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Component\Utility; + +/** + * Provides methods to filter arrays. + * + * @ingroup utility + */ +class FilterArray { + + /** + * Removes empty strings from an array. + * + * This method removes all empty strings from the input array. This is + * particularly useful to preserve 0 whilst filtering other falsy values. The + * values are first cast to a string before comparison. + * + * @param array $value + * The array to filter. + * + * @return array + * The filtered array. + */ + public static function removeEmptyStrings(array $value): array { + return array_filter($value, static fn ($item) => (string) $item !== ''); + } + +} diff --git a/core/lib/Drupal/Component/Utility/Image.php b/core/lib/Drupal/Component/Utility/Image.php index f1368c1b8390f99ff1fcf1e699b8d857b4c3c9eb..d955644b5c99a83b2eb2668a53ac26947beb7059 100644 --- a/core/lib/Drupal/Component/Utility/Image.php +++ b/core/lib/Drupal/Component/Utility/Image.php @@ -56,4 +56,29 @@ public static function scaleDimensions(array &$dimensions, $width = NULL, $heigh return TRUE; } + /** + * Returns the offset in pixels from the anchor. + * + * @param string $anchor + * The anchor ('top', 'left', 'bottom', 'right', 'center'). + * @param int $current_size + * The current size, in pixels. + * @param int $new_size + * The new size, in pixels. + * + * @return int + * The offset from the anchor, in pixels. + * + * @throws \InvalidArgumentException + * When the $anchor argument is not valid. + */ + public static function getKeywordOffset(string $anchor, int $current_size, int $new_size): int { + return match ($anchor) { + 'bottom', 'right' => $current_size - $new_size, + 'center' => (int) round($current_size / 2 - $new_size / 2), + 'top', 'left' => 0, + default => throw new \InvalidArgumentException("Invalid anchor '{$anchor}' provided to getKeywordOffset()"), + }; + } + } diff --git a/core/lib/Drupal/Component/Utility/NestedArray.php b/core/lib/Drupal/Component/Utility/NestedArray.php index ba74210b7aafb08c528ef2eebb1970c0e42ddda5..80f3822cf42b9319ae869f26f51f7604a5beed1b 100644 --- a/core/lib/Drupal/Component/Utility/NestedArray.php +++ b/core/lib/Drupal/Component/Utility/NestedArray.php @@ -286,7 +286,7 @@ public static function keyExists(array $array, array $parents) { * $correct = NestedArray::mergeDeep($link_options_1, $link_options_2); * @endcode * - * @param array ... + * @param array ...$arrays * Arrays to merge. * * @return array @@ -294,8 +294,8 @@ public static function keyExists(array $array, array $parents) { * * @see NestedArray::mergeDeepArray() */ - public static function mergeDeep() { - return self::mergeDeepArray(func_get_args()); + public static function mergeDeep(...$arrays) { + return self::mergeDeepArray($arrays); } /** diff --git a/core/lib/Drupal/Component/Utility/Timer.php b/core/lib/Drupal/Component/Utility/Timer.php index b086bfbcd34b37862588bf7e78079d4b9547e3f7..19c83922e4cb5b958afb6a65aaba69e58a0fd3ab 100644 --- a/core/lib/Drupal/Component/Utility/Timer.php +++ b/core/lib/Drupal/Component/Utility/Timer.php @@ -17,7 +17,7 @@ class Timer { * If you start and stop the same timer multiple times, the measured intervals * will be accumulated. * - * @param $name + * @param string $name * The name of the timer. */ public static function start($name) { diff --git a/core/lib/Drupal/Component/Utility/Variable.php b/core/lib/Drupal/Component/Utility/Variable.php index 338746e591ea34a6e4dcad72660a5e321851dda8..3837dae3f8c71c78bb9c58e45f368418c5948344 100644 --- a/core/lib/Drupal/Component/Utility/Variable.php +++ b/core/lib/Drupal/Component/Utility/Variable.php @@ -50,16 +50,16 @@ public static function callableToString($callable): string { public static function export($var, $prefix = '') { if (is_array($var)) { if (empty($var)) { - $output = 'array()'; + $output = '[]'; } else { - $output = "array(\n"; + $output = "[\n"; // Don't export keys if the array is non associative. $export_keys = array_values($var) != $var; foreach ($var as $key => $value) { $output .= ' ' . ($export_keys ? static::export($key) . ' => ' : '') . static::export($value, ' ') . ",\n"; } - $output .= ')'; + $output .= ']'; } } elseif (is_bool($var)) { @@ -85,6 +85,8 @@ public static function export($var, $prefix = '') { $output = '(object) ' . static::export((array) $var, $prefix); } else { + // @todo var_export() does not use long array syntax. Fix in + // https://www.drupal.org/project/drupal/issues/3476894 $output = var_export($var, TRUE); } diff --git a/core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php b/core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php index 9b1aba2439e1ecd2a96598a67dffc23ee995f342..eb7f2312e5f8b5fcade3b718c624acd15b602ab0 100644 --- a/core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php +++ b/core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php @@ -51,7 +51,7 @@ class MessageAction extends ConfigurableActionBase implements ContainerFactoryPl * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Utility\Token $token diff --git a/core/lib/Drupal/Core/Asset/CssOptimizer.php b/core/lib/Drupal/Core/Asset/CssOptimizer.php index f075666a8d1975c2c2be89e23514521f67ade815..8f2d910250cd23c4e1d0fdf886f152b87740214a 100644 --- a/core/lib/Drupal/Core/Asset/CssOptimizer.php +++ b/core/lib/Drupal/Core/Asset/CssOptimizer.php @@ -113,17 +113,17 @@ protected function processFile($css_asset) { * Name of the stylesheet to be processed. * @param $optimize * Defines if CSS contents should be compressed or not. - * @param $reset_basepath + * @param $reset_base_path * Used internally to facilitate recursive resolution of @import commands. * * @return string * Contents of the stylesheet, including any resolved @import commands. */ - public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) { + public function loadFile($file, $optimize = NULL, $reset_base_path = TRUE) { // These statics are not cache variables, so we don't use drupal_static(). - static $_optimize, $basepath; - if ($reset_basepath) { - $basepath = ''; + static $_optimize, $base_path; + if ($reset_base_path) { + $base_path = ''; } // Store the value of $optimize for preg_replace_callback with nested // @import loops. @@ -133,13 +133,13 @@ public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) { // Stylesheets are relative one to each other. Start by adding a base path // prefix provided by the parent stylesheet (if necessary). - if ($basepath && !StreamWrapperManager::getScheme($file)) { - $file = $basepath . '/' . $file; + if ($base_path && !StreamWrapperManager::getScheme($file)) { + $file = $base_path . '/' . $file; } // Store the parent base path to restore it later. - $parent_base_path = $basepath; + $parent_base_path = $base_path; // Set the current base path to process possible child imports. - $basepath = dirname($file); + $base_path = dirname($file); // Load the CSS stylesheet. We suppress errors because themes may specify // stylesheets in their .info.yml file that don't exist in the theme's path, @@ -164,7 +164,7 @@ public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) { } // Restore the parent base path as the file and its children are processed. - $basepath = $parent_base_path; + $base_path = $parent_base_path; return $content; } diff --git a/core/lib/Drupal/Core/Cache/Cache.php b/core/lib/Drupal/Core/Cache/Cache.php index 693e2cd918985190d50efbc8dd4ab20fa1cd97ff..bd0b45083575ddc74f70d480de1db7b16a852b32 100644 --- a/core/lib/Drupal/Core/Cache/Cache.php +++ b/core/lib/Drupal/Core/Cache/Cache.php @@ -19,7 +19,7 @@ class Cache { /** * Merges lists of cache contexts and removes duplicates. * - * @param list<string> ... + * @param list<string> ...$cache_contexts * Cache contexts to merge. * * @return list<string> @@ -42,7 +42,7 @@ public static function mergeContexts(array ...$cache_contexts) { * allows items to be invalidated based on all tags attached to the content * they're constituted from. * - * @param list<string> ... + * @param list<string> ...$cache_tags * Cache tags to merge. * * @return list<string> @@ -59,7 +59,7 @@ public static function mergeTags(array ...$cache_tags) { * * Ensures infinite max-age (Cache::PERMANENT) is taken into account. * - * @param int ... + * @param int ...$max_ages * Max age values to merge. * * @return int diff --git a/core/lib/Drupal/Core/Command/InstallCommand.php b/core/lib/Drupal/Core/Command/InstallCommand.php index a622a3b09677ce7b5027d096a2476e0f8025a8f9..d92f46c364bfea2b3cac2e86f21936b49796f8a4 100644 --- a/core/lib/Drupal/Core/Command/InstallCommand.php +++ b/core/lib/Drupal/Core/Command/InstallCommand.php @@ -50,6 +50,7 @@ protected function configure() { ->setDescription('Installs a Drupal demo site. This is not meant for production and might be too simple for custom development. It is a quick and easy way to get Drupal running.') ->addArgument('install-profile-or-recipe', InputArgument::OPTIONAL, 'Install profile or recipe directory from which to install the site.') ->addOption('langcode', NULL, InputOption::VALUE_OPTIONAL, 'The language to install the site in.', 'en') + ->addOption('password', NULL, InputOption::VALUE_OPTIONAL, 'The password to use for the site. Defaults to random password.') ->addOption('site-name', NULL, InputOption::VALUE_OPTIONAL, 'Set the site name.', 'Drupal') ->addUsage('demo_umami --langcode fr') ->addUsage('standard --site-name QuickInstall') @@ -115,7 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 1; } - return $this->install($this->classLoader, $io, $install_profile ?? '', $input->getOption('langcode'), $this->getSitePath(), $input->getOption('site-name'), $recipe ?? ''); + return $this->install($this->classLoader, $io, $install_profile ?? '', $input->getOption('langcode'), $this->getSitePath(), $input->getOption('site-name'), $recipe ?? '', $input->getOption('password')); } /** @@ -154,6 +155,8 @@ protected function isDrupalInstalled() { * The site name. * @param string $recipe * The recipe to use for installing. + * @param string|null $password + * The password to use for installing. * * @throws \Exception * Thrown when failing to create the $site_path directory or settings.php. @@ -161,9 +164,9 @@ protected function isDrupalInstalled() { * @return int * The command exit status. */ - protected function install($class_loader, SymfonyStyle $io, $profile, $langcode, $site_path, $site_name, string $recipe) { + protected function install($class_loader, SymfonyStyle $io, $profile, $langcode, $site_path, $site_name, string $recipe, ?string $password = NULL) { $sqliteDriverNamespace = 'Drupal\\sqlite\\Driver\\Database\\sqlite'; - $password = Crypt::randomBytesBase64(12); + $password ??= Crypt::randomBytesBase64(12); $parameters = [ 'interactive' => FALSE, 'site_path' => $site_path, diff --git a/core/lib/Drupal/Core/Command/QuickStartCommand.php b/core/lib/Drupal/Core/Command/QuickStartCommand.php index 6f16ccb9101256b53882c790778661b15b177404..160d63ebc848a8b3ca89cd9a467be47537fd7b45 100644 --- a/core/lib/Drupal/Core/Command/QuickStartCommand.php +++ b/core/lib/Drupal/Core/Command/QuickStartCommand.php @@ -30,6 +30,7 @@ protected function configure() { ->setDescription('Installs a Drupal site and runs a web server. This is not meant for production and might be too simple for custom development. It is a quick and easy way to get Drupal running.') ->addArgument('install-profile-or-recipe', InputArgument::OPTIONAL, 'Install profile or recipe directory from which to install the site.') ->addOption('langcode', NULL, InputOption::VALUE_OPTIONAL, 'The language to install the site in. Defaults to en.', 'en') + ->addOption('password', NULL, InputOption::VALUE_OPTIONAL, 'Set the administrator password. Defaults to a randomly generated password.') ->addOption('site-name', NULL, InputOption::VALUE_OPTIONAL, 'Set the site name. Defaults to Drupal.', 'Drupal') ->addOption('host', NULL, InputOption::VALUE_OPTIONAL, 'Provide a host for the server to run on. Defaults to 127.0.0.1.', '127.0.0.1') ->addOption('port', NULL, InputOption::VALUE_OPTIONAL, 'Provide a port for the server to run on. Will be determined automatically if none supplied.') @@ -52,6 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'command' => 'install', 'install-profile-or-recipe' => $input->getArgument('install-profile-or-recipe'), '--langcode' => $input->getOption('langcode'), + '--password' => $input->getOption('password'), '--site-name' => $input->getOption('site-name'), ]; diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/CreateForEachBundle.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/CreateForEachBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..08c4cfc609335550c933f9c8d1c9927e8ab74f74 --- /dev/null +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/CreateForEachBundle.php @@ -0,0 +1,138 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Config\Action\Plugin\ConfigAction; + +use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; +use Drupal\Core\Config\Action\Attribute\ConfigAction; +use Drupal\Core\Config\Action\ConfigActionManager; +use Drupal\Core\Config\Action\ConfigActionPluginInterface; +use Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver\CreateForEachBundleDeriver; +use Drupal\Core\Config\ConfigManagerInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Creates config entities for each bundle of a particular entity type. + * + * An example of using this in a recipe's config actions would be: + * @code + * node.type.*: + * createForEach: + * language.content_settings.node.%bundle: + * target_entity_type_id: node + * target_bundle: %bundle + * image.style.node_%bundle_big: + * label: 'Big images for %label content' + * @endcode + * This will create two entities for each existing content type: a content + * language settings entity, and an image style. For example, for a content type + * called `blog`, this will create `language.content_settings.node.blog` and + * `image.style.node_blog_big`, with the given values. The `%bundle` and + * `%label` placeholders will be replaced with the ID and label of the content + * type, respectively. + * + * @internal + * This API is experimental. + */ +#[ConfigAction( + id: 'create_for_each_bundle', + admin_label: new TranslatableMarkup('Create entities for each bundle of an entity type'), + deriver: CreateForEachBundleDeriver::class, +)] +final class CreateForEachBundle implements ConfigActionPluginInterface, ContainerFactoryPluginInterface { + + /** + * The placeholder which is replaced with the ID of the current bundle. + * + * @var string + */ + private const BUNDLE_PLACEHOLDER = '%bundle'; + + /** + * The placeholder which is replaced with the label of the current bundle. + * + * @var string + */ + private const LABEL_PLACEHOLDER = '%label'; + + public function __construct( + private readonly ConfigManagerInterface $configManager, + private readonly string $createAction, + private readonly ConfigActionManager $configActionManager, + ) {} + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static { + // If there are no bundle entity types, this plugin should not be usable. + if (empty($plugin_definition['entity_types'])) { + throw new InvalidPluginDefinitionException($plugin_id, "The $plugin_id config action must be restricted to entity types that are bundles of another entity type."); + } + + return new static( + $container->get(ConfigManagerInterface::class), + $plugin_definition['create_action'], + $container->get('plugin.manager.config_action'), + ); + } + + /** + * {@inheritdoc} + */ + public function apply(string $configName, mixed $value): void { + assert(is_array($value)); + + $bundle = $this->configManager->loadConfigEntityByName($configName); + assert(is_object($bundle)); + $value = static::replacePlaceholders($value, [ + static::BUNDLE_PLACEHOLDER => $bundle->id(), + static::LABEL_PLACEHOLDER => $bundle->label(), + ]); + + foreach ($value as $name => $values) { + // Invoke the actual create action via the config action manager, so that + // the created entity will be validated. + $this->configActionManager->applyAction('entity_create:' . $this->createAction, $name, $values); + } + } + + /** + * Replaces placeholders recursively. + * + * @param mixed $data + * The data to process. If this is an array, it'll be processed recursively. + * @param array $replacements + * An array whose keys are the placeholders to replace in the data, and + * whose values are the the replacements. Normally this will only mention + * the `%bundle` and `%label` placeholders. If $data is an array, the only + * placeholder that is replaced in the array's keys is `%bundle`. + * + * @return mixed + * The given $data, with the `%bundle` and `%label` placeholders replaced. + */ + private static function replacePlaceholders(mixed $data, array $replacements): mixed { + assert(array_key_exists(static::BUNDLE_PLACEHOLDER, $replacements)); + + if (is_string($data)) { + $data = str_replace(array_keys($replacements), $replacements, $data); + } + elseif (is_array($data)) { + foreach ($data as $old_key => $value) { + $value = static::replacePlaceholders($value, $replacements); + + // Only replace the `%bundle` placeholder in array keys. + $new_key = str_replace(static::BUNDLE_PLACEHOLDER, $replacements[static::BUNDLE_PLACEHOLDER], $old_key); + if ($old_key !== $new_key) { + unset($data[$old_key]); + } + $data[$new_key] = $value; + } + } + return $data; + } + +} diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/CreateForEachBundleDeriver.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/CreateForEachBundleDeriver.php new file mode 100644 index 0000000000000000000000000000000000000000..920a727d70516989da44678300f8f04cf74c621f --- /dev/null +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/CreateForEachBundleDeriver.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver; + +use Drupal\Component\Plugin\Derivative\DeriverBase; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Generates derivatives for the create_for_each_bundle config action. + * + * @internal + * This API is experimental. + */ +final class CreateForEachBundleDeriver extends DeriverBase implements ContainerDeriverInterface { + + public function __construct( + private readonly EntityTypeManagerInterface $entityTypeManager, + ) {} + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, $base_plugin_id): static { + return new static( + $container->get(EntityTypeManagerInterface::class), + ); + } + + /** + * {@inheritdoc} + */ + public function getDerivativeDefinitions($base_plugin_definition): array { + // The action should only be available for entity types that are bundles of + // another entity type, such as node types, media types, taxonomy + // vocabularies, and so forth. + $bundle_entity_types = array_filter( + $this->entityTypeManager->getDefinitions(), + fn (EntityTypeInterface $entity_type) => is_string($entity_type->getBundleOf()), + ); + $base_plugin_definition['entity_types'] = array_keys($bundle_entity_types); + + $this->derivatives['createForEachIfNotExists'] = $base_plugin_definition + [ + 'create_action' => 'createIfNotExists', + ]; + $this->derivatives['createForEach'] = $base_plugin_definition + [ + 'create_action' => 'create', + ]; + return $this->derivatives; + } + +} diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityClone.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityClone.php new file mode 100644 index 0000000000000000000000000000000000000000..e23f093010d514ae30a642ad1023f7754fa6c357 --- /dev/null +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityClone.php @@ -0,0 +1,68 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Config\Action\Plugin\ConfigAction; + +use Drupal\Core\Config\Action\Attribute\ConfigAction; +use Drupal\Core\Config\Action\ConfigActionException; +use Drupal\Core\Config\Action\ConfigActionManager; +use Drupal\Core\Config\Action\ConfigActionPluginInterface; +use Drupal\Core\Config\ConfigManagerInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * @internal + * This API is experimental. + */ +#[ConfigAction( + id: 'cloneAs', + admin_label: new TranslatableMarkup('Clone entity with a new ID'), + entity_types: ['*'], +)] +final class EntityClone implements ConfigActionPluginInterface, ContainerFactoryPluginInterface { + + public function __construct( + private readonly ConfigManagerInterface $configManager, + private readonly ConfigActionManager $configActionManager, + ) {} + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static { + return new static( + $container->get(ConfigManagerInterface::class), + $container->get('plugin.manager.config_action'), + ); + } + + /** + * {@inheritdoc} + */ + public function apply(string $configName, mixed $value): void { + if (!is_array($value)) { + $value = ['id' => $value]; + } + assert(is_string($value['id'])); + + $value += ['fail_if_exists' => FALSE]; + assert(is_bool($value['fail_if_exists'])); + + // If the original doesn't exist, there's nothing to clone. + $original = $this->configManager->loadConfigEntityByName($configName); + if (empty($original)) { + throw new ConfigActionException("Cannot clone '$configName' because it does not exist."); + } + $clone = $original->createDuplicate(); + $clone->set($original->getEntityType()->getKey('id'), $value['id']); + + $create_action = 'entity_create:' . ($value['fail_if_exists'] ? 'create' : 'createIfNotExists'); + // Use the config action manager to invoke the create action on the clone, + // so that it will be validated. + $this->configActionManager->applyAction($create_action, $clone->getConfigDependencyName(), $clone->toArray()); + } + +} diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php index f1e5c54f4d30f26e3291a14046ca41f017574ae1..cc1dd909e805110e71e55e1fff4c5885d9cd8a85 100644 --- a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php @@ -70,7 +70,9 @@ public function apply(string $configName, mixed $value): void { $id = substr($configName, strlen($entity_type->getConfigPrefix()) + 1); $entity_type_manager ->getStorage($entity_type->id()) - ->create($value + ['id' => $id]) + ->create($value + [ + $entity_type->getKey('id') => $id, + ]) ->save(); } diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php index 8b00b4381c16051feff631c48666aabfe8b0e3fe..82ffdf2fab536fd785476cac078c9ff4a663b699 100644 --- a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php @@ -138,12 +138,14 @@ private function applySingle(ConfigEntityInterface $entity, mixed $value): Confi if ($this->numberOfRequiredParams !== 1 && $this->numberOfParams !== 1) { throw new EntityMethodException(sprintf('Entity method config action \'%s\' requires an array value. The number of parameters or required parameters for %s::%s() is not 1', $this->pluginId, $entity->getEntityType()->getClass(), $this->method)); } - $entity->{$this->method}($value); + $result = $entity->{$this->method}($value); } else { - $entity->{$this->method}(...$value); + $result = $entity->{$this->method}(...$value); } - return $entity; + // If an instance of the entity (either itself, or a clone) was returned + // by the method, return that. + return is_a($result, get_class($entity)) ? $result : $entity; } } diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 702e1744dbe073362b9dd56138690635aafeb48d..bcee9c5e044b4bd3ddf7e0efea3ec3cde5605f81 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -83,7 +83,7 @@ abstract class ConfigEntityBase extends EntityBase implements ConfigEntityInterf * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $third_party_settings = []; /** @@ -95,7 +95,7 @@ abstract class ConfigEntityBase extends EntityBase implements ConfigEntityInterf * * @var array */ - // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $_core = []; /** diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php index 02d4961abe34d7dfa8771a84ae6e4ca355054eb3..dfc6f71a7a1c7cc412a84fb4746c9c51d0f9f1a8 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php @@ -18,13 +18,13 @@ class ConfigEntityType extends EntityType implements ConfigEntityTypeInterface { * * @see \Drupal\Core\Config\Entity\ConfigEntityTypeInterface::getConfigPrefix() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $config_prefix; /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $static_cache = FALSE; /** @@ -32,7 +32,7 @@ class ConfigEntityType extends EntityType implements ConfigEntityTypeInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $lookup_keys = []; /** @@ -40,7 +40,7 @@ class ConfigEntityType extends EntityType implements ConfigEntityTypeInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $config_export = []; /** @@ -62,8 +62,8 @@ class ConfigEntityType extends EntityType implements ConfigEntityTypeInterface { public function __construct($definition) { // Ensure a default list cache tag is set; do this before calling the parent // constructor, because we want "Configuration System style" cache tags. - if (empty($this->list_cache_tags)) { - $this->list_cache_tags = ['config:' . $definition['id'] . '_list']; + if (empty($definition['list_cache_tags'])) { + $definition['list_cache_tags'] = ['config:' . $definition['id'] . '_list']; } parent::__construct($definition); diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php index af5234b14c6d78e1914efb064f7d3f6ec36b8a64..959ca643c44f944d1f90fd3da530cb8142a68bb7 100644 --- a/core/lib/Drupal/Core/CoreServiceProvider.php +++ b/core/lib/Drupal/Core/CoreServiceProvider.php @@ -9,6 +9,7 @@ use Drupal\Core\DependencyInjection\Compiler\CorsCompilerPass; use Drupal\Core\DependencyInjection\Compiler\DeprecatedServicePass; use Drupal\Core\DependencyInjection\Compiler\DevelopmentSettingsPass; +use Drupal\Core\Hook\HookCollectorPass; use Drupal\Core\DependencyInjection\Compiler\LoggerAwarePass; use Drupal\Core\DependencyInjection\Compiler\ModifyServiceDefinitionsPass; use Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass; @@ -61,9 +62,11 @@ public function register(ContainerBuilder $container) { ->addTag('stream_wrapper', ['scheme' => 'private']); } + $container->addCompilerPass(new HookCollectorPass()); // Add the compiler pass that lets service providers modify existing - // service definitions. This pass must come first so that later - // list-building passes are operating on the post-alter services list. + // service definitions. This pass must come before all passes operating on + // services so that later list-building passes are operating on the + // post-alter services list. $container->addCompilerPass(new ModifyServiceDefinitionsPass()); $container->addCompilerPass(new DevelopmentSettingsPass()); @@ -117,6 +120,17 @@ public function register(ContainerBuilder $container) { $container->registerForAutoconfiguration(ModuleUninstallValidatorInterface::class) ->addTag('module_install.uninstall_validator'); + + // Deprecated parameters. + if ($container->hasParameter('session.storage.options')) { + $session_storage_options = $container->getParameter('session.storage.options'); + if (array_key_exists('sid_length', $session_storage_options)) { + @trigger_error('The "sid_length" parameter is deprecated in drupal:11.1.0 and will be removed in drupal:12.0.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3469305', E_USER_DEPRECATED); + } + if (array_key_exists('sid_bits_per_character', $session_storage_options)) { + @trigger_error('The "sid_bits_per_character" parameter is deprecated in drupal:11.1.0 and will be removed in drupal:12.0.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3469305', E_USER_DEPRECATED); + } + } } /** diff --git a/core/lib/Drupal/Core/Database/database.api.php b/core/lib/Drupal/Core/Database/database.api.php index 1c97fb2ecbbd636af75504aad5451766ff57c812..76dbb14fcefa19791a51d794e976525f3a3a234d 100644 --- a/core/lib/Drupal/Core/Database/database.api.php +++ b/core/lib/Drupal/Core/Database/database.api.php @@ -549,6 +549,8 @@ function hook_query_TAG_alter(Drupal\Core\Database\Query\AlterableInterface $que /** * Define the current version of the database schema. * + * Only procedural implementations are supported for this hook. + * * A Drupal schema definition is an array structure representing one or more * tables and their related keys and indexes. A schema is defined by * hook_schema() which must live in your module's .install file. diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php index 1b918131a8707327bed6305cdfc6563b3f62e75f..c94ecfa58c3f56e7722031a1d00b9ccc405d6910 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php @@ -2,6 +2,7 @@ namespace Drupal\Core\Datetime\Element; +use Drupal\Component\Utility\FilterArray; use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\Variable; use Drupal\Core\Datetime\DateHelper; @@ -345,7 +346,7 @@ protected static function checkEmptyInputs($input, $parts) { // \Drupal\Core\Datetime\Element\Datelist::valueCallback(). unset($input['object']); // Filters out empty array values, any valid value would have a string length. - $filtered_input = array_filter($input, 'strlen'); + $filtered_input = FilterArray::removeEmptyStrings($input); return array_diff($parts, array_keys($filtered_input)); } diff --git a/core/lib/Drupal/Core/Datetime/Entity/DateFormat.php b/core/lib/Drupal/Core/Datetime/Entity/DateFormat.php index e6c401afa9b0fa3266cb4b0a25cbd91630158149..33668a115dc7d6120bdc745c554697e51b64c34b 100644 --- a/core/lib/Drupal/Core/Datetime/Entity/DateFormat.php +++ b/core/lib/Drupal/Core/Datetime/Entity/DateFormat.php @@ -2,33 +2,32 @@ namespace Drupal\Core\Datetime\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Datetime\DateFormatInterface; +use Drupal\system\DateFormatAccessControlHandler; /** * Defines the Date Format configuration entity class. - * - * @ConfigEntityType( - * id = "date_format", - * label = @Translation("Date format"), - * handlers = { - * "access" = "Drupal\system\DateFormatAccessControlHandler", - * }, - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * admin_permission = "administer site configuration", - * list_cache_tags = { "rendered" }, - * config_export = { - * "id", - * "label", - * "locked", - * "pattern", - * } - * ) */ +#[ConfigEntityType( + id: 'date_format', + label: new TranslatableMarkup('Date format'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: ['access' => DateFormatAccessControlHandler::class], + admin_permission: 'administer site configuration', + list_cache_tags: ['rendered'], + config_export: [ + 'id', + 'label', + 'locked', + 'pattern', + ])] class DateFormat extends ConfigEntityBase implements DateFormatInterface { /** diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterServicesForDestructionPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterServicesForDestructionPass.php index 9049a3b579fbd53ca48827b38d95152a9915255d..41753abcae9c17b7c96cd5f77dd6282a2b35c35b 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterServicesForDestructionPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterServicesForDestructionPass.php @@ -2,6 +2,7 @@ namespace Drupal\Core\DependencyInjection\Compiler; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; @@ -14,12 +15,14 @@ */ class RegisterServicesForDestructionPass implements CompilerPassInterface { + use PriorityTaggedServiceTrait; + /** * {@inheritdoc} */ public function process(ContainerBuilder $container): void { - $services = $container->findTaggedServiceIds('needs_destruction'); - $container->setParameter('kernel.destructable_services', array_keys($services)); + $service_ids = array_values(array_map(strval(...), $this->findAndSortTaggedServices('needs_destruction', $container))); + $container->setParameter('kernel.destructable_services', $service_ids); } } diff --git a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php index d7edbafe39fbd2f881389cd97759519bcc89736d..6e6cabd244cb00c45c39f68d56ab0cb824a65199 100644 --- a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php +++ b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php @@ -16,7 +16,7 @@ trait DependencySerializationTrait { * * @var array */ - // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $_serviceIds = []; /** @@ -24,7 +24,7 @@ trait DependencySerializationTrait { * * @var array */ - // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $_entityStorages = []; /** diff --git a/core/lib/Drupal/Core/DependencyInjection/DeprecatedServicePropertyTrait.php b/core/lib/Drupal/Core/DependencyInjection/DeprecatedServicePropertyTrait.php index 8f70555323ca10c02a68c65751067868b7b6969b..ba81fac98be910f6f199bd08a4de285ab876bf42 100644 --- a/core/lib/Drupal/Core/DependencyInjection/DeprecatedServicePropertyTrait.php +++ b/core/lib/Drupal/Core/DependencyInjection/DeprecatedServicePropertyTrait.php @@ -12,7 +12,7 @@ trait DeprecatedServicePropertyTrait { * * This method must be public. */ - public function __get($name) { + public function __get(string $name): mixed { if (!isset($this->deprecatedProperties)) { throw new \LogicException('The deprecatedProperties property must be defined to use this trait.'); } @@ -24,6 +24,8 @@ public function __get($name) { @trigger_error("The property $name ($service_name service) is deprecated in $class_name and will be removed before Drupal 11.0.0.", E_USER_DEPRECATED); return \Drupal::service($service_name); } + + return NULL; } } diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index 39c4a771f57607eab037b5e99f04fa28e24e394b..c16f7d75da22ae04fe52576890e89cc6791f2773 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -390,10 +390,32 @@ private function parseDefinition(string $id, $service, string $file, array $defa $definition->addTag($name, $tag); } - if (isset($service['decorates'])) { + if (null !== $decorates = $service['decorates'] ?? null) { + if ('' !== $decorates && '@' === $decorates[0]) { + throw new InvalidArgumentException(\sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($decorates, 1))); + } + + $decorationOnInvalid = \array_key_exists('decoration_on_invalid', $service) ? $service['decoration_on_invalid'] : 'exception'; + if ('exception' === $decorationOnInvalid) { + $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; + } + elseif ('ignore' === $decorationOnInvalid) { + $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; + } + elseif (null === $decorationOnInvalid) { + $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; + } + elseif ('null' === $decorationOnInvalid) { + throw new InvalidArgumentException(\sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean null (without quotes) in "%s"?', $decorationOnInvalid, $id, $file)); + } + else { + throw new InvalidArgumentException(\sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean "exception", "ignore" or null in "%s"?', $decorationOnInvalid, $id, $file)); + } + $renameId = $service['decoration_inner_name'] ?? null; $priority = $service['decoration_priority'] ?? 0; - $definition->setDecoratedService($service['decorates'], $renameId, $priority); + + $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior); } if (isset($service['autowire'])) { diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 970f5f424c8c1fb3e94647c54554cfa40f905d70..14ac6baf6948fa9a1b8eaca78b4cf7c1fb023dda 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1142,7 +1142,11 @@ public function rebuildContainer() { $this->moduleList = NULL; $this->moduleData = []; $this->containerNeedsRebuild = TRUE; - return $this->initializeContainer(); + $container = $this->initializeContainer(); + // ThemeManager::render() fails without this. Normally ::preHandle() has + // a ->loadAll() call. + $container->get('module_handler')->loadAll(); + return $container; } /** diff --git a/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php b/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php index 1d0d4a566bdc7efc13ef26d78dc77817e757d44e..6e43f9ffe7fdd36fdfee4d4f9430e52482a887ba 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php @@ -20,7 +20,7 @@ class ConfigEntityType extends EntityType { /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $entity_type_class = 'Drupal\Core\Config\Entity\ConfigEntityType'; /** diff --git a/core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php b/core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php index bdf2e02c7dfdadaa8dbb59a1b9fe4619f012d035..70e120ef0da893bc1c8d022c19100767ebedecd7 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php @@ -22,7 +22,7 @@ class ContentEntityType extends EntityType { /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $entity_type_class = 'Drupal\Core\Entity\ContentEntityType'; /** diff --git a/core/lib/Drupal/Core/Entity/Attribute/ConfigEntityType.php b/core/lib/Drupal/Core/Entity/Attribute/ConfigEntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..a784f1248ac0e1402af66f2c546310cb0d1d6898 --- /dev/null +++ b/core/lib/Drupal/Core/Entity/Attribute/ConfigEntityType.php @@ -0,0 +1,57 @@ +<?php + +namespace Drupal\Core\Entity\Attribute; + +use Drupal\Core\StringTranslation\TranslatableMarkup; + +/** + * Defines a configuration entity type attribute object. + * + * Configuration entity type plugins use an object-based attribute method. The + * attribute properties of configuration entity types are found on + * \Drupal\Core\Config\Entity\ConfigEntityType and are accessed using get/set + * methods defined in \Drupal\Core\Entity\EntityTypeInterface. + * + * @ingroup entity_api + * + * @see \Drupal\Core\Entity\EntityType + * @see \Drupal\Core\Config\Entity\ConfigEntityType + * @see \Drupal\Core\Config\Entity\ConfigEntityTypeInterface + */ +#[\Attribute(\Attribute::TARGET_CLASS)] +class ConfigEntityType extends EntityType { + + public function __construct( + public readonly string $id, + public readonly ?TranslatableMarkup $label = NULL, + public readonly ?TranslatableMarkup $label_collection = NULL, + public readonly ?TranslatableMarkup $label_singular = NULL, + public readonly ?TranslatableMarkup $label_plural = NULL, + public readonly ?string $config_prefix = NULL, + public readonly string $entity_type_class = 'Drupal\Core\Config\Entity\ConfigEntityType', + public readonly string $group = 'configuration', + public readonly TranslatableMarkup $group_label = new TranslatableMarkup('Configuration', [], ['context' => 'Entity type group']), + public readonly bool $static_cache = FALSE, + public readonly bool $persistent_cache = TRUE, + protected readonly array $entity_keys = [], + protected readonly array $handlers = [], + protected readonly array $links = [], + public readonly ?string $admin_permission = NULL, + public readonly ?string $collection_permission = NULL, + public readonly string $permission_granularity = 'entity_type', + public readonly ?string $bundle_of = NULL, + public readonly ?TranslatableMarkup $bundle_label = NULL, + public readonly bool $internal = FALSE, + public readonly array $label_count = [], + public readonly ?string $uri_callback = NULL, + public readonly bool $common_reference_target = FALSE, + public readonly array $list_cache_contexts = [], + public readonly array $list_cache_tags = [], + public readonly array $constraints = [], + public readonly array $additional = [], + public readonly array $lookup_keys = [], + public readonly array $config_export = [], + ) { + } + +} diff --git a/core/lib/Drupal/Core/Entity/Attribute/ContentEntityType.php b/core/lib/Drupal/Core/Entity/Attribute/ContentEntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..285607bc5e34e4f2addf3d671a4809243f58949a --- /dev/null +++ b/core/lib/Drupal/Core/Entity/Attribute/ContentEntityType.php @@ -0,0 +1,65 @@ +<?php + +namespace Drupal\Core\Entity\Attribute; + +use Drupal\Core\StringTranslation\TranslatableMarkup; + +/** + * Defines a content entity type for plugin discovery. + * + * Content entity type plugins use an object-based attribute method, rather + * than an array-type (as commonly used on other plugin types). The attribute + * properties of content entity types are found on + * \Drupal\Core\Entity\ContentEntityType and are accessed using get/set methods + * defined in \Drupal\Core\Entity\ContentEntityTypeInterface. + * + * @ingroup entity_api + * + * @see \Drupal\Core\Entity\EntityType + * @see \Drupal\Core\Entity\ContentEntityType + * @see \Drupal\Core\Entity\ContentEntityTypeInterface + */ +#[\Attribute(\Attribute::TARGET_CLASS)] +class ContentEntityType extends EntityType { + + public function __construct( + public readonly string $id, + public readonly ?TranslatableMarkup $label = NULL, + public readonly ?TranslatableMarkup $label_collection = NULL, + public readonly ?TranslatableMarkup $label_singular = NULL, + public readonly ?TranslatableMarkup $label_plural = NULL, + public readonly string $entity_type_class = 'Drupal\Core\Entity\ContentEntityType', + public readonly string $group = 'content', + public readonly TranslatableMarkup $group_label = new TranslatableMarkup('Content', [], ['context' => 'Entity type group']), + public readonly bool $static_cache = TRUE, + public readonly bool $render_cache = TRUE, + public readonly bool $persistent_cache = TRUE, + protected readonly array $entity_keys = [], + protected readonly array $handlers = [], + protected readonly array $links = [], + public readonly ?string $admin_permission = NULL, + public readonly ?string $collection_permission = NULL, + public readonly string $permission_granularity = 'entity_type', + public readonly ?string $bundle_entity_type = NULL, + public readonly ?string $bundle_of = NULL, + public readonly ?TranslatableMarkup $bundle_label = NULL, + public readonly ?string $base_table = NULL, + public readonly ?string $data_table = NULL, + public readonly ?string $revision_table = NULL, + public readonly ?string $revision_data_table = NULL, + public readonly bool $internal = FALSE, + public readonly bool $translatable = FALSE, + public readonly bool $show_revision_ui = FALSE, + public readonly array $label_count = [], + public readonly ?string $uri_callback = NULL, + public readonly ?string $field_ui_base_route = NULL, + public readonly bool $common_reference_target = FALSE, + public readonly array $list_cache_contexts = [], + public readonly array $list_cache_tags = [], + public readonly array $constraints = [], + public readonly array $revision_metadata_keys = [], + public readonly array $additional = [], + ) { + } + +} diff --git a/core/lib/Drupal/Core/Entity/Attribute/EntityType.php b/core/lib/Drupal/Core/Entity/Attribute/EntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..40d769e61c0289709b6bd0f2197cdcd330cb0a82 --- /dev/null +++ b/core/lib/Drupal/Core/Entity/Attribute/EntityType.php @@ -0,0 +1,81 @@ +<?php + +namespace Drupal\Core\Entity\Attribute; + +use Drupal\Component\Plugin\Attribute\Plugin; +use Drupal\Core\StringTranslation\TranslatableMarkup; + +/** + * Defines an entity type for plugin discovery. + * + * Entity type plugins use an object-based attribute method. The attribute + * properties of entity types are found on \Drupal\Core\Entity\EntityType and + * are accessed using get/set methods defined in + * \Drupal\Core\Entity\EntityTypeInterface. + * + * @ingroup entity_api + * + * @see \Drupal\Core\Entity\EntityType + * @see \Drupal\Core\Entity\ContentEntityTypeInterface + */ +#[\Attribute(\Attribute::TARGET_CLASS)] +class EntityType extends Plugin { + + public function __construct( + public readonly string $id, + public readonly ?TranslatableMarkup $label = NULL, + public readonly ?TranslatableMarkup $label_collection = NULL, + public readonly ?TranslatableMarkup $label_singular = NULL, + public readonly ?TranslatableMarkup $label_plural = NULL, + public readonly string $entity_type_class = 'Drupal\Core\Entity\EntityType', + public readonly string $group = 'default', + public readonly TranslatableMarkup $group_label = new TranslatableMarkup('Other', [], ['context' => 'Entity type group']), + public readonly bool $static_cache = TRUE, + public readonly bool $render_cache = TRUE, + public readonly bool $persistent_cache = TRUE, + protected readonly array $entity_keys = [], + protected readonly array $handlers = [], + protected readonly array $links = [], + public readonly ?string $admin_permission = NULL, + public readonly ?string $collection_permission = NULL, + public readonly string $permission_granularity = 'entity_type', + public readonly ?string $bundle_entity_type = NULL, + public readonly ?string $bundle_of = NULL, + public readonly ?TranslatableMarkup $bundle_label = NULL, + public readonly ?string $base_table = NULL, + public readonly ?string $data_table = NULL, + public readonly ?string $revision_table = NULL, + public readonly ?string $revision_data_table = NULL, + public readonly bool $internal = FALSE, + public readonly bool $translatable = FALSE, + public readonly bool $show_revision_ui = FALSE, + public readonly array $label_count = [], + public readonly ?string $uri_callback = NULL, + public readonly ?string $field_ui_base_route = NULL, + public readonly bool $common_reference_target = FALSE, + public readonly array $list_cache_contexts = [], + public readonly array $list_cache_tags = [], + public readonly array $constraints = [], + public readonly array $additional = [], + ) { + + } + + /** + * {@inheritdoc} + */ + public function get(): array|object { + // Use the specified entity type class, and remove it before instantiating. + $class = $this->entity_type_class; + + $values = array_filter(get_object_vars($this) + [ + 'class' => $this->getClass(), + 'provider' => $this->getProvider(), + ], function ($value, $key) { + return !($value === NULL && ($key === 'deriver' || $key === 'provider' || $key == 'entity_type_class')); + }, ARRAY_FILTER_USE_BOTH); + + return new $class($values); + } + +} diff --git a/core/lib/Drupal/Core/Entity/ContentEntityType.php b/core/lib/Drupal/Core/Entity/ContentEntityType.php index cf781cc17008af77dbc02f29b77f4eae01e7121c..18516c2b7c1665c2192a846b3a11e85804c3a9e3 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityType.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityType.php @@ -12,7 +12,7 @@ class ContentEntityType extends EntityType implements ContentEntityTypeInterface * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $revision_metadata_keys = []; /** diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php index 8c591c9a4179d2063ee2048b55a617a03c24a241..0ee6cb9c88e8f22c51edd253ede7f2fb6050dc72 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php @@ -2,6 +2,9 @@ namespace Drupal\Core\Entity\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\Entity\Access\EntityFormDisplayAccessControlHandler; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityConstraintViolationListInterface; use Drupal\Core\Entity\EntityDisplayPluginCollection; use Drupal\Core\Entity\FieldableEntityInterface; @@ -17,30 +20,33 @@ * * Contains widget options for all components of an entity form in a given * form mode. - * - * @ConfigEntityType( - * id = "entity_form_display", - * label = @Translation("Entity form display"), - * entity_keys = { - * "id" = "id", - * "status" = "status" - * }, - * handlers = { - * "access" = "\Drupal\Core\Entity\Entity\Access\EntityFormDisplayAccessControlHandler", - * }, - * config_export = { - * "id", - * "targetEntityType", - * "bundle", - * "mode", - * "content", - * "hidden", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "targetEntityType", "bundle", "mode"}, - * } - * ) */ +#[ConfigEntityType( + id: 'entity_form_display', + label: new TranslatableMarkup('Entity form display'), + entity_keys: [ + 'id' => 'id', + 'status' => 'status', + ], + handlers: [ + 'access' => EntityFormDisplayAccessControlHandler::class, + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'targetEntityType', + 'bundle', + 'mode', + ], + ], + config_export: [ + 'id', + 'targetEntityType', + 'bundle', + 'mode', + 'content', + 'hidden', + ])] class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayInterface { /** @@ -206,6 +212,11 @@ public function buildForm(FieldableEntityInterface $entity, array &$form, FormSt // Associate the cache tags for the form display. $this->renderer->addCacheableDependency($form, $this); + // The form might not have the correct cacheability metadata, so make it + // uncacheable by default. + // @todo Remove this in https://www.drupal.org/node/3395524. + $form['#cache']['max-age'] = 0; + // Add a process callback so we can assign weights and hide extra fields. $form['#process'][] = [$this, 'processForm']; } diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php index 855e0a1d372c70572a82b004299fe3f945a8e093..24ed8bf55e50affc343aefeb1242cec940df81aa 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php @@ -2,6 +2,8 @@ namespace Drupal\Core\Entity\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityDisplayModeBase; use Drupal\Core\Entity\EntityFormModeInterface; @@ -21,27 +23,28 @@ * * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllFormModes() * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModes() - * - * @ConfigEntityType( - * id = "entity_form_mode", - * label = @Translation("Form mode"), - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "description" = "description", - * }, - * config_export = { - * "id", - * "label", - * "description", - * "targetEntityType", - * "cache", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "targetEntityType"}, - * } - * ) */ +#[ConfigEntityType( + id: 'entity_form_mode', + label: new TranslatableMarkup('Form mode'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'description' => 'description', + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'targetEntityType', + ], + ], + config_export: [ + 'id', + 'label', + 'description', + 'targetEntityType', + 'cache', + ])] class EntityFormMode extends EntityDisplayModeBase implements EntityFormModeInterface { } diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index 19cb4219b89a2ebc741fa2aafa0672baa05ac3ee..e2e01b3ec708b7d2ffcd64e876d90bd6c7ad0037 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -2,6 +2,9 @@ namespace Drupal\Core\Entity\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityDisplayPluginCollection; @@ -16,30 +19,33 @@ * * Contains display options for all components of a rendered entity in a given * view mode. - * - * @ConfigEntityType( - * id = "entity_view_display", - * label = @Translation("Entity view display"), - * entity_keys = { - * "id" = "id", - * "status" = "status" - * }, - * handlers = { - * "access" = "\Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler", - * }, - * config_export = { - * "id", - * "targetEntityType", - * "bundle", - * "mode", - * "content", - * "hidden", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "targetEntityType", "bundle", "mode"}, - * } - * ) */ +#[ConfigEntityType( + id: 'entity_view_display', + label: new TranslatableMarkup('Entity view display'), + entity_keys: [ + 'id' => 'id', + 'status' => 'status', + ], + handlers: [ + 'access' => EntityViewDisplayAccessControlHandler::class, + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'targetEntityType', + 'bundle', + 'mode', + ], + ], + config_export: [ + 'id', + 'targetEntityType', + 'bundle', + 'mode', + 'content', + 'hidden', + ])] class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayInterface { /** diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewMode.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewMode.php index 1d54022454dab98368b1e26bad2c7adb66aa6292..b9aba078a741fdc15d50ecbba20b889eb7c95f73 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewMode.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewMode.php @@ -2,6 +2,8 @@ namespace Drupal\Core\Entity\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityDisplayModeBase; use Drupal\Core\Entity\EntityViewModeInterface; @@ -23,27 +25,28 @@ * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllViewModes() * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModes() * @see hook_entity_view_mode_info_alter() - * - * @ConfigEntityType( - * id = "entity_view_mode", - * label = @Translation("View mode"), - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "description" = "description", - * }, - * config_export = { - * "id", - * "label", - * "description", - * "targetEntityType", - * "cache", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "targetEntityType"}, - * } - * ) */ +#[ConfigEntityType( + id: 'entity_view_mode', + label: new TranslatableMarkup('View mode'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'description' => 'description', + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'targetEntityType', + ], + ], + config_export: [ + 'id', + 'label', + 'description', + 'targetEntityType', + 'cache', + ])] class EntityViewMode extends EntityDisplayModeBase implements EntityViewModeInterface { } diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php index c7620ca8085bd1d0bb7f1bac3338075152b73bd7..b727143ec041f0c7b6d29a539b60f818b9ab63f8 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -324,6 +324,7 @@ public function toArray() { /** * {@inheritdoc} */ + #[ActionMethod(adminLabel: new TranslatableMarkup('Copy to another mode'), pluralize: FALSE)] public function createCopy($mode) { $display = $this->createDuplicate(); $display->mode = $display->originalMode = $mode; @@ -588,4 +589,20 @@ protected function getLogger() { return \Drupal::logger('system'); } + /** + * {@inheritdoc} + */ + public function set($property_name, $value): static { + // If changing the entity ID, also update the target entity type, bundle, + // and view mode. + if ($this->isNew() && $property_name === $this->getEntityType()->getKey('id')) { + if (substr_count($value, '.') !== 2) { + throw new \InvalidArgumentException("'$value' is not a valid entity display ID."); + } + [$this->targetEntityType, $this->bundle, $this->mode] = explode('.', $value); + } + parent::set($property_name, $value); + return $this; + } + } diff --git a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php index 29b683f972f01bd7b2e236801096f7a44a40a2ec..b40e3263671941724d6b6ab41b511b0849f506d9 100644 --- a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php @@ -20,7 +20,7 @@ abstract class SelectionPluginBase extends PluginBase implements SelectionInterf * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php index f62b420d3c4633e10b0d2ce21af613ad7096fb39..a06a72f001541fe6e7bc2980a0992212c3841b0f 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php @@ -8,8 +8,9 @@ * For common default implementations, see * \Drupal\Core\Entity\Sql\SqlContentEntityStorage for content entities and * \Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Those - * implementations are used by default when the @ContentEntityType or - * @ConfigEntityType annotations are used. + * implementations are used by default when the + * \Drupal\Core\Entity\Attribute\ContentEntityType or + * \Drupal\Core\Entity\Attribute\ConfigEntityType attributes are used. * * @ingroup entity_api */ diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 71f8eac567ef1b2b218a60214d5f1ab8ff1100fc..d9e8ffd806aa3537df71ba71b9478a0bfaac51a5 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -23,7 +23,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $static_cache = TRUE; /** @@ -31,7 +31,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $render_cache = TRUE; /** @@ -39,7 +39,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $persistent_cache = TRUE; /** @@ -47,7 +47,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $entity_keys = []; /** @@ -78,7 +78,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $admin_permission; /** @@ -86,7 +86,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $collection_permission; /** @@ -96,7 +96,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $permission_granularity = 'entity_type'; /** * Link templates using the URI template syntax. @@ -110,7 +110,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $bundle_entity_type = NULL; /** @@ -118,7 +118,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $bundle_of = NULL; /** @@ -126,7 +126,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $bundle_label = NULL; /** @@ -134,7 +134,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $base_table = NULL; /** @@ -142,7 +142,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $revision_data_table = NULL; /** @@ -150,7 +150,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $revision_table = NULL; /** @@ -158,7 +158,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $data_table = NULL; /** @@ -180,7 +180,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $show_revision_ui = FALSE; /** @@ -199,7 +199,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @see \Drupal\Core\Entity\EntityTypeInterface::getCollectionLabel() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $label_collection = ''; /** @@ -209,7 +209,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @see \Drupal\Core\Entity\EntityTypeInterface::getSingularLabel() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $label_singular = ''; /** @@ -219,7 +219,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @see \Drupal\Core\Entity\EntityTypeInterface::getPluralLabel() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $label_plural = ''; /** @@ -237,7 +237,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @see \Drupal\Core\Entity\EntityTypeInterface::getCountLabel() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $label_count = []; /** @@ -245,7 +245,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var callable|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $uri_callback = NULL; /** @@ -264,7 +264,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @see \Drupal\Core\Entity\EntityTypeInterface::getGroupLabel() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $group_label; /** @@ -272,7 +272,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $field_ui_base_route; /** @@ -283,7 +283,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $common_reference_target = FALSE; /** @@ -291,7 +291,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string[] */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $list_cache_contexts = []; /** @@ -299,7 +299,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * * @var string[] */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $list_cache_tags = []; /** diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManager.php b/core/lib/Drupal/Core/Entity/EntityTypeManager.php index eb1486de473528e7f8e582395e9e6325dbd183d5..1894b766334e6d64c7443777c194d69bc7e177d1 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeManager.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeManager.php @@ -9,7 +9,8 @@ use Drupal\Core\Entity\Exception\InvalidLinkTemplateException; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Plugin\DefaultPluginManager; -use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; +use Drupal\Core\Entity\Attribute\EntityType; +use Drupal\Core\Plugin\Discovery\AttributeDiscoveryWithAnnotations; use Drupal\Core\StringTranslation\TranslationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -87,7 +88,7 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo $this->setCacheBackend($cache, 'entity_type', ['entity_types']); $this->alterInfo('entity_type'); - $this->discovery = new AnnotatedClassDiscovery('Entity', $namespaces, 'Drupal\Core\Entity\Annotation\EntityType'); + $this->discovery = new AttributeDiscoveryWithAnnotations($this->subdir, $this->namespaces, EntityType::class, 'Drupal\Core\Entity\Annotation\EntityType'); $this->stringTranslation = $string_translation; $this->classResolver = $class_resolver; $this->entityLastInstalledSchemaRepository = $entity_last_installed_schema_repository; diff --git a/core/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php b/core/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php index d9f19258361ca3a7103e70fe6bde652e7bc3e9f2..2a0c99f483232e993d1f3277e9c9fa9c66181c02 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php +++ b/core/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php @@ -35,7 +35,7 @@ class EntityBundle extends ConditionPluginBase implements ContainerFactoryPlugin * initialize the defined contexts by setting it to an array of context * values keyed by context names. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info diff --git a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php index d32b320e817255000fc09b213aca0ab036b89b4c..5d08460c396a9431cdb4e2887c921e6dbaa98bf2 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php +++ b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php @@ -92,7 +92,7 @@ class DefaultSelection extends SelectionPluginBase implements ContainerFactoryPl * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php index 579c0c9aa692bcede52320c1a377b096774828be..9d872ffdcb1f8c0c09954a020df456a572863412 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php +++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php @@ -35,7 +35,7 @@ class EntityHasFieldConstraint extends SymfonyConstraint { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $field_name; /** diff --git a/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php b/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php index f8f759f055215cb3ba5dda7ea922051f62ed63ad..93398a56fc3bd6d4fba836bfa5805216d890e80e 100644 --- a/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php +++ b/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php @@ -176,7 +176,9 @@ public static function create(ContentEntityTypeInterface $entity_type, array $st return $table_mapping->allowsSharedTableStorage($definition); }); - $key_fields = array_values(array_filter([$id_key, $revision_key, $bundle_key, $uuid_key, $langcode_key])); + // The ID and UUID key may point to the same field, so make sure the list is + // unique. + $key_fields = array_values(array_unique(array_filter([$id_key, $revision_key, $bundle_key, $uuid_key, $langcode_key]))); $all_fields = array_keys($shared_table_definitions); $revisionable_fields = array_keys(array_filter($shared_table_definitions, function (FieldStorageDefinitionInterface $definition) { return $definition->isRevisionable(); @@ -206,10 +208,11 @@ public static function create(ContentEntityTypeInterface $entity_type, array $st // whether they are translatable or not. The data table holds also a // denormalized copy of the bundle field value to allow for more // performant queries. This means that only the UUID is not stored on - // the data table. + // the data table. Make sure the ID is always in the list, even if the ID + // key and the UUID key point to the same field. $table_mapping ->setFieldNames($table_mapping->baseTable, $key_fields) - ->setFieldNames($table_mapping->dataTable, array_values(array_diff($all_fields, [$uuid_key]))); + ->setFieldNames($table_mapping->dataTable, array_values(array_unique(array_merge([$id_key], array_diff($all_fields, [$uuid_key]))))); } elseif ($revisionable && $translatable) { // The revisionable multilingual layout stores key field values in the @@ -224,7 +227,7 @@ public static function create(ContentEntityTypeInterface $entity_type, array $st // Like in the multilingual, non-revisionable case the UUID is not // in the data table. Additionally, do not store revision metadata // fields in the data table. - $data_fields = array_values(array_diff($all_fields, [$uuid_key], $revision_metadata_fields)); + $data_fields = array_values(array_unique(array_merge([$id_key], array_diff($all_fields, [$uuid_key], $revision_metadata_fields)))); $table_mapping->setFieldNames($table_mapping->dataTable, $data_fields); $revision_base_fields = array_merge([$id_key, $revision_key, $langcode_key], $revision_metadata_fields); diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php index 09853d9adcac76f69a32f5c5c93610e090106836..e4c12dc71c8432358ab917a491c876685459b6ce 100644 --- a/core/lib/Drupal/Core/Entity/entity.api.php +++ b/core/lib/Drupal/Core/Entity/entity.api.php @@ -367,8 +367,9 @@ * for more information. * - Define a class for your entity, implementing your interface and extending * either \Drupal\Core\Config\Entity\ConfigEntityBase or - * \Drupal\Core\Entity\ContentEntityBase, with annotation for - * \@ConfigEntityType or \@ContentEntityType in its documentation block. + * \Drupal\Core\Entity\ContentEntityBase, with a + * \Drupal\Core\Entity\Attribute\ConfigEntityType or + * \Drupal\Core\Entity\Attribute\ContentEntityType attribute set on the class. * If you are defining a content entity type, it is recommended to extend the * \Drupal\Core\Entity\EditorialContentEntityBase base class in order to get * out-of-the-box support for Entity API's revisioning and publishing @@ -844,7 +845,7 @@ function hook_entity_type_build(array &$entity_types) { * @see \Drupal\Core\Entity\Entity * @see \Drupal\Core\Entity\EntityTypeInterface */ -function hook_entity_type_alter(array &$entity_types) { +function hook_entity_type_alter(array &$entity_types): void { /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ // Set the controller class for nodes to an alternate implementation of the // Drupal\Core\Entity\EntityStorageInterface interface. diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php index 7b72f326049720d56a89e16192067041628d08e1..ff4138685f3c0a1b2b740956b363b956306e4692 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php @@ -4,8 +4,10 @@ use Drupal\Component\Graph\Graph; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\Exception\UnknownExtensionException; +use Drupal\Core\Hook\Attribute\LegacyHook; +use Drupal\Core\Hook\HookCollectorPass; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Class that manages modules in a Drupal installation. @@ -36,47 +38,11 @@ class ModuleHandler implements ModuleHandlerInterface { protected $loaded = FALSE; /** - * List of hook implementations keyed by hook name. + * List of events which implement an alter hook keyed by hook name(s). * * @var array */ - protected $implementations; - - /** - * List of hooks where the implementations have been "verified". - * - * @var true[] - * Associative array where keys are hook names. - */ - protected $verified; - - /** - * Information returned by hook_hook_info() implementations. - * - * @var array - */ - protected $hookInfo; - - /** - * Cache backend for storing module hook implementation information. - * - * @var \Drupal\Core\Cache\CacheBackendInterface - */ - protected $cacheBackend; - - /** - * Whether the cache needs to be written. - * - * @var bool - */ - protected $cacheNeedsWriting = FALSE; - - /** - * List of alter hook implementations keyed by hook name(s). - * - * @var array - */ - protected $alterFunctions; + protected array $alterEventListeners = []; /** * The app root. @@ -92,6 +58,13 @@ class ModuleHandler implements ModuleHandlerInterface { */ protected $includeFileKeys = []; + /** + * Hook and module keyed list of listeners. + * + * @var array + */ + protected array $invokeMap = []; + /** * Constructs a ModuleHandler object. * @@ -101,19 +74,22 @@ class ModuleHandler implements ModuleHandlerInterface { * An associative array whose keys are the names of installed modules and * whose values are Extension class parameters. This is normally the * %container.modules% parameter being set up by DrupalKernel. - * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend - * Cache backend for storing module hook implementation information. + * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher + * The event dispatcher. + * @param array $hookImplementationsMap + * An array keyed by hook, classname, method and the value is the module. + * @param array $groupIncludes + * An array of .inc files to get helpers from. * * @see \Drupal\Core\DrupalKernel * @see \Drupal\Core\CoreServiceProvider */ - public function __construct($root, array $module_list, CacheBackendInterface $cache_backend) { + public function __construct($root, array $module_list, protected EventDispatcherInterface $eventDispatcher, protected array $hookImplementationsMap, protected array $groupIncludes = []) { $this->root = $root; $this->moduleList = []; foreach ($module_list as $name => $module) { $this->moduleList[$name] = new Extension($this->root, $module['type'], $module['pathname'], $module['filename']); } - $this->cacheBackend = $cache_backend; } /** @@ -212,9 +188,25 @@ public function addProfile($name, $path) { */ protected function add($type, $name, $path) { $pathname = "$path/$name.info.yml"; - $filename = file_exists($this->root . "/$path/$name.$type") ? "$name.$type" : NULL; + $php_file_path = $this->root . "/$path/$name.$type"; + $filename = file_exists($php_file_path) ? "$name.$type" : NULL; $this->moduleList[$name] = new Extension($this->root, $type, $pathname, $filename); $this->resetImplementations(); + $hook_collector = HookCollectorPass::collectAllHookImplementations([$name => ['pathname' => $pathname]]); + // A module freshly added will not be registered on the container yet. + // ProceduralCall service does not yet know about it. + // Note in HookCollectorPass: + // - $container->register(ProceduralCall::class, ProceduralCall::class)->addArgument($collector->includes); + // Load all includes so the legacy section of invoke can handle hooks in includes. + $hook_collector->loadAllIncludes(); + // Register procedural implementations. + foreach ($hook_collector->getImplementations() as $hook => $moduleImplements) { + foreach ($moduleImplements as $module => $classImplements) { + foreach ($classImplements[ProceduralCall::class] ?? [] as $method) { + $this->invokeMap[$hook][$module][] = $method; + } + } + } } /** @@ -261,7 +253,7 @@ public function loadAllIncludes($type, $name = NULL) { */ public function loadInclude($module, $type, $name = NULL) { if ($type == 'install') { - // Make sure the installation API is available + // Make sure the installation API is available. include_once $this->root . '/core/includes/install.inc'; } @@ -288,123 +280,70 @@ public function loadInclude($module, $type, $name = NULL) { * {@inheritdoc} */ public function getHookInfo() { - if (!isset($this->hookInfo)) { - if ($cache = $this->cacheBackend->get('hook_info')) { - $this->hookInfo = $cache->data; - } - else { - $this->buildHookInfo(); - $this->cacheBackend->set('hook_info', $this->hookInfo); - } - } - return $this->hookInfo; - } - - /** - * Builds hook_hook_info() information. - * - * @see \Drupal\Core\Extension\ModuleHandler::getHookInfo() - */ - protected function buildHookInfo() { - $this->hookInfo = []; - // Make sure that the modules are loaded before checking. - $this->reload(); - // $this->invokeAll() would cause an infinite recursion. - foreach ($this->moduleList as $module => $filename) { - $function = $module . '_hook_info'; - if (function_exists($function)) { - $result = $function(); - if (isset($result) && is_array($result)) { - $this->hookInfo = NestedArray::mergeDeep($this->hookInfo, $result); - } - } - } + return []; } /** * {@inheritdoc} */ - public function writeCache() { - if ($this->cacheNeedsWriting) { - $this->cacheBackend->set('module_implements', $this->implementations); - $this->cacheNeedsWriting = FALSE; - } + public function resetImplementations() { + $this->alterEventListeners = []; } /** * {@inheritdoc} */ - public function destruct() { - $this->writeCache(); + public function hasImplementations(string $hook, $modules = NULL): bool { + $implementation_modules = array_keys($this->getHookListeners($hook)); + return (bool) (isset($modules) ? array_intersect($implementation_modules, (array) $modules) : $implementation_modules); } /** * {@inheritdoc} */ - public function resetImplementations() { - $this->implementations = NULL; - $this->hookInfo = NULL; - $this->alterFunctions = NULL; - // We maintain a persistent cache of hook implementations in addition to the - // static cache to avoid looping through every module and every hook on each - // request. Benchmarks show that the benefit of this caching outweighs the - // additional database hit even when using the default database caching - // backend and only a small number of modules are enabled. The cost of the - // $this->cacheBackend->get() is more or less constant and reduced further - // when non-database caching backends are used, so there will be more - // significant gains when a large number of modules are installed or hooks - // invoked, since this can quickly lead to - // \Drupal::moduleHandler()->hasImplementations() being called several - // thousand times per request. - $this->cacheBackend->set('module_implements', []); - $this->cacheBackend->delete('hook_info'); + public function invokeAllWith(string $hook, callable $callback): void { + foreach ($this->getHookListeners($hook) as $module => $listeners) { + foreach ($listeners as $listener) { + $callback($listener, $module); + } + } } /** * {@inheritdoc} */ - public function hasImplementations(string $hook, $modules = NULL): bool { - if ($modules !== NULL) { - foreach ((array) $modules as $module) { - // Hook implementations usually found in a module's .install file are - // not stored in the implementation info cache. In order to invoke hooks - // like hook_schema() and hook_requirements() the module's .install file - // must be included by the calling code. Additionally, this check avoids - // unnecessary work when a hook implementation is present in a module's - // .module file. - if (function_exists($module . '_' . $hook)) { - return TRUE; - } + public function invoke($module, $hook, array $args = []) { + if ($listeners = $this->getHookListeners($hook)[$module] ?? []) { + if (count($listeners) > 1) { + throw new \LogicException("Module $module should not implement $hook more than once"); } + return reset($listeners)(... $args); } - $implementations = $this->getImplementationInfo($hook); - if ($modules === NULL && !empty($implementations)) { - return TRUE; - } - - return !empty(array_intersect((array) $modules, array_keys($implementations))); + return $this->legacyInvoke($module, $hook, $args); } /** - * {@inheritdoc} + * Calls a function called $module . '_' . $hook if one exists. + * + * @param string $module + * The name of the module (without the .module extension). + * @param string $hook + * The name of the hook to invoke. + * @param array $args + * Arguments to pass to the hook implementation. + * + * @return mixed + * The return value of the hook implementation. */ - public function invokeAllWith(string $hook, callable $callback): void { - foreach (array_keys($this->getImplementationInfo($hook)) as $module) { - $hookInvoker = \Closure::fromCallable($module . '_' . $hook); - $callback($hookInvoker, $module); + protected function legacyInvoke($module, $hook, array $args = []) { + $this->load($module); + $function = $module . '_' . $hook; + if (function_exists($function) && !(new \ReflectionFunction($function))->getAttributes(LegacyHook::class)) { + return $function(... $args); } - } - /** - * {@inheritdoc} - */ - public function invoke($module, $hook, array $args = []) { - if (!$this->hasImplementations($hook, $module)) { - return; - } - $hookInvoker = \Closure::fromCallable($module . '_' . $hook); - return call_user_func_array($hookInvoker, $args); + return NULL; } /** @@ -451,13 +390,10 @@ public function invokeAllDeprecated($description, $hook, array $args = []) { * The name of the hook. */ private function triggerDeprecationError($description, $hook) { - $modules = array_keys($this->getImplementationInfo($hook)); + $modules = array_keys($this->getHookListeners($hook)); if (!empty($modules)) { - $message = 'The deprecated hook hook_' . $hook . '() is implemented in these functions: '; - $implementations = array_map(function ($module) use ($hook) { - return $module . '_' . $hook . '()'; - }, $modules); - @trigger_error($message . implode(', ', $implementations) . '. ' . $description, E_USER_DEPRECATED); + $message = 'The deprecated hook hook_' . $hook . '() is implemented in these modules: '; + @trigger_error($message . implode(', ', $modules) . '. ' . $description, E_USER_DEPRECATED); } } @@ -487,78 +423,75 @@ public function alter($type, &$data, &$context1 = NULL, &$context2 = NULL) { // Some alter hooks are invoked many times per page request, so store the // list of functions to call, and on subsequent calls, iterate through them // quickly. - if (!isset($this->alterFunctions[$cid])) { - $this->alterFunctions[$cid] = []; + if (!isset($this->alterEventListeners[$cid])) { + $this->alterEventListeners[$cid] = []; $hook = $type . '_alter'; - $modules = array_keys($this->getImplementationInfo($hook)); - if (!isset($extra_types)) { - // For the more common case of a single hook, we do not need to call - // function_exists(), since $this->getImplementationInfo() returns only - // modules with implementations. - foreach ($modules as $module) { - $this->alterFunctions[$cid][] = $module . '_' . $hook; - } - } - else { + $hook_listeners = $this->getHookListeners($hook); + if (isset($extra_types)) { // For multiple hooks, we need $modules to contain every module that - // implements at least one of them. - $extra_modules = []; + // implements at least one of them in the correct order. foreach ($extra_types as $extra_type) { - $extra_modules[] = array_keys($this->getImplementationInfo($extra_type . '_alter')); - } - $extra_modules = array_merge(...$extra_modules); - // If any modules implement one of the extra hooks that do not implement - // the primary hook, we need to add them to the $modules array in their - // appropriate order. $this->getImplementationInfo() can only return - // ordered implementations of a single hook. To get the ordered - // implementations of multiple hooks, we mimic the - // $this->getImplementationInfo() logic of first ordering by - // $this->getModuleList(), and then calling - // $this->alter('module_implements'). - if (array_diff($extra_modules, $modules)) { - // Merge the arrays and order by getModuleList(). - $modules = array_intersect(array_keys($this->moduleList), array_merge($modules, $extra_modules)); - // Since $this->getImplementationInfo() already took care of loading the - // necessary include files, we can safely pass FALSE for the array - // values. - $implementations = array_fill_keys($modules, FALSE); - // Let modules adjust the order solely based on the primary hook. This - // ensures the same module order regardless of whether this if block - // runs. Calling $this->alter() recursively in this way does not - // result in an infinite loop, because this call is for a single - // $type, so we won't end up in this code block again. - $this->alter('module_implements', $implementations, $hook); - $modules = array_keys($implementations); - } - foreach ($modules as $module) { - // Since $modules is a merged array, for any given module, we do not - // know whether it has any particular implementation, so we need a - // function_exists(). - $function = $module . '_' . $hook; - if (function_exists($function)) { - $this->alterFunctions[$cid][] = $function; - } - foreach ($extra_types as $extra_type) { - $function = $module . '_' . $extra_type . '_alter'; - if (function_exists($function)) { - $this->alterFunctions[$cid][] = $function; + foreach ($this->getHookListeners($extra_type . '_alter') as $module => $listeners) { + if (isset($hook_listeners[$module])) { + $hook_listeners[$module] = array_merge($hook_listeners[$module], $listeners); + } + else { + $hook_listeners[$module] = $listeners; + $extra_modules = TRUE; } } } } + // If any modules implement one of the extra hooks that do not implement + // the primary hook, we need to add them to the $modules array in their + // appropriate order. + $modules = array_keys($hook_listeners); + if (isset($extra_modules)) { + $modules = $this->reOrderModulesForAlter($modules, $hook); + } + foreach ($modules as $module) { + foreach ($hook_listeners[$module] ?? [] as $listener) { + $this->alterEventListeners[$cid][] = $listener; + } + } } - - foreach ($this->alterFunctions[$cid] as $function) { - $function($data, $context1, $context2); + foreach ($this->alterEventListeners[$cid] as $listener) { + $listener($data, $context1, $context2); } } + /** + * Reorder modules for alters. + * + * @param array $modules + * A list of modules. + * @param string $hook + * The hook being worked on, for example form_alter. + * + * @return array + * The list, potentially reordered and changed by + * hook_module_implements_alter(). + */ + protected function reOrderModulesForAlter(array $modules, string $hook): array { + // Order by module order first. + $modules = array_intersect(array_keys($this->moduleList), $modules); + // Alter expects the module list to be in the keys. + $implementations = array_fill_keys($modules, FALSE); + // Let modules adjust the order solely based on the primary hook. This + // ensures the same module order regardless of whether this block + // runs. Calling $this->alter() recursively in this way does not + // result in an infinite loop, because this call is for a single + // $type, so we won't end up in this method again. + $this->alter('module_implements', $implementations, $hook); + return array_keys($implementations); + } + /** * {@inheritdoc} */ public function alterDeprecated($description, $type, &$data, &$context1 = NULL, &$context2 = NULL) { // Invoke the alter hook. This has the side effect of populating - // $this->alterFunctions. + // $this->alterEventListeners. $this->alter($type, $data, $context1, $context2); // The $type parameter can be an array. alter() will deal with this // internally, but we have to extract the proper $cid in order to discover @@ -569,144 +502,19 @@ public function alterDeprecated($description, $type, &$data, &$context1 = NULL, $extra_types = $type; $type = array_shift($extra_types); } - if (!empty($this->alterFunctions[$cid])) { - $message = 'The deprecated alter hook hook_' . $type . '_alter() is implemented in these functions: ' . implode(', ', $this->alterFunctions[$cid]) . '.'; - @trigger_error($message . ' ' . $description, E_USER_DEPRECATED); - } - } - - /** - * Provides information about modules' implementations of a hook. - * - * @param string $hook - * The name of the hook (e.g. "help" or "menu"). - * - * @return mixed[] - * An array whose keys are the names of the modules which are implementing - * this hook and whose values are either a string identifying a file in - * which the implementation is to be found, or FALSE, if the implementation - * is in the module file. - */ - protected function getImplementationInfo($hook) { - if (!isset($this->implementations)) { - $this->implementations = []; - $this->verified = []; - if ($cache = $this->cacheBackend->get('module_implements')) { - $this->implementations = $cache->data; - } - } - if (!isset($this->implementations[$hook])) { - // The hook is not cached, so ensure that whether or not it has - // implementations, the cache is updated at the end of the request. - $this->cacheNeedsWriting = TRUE; - // Discover implementations. - $this->implementations[$hook] = $this->buildImplementationInfo($hook); - // Implementations are always "verified" as part of the discovery. - $this->verified[$hook] = TRUE; - } - elseif (!isset($this->verified[$hook])) { - if (!$this->verifyImplementations($this->implementations[$hook], $hook)) { - // One or more of the implementations did not exist and need to be - // removed in the cache. - $this->cacheNeedsWriting = TRUE; - } - $this->verified[$hook] = TRUE; - } - return $this->implementations[$hook]; - } - - /** - * Builds hook implementation information for a given hook name. - * - * @param string $hook - * The name of the hook (e.g. "help" or "menu"). - * - * @return mixed[] - * An array whose keys are the names of the modules which are implementing - * this hook and whose values are either a string identifying a file in - * which the implementation is to be found, or FALSE, if the implementation - * is in the module file. - * - * @throws \RuntimeException - * Exception thrown when an invalid implementation is added by - * hook_module_implements_alter(). - * - * @see \Drupal\Core\Extension\ModuleHandler::getImplementationInfo() - */ - protected function buildImplementationInfo($hook) { - $implementations = []; - $hook_info = $this->getHookInfo(); - foreach ($this->moduleList as $module => $extension) { - $include_file = isset($hook_info[$hook]['group']) && $this->loadInclude($module, 'inc', $module . '.' . $hook_info[$hook]['group']); - // Since $this->implementsHook() may needlessly try to load the include - // file again, function_exists() is used directly here. - if (function_exists($module . '_' . $hook)) { - $implementations[$module] = $include_file ? $hook_info[$hook]['group'] : FALSE; - } - } - // Allow modules to change the weight of specific implementations, but avoid - // an infinite loop. - if ($hook != 'module_implements_alter') { - // Remember the original implementations, before they are modified with - // hook_module_implements_alter(). - $implementations_before = $implementations; - // Verify implementations that were added or modified. - $this->alter('module_implements', $implementations, $hook); - // Verify new or modified implementations. - foreach (array_diff_assoc($implementations, $implementations_before) as $module => $group) { - // If an implementation of hook_module_implements_alter() changed or - // added a group, the respective file needs to be included. - if ($group) { - $this->loadInclude($module, 'inc', "$module.$group"); + if (!empty($this->alterEventListeners[$cid])) { + $functions = []; + foreach ($this->alterEventListeners[$cid] as $listener) { + if (is_string($listener)) { + $functions[] = substr($listener, 1); } - // If a new implementation was added, verify that the function exists. - if (!function_exists($module . '_' . $hook)) { - throw new \RuntimeException("An invalid implementation {$module}_{$hook} was added by hook_module_implements_alter()"); + else { + $functions[] = get_class($listener[0]) . '::' . $listener[1]; } } + $message = 'The deprecated alter hook hook_' . $type . '_alter() is implemented in these locations: ' . implode(', ', $functions) . '.'; + @trigger_error($message . ' ' . $description, E_USER_DEPRECATED); } - return $implementations; - } - - /** - * Verifies an array of implementations loaded from cache. - * - * Verification is done by including the lazy-loaded $module.$group.inc file, - * and checking function_exists(). - * - * @param string[] $implementations - * Implementation "group" by module name. - * @param string $hook - * The hook name. - * - * @return bool - * TRUE, if all implementations exist. - * FALSE, if one or more implementations don't exist and need to be removed - * from the cache. - */ - protected function verifyImplementations(&$implementations, $hook) { - $all_valid = TRUE; - foreach ($implementations as $module => $group) { - // If this hook implementation is stored in a lazy-loaded file, include - // that file first. - if ($group) { - $this->loadInclude($module, 'inc', "$module.$group"); - } - // It is possible that a module removed a hook implementation without - // the implementations cache being rebuilt yet, so we check whether the - // function exists on each request to avoid undefined function errors. - // Since ModuleHandler::implementsHook() may needlessly try to - // load the include file again, function_exists() is used directly here. - if (!function_exists($module . '_' . $hook)) { - // Clear out the stale implementation from the cache and force a cache - // refresh to forget about no longer existing hook implementations. - unset($implementations[$module]); - // One of the implementations did not exist and needs to be removed in - // the cache. - $all_valid = FALSE; - } - } - return $all_valid; } /** @@ -728,4 +536,42 @@ public function getName($module) { return \Drupal::service('extension.list.module')->getName($module); } + public function writeCache() { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no need to call this method so there is no replacement. See https://www.drupal.org/node/3442349', E_USER_DEPRECATED); + } + + /** + * @param string $hook + * The name of the hook. + * + * @return array + * A list of event listeners implementing this hook. + */ + protected function getHookListeners(string $hook): array { + if (!isset($this->invokeMap[$hook])) { + foreach ($this->eventDispatcher->getListeners("drupal_hook.$hook") as $listener) { + if (is_array($listener) && is_object($listener[0])) { + $module = $this->hookImplementationsMap[$hook][get_class($listener[0])][$listener[1]]; + // Inline ProceduralCall::__call() otherwise references get lost. + if ($listener[0] instanceof ProceduralCall) { + $listener[0]->loadFile($listener[1]); + $callable = '\\' . $listener[1]; + } + else { + $callable = $listener; + } + if (isset($this->moduleList[$module])) { + $this->invokeMap[$hook][$module][] = $callable; + } + } + } + if (isset($this->groupIncludes[$hook])) { + foreach ($this->groupIncludes[$hook] as $include) { + include_once $include; + } + } + } + return $this->invokeMap[$hook] ?? []; + } + } diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php index afaf8073683881b7dd61629d3683080690cfd3d4..e0b56bb45d853c117b2e3b31dc55f3a1e04e616f 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php @@ -2,8 +2,6 @@ namespace Drupal\Core\Extension; -use Drupal\Core\DestructableInterface; - /** * Interface for classes that manage a set of enabled modules. * @@ -11,7 +9,7 @@ * responsible for loading module files and maintaining information about module * dependencies and hook implementations. */ -interface ModuleHandlerInterface extends DestructableInterface { +interface ModuleHandlerInterface { /** * Includes a module's .module file. @@ -170,12 +168,22 @@ public function loadInclude($module, $type, $name = NULL); * associative array containing a group name. The structure of the array * is the same as the return value of hook_hook_info(). * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Not + * needed any more. + * + * @see https://www.drupal.org/node/3442349 + * * @see hook_hook_info() */ public function getHookInfo(); /** - * Write the hook implementation info to the cache. + * Does not do anything. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Not + * needed any more. + * + * @see https://www.drupal.org/node/3442349 */ public function writeCache(); diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php index 4ba14f3ada8612609ef98a55a8df37a505cdc1bb..2fe42167bcecdac0a72bfa7a418c7b25e5cd7eba 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -272,7 +272,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { } // Allow modules to react prior to the installation of a module. - $this->moduleHandler->invokeAll('module_preinstall', [$module, $sync_status]); + $this->invokeAll('module_preinstall', [$module, $sync_status]); // Now install the module's schema if necessary. $this->installSchema($module); @@ -335,7 +335,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { // If the module has no current updates, but has some that were // previously removed, set the version to the value of // hook_update_last_removed(). - if ($last_removed = $this->moduleHandler->invoke($module, 'update_last_removed')) { + if ($last_removed = $this->invoke($module, 'update_last_removed')) { $version = max($version, $last_removed); } $this->updateRegistry->setInstalledVersion($module, $version); @@ -365,7 +365,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { \Drupal::service('library.discovery')->clear(); // Allow the module to perform install tasks. - $this->moduleHandler->invoke($module, 'install', [$sync_status]); + $this->invoke($module, 'install', [$sync_status]); // Record the fact that it was installed. \Drupal::logger('system')->info('%module module installed.', ['%module' => $module]); @@ -389,7 +389,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { } } - $this->moduleHandler->invokeAll('modules_installed', [$modules_installed, $sync_status]); + $this->invokeAll('modules_installed', [$modules_installed, $sync_status]); } return TRUE; @@ -471,11 +471,11 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { } // Allow modules to react prior to the uninstallation of a module. - $this->moduleHandler->invokeAll('module_preuninstall', [$module, $sync_status]); + $this->invokeAll('module_preuninstall', [$module, $sync_status]); // Uninstall the module. $this->moduleHandler->loadInclude($module, 'install'); - $this->moduleHandler->invoke($module, 'uninstall', [$sync_status]); + $this->invoke($module, 'uninstall', [$sync_status]); // Remove all configuration belonging to the module. \Drupal::service('config.manager')->uninstall('module', $module); @@ -565,12 +565,12 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { \Drupal::service('router.builder')->rebuild(); // Let other modules react. - $this->moduleHandler->invokeAll('modules_uninstalled', [$module_list, $sync_status]); + $this->invokeAll('modules_uninstalled', [$module_list, $sync_status]); // Flush all persistent caches. // Any cache entry might implicitly depend on the uninstalled modules, // so clear all of them explicitly. - $this->moduleHandler->invokeAll('cache_flush'); + $this->invokeAll('cache_flush'); foreach (Cache::getBins() as $cache_backend) { $cache_backend->deleteAll(); } @@ -675,7 +675,7 @@ public function validateUninstall(array $module_list) { * @internal */ protected function installSchema(string $module): void { - $tables = $this->moduleHandler->invoke($module, 'schema') ?? []; + $tables = $this->invoke($module, 'schema') ?? []; $schema = $this->connection->schema(); foreach ($tables as $name => $table) { $schema->createTable($name, $table); @@ -691,7 +691,7 @@ protected function installSchema(string $module): void { * @internal */ protected function uninstallSchema(string $module): void { - $tables = $this->moduleHandler->invoke($module, 'schema') ?? []; + $tables = $this->invoke($module, 'schema') ?? []; $schema = $this->connection->schema(); foreach (array_keys($tables) as $table) { if ($schema->tableExists($table)) { @@ -700,4 +700,52 @@ protected function uninstallSchema(string $module): void { } } + /** + * Call procedural hooks in all installed modules during installation. + * + * Hooks called during install will remain procedural. + * - hook_install() + * - hook_module_preinstall() + * - hook_module_preuninstall() + * - hook_modules_installed() + * - hook_modules_uninstalled() + * - hook_post_update_NAME() + * - hook_schema() + * - hook_uninstall() + * - hook_update_last_removed() + * - hook_update_N() + * + * @param string $hook + * The name of the hook to invoke. + * @param array $args + * Arguments to pass to the hook. + * + * @return void + */ + protected function invokeAll($hook, $args = []): void { + $this->moduleHandler->loadAll(); + foreach ($this->moduleHandler->getModuleList() as $module => $extension) { + $this->moduleHandler->invoke($module, $hook, $args); + } + } + + /** + * Call a procedural hook in an installed module during installation. + * + * Hook_install(), hook_uninstall() etc. will remain procedural. + * + * @param string $module + * The module (it can be a profile, too). + * @param string $hook + * The name of the hook to invoke. + * @param array $args + * Arguments to pass to the hook. + * + * @return mixed + */ + protected function invoke(string $module, string $hook, array $args = []): mixed { + $function = $module . '_' . $hook; + return function_exists($function) ? $function(... $args) : NULL; + } + } diff --git a/core/lib/Drupal/Core/Extension/ProceduralCall.php b/core/lib/Drupal/Core/Extension/ProceduralCall.php new file mode 100644 index 0000000000000000000000000000000000000000..5969a80df7d431e4e2be6cac39d74ffbede062cf --- /dev/null +++ b/core/lib/Drupal/Core/Extension/ProceduralCall.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Extension; + +/** + * Calls procedural hook implementations for backwards compatibility. + * + * @internal + */ +final class ProceduralCall { + + /** + * @param array $includes + * An associated array, key is a function name, value is the name of the + * include file the function lives in, if any. + */ + public function __construct(protected array $includes) { + + } + + /** + * Calls a function in the root namespace. + * + * __call() does not support references https://bugs.php.net/bug.php?id=71256 + * Because of this, ModuleHandler::getHookListeners() inlines this + * method so it is not called anywhere in core. + */ + public function __call($name, $args): mixed { + $this->loadFile($name); + return ('\\' . $name)(... $args); + } + + /** + * Loads the file a function lives in, if any. + * + * @param $function + * The name of the function. + */ + public function loadFile($function): void { + if (isset($this->includes[$function])) { + include_once $this->includes[$function]; + } + } + +} diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index 65e912ba5640d5b38a7eaadaac1e6d49b9fac76a..c11770d9bf55c86e05c979500f0427f1fafa0a3c 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -62,6 +62,8 @@ /** * Defines one or more hooks that are exposed by a module. * + * Only procedural implementations are supported for this hook. + * * Normally hooks do not need to be explicitly defined. However, by declaring a * hook explicitly, a module may define a "group" for it. Modules that implement * a hook may then place their implementation in either $module.module or in @@ -94,6 +96,8 @@ function hook_hook_info() { /** * Alter the registry of modules implementing a hook. * + * Only procedural implementations are supported for this hook. + * * This hook is invoked in \Drupal::moduleHandler()->getImplementationInfo(). * A module may implement this hook in order to reorder the implementing * modules, which are otherwise ordered by the module's system weight. @@ -209,6 +213,8 @@ function hook_modules_installed($modules, $is_syncing) { /** * Perform setup tasks when the module is installed. * + * Only procedural implementations are supported for this hook. + * * If the module implements hook_schema(), the database tables will * be created before this hook is fired. * @@ -249,7 +255,7 @@ function hook_modules_installed($modules, $is_syncing) { * @see hook_uninstall() * @see hook_modules_installed() */ -function hook_install($is_syncing) { +function hook_install($is_syncing): void { // Set general module variables. \Drupal::state()->set('my_module.foo', 'bar'); } @@ -304,6 +310,8 @@ function hook_modules_uninstalled($modules, $is_syncing) { /** * Remove any information that the module sets. * + * Only procedural implementations are supported for this hook. + * * The information that the module should remove includes: * - state that the module has set using \Drupal::state() * - modifications to existing tables @@ -333,7 +341,7 @@ function hook_modules_uninstalled($modules, $is_syncing) { * @see hook_modules_uninstalled() * @see \Drupal\Core\Extension\ModuleUninstallValidatorInterface */ -function hook_uninstall($is_syncing) { +function hook_uninstall($is_syncing): void { // Delete remaining general module variables. \Drupal::state()->delete('my_module.foo'); } @@ -529,6 +537,8 @@ function hook_install_tasks_alter(&$tasks, $install_state) { /** * Perform a single update between minor versions. * + * Only procedural implementations are supported for this hook. + * * Modules should use hook hook_update_N() to update between minor or major * versions of the module. Sites upgrading from Drupal 6 or 7 to any higher * version should use the @link migrate Migrate API @endlink instead. @@ -822,6 +832,8 @@ function hook_update_N(&$sandbox) { /** * Executes an update which is intended to update data, like entities. * + * Only procedural implementations are supported for this hook. + * * These implementations have to be placed in a MODULE.post_update.php file or * a THEME.post_update.php file. * @@ -902,7 +914,7 @@ function hook_post_update_NAME(&$sandbox) { * * @see hook_post_update_NAME() */ -function hook_removed_post_updates() { +function hook_removed_post_updates(): array { return [ 'my_module_post_update_foo' => '8.x-2.0', 'my_module_post_update_bar' => '8.x-3.0', @@ -960,6 +972,8 @@ function hook_update_dependencies() { /** * Return a number which is no longer available as hook_update_N(). * + * Only procedural implementations are supported for this hook. + * * If you remove some update functions from your my_module.install file, you * should notify Drupal of those missing functions. This way, Drupal can * ensure that no update is accidentally skipped. @@ -975,7 +989,7 @@ function hook_update_dependencies() { * * @see hook_update_N() */ -function hook_update_last_removed() { +function hook_update_last_removed(): int { // We've removed the 8.x-1.x version of my_module, including database updates. // The next update function is my_module_update_8200(). return 8103; diff --git a/core/lib/Drupal/Core/Field/Annotation/FieldType.php b/core/lib/Drupal/Core/Field/Annotation/FieldType.php index ae9bb5475385853687562187cf6afdf6117b2d03..293e6341ba9cba7c4f450fe7de0547df2694afab 100644 --- a/core/lib/Drupal/Core/Field/Annotation/FieldType.php +++ b/core/lib/Drupal/Core/Field/Annotation/FieldType.php @@ -65,7 +65,7 @@ class FieldType extends DataType { public $weight = 0; /** - * The plugin_id of the default widget for this field type. + * The plugin ID of the default widget for this field type. * * This widget must be available whenever the field type is available (i.e. * provided by the field type module, or by a module the field type module @@ -73,11 +73,11 @@ class FieldType extends DataType { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $default_widget; /** - * The plugin_id of the default formatter for this field type. + * The plugin ID of the default formatter for this field type. * * This formatter must be available whenever the field type is available (i.e. * provided by the field type module, or by a module the field type module @@ -85,7 +85,7 @@ class FieldType extends DataType { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $default_formatter; /** @@ -93,13 +93,13 @@ class FieldType extends DataType { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $no_ui = FALSE; /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $list_class; /** diff --git a/core/lib/Drupal/Core/Field/Attribute/FieldType.php b/core/lib/Drupal/Core/Field/Attribute/FieldType.php index 2a2196f51ef5759943de0b56f5f4f0d5f148ce2a..45985c3bb4325237d514e926e68868dd9c5f6a9c 100644 --- a/core/lib/Drupal/Core/Field/Attribute/FieldType.php +++ b/core/lib/Drupal/Core/Field/Attribute/FieldType.php @@ -33,12 +33,12 @@ class FieldType extends Plugin { * @param int $weight * (optional) The weight of the field type. * @param string|null $default_widget - * (optional) The plugin_id of the default widget for this field type. + * (optional) The plugin ID of the default widget for this field type. * This widget must be available whenever the field type is available (i.e. * provided by the field type module, or by a module the field type module * depends on). * @param string|null $default_formatter - * (optional) The plugin_id of the default formatter for this field type. + * (optional) The plugin ID of the default formatter for this field type. * This formatter must be available whenever the field type is available * (i.e. provided by the field type module, or by a module the field type * module depends on). diff --git a/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php b/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php index 1e3cdf81f111eaa9b35c00d5f4293095fd9d9c96..52aed42fcf6ff476e2590aac57fb2e24188c8d86 100644 --- a/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php +++ b/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php @@ -2,6 +2,10 @@ namespace Drupal\Core\Field\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Field\BaseFieldOverrideAccessControlHandler; +use Drupal\Core\Field\BaseFieldOverrideStorage; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Field\FieldConfigBase; @@ -11,38 +15,43 @@ * Defines the base field override entity. * * Allows base fields to be overridden on the bundle level. - * - * @ConfigEntityType( - * id = "base_field_override", - * label = @Translation("Base field override"), - * handlers = { - * "storage" = "Drupal\Core\Field\BaseFieldOverrideStorage", - * "access" = "Drupal\Core\Field\BaseFieldOverrideAccessControlHandler", - * }, - * config_prefix = "base_field_override", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "field_name", - * "entity_type", - * "bundle", - * "label", - * "description", - * "required", - * "translatable", - * "default_value", - * "default_value_callback", - * "settings", - * "field_type", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "entity_type", "bundle", "field_name", "field_type"}, - * } - * ) */ +#[ConfigEntityType( + id: 'base_field_override', + label: new TranslatableMarkup('Base field override'), + config_prefix: 'base_field_override', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'storage' => BaseFieldOverrideStorage::class, + 'access' => BaseFieldOverrideAccessControlHandler::class, + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'entity_type', + 'bundle', + 'field_name', + 'field_type', + ], + ], + config_export: [ + 'id', + 'field_name', + 'entity_type', + 'bundle', + 'label', + 'description', + 'required', + 'translatable', + 'default_value', + 'default_value_callback', + 'settings', + 'field_type', + ], +)] class BaseFieldOverride extends FieldConfigBase { /** diff --git a/core/lib/Drupal/Core/Field/FormatterBase.php b/core/lib/Drupal/Core/Field/FormatterBase.php index aa415d39cad14517f6c99103fc5c00de83f7e849..d54def2ecd18cc2e9277da2ca54cc623de9401e5 100644 --- a/core/lib/Drupal/Core/Field/FormatterBase.php +++ b/core/lib/Drupal/Core/Field/FormatterBase.php @@ -49,7 +49,7 @@ abstract class FormatterBase extends PluginSettingsBase implements FormatterInte * Constructs a FormatterBase object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php index dbe8ef7787474d82de472f6f7211c3c6605cdf6d..b80f036ea38bbbf48c34bc97357d5706c129897d 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php @@ -69,7 +69,7 @@ class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase { * Constructs an EntityReferenceEntityFormatter instance. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceLabelFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceLabelFormatter.php index ef033cd466579a32554e71a796828d9561fd13d0..fe482b2fbbc5a6ecbf54e5fb4d1a3d2607fa82bc 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceLabelFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceLabelFormatter.php @@ -2,6 +2,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldFormatter; +use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Exception\UndefinedLinkTemplateException; use Drupal\Core\Field\Attribute\FieldFormatter; @@ -61,7 +62,9 @@ public function viewElements(FieldItemListInterface $items, $langcode) { $output_as_link = $this->getSetting('link'); foreach ($this->getEntitiesToView($items, $langcode) as $delta => $entity) { + $elements[$delta] = ['#entity' => $entity]; $label = $entity->label(); + $cacheability = CacheableMetadata::createFromObject($entity); // If the link is to be displayed and the entity has a uri, display a // link. if ($output_as_link && !$entity->isNew()) { @@ -74,31 +77,38 @@ public function viewElements(FieldItemListInterface $items, $langcode) { // entity type doesn't have a link template nor a valid // "uri_callback", so don't bother trying to output a link for the // rest of the referenced entities. - $output_as_link = FALSE; + $elements[$delta]['#plain_text'] = $label; + $cacheability->applyTo($elements[$delta]); + continue; } - } - if ($output_as_link && isset($uri) && !$entity->isNew()) { - $elements[$delta] = [ - '#type' => 'link', - '#title' => $label, - '#url' => $uri, - '#options' => $uri->getOptions(), - ]; + $uri_access = $uri->access(return_as_object: TRUE); + $cacheability->addCacheableDependency($uri_access); + if ($uri_access->isAllowed()) { + $elements[$delta] += [ + '#type' => 'link', + '#title' => $label, + '#url' => $uri, + '#options' => $uri->getOptions(), + ]; - if (!empty($items[$delta]->_attributes)) { - $elements[$delta]['#options'] += ['attributes' => []]; - $elements[$delta]['#options']['attributes'] += $items[$delta]->_attributes; - // Unset field item attributes since they have been included in the - // formatter output and shouldn't be rendered in the field template. - unset($items[$delta]->_attributes); + if (!empty($items[$delta]->_attributes)) { + $elements[$delta]['#options'] += ['attributes' => []]; + $elements[$delta]['#options']['attributes'] += $items[$delta]->_attributes; + // Unset field item attributes since they have been included in the + // formatter output and shouldn't be rendered in the field template. + unset($items[$delta]->_attributes); + } + } + else { + $elements[$delta]['#plain_text'] = $label; } } else { - $elements[$delta] = ['#plain_text' => $label]; + $elements[$delta]['#plain_text'] = $label; } - $elements[$delta]['#entity'] = $entity; - $elements[$delta]['#cache']['tags'] = $entity->getCacheTags(); + + $cacheability->applyTo($elements[$delta]); } return $elements; diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php index b1a65a49c061f3e924ea95f8db82885e48c8ec99..1a2d0a462e67b315af400ec00ff5a568348dc654 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php @@ -35,7 +35,7 @@ class LanguageFormatter extends StringFormatter { * Constructs a LanguageFormatter instance. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php index 9ccfc05ce9f70d822bb47c423c867c1071f0499c..d860cb73346f13ba14393a8f2f8023181b3fbfdd 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php @@ -38,7 +38,7 @@ class StringFormatter extends FormatterBase { * Constructs a StringFormatter instance. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php index e2e179b94bc6caae3d6857fbdaa1d0924632d3b4..4556cc0564604d55125048c12919fe4817b9ab29 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php @@ -47,7 +47,7 @@ class TimestampAgoFormatter extends FormatterBase { * Constructs a TimestampAgoFormatter object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php index 8afbeb9b7d134b44b52d8c1a7d70951c6a7d2088..aaeb0adf65f318f1a70cab4c056b12fd5a9af7ce 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php @@ -41,7 +41,7 @@ class TimestampFormatter extends FormatterBase { * Constructs a new TimestampFormatter. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php index a7c8460a7c48416bca63aa31bb39efdfcd65214e..a846a6f06240ca499799a0f95a64bcc016f20167 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php @@ -56,7 +56,7 @@ public function preSave() { $this->value = \Drupal::service('password')->hash(trim($this->value)); // Abort if the hashing failed and returned FALSE. if (!$this->value) { - throw new EntityMalformedException('The entity does not have a password.'); + throw new EntityMalformedException(sprintf("Failed to hash the %s password.", $entity->getEntityType()->getLabel())); } } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php index e8a186205fe79d25cddd8a3ee518d85568618aff..29a2041fd43749556e54ace0d77573e05db76bfc 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -45,7 +45,7 @@ abstract class OptionsWidgetBase extends WidgetBase { /** * Tracks whether the field has a value. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected bool $has_value; /** diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index 9de0aa8a18e73bbc5c5765cd0f1aed5d8d1d4c85..3b2ff90fb96048e26a52719fd00f6fa5069314a5 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -40,7 +40,7 @@ abstract class WidgetBase extends PluginSettingsBase implements WidgetInterface, * Constructs a WidgetBase object. * * @param string $plugin_id - * The plugin_id for the widget. + * The plugin ID for the widget. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php b/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php index b84a5514649888c38f6347a713f7a8784f586ad8..70ee07a1ebe047a93d9d6c9bfc63d00a267ff49a 100644 --- a/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php +++ b/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php @@ -911,16 +911,12 @@ public function guessMimeType($path): ?string { $extension = ''; $file_parts = explode('.', \Drupal::service('file_system')->basename($path)); - // Remove the first part: a full filename should not match an extension. - array_shift($file_parts); - - // Iterate over the file parts, trying to find a match. - // For my.awesome.image.jpeg, we try: - // - jpeg - // - image.jpeg, and - // - awesome.image.jpeg - while ($additional_part = array_pop($file_parts)) { - $extension = strtolower($additional_part . ($extension ? '.' . $extension : '')); + // Remove the first part: a full filename should not match an extension, + // then iterate over the file parts, trying to find a match. + // For 'my.awesome.image.jpeg', we try: 'awesome.image.jpeg', then + // 'image.jpeg', then 'jpeg'. + while (array_shift($file_parts)) { + $extension = strtolower(implode('.', $file_parts)); if (isset($this->mapping['extensions'][$extension])) { return $this->mapping['mimetypes'][$this->mapping['extensions'][$extension]]; } diff --git a/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php b/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php index 13b04b22e62e68baf21aa1ec2ca199509038e7f9..ed05bfc9af05042251fc9cacff0250b5a7b17380 100644 --- a/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php +++ b/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php @@ -37,7 +37,6 @@ trait ConfigFormBaseTrait { * not. */ protected function config($name) { - /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ if (method_exists($this, 'configFactory')) { $config_factory = $this->configFactory(); } diff --git a/core/lib/Drupal/Core/Form/ConfigTarget.php b/core/lib/Drupal/Core/Form/ConfigTarget.php index 55b86dc6b4b55220d3323e139cd411d31303df55..4eab41288b6d706fd33f0fffb7368eface724f6c 100644 --- a/core/lib/Drupal/Core/Form/ConfigTarget.php +++ b/core/lib/Drupal/Core/Form/ConfigTarget.php @@ -74,8 +74,8 @@ final class ConfigTarget { * return an array with the transformed values, also keyed by property path. * The callback will receive the form state object as its second argument. * The callback may return a special values: - * - ToConfig::NoMapping, to indicate that the given form value does not - * need to be mapped onto the Config object + * - ToConfig::NoOp, to indicate that the given form value does not need to + * be mapped onto the Config object * - ToConfig::DeleteKey to indicate that the targeted property path should * be deleted from config. * Defaults to NULL. @@ -237,7 +237,7 @@ public function setValue(Config $config, mixed $value, FormStateInterface $form_ } // Set the returned value, or if a special value (one of the cases in the - // ConfigTargetValue enum): apply the appropriate action. + // ToConfig enum): apply the appropriate action. array_walk($value, fn (mixed $value, string $property) => match ($value) { // No-op. ToConfig::NoOp => NULL, diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index f31346a378772fe3a64b4cd5e97e2844efa159e0..be0a22f456f8a9db363f5743bf3caf18572faded 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -770,10 +770,17 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state) { ], ], ], - '#cache' => [ - 'max-age' => 0, - ], ]; + + // If a form hasn't explicitly opted in to caching by setting max-age at + // the top level, then make it uncacheable in case it doesn't have the + // correct cacheability metadata. + // @todo Remove this in the next major version, after the deprecation + // process from https://www.drupal.org/project/drupal/issues/3395157 + // has ended. + if (!isset($form['#cache']['max-age'])) { + $form['form_token']['#cache']['max-age'] = 0; + } } } diff --git a/core/lib/Drupal/Core/Form/FormBuilderInterface.php b/core/lib/Drupal/Core/Form/FormBuilderInterface.php index ff7c6273128e1f54c5f7a9d83a1143c4c85fd62a..66d9da4c2f1e7a6b5ed896e8c097a24469b5fca5 100644 --- a/core/lib/Drupal/Core/Form/FormBuilderInterface.php +++ b/core/lib/Drupal/Core/Form/FormBuilderInterface.php @@ -149,7 +149,7 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form * The value must be one of the following: * - The name of a class that implements \Drupal\Core\Form\FormInterface. * - An instance of a class that implements \Drupal\Core\Form\FormInterface. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. Most important is the * $form_state->getValues() collection, a tree of data used to simulate the * incoming \Drupal::request()->request information from a user's form diff --git a/core/lib/Drupal/Core/Form/FormHelper.php b/core/lib/Drupal/Core/Form/FormHelper.php index 8ac7266a1649cf6aa9af338fc348d59d6f2bc8d2..08e2035d2597c08c6d9f71ec701a4dfa06502433 100644 --- a/core/lib/Drupal/Core/Form/FormHelper.php +++ b/core/lib/Drupal/Core/Form/FormHelper.php @@ -204,11 +204,11 @@ protected static function processStatesArray(array &$conditions, $search, $repla */ public static function processStates(array &$elements) { $elements['#attached']['library'][] = 'core/drupal.states'; - // Elements of '#type' => 'item' are not actual form input elements, but we - // still want to be able to show/hide them. Since there's no actual HTML - // input element available, setting #attributes does not make sense, but a - // wrapper is available, so setting #wrapper_attributes makes it work. - $key = ($elements['#type'] == 'item') ? '#wrapper_attributes' : '#attributes'; + // Elements that are actual form input elements, use '#attributes'. + // In cases like 'item' that are not actual form input elements or + // those like 'password_confirm' that have child elements, + // use #wrapper_attributes. + $key = (($elements['#markup'] ?? FALSE) === '' && ($elements['#input'] ?? FALSE) === TRUE) ? '#wrapper_attributes' : '#attributes'; $elements[$key]['data-drupal-states'] = Json::encode($elements['#states']); } diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php index fe65e0315f15e36aca088b82f52154c8916f64ec..e129050f67e82775f213fcd3e66f6c4d3e96b5a9 100644 --- a/core/lib/Drupal/Core/Form/FormState.php +++ b/core/lib/Drupal/Core/Form/FormState.php @@ -33,7 +33,7 @@ class FormState implements FormStateInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $complete_form; /** @@ -66,7 +66,7 @@ class FormState implements FormStateInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $build_info = [ 'args' => [], 'files' => [], @@ -81,7 +81,7 @@ class FormState implements FormStateInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $rebuild_info = []; /** @@ -166,7 +166,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $no_redirect; /** @@ -225,7 +225,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $no_cache; /** @@ -284,7 +284,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $always_process; /** @@ -299,7 +299,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $must_validate; /** @@ -323,7 +323,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $programmed_bypass_access_check = TRUE; /** @@ -336,7 +336,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $process_input; /** @@ -368,7 +368,7 @@ class FormState implements FormStateInterface { * * @var array|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $triggering_element; /** @@ -379,7 +379,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $has_file_element; /** @@ -447,7 +447,7 @@ class FormState implements FormStateInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $validation_complete = FALSE; /** @@ -473,7 +473,7 @@ class FormState implements FormStateInterface { * * @var array|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $limit_validation_errors; /** @@ -483,7 +483,7 @@ class FormState implements FormStateInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $validate_handlers = []; /** @@ -493,7 +493,7 @@ class FormState implements FormStateInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $submit_handlers = []; /** diff --git a/core/lib/Drupal/Core/Form/FormSubmitterInterface.php b/core/lib/Drupal/Core/Form/FormSubmitterInterface.php index c3e0089b079189b4cdd66b8e89404e4542e039dc..9d078b3ca332e85cf0000b23b16065383abc74e7 100644 --- a/core/lib/Drupal/Core/Form/FormSubmitterInterface.php +++ b/core/lib/Drupal/Core/Form/FormSubmitterInterface.php @@ -27,9 +27,9 @@ public function doSubmitForm(&$form, FormStateInterface &$form_state); * Button-specific handlers are checked first. If none exist, the function * falls back to form-level handlers. * - * @param $form + * @param array $form * An associative array containing the structure of the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. If the user submitted the form by clicking * a button with custom handler functions defined, those handlers will be * stored here. diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php index 0502ea3239212fd918c0a55ac99244ac72b0d780..b5624f624db7e4dd1574ac1a176f1da1c28003e8 100644 --- a/core/lib/Drupal/Core/Form/form.api.php +++ b/core/lib/Drupal/Core/Form/form.api.php @@ -186,13 +186,13 @@ function hook_ajax_render_alter(array &$data) { * hook_form_FORM_ID_alter(). So, for each module, the more general hooks are * called first followed by the more specific. * - * @param $form + * @param array $form * Nested array of form elements that comprise the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. The arguments that * \Drupal::formBuilder()->getForm() was originally called with are available * in the array $form_state->getBuildInfo()['args']. - * @param $form_id + * @param string $form_id * A string that is the unique ID of the form, set by * Drupal\Core\Form\FormInterface::getFormId(). * @@ -201,7 +201,7 @@ function hook_ajax_render_alter(array &$data) { * * @ingroup form_api */ -function hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { +function hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id): void { if (isset($form['type']) && $form['type']['#value'] . '_node_settings' == $form_id) { $upload_enabled_types = \Drupal::config('my_module.settings')->get('upload_enabled_types'); $form['workflow']['upload_' . $form['type']['#value']] = [ @@ -235,13 +235,13 @@ function hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_stat * hook_form_FORM_ID_alter(). So, for each module, the more general hooks are * called first followed by the more specific. * - * @param $form + * @param array $form * Nested array of form elements that comprise the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. The arguments that * \Drupal::formBuilder()->getForm() was originally called with are available * in the array $form_state->getBuildInfo()['args']. - * @param $form_id + * @param string $form_id * String representing the name of the form itself. Typically this is the * name of the function that generated the form. * @@ -251,7 +251,7 @@ function hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_stat * * @ingroup form_api */ -function hook_form_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { +function hook_form_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id): void { // Modification for the form with the given form ID goes here. For example, if // FORM_ID is "user_register_form" this code would run only on the user // registration form. @@ -293,11 +293,11 @@ function hook_form_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $f * hook_form_FORM_ID_alter(). So, for each module, the more general hooks are * called first followed by the more specific. * - * @param $form + * @param array $form * Nested array of form elements that comprise the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. - * @param $form_id + * @param string $form_id * String representing the name of the form itself. Typically this is the * name of the function that generated the form. * @@ -307,7 +307,7 @@ function hook_form_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $f * * @ingroup form_api */ -function hook_form_BASE_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { +function hook_form_BASE_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id): void { // Modification for the form with the given BASE_FORM_ID goes here. For // example, if BASE_FORM_ID is "node_form", this code would run on every // node form, regardless of node type. diff --git a/core/lib/Drupal/Core/Hook/Attribute/Hook.php b/core/lib/Drupal/Core/Hook/Attribute/Hook.php new file mode 100644 index 0000000000000000000000000000000000000000..2fd5338d781b0027d0f4115a4223efed3df67178 --- /dev/null +++ b/core/lib/Drupal/Core/Hook/Attribute/Hook.php @@ -0,0 +1,125 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Hook\Attribute; + +/** + * Attribute for defining a class method as a hook implementation. + * + * Hook implementations in classes need to be marked with this attribute, + * using one of the following techniques: + * - On a method, use this attribute with the hook name: + * @code + * #[Hook('user_cancel')] + * public method userCancel(...) + * @endcode + * - On a class, specifying the method name: + * @code + * #[Hook('user_cancel', method: 'userCancel')] + * class Hooks { + * method userCancel(...) {} + * } + * @endcode + * - On a class with an __invoke method, which is taken to be the hook + * implementation: + * @code + * #[Hook('user_cancel')] + * class Hooks { + * method __invoke(...) {} + * } + * @endcode + * + * Ordering hook implementations can be done by implementing + * hook_module_implements_alter. + * + * Classes that use this annotation on the class or on their methods are + * automatically registered as autowired services with the class name as the + * service ID. If autowire does not suffice, they can be registered manually as + * well. + * + * Implementing a hook on behalf of another module can be done by by specifying + * the 'module' parameter in the attribute. + * + * @section sec_multiple_implementations Multiple implementations + * + * Multiple implementations are allowed on multiple axes: + * - One method can implement multiple hooks by adding a Hook attribute for each + * method. + * - One module can implement a particular hook multiple times in multiple + * classes, although see below for some exceptions. This allows, for example, + * adding hook_form_alter() implementations firing on other conditions than + * form ID without modifying any existing implementations. + * + * The following hooks may not have multiple implementations by a single module: + * - hook_library_build_info() + * - hook_mail() + * - hook_help() + * - hook_node_update_index() + * + * @section sec_procedural Procedural hooks + * + * The following hooks can only have procedural hook implementations: + * + * Legacy meta hooks: + * - hook_hook_info() + * - hook_module_implements_alter() + * + * Install hooks: + * - hook_install() + * - hook_post_update_NAME() + * - hook_schema() + * - hook_uninstall() + * - hook_update_last_removed() + * - hook_update_N() + * + * Theme hooks: + * - hook_preprocess_HOOK() + * - hook_process_HOOK() + * + * @section sec_backwards_compatibility Backwards-compatibility + * + * To allow hook implementations to work on older versions of Drupal as well, + * add both an attribute-based hook implementation and a procedural hook + * implementation, with the \Drupal\Core\Hook\Attribute\LegacyHook attribute on + * the procedural hook implementations. + * + * See \Drupal\Core\Hook\Attribute\LegacyHook for additional information. + */ +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] +class Hook { + + /** + * Constructs a Hook attribute object. + * + * @param string $hook + * The short hook name, without the 'hook_' prefix. + * @param string $method + * (optional) The method name. If this attribute is on a method, this + * parameter is not required. If this attribute is on a class and this + * parameter is omitted, the class must have an __invoke() method, which is + * taken as the hook implementation. + * @param string|null $module + * (optional) The module this implementation is for. This allows one module to + * implement a hook on behalf of another module. Defaults to the module the + * implementation is in. + */ + public function __construct( + public string $hook, + public string $method = '', + public ?string $module = NULL, + ) {} + + /** + * Set the method the hook should apply to. + * + * @param string $method + * The method that the hook attribute applies to. + * This only needs to be set when the attribute is on the class. + */ + public function setMethod(string $method): static { + $this->method = $method; + return $this; + } + +} diff --git a/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php b/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php new file mode 100644 index 0000000000000000000000000000000000000000..ee6501d7b42e7e57679002a651eb54dcfea32492 --- /dev/null +++ b/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Hook\Attribute; + +/** + * Defines a LegacyHook attribute object. + * + * This allows contrib and core to maintain legacy hook implementations + * alongside the new attribute-based hooks. This means that a contrib module can + * simultaneously support Drupal 11 and older versions of Drupal that only + * support procedural hooks. + * + * Marking a procedural hook as #LegacyHook will prevent duplicate executions of + * attribute-based hooks. + * + * On older versions of Drupal which are not aware of attribute-based hooks, + * only the legacy hook implementation is executed. + * + * For more information, see https://www.drupal.org/node/3442349. + */ +#[\Attribute(\Attribute::TARGET_FUNCTION)] +class LegacyHook { + +} diff --git a/core/lib/Drupal/Core/Hook/HookCollectorPass.php b/core/lib/Drupal/Core/Hook/HookCollectorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..3d96ca99486fd355bfe131cbe7244323ed8823e1 --- /dev/null +++ b/core/lib/Drupal/Core/Hook/HookCollectorPass.php @@ -0,0 +1,351 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Core\Hook; + +use Drupal\Component\Annotation\Doctrine\StaticReflectionParser; +use Drupal\Component\Annotation\Reflection\MockFileFinder; +use Drupal\Core\Extension\ProceduralCall; +use Drupal\Core\Hook\Attribute\Hook; +use Drupal\Core\Hook\Attribute\LegacyHook; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Collects and registers hook implementations. + * + * A hook implementation is a class in a Drupal\modulename\Hook namespace + * where either the class itself or the methods have a #[Hook] attribute. + * These classes are automatically registered as autowired services. + * + * Services for procedural implementation of hooks are also registered + * using the ProceduralCall class. + * + * Finally, a hook_implementations_map container parameter is added. This + * contains a mapping from [hook,class,method] to the module name. + */ +class HookCollectorPass implements CompilerPassInterface { + + /** + * An associative array of hook implementations. + * + * Keys are hook, module, class. Values are a list of methods. + */ + protected array $implementations = []; + + /** + * An associative array of hook implementations. + * + * Keys are hook, module and an empty string value. + * + * @see hook_module_implements_alter() + */ + protected array $moduleImplements = []; + + /** + * A list of include files. + * + * (This is required only for BC.) + */ + protected array $includes = []; + + /** + * A list of functions implementing hook_module_implements_alter(). + * + * (This is required only for BC.) + */ + protected array $moduleImplementsAlters = []; + + /** + * A list of functions implementing hook_hook_info(). + * + * (This is required only for BC.) + */ + private array $hookInfo = []; + + /** + * A list of .inc files. + */ + private array $groupIncludes = []; + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container): void { + $collector = static::collectAllHookImplementations($container->getParameter('container.modules')); + $map = []; + $container->register(ProceduralCall::class, ProceduralCall::class) + ->addArgument($collector->includes); + $groupIncludes = []; + foreach ($collector->hookInfo as $function) { + foreach ($function() as $hook => $info) { + if (isset($collector->groupIncludes[$info['group']])) { + $groupIncludes[$hook] = $collector->groupIncludes[$info['group']]; + } + } + } + $definition = $container->getDefinition('module_handler'); + $definition->setArgument('$groupIncludes', $groupIncludes); + foreach ($collector->moduleImplements as $hook => $moduleImplements) { + foreach ($collector->moduleImplementsAlters as $alter) { + $alter($moduleImplements, $hook); + } + $priority = 0; + foreach ($moduleImplements as $module => $v) { + foreach ($collector->implementations[$hook][$module] as $class => $method_hooks) { + if ($container->has($class)) { + $definition = $container->findDefinition($class); + } + else { + $definition = $container + ->register($class, $class) + ->setAutowired(TRUE); + } + foreach ($method_hooks as $method) { + $map[$hook][$class][$method] = $module; + $definition->addTag('kernel.event_listener', [ + 'event' => "drupal_hook.$hook", + 'method' => $method, + 'priority' => $priority--, + ]); + } + } + } + } + $container->setParameter('hook_implementations_map', $map); + } + + /** + * Collects all hook implementations. + * + * @param array $module_filenames + * An associative array. Keys are the module names, values are relevant + * info yml file path. + * + * @return static + * A HookCollectorPass instance holding all hook implementations and + * include file information. + * + * @internal + * This method is only used by ModuleHandler. + */ + public static function collectAllHookImplementations(array $module_filenames): static { + $modules = array_map(fn ($x) => preg_quote($x, '/'), array_keys($module_filenames)); + // Longer modules first. + usort($modules, fn($a, $b) => strlen($b) - strlen($a)); + $module_preg = '/^(?<function>(?<module>' . implode('|', $modules) . ')_(?!preprocess_)(?!update_\d)(?<hook>[a-zA-Z0-9_\x80-\xff]+$))/'; + $collector = new static(); + foreach ($module_filenames as $module => $info) { + $collector->collectModuleHookImplementations(dirname($info['pathname']), $module, $module_preg); + } + return $collector; + } + + /** + * Collects procedural and Attribute hook implementations. + * + * @param $dir + * The directory in which the module resides. + * @param $module + * The name of the module. + * @param $module_preg + * A regular expression matching every module, longer module names are + * matched first. + * + * @return void + */ + protected function collectModuleHookImplementations($dir, $module, $module_preg): void { + $iterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS | \FilesystemIterator::FOLLOW_SYMLINKS); + $iterator = new \RecursiveCallbackFilterIterator($iterator, static::filterIterator(...)); + $iterator = new \RecursiveIteratorIterator($iterator); + /** @var \RecursiveDirectoryIterator | \RecursiveIteratorIterator $iterator*/ + foreach ($iterator as $fileinfo) { + assert($fileinfo instanceof \SplFileInfo); + $extension = $fileinfo->getExtension(); + if ($extension === 'module' && !$iterator->getDepth()) { + // There is an expectation for all modules to be loaded. However, + // .module files are not supposed to be in subdirectories. + include_once $fileinfo->getPathname(); + } + if ($extension === 'php') { + $namespace = preg_replace('#^src/#', "Drupal/$module/", $iterator->getSubPath()); + $class = $namespace . '/' . $fileinfo->getBasename('.php'); + $class = str_replace('/', '\\', $class); + foreach (static::getHookAttributesInClass($class) as $attribute) { + $this->addFromAttribute($attribute, $class, $module); + } + } + else { + $finder = MockFileFinder::create($fileinfo->getPathName()); + $parser = new StaticReflectionParser('', $finder); + foreach ($parser->getMethodAttributes() as $function => $attributes) { + if (!StaticReflectionParser::hasAttribute($attributes, LegacyHook::class) && preg_match($module_preg, $function, $matches)) { + $this->addProceduralImplementation($fileinfo, $matches['hook'], $matches['module'], $matches['function']); + } + } + } + if ($extension === 'inc') { + $parts = explode('.', $fileinfo->getFilename()); + if (count($parts) === 3 && $parts[0] === $module) { + $this->groupIncludes[$parts[1]][] = $fileinfo->getPathname(); + } + } + } + } + + /** + * Filter iterator callback. Allows include files and .php files in src/Hook. + */ + protected static function filterIterator(\SplFileInfo $fileInfo, $key, \RecursiveDirectoryIterator $iterator): bool { + $sub_path_name = $iterator->getSubPathname(); + $extension = $fileInfo->getExtension(); + if (str_starts_with($sub_path_name, 'src/Hook/')) { + return $iterator->isDir() || $extension === 'php'; + } + if ($iterator->isDir()) { + if ($sub_path_name === 'src' || $sub_path_name === 'src/Hook') { + return TRUE; + } + // glob() doesn't support streams but scandir() does. + return !in_array($fileInfo->getFilename(), ['tests', 'js', 'css']) && !array_filter(scandir($key), fn ($filename) => str_ends_with($filename, '.info.yml')); + } + return in_array($extension, ['inc', 'module', 'profile', 'install']); + } + + /** + * An array of Hook attributes on this class with $method set. + * + * @param string $class + * The class. + * + * @return \Drupal\Core\Hook\Attribute\Hook[] + * An array of Hook attributes on this class. The $method property is guaranteed to be set. + */ + protected static function getHookAttributesInClass(string $class): array { + if (!class_exists($class)) { + return []; + } + $reflection_class = new \ReflectionClass($class); + $class_implementations = []; + // Check for #[Hook] on the class itself. + foreach ($reflection_class->getAttributes(Hook::class, \ReflectionAttribute::IS_INSTANCEOF) as $reflection_attribute) { + $hook = $reflection_attribute->newInstance(); + assert($hook instanceof Hook); + self::checkForProceduralOnlyHooks($hook, $class); + if (!$hook->method) { + if (method_exists($class, '__invoke')) { + $hook->setMethod('__invoke'); + } + else { + throw new \LogicException("The Hook attribute for hook $hook->hook on class $class must specify a method."); + } + } + $class_implementations[] = $hook; + } + // Check for #[Hook] on methods. + foreach ($reflection_class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method_reflection) { + foreach ($method_reflection->getAttributes(Hook::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute_reflection) { + $hook = $attribute_reflection->newInstance(); + assert($hook instanceof Hook); + self::checkForProceduralOnlyHooks($hook, $class); + $class_implementations[] = $hook->setMethod($method_reflection->getName()); + } + } + return $class_implementations; + } + + /** + * Adds a Hook attribute implementation. + * + * @param \Drupal\Core\Hook\Attribute\Hook $hook + * A hook attribute. + * @param $class + * The class in which said attribute resides in. + * @param $module + * The module in which the class resides in. + * + * @return void + */ + protected function addFromAttribute(Hook $hook, $class, $module) { + if ($hook->module) { + $module = $hook->module; + } + $this->moduleImplements[$hook->hook][$module] = ''; + $this->implementations[$hook->hook][$module][$class][] = $hook->method; + } + + /** + * Adds a procedural hook implementation. + * + * @param \SplFileInfo $fileinfo + * The file this procedural implementation is in. (You don't say) + * @param string $hook + * The name of the hook. (Huh, right?) + * @param string $module + * The name of the module. (Truly shocking!) + * @param string $function + * The name of function implementing the hook. (Wow!) + * + * @return void + */ + protected function addProceduralImplementation(\SplFileInfo $fileinfo, string $hook, string $module, string $function) { + $this->addFromAttribute(new Hook($hook, $module . '_' . $hook), ProceduralCall::class, $module); + if ($hook === 'hook_info') { + $this->hookInfo[] = $function; + } + if ($hook === 'module_implements_alter') { + $this->moduleImplementsAlters[] = $function; + } + if ($fileinfo->getExtension() !== 'module') { + $this->includes[$function] = $fileinfo->getPathname(); + } + } + + /** + * This method is only to be used by ModuleHandler. + * + * @internal + */ + public function loadAllIncludes(): void { + foreach ($this->includes as $include) { + include_once $include; + } + } + + /** + * This method is only to be used by ModuleHandler. + * + * @internal + */ + public function getImplementations(): array { + return $this->implementations; + } + + /** + * Checks for hooks which can't be supported in classes. + * + * @param \Drupal\Core\Hook\Attribute\Hook $hook + * The hook to check. + * @param string $class + * The class the hook is implemented on. + * + * @return void + */ + public static function checkForProceduralOnlyHooks(Hook $hook, string $class): void { + $staticDenyHooks = [ + 'hook_info', + 'install', + 'module_implements_alter', + 'requirements', + 'schema', + 'uninstall', + 'update_last_removed', + ]; + + if (in_array($hook->hook, $staticDenyHooks) || preg_match('/^(post_update_|preprocess_|process_|update_\d+$)/', $hook->hook)) { + throw new \LogicException("The hook $hook->hook on class $class does not support attributes and must remain procedural."); + } + } + +} diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php index 27ef431353198b3569070b57b675dc9dff4585c2..b603bd1fd99a21666598aa66287ee30043c89e58 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php @@ -52,7 +52,7 @@ abstract class ImageToolkitBase extends PluginBase implements ImageToolkitInterf * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface $operation_manager diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php index 441fbd57f5a47c931b52a092a4efaf9edd1219d8..d7a6f70c54aaf2c203cdf2d8f0fb9a9cf87041d4 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php @@ -36,7 +36,7 @@ abstract class ImageToolkitOperationBase extends PluginBase implements ImageTool * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit @@ -97,8 +97,8 @@ abstract protected function arguments(); * @return array * The prepared arguments array. * - * @throws \InvalidArgumentException. - * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException. + * @throws \InvalidArgumentException + * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException */ protected function prepareArguments(array $arguments) { foreach ($this->arguments() as $id => $argument) { diff --git a/core/lib/Drupal/Core/Layout/LayoutDefinition.php b/core/lib/Drupal/Core/Layout/LayoutDefinition.php index 11cbf51436626c4a0916ab8f2985b882a511f1cc..e0cd3cc1f59616b93caafa067bf826c7df1fecc9 100644 --- a/core/lib/Drupal/Core/Layout/LayoutDefinition.php +++ b/core/lib/Drupal/Core/Layout/LayoutDefinition.php @@ -65,7 +65,7 @@ class LayoutDefinition extends PluginDefinition implements PluginDefinitionInter * * @var string|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $theme_hook; /** @@ -96,7 +96,7 @@ class LayoutDefinition extends PluginDefinition implements PluginDefinitionInter * * @see \Drupal\Core\Layout\Icon\IconBuilderInterface::build() */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $icon_map; /** @@ -118,7 +118,7 @@ class LayoutDefinition extends PluginDefinition implements PluginDefinitionInter * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $default_region; /** diff --git a/core/lib/Drupal/Core/Menu/LocalActionDefault.php b/core/lib/Drupal/Core/Menu/LocalActionDefault.php index 5d327421088589ef170a52eb2b016489ea7b8ab1..d2511e9664cf553f750429a8d4db31e8fcdae64f 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionDefault.php +++ b/core/lib/Drupal/Core/Menu/LocalActionDefault.php @@ -32,7 +32,7 @@ class LocalActionDefault extends PluginBase implements LocalActionInterface, Con * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/lib/Drupal/Core/Menu/MenuLinkDefault.php b/core/lib/Drupal/Core/Menu/MenuLinkDefault.php index 8407844565d5bc407fef155c84a4c2f5adbc44df..17f94d60fdd0be7ed7a4c44ef9c22e8e9cb70082 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkDefault.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkDefault.php @@ -35,7 +35,7 @@ class MenuLinkDefault extends MenuLinkBase implements ContainerFactoryPluginInte * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Menu\StaticMenuLinkOverridesInterface $static_override diff --git a/core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php b/core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php index 27591d4a3f39747097011d838aa107226cd28f78..64ba69275ee585eaf19fcb44e64ca0d7d48dec1d 100644 --- a/core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php +++ b/core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php @@ -39,7 +39,7 @@ class LocalActionsBlock extends BlockBase implements ContainerFactoryPluginInter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Menu\LocalActionManagerInterface $local_action_manager diff --git a/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php b/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php index bc7d6e7590952098837cf52e5d929b5c4ae0e6ad..c34d7105e87e713290f396ad4939b2a02b698bc2 100644 --- a/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php +++ b/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php @@ -43,7 +43,7 @@ class LocalTasksBlock extends BlockBase implements ContainerFactoryPluginInterfa * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Menu\LocalTaskManagerInterface $local_task_manager diff --git a/core/lib/Drupal/Core/Password/PhpassHashedPasswordBase.php b/core/lib/Drupal/Core/Password/PhpassHashedPasswordBase.php index 0e60391a2eec8539543a4ec8ea0d2f07d59bc582..f659c367bb4ec2ec00a9294044cf0cb1526ab63b 100644 --- a/core/lib/Drupal/Core/Password/PhpassHashedPasswordBase.php +++ b/core/lib/Drupal/Core/Password/PhpassHashedPasswordBase.php @@ -33,7 +33,7 @@ abstract class PhpassHashedPasswordBase implements PasswordInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public static $ITOA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; /** diff --git a/core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php b/core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php index 5ac5ae40d93b73e7fdef444629481bea24039865..e9e31be4f2d774d075298c7cb6867087dadedc28 100644 --- a/core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php +++ b/core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php @@ -14,7 +14,7 @@ trait DependentPluginDefinitionTrait { * * @see \Drupal\Core\Config\Entity\ConfigDependencyManager */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $config_dependencies = []; /** diff --git a/core/lib/Drupal/Core/Recipe/InputConfigurator.php b/core/lib/Drupal/Core/Recipe/InputConfigurator.php index 9dbc977f84fffe82109bf90ba550e5fc5b46dcc4..4e429ef70cf0f9456e4218a38922fb5ad596d27e 100644 --- a/core/lib/Drupal/Core/Recipe/InputConfigurator.php +++ b/core/lib/Drupal/Core/Recipe/InputConfigurator.php @@ -124,18 +124,20 @@ public function describeAll(): array { * * @param \Drupal\Core\Recipe\InputCollectorInterface $collector * The input collector to use. + * @param string[] $processed + * The names of the recipes for which input has already been collected. + * Internal use only, should not be passed in by calling code. * * @throws \Symfony\Component\Validator\Exception\ValidationFailedException * Thrown if any of the collected values violate their validation * constraints. */ - public function collectAll(InputCollectorInterface $collector): void { + public function collectAll(InputCollectorInterface $collector, array &$processed = []): void { if (is_array($this->values)) { throw new \LogicException('Input values cannot be changed once they have been set.'); } // Don't bother collecting values for a recipe we've already seen. - static $processed = []; if (in_array($this->prefix, $processed, TRUE)) { return; } @@ -143,7 +145,7 @@ public function collectAll(InputCollectorInterface $collector): void { // First, collect values for the recipe's dependencies. /** @var \Drupal\Core\Recipe\Recipe $dependency */ foreach ($this->dependencies->recipes as $dependency) { - $dependency->input->collectAll($collector); + $dependency->input->collectAll($collector, $processed); } $this->values = []; diff --git a/core/lib/Drupal/Core/Recipe/Recipe.php b/core/lib/Drupal/Core/Recipe/Recipe.php index 89e7b0ed742de6e452dee26a1a1e527be99d562d..c9f5f055932c9ec98bb5a403d4c580105862a56c 100644 --- a/core/lib/Drupal/Core/Recipe/Recipe.php +++ b/core/lib/Drupal/Core/Recipe/Recipe.php @@ -383,14 +383,23 @@ private static function validateConfigActions(mixed $value, ExecutionContextInte $configurator = new RecipeConfigurator($recipe_being_validated['recipes'] ?? [], $include_path); + /** @var \Drupal\Core\Extension\ModuleExtensionList $module_list */ + $module_list = \Drupal::service('extension.list.module'); // The config provider must either be an already-installed module or theme, // or an extension being installed by this recipe or a recipe it depends on. $all_extensions = [ - ...array_keys(\Drupal::service('extension.list.module')->getAllInstalledInfo()), + ...array_keys($module_list->getAllInstalledInfo()), ...array_keys(\Drupal::service('extension.list.theme')->getAllInstalledInfo()), ...$recipe_being_validated['install'] ?? [], ...$configurator->listAllExtensions(), ]; + // Explicitly treat required modules as installed, even if Drupal isn't + // installed yet, because we know they WILL be installed. + foreach ($module_list->getAllAvailableInfo() as $name => $info) { + if (!empty($info['required'])) { + $all_extensions[] = $name; + } + } if (!in_array($config_provider, $all_extensions, TRUE)) { $context->addViolation('Config actions cannot be applied to %config_name because the %config_provider extension is not installed, and is not installed by this recipe or any of the recipes it depends on.', [ diff --git a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php index 6c73a0d85e469bc79623bb17c7cf696cc9d5c8cd..a2c47433c50bb253a2cd31188493474f02ddb3b9 100644 --- a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php +++ b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php @@ -62,7 +62,7 @@ public function renderBarePage(array $content, $title, $page_theme_property, arr // Add the bare minimum of attachments from the system module and the // current maintenance theme. - system_page_attachments($html['page']); + _system_page_attachments($html['page']); $this->renderer->renderRoot($html); $response = new HtmlResponse(); diff --git a/core/lib/Drupal/Core/Render/Element/FormElementBase.php b/core/lib/Drupal/Core/Render/Element/FormElementBase.php index 75da91227dc4cf80bf5458e3bbcffe6d23e45079..bce01e19558d7d6dc497dcd3f91ffa87eb403960 100644 --- a/core/lib/Drupal/Core/Render/Element/FormElementBase.php +++ b/core/lib/Drupal/Core/Render/Element/FormElementBase.php @@ -132,7 +132,7 @@ public static function processPattern(&$element, FormStateInterface $form_state, * @param $element * An associative array containing the properties and children of the * generic form element. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. * @param array $complete_form * The complete form structure. diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php index a67c53299b4e75fc3247dfaf44acc535e3e7463d..3a9354c754908f8e3bc14bc34bbbd29151309e6c 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -525,9 +525,9 @@ * Note that the base theme's form alterations will be run before any sub-theme * alterations. * - * @param $form + * @param array $form * Nested array of form elements that comprise the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. */ function hook_form_system_theme_settings_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state) { @@ -1248,7 +1248,7 @@ function hook_page_bottom(array &$page_bottom) { * @see themeable * @see hook_theme_registry_alter() */ -function hook_theme($existing, $type, $theme, $path) { +function hook_theme($existing, $type, $theme, $path): array { return [ 'my_module_display' => [ 'variables' => [ diff --git a/core/lib/Drupal/Core/Session/SessionConfiguration.php b/core/lib/Drupal/Core/Session/SessionConfiguration.php index 1d98facb2db8326b11d3499777fb5c3440a6c4e8..9f127db61a9af405946b70023a669b786d7863c2 100644 --- a/core/lib/Drupal/Core/Session/SessionConfiguration.php +++ b/core/lib/Drupal/Core/Session/SessionConfiguration.php @@ -25,12 +25,9 @@ class SessionConfiguration implements SessionConfigurationInterface { * @see https://www.php.net/manual/session.security.ini.php */ public function __construct($options = []) { - // Provide sensible defaults for sid_length, sid_bits_per_character and - // name_suffix. + // Provide sensible defaults for name_suffix. // @see core/assets/scaffold/files/default.services.yml $this->options = $options + [ - 'sid_length' => 48, - 'sid_bits_per_character' => 6, 'name_suffix' => '', ]; } @@ -58,10 +55,6 @@ public function getOptions(Request $request) { // Set the session cookie name. $options['name'] = $this->getName($request); - if (\PHP_VERSION_ID >= 80400) { - // See https://wiki.php.net/rfc/deprecations_php_8_4#sessionsid_length_and_sessionsid_bits_per_character - unset($options['sid_length'], $options['sid_bits_per_character']); - } return $options; } diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php index 30f5f3e9bcdae856281f1a8b5d070940a28a9a16..caa45c379172a79c24436777e256ccf4e322b07a 100644 --- a/core/lib/Drupal/Core/Session/UserSession.php +++ b/core/lib/Drupal/Core/Session/UserSession.php @@ -45,7 +45,7 @@ class UserSession implements AccountInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $preferred_langcode; /** @@ -53,7 +53,7 @@ class UserSession implements AccountInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $preferred_admin_langcode; /** diff --git a/core/lib/Drupal/Core/Template/Attribute.php b/core/lib/Drupal/Core/Template/Attribute.php index 7422e26f463dc42b864dd937ea728e68ab41fd7e..52485e6a538a4071d44641f34f9c2fb385b2831b 100644 --- a/core/lib/Drupal/Core/Template/Attribute.php +++ b/core/lib/Drupal/Core/Template/Attribute.php @@ -174,13 +174,12 @@ public function offsetExists($name): bool { /** * Adds classes or merges them on to array of existing CSS classes. * - * @param string|array ... + * @param string|array ...$args * CSS classes to add to the class attribute array. * * @return $this */ - public function addClass() { - $args = func_get_args(); + public function addClass(...$args) { if ($args) { $classes = []; foreach ($args as $arg) { @@ -237,13 +236,12 @@ public function hasAttribute($name) { /** * Removes an attribute from an Attribute object. * - * @param string|array ... + * @param string|array ...$args * Attributes to remove from the attribute array. * * @return $this */ - public function removeAttribute() { - $args = func_get_args(); + public function removeAttribute(...$args) { foreach ($args as $arg) { // Support arrays or multiple arguments. if (is_array($arg)) { @@ -262,15 +260,14 @@ public function removeAttribute() { /** * Removes argument values from array of existing CSS classes. * - * @param string|array ... + * @param string|array ...$args * CSS classes to remove from the class attribute array. * * @return $this */ - public function removeClass() { + public function removeClass(...$args) { // With no class attribute, there is no need to remove. if (isset($this->storage['class']) && $this->storage['class'] instanceof AttributeArray) { - $args = func_get_args(); $classes = []; foreach ($args as $arg) { // Merge the values passed in from the classes array. diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 7ed7716208026a54748c119793ba5a8c0b36810a..cd34aec44973bc8b2a2baf1044c8f2982cdf1ae5 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -631,22 +631,20 @@ public function createAttribute(Attribute|array $attributes = []) { * * @param array|object $element * The parent renderable array to exclude the child items. - * @param string[]|string ... + * @param string[]|string ...$args * The string keys of $element to prevent printing. Arguments can include * string keys directly, or arrays of string keys to hide. * * @return array * The filtered renderable array. */ - public function withoutFilter($element) { + public function withoutFilter($element, ...$args) { if ($element instanceof \ArrayAccess) { $filtered_element = clone $element; } else { $filtered_element = $element; } - $args = func_get_args(); - unset($args[0]); // Since the remaining arguments can be a mix of arrays and strings, we use // some native PHP iterator classes to allow us to recursively iterate over // everything in a single pass. diff --git a/core/lib/Drupal/Core/Template/TwigSandboxPolicy.php b/core/lib/Drupal/Core/Template/TwigSandboxPolicy.php index 059e91d68d8996f8268537f0c190de62bcceed1a..2a8dfe7dae64a62cd228290ab722b21ed28f1cfb 100644 --- a/core/lib/Drupal/Core/Template/TwigSandboxPolicy.php +++ b/core/lib/Drupal/Core/Template/TwigSandboxPolicy.php @@ -22,7 +22,7 @@ class TwigSandboxPolicy implements SecurityPolicyInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $allowed_methods; /** @@ -32,7 +32,7 @@ class TwigSandboxPolicy implements SecurityPolicyInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $allowed_prefixes; /** @@ -40,7 +40,7 @@ class TwigSandboxPolicy implements SecurityPolicyInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $allowed_classes; /** diff --git a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php index c9341f886b2ead8c1dd8b534877e3c05f0be6866..6a8a0fbd1b669cd65b858fbacb58e18594429078 100644 --- a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php +++ b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php @@ -9,6 +9,8 @@ use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; +// cspell:ignore testdox + /** * Run PHPUnit-based tests. * @@ -100,16 +102,24 @@ public function phpUnitCommand(): string { * A fully qualified test class name. * @param string $log_junit_file_path * A filepath to use for PHPUnit's --log-junit option. - * @param int $status + * @param int|null $status * (optional) The exit status code of the PHPUnit process will be assigned * to this variable. - * @param string[] $output + * @param string[]|null $output * (optional) The output by running the phpunit command. If provided, this * array will contain the lines output by the command. + * @param bool $colors + * (optional) Whether to use colors in output. Defaults to FALSE. * * @internal */ - protected function runCommand(string $test_class_name, string $log_junit_file_path, ?int &$status = NULL, ?array &$output = NULL): void { + protected function runCommand( + string $test_class_name, + string $log_junit_file_path, + ?int &$status = NULL, + ?array &$output = NULL, + bool $colors = FALSE, + ): void { global $base_url; // Setup an environment variable containing the database connection so that // functional tests can connect to the database. @@ -130,9 +140,13 @@ protected function runCommand(string $test_class_name, string $log_junit_file_pa // Build the command line for the PHPUnit CLI invocation. $command = [ $phpunit_bin, + '--testdox', '--log-junit', $log_junit_file_path, ]; + if ($colors) { + $command[] = '--colors=always'; + } // If the deprecation handler bridge is active, we need to fail when there // are deprecations that get reported (i.e. not ignored or expected). @@ -159,9 +173,11 @@ protected function runCommand(string $test_class_name, string $log_junit_file_pa * The test run object. * @param string $test_class_name * A fully qualified test class name. - * @param int $status + * @param int|null $status * (optional) The exit status code of the PHPUnit process will be assigned * to this variable. + * @param bool $colors + * (optional) Whether to use colors in output. Defaults to FALSE. * * @return array * The parsed results of PHPUnit's JUnit XML output, in the format of @@ -169,11 +185,16 @@ protected function runCommand(string $test_class_name, string $log_junit_file_pa * * @internal */ - public function execute(TestRun $test_run, string $test_class_name, ?int &$status = NULL): array { + public function execute( + TestRun $test_run, + string $test_class_name, + ?int &$status = NULL, + bool $colors = FALSE, + ): array { $log_junit_file_path = $this->xmlLogFilePath($test_run->id()); // Store output from our test run. $output = []; - $this->runCommand($test_class_name, $log_junit_file_path, $status, $output); + $this->runCommand($test_class_name, $log_junit_file_path, $status, $output, $colors); if ($status == TestStatus::PASS) { return JUnitConverter::xmlToRows($test_run->id(), $log_junit_file_path); diff --git a/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php b/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php index 530e7fc5a6df76c65ac94896624d2496491d8bd7..357c3ab21c314e6a68e305946d8c9e3cd7f5a80b 100644 --- a/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php +++ b/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php @@ -81,6 +81,28 @@ public function validateDefinition(array $definition, bool $enforce_schemas): bo if (($schema['properties'] ?? NULL) === []) { $schema['properties'] = new \stdClass(); } + + // Ensure that all property types are strings. For example, a null value + // will not automatically convert to 'null', which will lead to a PHP error + // that is hard to trace back to the property. + $non_string_props = []; + \array_walk($prop_names, function (string $prop) use (&$non_string_props, $schema) { + $type = $schema['properties'][$prop]['type']; + $types = !\is_array($type) ? [$type] : $type; + $non_string_types = \array_filter($types, static fn (mixed $type) => !\is_string($type)); + if ($non_string_types) { + $non_string_props[] = $prop; + } + }); + + if ($non_string_props) { + throw new InvalidComponentException(\sprintf( + 'The component "%s" uses non-string types for properties: %s.', + $definition['id'], + \implode(', ', $non_string_props), + )); + } + $classes_per_prop = $this->getClassProps($schema); $missing_class_errors = []; foreach ($classes_per_prop as $prop_name => $class_types) { diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index d4f02d7108ec931cd4cccaff78a6262d41b10136..e85a72ffe8f325e5fb75db8c4e00f8a0bb3c181f 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -497,9 +497,18 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) // Invoke the hook_theme() implementation, preprocess what is returned, and // merge it into $cache. - $function = $name . '_theme'; - if (function_exists($function)) { - $result = $function($cache, $type, $theme, $path); + $args = [$cache, $type, $theme, $path]; + $result = []; + if ($type === 'module') { + $result = $this->moduleHandler->invoke($name, 'theme', $args); + } + else { + $function = $name . '_theme'; + if (function_exists($function)) { + $result = $function(... $args); + } + } + if ($result) { foreach ($result as $hook => $info) { // When a theme or engine overrides a module's theme function // $result[$hook] will only contain key/value pairs for information being diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php index ee648a50f86f98de5478824bfd56e2f4839a4407..9454862ff979225a37f998a25b191a381624f18d 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php @@ -2,6 +2,7 @@ namespace Drupal\Core\TypedData\Plugin\DataType; +use Drupal\Component\Utility\FilterArray; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\TypedData\Attribute\DataType; use Drupal\Core\TypedData\ComplexDataInterface; @@ -92,7 +93,7 @@ public function getString() { $strings[] = $item->getString(); } // Remove any empty strings resulting from empty items. - return implode(', ', array_filter($strings, 'mb_strlen')); + return implode(', ', FilterArray::removeEmptyStrings($strings)); } /** diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php index e08e9312e0c7760d6dc5e6b8569e42e707259d77..16aaa68fdc448711c8a1e842b097d92b6b7569b5 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php @@ -2,6 +2,7 @@ namespace Drupal\Core\TypedData\Plugin\DataType; +use Drupal\Component\Utility\FilterArray; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\TypedData\Attribute\DataType; use Drupal\Core\TypedData\ComplexDataInterface; @@ -106,7 +107,7 @@ public function getString() { $strings[] = $property->getString(); } // Remove any empty strings resulting from empty items. - return implode(', ', array_filter($strings, 'mb_strlen')); + return implode(', ', FilterArray::removeEmptyStrings($strings)); } /** diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php index 1857ba09048339303407ba4f9349ecf75b97fb3b..d16ef550651737852d6d794ddd3f83864f943f4d 100644 --- a/core/lib/Drupal/Core/Url.php +++ b/core/lib/Drupal/Core/Url.php @@ -563,7 +563,7 @@ public function isRouted() { * * @return string * - * @throws \UnexpectedValueException. + * @throws \UnexpectedValueException * If this is a URI with no corresponding route. */ public function getRouteName() { @@ -579,7 +579,7 @@ public function getRouteName() { * * @return array * - * @throws \UnexpectedValueException. + * @throws \UnexpectedValueException * If this is a URI with no corresponding route. */ public function getRouteParameters() { @@ -598,7 +598,7 @@ public function getRouteParameters() { * * @return $this * - * @throws \UnexpectedValueException. + * @throws \UnexpectedValueException * If this is a URI with no corresponding route. */ public function setRouteParameters($parameters) { @@ -619,7 +619,7 @@ public function setRouteParameters($parameters) { * * @return $this * - * @throws \UnexpectedValueException. + * @throws \UnexpectedValueException * If this is a URI with no corresponding route. */ public function setRouteParameter($key, $value) { @@ -777,7 +777,7 @@ public function toString($collect_bubbleable_metadata = FALSE) { * @return string * The internal path for this route. * - * @throws \UnexpectedValueException. + * @throws \UnexpectedValueException * If this is a URI with no corresponding system path. */ public function getInternalPath() { diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index dc36ea926be5fed949691391c4597e1f62c7902f..92157f7dd359fc98e4fdb3aa8ffb7057b0b0615d 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -40,9 +40,6 @@ backporting backports bakeware barchart -basefield -basepath -basetheme beatle bebebe beforeclose @@ -259,6 +256,7 @@ guzzlehttp hande hateoas hexcode +hhvm hilited hmac hookname @@ -274,6 +272,7 @@ imagecache imagetextalternative indexname inited +inlines inno instantiator interactable @@ -389,6 +388,7 @@ nourriture nplurals nproc ntfs +nyholm oembed omittable onecol @@ -570,6 +570,7 @@ subvalues subview supercede svgz +syncer synchronizable syrop tabbingmanager @@ -584,6 +585,7 @@ tablesorts tabset tabwidth taskless +tbachert testbot testbots testgroups diff --git a/core/modules/announcements_feed/announcements_feed.module b/core/modules/announcements_feed/announcements_feed.module deleted file mode 100644 index dafa74ec3e5772312ba02be0d2b62900925a693a..0000000000000000000000000000000000000000 --- a/core/modules/announcements_feed/announcements_feed.module +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -/** - * @file - * Fetch community announcements from www.drupal.org feed. - */ - -use Drupal\announcements_feed\RenderCallbacks; -use Drupal\Core\Link; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function announcements_feed_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.announcements_feed': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Announcements module displays announcements from the Drupal community. For more information, see the <a href=":documentation">online documentation for the Announcements module</a>.', [':documentation' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/announcements-feed']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl><dt>' . t('Accessing announcements') . '</dt>'; - $output .= '<dd>' . t('Users with the "View drupal.org announcements" permission may click on the "Announcements" item in the administration toolbar, or access @link, to see all announcements relevant to the Drupal version of your site.', [ - '@link' => Link::createFromRoute(t('Announcements'), 'announcements_feed.announcement')->toString(), - ]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_toolbar(). - */ -function announcements_feed_toolbar() { - if (!\Drupal::currentUser()->hasPermission('access announcements')) { - return [ - '#cache' => ['contexts' => ['user.permissions']], - ]; - } - $items['announcement'] = [ - '#type' => 'toolbar_item', - 'tab' => [ - '#lazy_builder' => [ - 'announcements_feed.lazy_builders:renderAnnouncements', - [], - ], - '#create_placeholder' => TRUE, - '#cache' => [ - 'tags' => [ - 'announcements_feed:feed', - ], - ], - ], - '#wrapper_attributes' => [ - 'class' => ['announce-toolbar-tab'], - ], - '#cache' => ['contexts' => ['user.permissions']], - '#weight' => 3399, - ]; - - // \Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem adds an - // #attributes property to each toolbar item's tab child automatically. - // Lazy builders don't support an #attributes property so we need to - // add another render callback to remove the #attributes property. We start by - // adding the defaults, and then we append our own pre render callback. - $items['announcement'] += \Drupal::service('plugin.manager.element_info')->getInfo('toolbar_item'); - $items['announcement']['#pre_render'][] = [RenderCallbacks::class, 'removeTabAttributes']; - return $items; -} - -/** - * Implements hook_toolbar_alter(). - */ -function announcements_feed_toolbar_alter(&$items) { - // As the "Announcements" link is shown already in the top toolbar bar, we - // don't need it again in the administration menu tray, so hide it. - if (!empty($items['administration']['tray'])) { - $callable = function (array $element) { - unset($element['administration_menu']['#items']['announcements_feed.announcement']); - return $element; - }; - - $items['administration']['tray']['toolbar_administration']['#pre_render'][] = $callable; - } -} - -/** - * Implements hook_theme(). - */ -function announcements_feed_theme($existing, $type, $theme, $path) { - return [ - 'announcements_feed' => [ - 'variables' => [ - 'featured' => NULL, - 'standard' => NULL, - 'count' => 0, - 'feed_link' => '', - ], - ], - 'announcements_feed_admin' => [ - 'variables' => [ - 'featured' => NULL, - 'standard' => NULL, - 'count' => 0, - 'feed_link' => '', - ], - ], - ]; -} - -/** - * Implements hook_cron(). - */ -function announcements_feed_cron() { - $config = \Drupal::config('announcements_feed.settings'); - $interval = $config->get('cron_interval'); - $last_check = \Drupal::state()->get('announcements_feed.last_fetch', 0); - $time = \Drupal::time()->getRequestTime(); - if (($time - $last_check) > $interval) { - \Drupal::service('announcements_feed.fetcher')->fetch(TRUE); - \Drupal::state()->set('announcements_feed.last_fetch', $time); - } -} diff --git a/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php b/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0fba340a6e615c3bccebe57765d061a67784d13d --- /dev/null +++ b/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php @@ -0,0 +1,137 @@ +<?php + +namespace Drupal\announcements_feed\Hook; + +use Drupal\announcements_feed\RenderCallbacks; +use Drupal\Core\Link; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for announcements_feed. + */ +class AnnouncementsFeedHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.announcements_feed': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Announcements module displays announcements from the Drupal community. For more information, see the <a href=":documentation">online documentation for the Announcements module</a>.', [ + ':documentation' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/announcements-feed', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl><dt>' . t('Accessing announcements') . '</dt>'; + $output .= '<dd>' . t('Users with the "View drupal.org announcements" permission may click on the "Announcements" item in the administration toolbar, or access @link, to see all announcements relevant to the Drupal version of your site.', [ + '@link' => Link::createFromRoute(t('Announcements'), 'announcements_feed.announcement')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + if (!\Drupal::currentUser()->hasPermission('access announcements')) { + return ['#cache' => ['contexts' => ['user.permissions']]]; + } + $items['announcement'] = [ + '#type' => 'toolbar_item', + 'tab' => [ + '#lazy_builder' => [ + 'announcements_feed.lazy_builders:renderAnnouncements', + [], + ], + '#create_placeholder' => TRUE, + '#cache' => [ + 'tags' => [ + 'announcements_feed:feed', + ], + ], + ], + '#wrapper_attributes' => [ + 'class' => [ + 'announce-toolbar-tab', + ], + ], + '#cache' => [ + 'contexts' => [ + 'user.permissions', + ], + ], + '#weight' => 3399, + ]; + // \Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem adds an + // #attributes property to each toolbar item's tab child automatically. + // Lazy builders don't support an #attributes property so we need to + // add another render callback to remove the #attributes property. We start by + // adding the defaults, and then we append our own pre render callback. + $items['announcement'] += \Drupal::service('plugin.manager.element_info')->getInfo('toolbar_item'); + $items['announcement']['#pre_render'][] = [RenderCallbacks::class, 'removeTabAttributes']; + return $items; + } + + /** + * Implements hook_toolbar_alter(). + */ + #[Hook('toolbar_alter')] + public function toolbarAlter(&$items) { + // As the "Announcements" link is shown already in the top toolbar bar, we + // don't need it again in the administration menu tray, so hide it. + if (!empty($items['administration']['tray'])) { + $callable = function (array $element) { + unset($element['administration_menu']['#items']['announcements_feed.announcement']); + return $element; + }; + $items['administration']['tray']['toolbar_administration']['#pre_render'][] = $callable; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + return [ + 'announcements_feed' => [ + 'variables' => [ + 'featured' => NULL, + 'standard' => NULL, + 'count' => 0, + 'feed_link' => '', + ], + ], + 'announcements_feed_admin' => [ + 'variables' => [ + 'featured' => NULL, + 'standard' => NULL, + 'count' => 0, + 'feed_link' => '', + ], + ], + ]; + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + $config = \Drupal::config('announcements_feed.settings'); + $interval = $config->get('cron_interval'); + $last_check = \Drupal::state()->get('announcements_feed.last_fetch', 0); + $time = \Drupal::time()->getRequestTime(); + if ($time - $last_check > $interval) { + \Drupal::service('announcements_feed.fetcher')->fetch(TRUE); + \Drupal::state()->set('announcements_feed.last_fetch', $time); + } + } + +} diff --git a/core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php b/core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php index 997031bd12e7e025bbda8e99af9d793acfacb8d7..a5220e78d0ca869e86ee3bae3ed91667f153cf6f 100644 --- a/core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php +++ b/core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php @@ -30,7 +30,7 @@ class AnnounceBlock extends BlockBase implements ContainerFactoryPluginInterface * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\announcements_feed\AnnounceRenderer $announceRenderer diff --git a/core/modules/automated_cron/automated_cron.module b/core/modules/automated_cron/automated_cron.module index 63aeef8323751bbbf2671af6d4f17bc5f05c14ea..f1f2b482d3df095cf38fe0fe483f0adf7ca5de0a 100644 --- a/core/modules/automated_cron/automated_cron.module +++ b/core/modules/automated_cron/automated_cron.module @@ -2,55 +2,10 @@ /** * @file - * Provides an automated cron by executing it at the end of a response. */ -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Form\FormStateInterface; -/** - * Implements hook_help(). - */ -function automated_cron_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.automated_cron': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Automated Cron module runs cron operations for your site using normal browser/page requests instead of having to set up a separate cron job. The Automated Cron module checks at the end of each server response when cron operation was last ran and, if it has been too long since last run, it executes the cron tasks after sending a server response. For more information, see the <a href=":automated_cron-documentation">online documentation for the Automated Cron module</a>.', [':automated_cron-documentation' => 'https://www.drupal.org/documentation/modules/automated_cron']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Configuring Automated Cron') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":cron-settings">Cron page</a>, you can set the frequency (time interval) for running cron jobs.', [':cron-settings' => Url::fromRoute('system.cron_settings')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Disabling Automated Cron') . '</dt>'; - $output .= '<dd>' . t('To disable automated cron, the recommended method is to uninstall the module, to reduce site overhead. If you only want to disable it temporarily, you can set the frequency to Never on the Cron page, and then change the frequency back when you want to start it up again.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for the system_cron_settings() form. - */ -function automated_cron_form_system_cron_settings_alter(&$form, &$form_state) { - $automated_cron_settings = \Drupal::config('automated_cron.settings'); - - $options = [3600, 10800, 21600, 43200, 86400, 604800]; - $form['cron']['interval'] = [ - '#type' => 'select', - '#title' => t('Run cron every'), - '#description' => t('More information about setting up scheduled tasks can be found by <a href=":url">reading the cron tutorial on drupal.org</a>.', [':url' => 'https://www.drupal.org/docs/8/administering-a-drupal-8-site/cron-automated-tasks']), - '#default_value' => $automated_cron_settings->get('interval'), - '#options' => [0 => t('Never')] + array_map([\Drupal::service('date.formatter'), 'formatInterval'], array_combine($options, $options)), - ]; - - // Add submit callback. - $form['#submit'][] = 'automated_cron_settings_submit'; - - // Theme this form as a config form. - $form['#theme'] = 'system_config_form'; -} - /** * Form submission handler for system_cron_settings(). */ diff --git a/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php b/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..64be8d4c2512fde5eb5ff058c268ea308351d74a --- /dev/null +++ b/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php @@ -0,0 +1,66 @@ +<?php + +namespace Drupal\automated_cron\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for automated_cron. + */ +class AutomatedCronHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.automated_cron': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Automated Cron module runs cron operations for your site using normal browser/page requests instead of having to set up a separate cron job. The Automated Cron module checks at the end of each server response when cron operation was last ran and, if it has been too long since last run, it executes the cron tasks after sending a server response. For more information, see the <a href=":automated_cron-documentation">online documentation for the Automated Cron module</a>.', [ + ':automated_cron-documentation' => 'https://www.drupal.org/documentation/modules/automated_cron', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Configuring Automated Cron') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":cron-settings">Cron page</a>, you can set the frequency (time interval) for running cron jobs.', [ + ':cron-settings' => Url::fromRoute('system.cron_settings')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Disabling Automated Cron') . '</dt>'; + $output .= '<dd>' . t('To disable automated cron, the recommended method is to uninstall the module, to reduce site overhead. If you only want to disable it temporarily, you can set the frequency to Never on the Cron page, and then change the frequency back when you want to start it up again.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for the system_cron_settings() form. + */ + #[Hook('form_system_cron_settings_alter')] + public function formSystemCronSettingsAlter(&$form, &$form_state) : void { + $automated_cron_settings = \Drupal::config('automated_cron.settings'); + $options = [3600, 10800, 21600, 43200, 86400, 604800]; + $form['cron']['interval'] = [ + '#type' => 'select', + '#title' => t('Run cron every'), + '#description' => t('More information about setting up scheduled tasks can be found by <a href=":url">reading the cron tutorial on drupal.org</a>.', [ + ':url' => 'https://www.drupal.org/docs/8/administering-a-drupal-8-site/cron-automated-tasks', + ]), + '#default_value' => $automated_cron_settings->get('interval'), + '#options' => [ + 0 => t('Never'), + ] + array_map([ + \Drupal::service('date.formatter'), + 'formatInterval', + ], array_combine($options, $options)), + ]; + // Add submit callback. + $form['#submit'][] = 'automated_cron_settings_submit'; + // Theme this form as a config form. + $form['#theme'] = 'system_config_form'; + } + +} diff --git a/core/modules/ban/ban.module b/core/modules/ban/ban.module deleted file mode 100644 index a407fe7e2d23eb08e5a6825b574f5e3babbb3948..0000000000000000000000000000000000000000 --- a/core/modules/ban/ban.module +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * Allows to ban individual IP addresses. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function ban_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.ban': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see the <a href=":url">online documentation for the Ban module</a>.', [':url' => 'https://www.drupal.org/documentation/modules/ban']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Banning IP addresses') . '</dt>'; - $output .= '<dd>' . t('Administrators can enter IP addresses to ban on the <a href=":bans">IP address bans</a> page.', [':bans' => Url::fromRoute('ban.admin_page')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'ban.admin_page': - return '<p>' . t('IP addresses listed here are banned from your site. Banned addresses are completely forbidden from accessing the site and instead see a brief message explaining the situation.') . '</p>'; - } -} diff --git a/core/modules/ban/src/Hook/BanHooks.php b/core/modules/ban/src/Hook/BanHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c4966a1a41a5ab04ffa05c94bd4be772a498b77e --- /dev/null +++ b/core/modules/ban/src/Hook/BanHooks.php @@ -0,0 +1,36 @@ +<?php + +namespace Drupal\ban\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for ban. + */ +class BanHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.ban': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see the <a href=":url">online documentation for the Ban module</a>.', [':url' => 'https://www.drupal.org/documentation/modules/ban']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Banning IP addresses') . '</dt>'; + $output .= '<dd>' . t('Administrators can enter IP addresses to ban on the <a href=":bans">IP address bans</a> page.', [':bans' => Url::fromRoute('ban.admin_page')->toString()]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'ban.admin_page': + return '<p>' . t('IP addresses listed here are banned from your site. Banned addresses are completely forbidden from accessing the site and instead see a brief message explaining the situation.') . '</p>'; + } + } + +} diff --git a/core/modules/basic_auth/basic_auth.module b/core/modules/basic_auth/basic_auth.module deleted file mode 100644 index 879e76355bb838895285bdf87a72958d2a7694b2..0000000000000000000000000000000000000000 --- a/core/modules/basic_auth/basic_auth.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Provides an HTTP Basic authentication provider. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function basic_auth_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.basic_auth': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', [':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? Url::fromRoute('help.page', ['name' => 'rest'])->toString() : '#']) . '</p>'; - return $output; - } -} diff --git a/core/modules/basic_auth/src/Hook/BasicAuthHooks.php b/core/modules/basic_auth/src/Hook/BasicAuthHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2660b1ff87817836733f75c6f3d90003a031f336 --- /dev/null +++ b/core/modules/basic_auth/src/Hook/BasicAuthHooks.php @@ -0,0 +1,33 @@ +<?php + +namespace Drupal\basic_auth\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for basic_auth. + */ +class BasicAuthHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.basic_auth': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', [ + ':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', + ':rest_help' => \Drupal::moduleHandler()->moduleExists('rest') ? Url::fromRoute('help.page', [ + 'name' => 'rest', + ])->toString() : '#', + ]) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/big_pipe/big_pipe.module b/core/modules/big_pipe/big_pipe.module index 1eac8c5baa35373c47352240d1d92afb00429cd7..2ac12cbd9a21b26aea0c464160ea69f3c2ce253d 100644 --- a/core/modules/big_pipe/big_pipe.module +++ b/core/modules/big_pipe/big_pipe.module @@ -2,96 +2,8 @@ /** * @file - * Adds BigPipe no-JS detection. */ -use Drupal\big_pipe\Render\Placeholder\BigPipeStrategy; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function big_pipe_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.big_pipe': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The BigPipe module sends pages with dynamic content in a way that allows browsers to show them much faster. For more information, see the <a href=":big_pipe-documentation">online documentation for the BigPipe module</a>.', [':big_pipe-documentation' => 'https://www.drupal.org/documentation/modules/big_pipe']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Speeding up your site') . '</dt>'; - $output .= '<dd>' . t('The module requires no configuration. Every part of the page contains metadata that allows BigPipe to figure this out on its own.') . '</dd>'; - $output .= '</dl>'; - - return $output; - } -} - -/** - * Implements hook_page_attachments(). - * - * @see \Drupal\big_pipe\Controller\BigPipeController::setNoJsCookie() - */ -function big_pipe_page_attachments(array &$page) { - // Routes that don't use BigPipe also don't need no-JS detection. - if (\Drupal::routeMatch()->getRouteObject()->getOption('_no_big_pipe')) { - return; - } - - $request = \Drupal::request(); - // BigPipe is only used when there is an actual session, so only add the no-JS - // detection when there actually is a session. - // @see \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy. - $session_exists = \Drupal::service('session_configuration')->hasSession($request); - $page['#cache']['contexts'][] = 'session.exists'; - // Only do the no-JS detection while we don't know if there's no JS support: - // avoid endless redirect loops. - $has_big_pipe_nojs_cookie = $request->cookies->has(BigPipeStrategy::NOJS_COOKIE); - $page['#cache']['contexts'][] = 'cookies:' . BigPipeStrategy::NOJS_COOKIE; - if ($session_exists) { - if (!$has_big_pipe_nojs_cookie) { - // Let server set the BigPipe no-JS cookie. - $page['#attached']['html_head'][] = [ - [ - // Redirect through a 'Refresh' meta tag if JavaScript is disabled. - '#tag' => 'meta', - '#noscript' => TRUE, - '#attributes' => [ - 'http-equiv' => 'Refresh', - 'content' => '0; URL=' . Url::fromRoute('big_pipe.nojs', [], ['query' => \Drupal::service('redirect.destination')->getAsArray()])->toString(), - ], - ], - 'big_pipe_detect_nojs', - ]; - } - else { - // Let client delete the BigPipe no-JS cookie. - $page['#attached']['html_head'][] = [ - [ - '#tag' => 'script', - '#value' => 'document.cookie = "' . BigPipeStrategy::NOJS_COOKIE . '=1; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"', - ], - 'big_pipe_detect_js', - ]; - } - } -} - -/** - * Implements hook_theme(). - */ -function big_pipe_theme() { - return [ - 'big_pipe_interface_preview' => [ - 'variables' => [ - 'callback' => NULL, - 'arguments' => NULL, - 'preview' => NULL, - ], - ], - ]; -} - /** * Implements hook_theme_suggestions_HOOK(). */ diff --git a/core/modules/big_pipe/big_pipe.post_update.php b/core/modules/big_pipe/big_pipe.post_update.php index 0e3282fb5d9aa366acabefce4e449eff8fff9dfb..29df6fe0ff846f2d2e40087871aae12a2a275f48 100644 --- a/core/modules/big_pipe/big_pipe.post_update.php +++ b/core/modules/big_pipe/big_pipe.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function big_pipe_removed_post_updates() { +function big_pipe_removed_post_updates(): array { return [ 'big_pipe_post_update_html5_placeholders' => '11.0.0', ]; diff --git a/core/modules/big_pipe/src/Hook/BigPipeHooks.php b/core/modules/big_pipe/src/Hook/BigPipeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..370bfb899ccaca7f03bbe36afd28bf6eca98da99 --- /dev/null +++ b/core/modules/big_pipe/src/Hook/BigPipeHooks.php @@ -0,0 +1,103 @@ +<?php + +namespace Drupal\big_pipe\Hook; + +use Drupal\Core\Url; +use Drupal\big_pipe\Render\Placeholder\BigPipeStrategy; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for big_pipe. + */ +class BigPipeHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.big_pipe': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The BigPipe module sends pages with dynamic content in a way that allows browsers to show them much faster. For more information, see the <a href=":big_pipe-documentation">online documentation for the BigPipe module</a>.', [ + ':big_pipe-documentation' => 'https://www.drupal.org/documentation/modules/big_pipe', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Speeding up your site') . '</dt>'; + $output .= '<dd>' . t('The module requires no configuration. Every part of the page contains metadata that allows BigPipe to figure this out on its own.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_page_attachments(). + * + * @see \Drupal\big_pipe\Controller\BigPipeController::setNoJsCookie() + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$page) { + // Routes that don't use BigPipe also don't need no-JS detection. + if (\Drupal::routeMatch()->getRouteObject()->getOption('_no_big_pipe')) { + return; + } + $request = \Drupal::request(); + // BigPipe is only used when there is an actual session, so only add the no-JS + // detection when there actually is a session. + // @see \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy. + $session_exists = \Drupal::service('session_configuration')->hasSession($request); + $page['#cache']['contexts'][] = 'session.exists'; + // Only do the no-JS detection while we don't know if there's no JS support: + // avoid endless redirect loops. + $has_big_pipe_nojs_cookie = $request->cookies->has(BigPipeStrategy::NOJS_COOKIE); + $page['#cache']['contexts'][] = 'cookies:' . BigPipeStrategy::NOJS_COOKIE; + if ($session_exists) { + if (!$has_big_pipe_nojs_cookie) { + // Let server set the BigPipe no-JS cookie. + $page['#attached']['html_head'][] = [ + [ + // Redirect through a 'Refresh' meta tag if JavaScript is disabled. + '#tag' => 'meta', + '#noscript' => TRUE, + '#attributes' => [ + 'http-equiv' => 'Refresh', + 'content' => '0; URL=' . Url::fromRoute('big_pipe.nojs', [], [ + 'query' => \Drupal::service('redirect.destination')->getAsArray(), + ])->toString(), + ], + ], + 'big_pipe_detect_nojs', + ]; + } + else { + // Let client delete the BigPipe no-JS cookie. + $page['#attached']['html_head'][] = [ + [ + '#tag' => 'script', + '#value' => 'document.cookie = "' . BigPipeStrategy::NOJS_COOKIE . '=1; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"', + ], + 'big_pipe_detect_js', + ]; + } + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'big_pipe_interface_preview' => [ + 'variables' => [ + 'callback' => NULL, + 'arguments' => NULL, + 'preview' => NULL, + ], + ], + ]; + } + +} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/big_pipe_bypass_js.module b/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/big_pipe_bypass_js.module deleted file mode 100644 index 8dd1204079de194afc9e97b557ac385fcdb64ad3..0000000000000000000000000000000000000000 --- a/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/big_pipe_bypass_js.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provides a way to bypass Big Pipe JavaScript. - */ - -declare(strict_types=1); - -/** - * Implements hook_library_info_alter(). - * - * Disables Big Pipe JavaScript by removing the js file from the library. - */ -function big_pipe_bypass_js_library_info_alter(&$libraries, $extension) { - if ($extension === 'big_pipe') { - unset($libraries['big_pipe']['js']); - } -} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/src/Hook/BigPipeBypassJsHooks.php b/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/src/Hook/BigPipeBypassJsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a143ba7da717fdd4fc1272ccdaed29a63fa12286 --- /dev/null +++ b/core/modules/big_pipe/tests/modules/big_pipe_bypass_js/src/Hook/BigPipeBypassJsHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\big_pipe_bypass_js\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for big_pipe_bypass_js. + */ +class BigPipeBypassJsHooks { + + /** + * Implements hook_library_info_alter(). + * + * Disables Big Pipe JavaScript by removing the js file from the library. + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(&$libraries, $extension) { + if ($extension === 'big_pipe') { + unset($libraries['big_pipe']['js']); + } + } + +} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.module b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.module deleted file mode 100644 index 850313babeefd574c3bf1e594f73d5e873a87968..0000000000000000000000000000000000000000 --- a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Support module for BigPipe testing. - */ - -declare(strict_types=1); - -/** - * Implements hook_theme(). - * - * @see \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::testBigPipeLargeContent - */ -function big_pipe_regression_test_theme() { - return [ - 'big_pipe_test_large_content' => [ - 'variables' => [], - ], - ]; -} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/Hook/BigPipeRegressionTestHooks.php b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/Hook/BigPipeRegressionTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d8f4ecd319c79431a7167a2fd5c4b68a38127798 --- /dev/null +++ b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/Hook/BigPipeRegressionTestHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\big_pipe_regression_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for big_pipe_regression_test. + */ +class BigPipeRegressionTestHooks { + + /** + * Implements hook_theme(). + * + * @see \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::testBigPipeLargeContent + */ + #[Hook('theme')] + public function theme() : array { + return ['big_pipe_test_large_content' => ['variables' => []]]; + } + +} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module b/core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module deleted file mode 100644 index 73d5a83f94cc24318df9760ab4530b54b75b459d..0000000000000000000000000000000000000000 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Support module for BigPipe testing. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_top(). - */ -function big_pipe_test_page_top(array &$page_top) { - // Ensure this hook is invoked on every page load. - $page_top['#cache']['max-age'] = 0; - - $request = \Drupal::request(); - if ($request->query->get('trigger_session')) { - $request->getSession()->set('big_pipe_test', TRUE); - } -} diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/Hook/BigPipeTestHooks.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/Hook/BigPipeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..691ef5837c32b0d39f634c6a46e7c64216d542c8 --- /dev/null +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/Hook/BigPipeTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\big_pipe_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for big_pipe_test. + */ +class BigPipeTestHooks { + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + // Ensure this hook is invoked on every page load. + $page_top['#cache']['max-age'] = 0; + $request = \Drupal::request(); + if ($request->query->get('trigger_session')) { + $request->getSession()->set('big_pipe_test', TRUE); + } + } + +} diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php index 0abdab92dc9ed9a3a6d62ab323c7654a8b0491d6..d9df470ed7ab7308f86a35e2b28c4af4b31d4ed0 100644 --- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php +++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php @@ -62,7 +62,7 @@ protected function setUp(): void { * * @see setUp() */ - protected function performMetaRefresh() { + protected function performMetaRefresh(): void { $this->maximumMetaRefreshCount = 1; $this->checkForMetaRefresh(); $this->maximumMetaRefreshCount = 0; @@ -438,7 +438,7 @@ protected function assertBigPipePlaceholders(array $expected_big_pipe_placeholde /** * Ensures CSRF tokens can be generated for the current user's session. */ - protected function setCsrfTokenSeedInTestEnvironment() { + protected function setCsrfTokenSeedInTestEnvironment(): void { // Retrieve the CSRF token from the child site from its serialized session // record in the database. $session_data = $this->container->get('session_handler.write_safe')->read($this->getSession()->getCookie($this->getSessionName())); diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php index 3146346e78711404b0f57ce575adbc90d73d4225..2cfcfd44463928b83e56728c771d5ec1d1019103 100644 --- a/core/modules/block/block.api.php +++ b/core/modules/block/block.api.php @@ -5,6 +5,9 @@ * Hooks provided by the Block module. */ +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\block\Entity\Block; +use Drupal\Core\Session\AccountInterface; use Drupal\Core\Access\AccessResult; /** @@ -116,7 +119,7 @@ * * @ingroup block_api */ -function hook_block_view_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) { +function hook_block_view_alter(array &$build, BlockPluginInterface $block) { // Remove the contextual links on all blocks that provide them. if (isset($build['#contextual_links'])) { unset($build['#contextual_links']); @@ -146,7 +149,7 @@ function hook_block_view_alter(array &$build, \Drupal\Core\Block\BlockPluginInte * * @ingroup block_api */ -function hook_block_view_BASE_BLOCK_ID_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) { +function hook_block_view_BASE_BLOCK_ID_alter(array &$build, BlockPluginInterface $block) { // Change the title of the specific block. $build['#title'] = t('New title of the block'); } @@ -173,7 +176,7 @@ function hook_block_view_BASE_BLOCK_ID_alter(array &$build, \Drupal\Core\Block\B * * @ingroup block_api */ -function hook_block_build_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) { +function hook_block_build_alter(array &$build, BlockPluginInterface $block) { // Add the 'user' cache context to some blocks. if ($block->label() === 'some condition') { $build['#cache']['contexts'][] = 'user'; @@ -201,7 +204,7 @@ function hook_block_build_alter(array &$build, \Drupal\Core\Block\BlockPluginInt * * @ingroup block_api */ -function hook_block_build_BASE_BLOCK_ID_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) { +function hook_block_build_BASE_BLOCK_ID_alter(array &$build, BlockPluginInterface $block) { // Explicitly enable placeholdering of the specific block. $build['#create_placeholder'] = TRUE; } @@ -230,7 +233,7 @@ function hook_block_build_BASE_BLOCK_ID_alter(array &$build, \Drupal\Core\Block\ * @see \Drupal\block\BlockAccessControlHandler::checkAccess() * @ingroup block_api */ -function hook_block_access(\Drupal\block\Entity\Block $block, $operation, \Drupal\Core\Session\AccountInterface $account) { +function hook_block_access(Block $block, $operation, AccountInterface $account) { // Example code that would prevent displaying the 'Powered by Drupal' block in // a region different than the footer. if ($operation == 'view' && $block->getPluginId() == 'system_powered_by_block') { diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 0a2717dabf3810805013aad8e88e31363dd2b7af..bba25269c0499b5fd1d69f1f8e05c4d25ce8f7bf 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function block_install() { +function block_install(): void { // Because the Block module upon installation unconditionally overrides all // HTML output by selecting a different page display variant, we must // invalidate all cached HTML output. @@ -20,6 +20,6 @@ function block_install() { /** * Implements hook_update_last_removed(). */ -function block_update_last_removed() { +function block_update_last_removed(): int { return 8003; } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 75ac30ab60c6b5869e195139894aa8e5a489b496..de17aed9fb998eb56bb6d0c4ab36adbf51ed92e3 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -2,86 +2,10 @@ /** * @file - * Controls the visual building blocks a page is constructed with. */ use Drupal\Component\Utility\Html; use Drupal\Core\Installer\InstallerKernel; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Link; -use Drupal\Core\Url; -use Drupal\language\ConfigurableLanguageInterface; -use Drupal\system\Entity\Menu; -use Drupal\Core\Block\BlockPluginInterface; -use Drupal\block\Entity\Block; - -/** - * Implements hook_help(). - */ -function block_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.block': - $block_content = \Drupal::moduleHandler()->moduleExists('block_content') ? Url::fromRoute('help.page', ['name' => 'block_content'])->toString() : '#'; - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the <a href=":blocks-documentation">online documentation for the Block module</a>.', [':blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Placing and moving blocks') . '</dt>'; - $output .= '<dd>' . t('You can place a new block in a region by selecting <em>Place block</em> on the <a href=":blocks">Block layout page</a>. Once a block is placed, it can be moved to a different region by drag-and-drop or by using the <em>Region</em> drop-down list, and then clicking <em>Save blocks</em>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Toggling between different themes') . '</dt>'; - $output .= '<dd>' . t('Blocks are placed and configured specifically for each theme. The Block layout page opens with the default theme, but you can toggle to other installed themes.') . '</dd>'; - $output .= '<dt>' . t('Demonstrating block regions for a theme') . '</dt>'; - $output .= '<dd>' . t('You can see where the regions are for the current theme by clicking the <em>Demonstrate block regions</em> link on the <a href=":blocks">Block layout page</a>. Regions are specific to each theme.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring block settings') . '</dt>'; - $output .= '<dd>' . t('To change the settings of an individual block click on the <em>Configure</em> link on the <a href=":blocks">Block layout page</a>. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Controlling visibility') . '</dt>'; - $output .= '<dd>' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under <em>Visibility settings</em> of the block configuration.') . '</dd>'; - $output .= '<dt>' . t('Adding content blocks') . '</dt>'; - $output .= '<dd>' . t('You can add content blocks, if the <em>Block Content</em> module is installed. For more information, see the <a href=":blockcontent-help">Block Content help page</a>.', [':blockcontent-help' => $block_content]) . '</dd>'; - $output .= '</dl>'; - return $output; - } - if ($route_name == 'block.admin_display' || $route_name == 'block.admin_display_theme') { - $demo_theme = $route_match->getParameter('theme') ?: \Drupal::config('system.theme')->get('default'); - $themes = \Drupal::service('theme_handler')->listInfo(); - $output = '<p>' . t('Block placement is specific to each theme on your site. Changes will not be saved until you click <em>Save blocks</em> at the bottom of the page.') . '</p>'; - $output .= '<p>' . Link::fromTextAndUrl(t('Demonstrate block regions (@theme)', ['@theme' => $themes[$demo_theme]->info['name']]), Url::fromRoute('block.admin_demo', ['theme' => $demo_theme]))->toString() . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function block_theme() { - return [ - 'block' => [ - 'render element' => 'elements', - ], - ]; -} - -/** - * Implements hook_page_top(). - */ -function block_page_top(array &$page_top) { - if (\Drupal::routeMatch()->getRouteName() === 'block.admin_demo') { - $theme = \Drupal::theme()->getActiveTheme()->getName(); - $page_top['backlink'] = [ - '#type' => 'link', - '#title' => t('Exit block region demonstration'), - '#options' => ['attributes' => ['class' => ['block-demo-backlink']]], - '#weight' => -10, - ]; - if (\Drupal::config('system.theme')->get('default') == $theme) { - $page_top['backlink']['#url'] = Url::fromRoute('block.admin_display'); - } - else { - $page_top['backlink']['#url'] = Url::fromRoute('block.admin_display_theme', ['theme' => $theme]); - } - } -} /** * Initializes blocks for installed themes. @@ -146,53 +70,6 @@ function block_theme_initialize($theme) { } } -/** - * Implements hook_modules_installed(). - * - * @see block_themes_installed() - */ -function block_modules_installed($modules) { - // block_themes_installed() does not call block_theme_initialize() during site - // installation because block configuration can be optional or provided by the - // profile. Now, when the profile is installed, this configuration exists, - // call block_theme_initialize() for all installed themes. - $profile = \Drupal::installProfile(); - if (in_array($profile, $modules, TRUE)) { - foreach (\Drupal::service('theme_handler')->listInfo() as $theme => $data) { - block_theme_initialize($theme); - } - } -} - -/** - * Implements hook_rebuild(). - */ -function block_rebuild() { - foreach (\Drupal::service('theme_handler')->listInfo() as $theme => $data) { - if ($data->status) { - $regions = system_region_list($theme); - /** @var \Drupal\block\BlockInterface[] $blocks */ - $blocks = \Drupal::entityTypeManager()->getStorage('block')->loadByProperties(['theme' => $theme]); - foreach ($blocks as $block_id => $block) { - // Disable blocks in invalid regions. - if (!isset($regions[$block->getRegion()])) { - if ($block->status()) { - \Drupal::messenger() - ->addWarning(t('The block %info was assigned to the invalid region %region and has been disabled.', [ - '%info' => $block_id, - '%region' => $block->getRegion(), - ])); - } - $block - ->setRegion(system_default_region($theme)) - ->disable() - ->save(); - } - } - } - } -} - /** * Implements hook_theme_suggestions_HOOK(). */ @@ -269,70 +146,3 @@ function template_preprocess_block(&$variables) { } } - -/** - * Implements hook_ENTITY_TYPE_delete() for user_role entities. - * - * Removes deleted role from blocks that use it. - */ -function block_user_role_delete($role) { - foreach (Block::loadMultiple() as $block) { - /** @var \Drupal\block\BlockInterface $block */ - $visibility = $block->getVisibility(); - if (isset($visibility['user_role']['roles'][$role->id()])) { - unset($visibility['user_role']['roles'][$role->id()]); - $block->setVisibilityConfig('user_role', $visibility['user_role']); - $block->save(); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for menu entities. - */ -function block_menu_delete(Menu $menu) { - if (!$menu->isSyncing()) { - foreach (Block::loadMultiple() as $block) { - if ($block->getPluginId() == 'system_menu_block:' . $menu->id()) { - $block->delete(); - } - } - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. - * - * Delete the potential block visibility settings of the deleted language. - */ -function block_configurable_language_delete(ConfigurableLanguageInterface $language) { - // Remove the block visibility settings for the deleted language. - foreach (Block::loadMultiple() as $block) { - /** @var \Drupal\block\BlockInterface $block */ - $visibility = $block->getVisibility(); - if (isset($visibility['language']['langcodes'][$language->id()])) { - unset($visibility['language']['langcodes'][$language->id()]); - $block->setVisibilityConfig('language', $visibility['language']); - $block->save(); - } - } -} - -/** - * Implements hook_block_build_BASE_BLOCK_ID_alter(). - */ -function block_block_build_local_actions_block_alter(array &$build, BlockPluginInterface $block) { - $build['#lazy_builder_preview'] = [ - '#type' => 'container', - '#attributes' => [ - 'class' => ['invisible'], - ], - 'actions' => [ - '#theme' => 'menu_local_action', - '#link' => [ - 'title' => t('Add'), - 'url' => Url::fromUserInput('#'), - ], - ], - ]; -} diff --git a/core/modules/block/block.post_update.php b/core/modules/block/block.post_update.php index 29004ed58536a4c9481e891a80416df247445024..d1fd8e5344a498dd089b50996615bc97252a54ae 100644 --- a/core/modules/block/block.post_update.php +++ b/core/modules/block/block.post_update.php @@ -11,7 +11,7 @@ /** * Implements hook_removed_post_updates(). */ -function block_removed_post_updates() { +function block_removed_post_updates(): array { return [ 'block_post_update_disable_blocks_with_missing_contexts' => '9.0.0', 'block_post_update_disabled_region_update' => '9.0.0', diff --git a/core/modules/block/src/Entity/Block.php b/core/modules/block/src/Entity/Block.php index 3bc7da26afcf251d38d13adbe5c14b24a35e1c20..5e9c5f0709de9d578751c618858923ff765805d3 100644 --- a/core/modules/block/src/Entity/Block.php +++ b/core/modules/block/src/Entity/Block.php @@ -2,6 +2,12 @@ namespace Drupal\block\Entity; +use Drupal\block\BlockAccessControlHandler; +use Drupal\block\BlockForm; +use Drupal\block\BlockListBuilder; +use Drupal\block\BlockViewBuilder; +use Drupal\block\Form\BlockDeleteForm; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Cache\Cache; use Drupal\Core\Condition\ConditionPluginCollection; use Drupal\Core\Config\Action\Attribute\ActionMethod; @@ -16,52 +22,51 @@ /** * Defines a Block configuration entity class. - * - * @ConfigEntityType( - * id = "block", - * label = @Translation("Block"), - * label_collection = @Translation("Blocks"), - * label_singular = @Translation("block"), - * label_plural = @Translation("blocks"), - * label_count = @PluralTranslation( - * singular = "@count block", - * plural = "@count blocks", - * ), - * handlers = { - * "access" = "Drupal\block\BlockAccessControlHandler", - * "view_builder" = "Drupal\block\BlockViewBuilder", - * "list_builder" = "Drupal\block\BlockListBuilder", - * "form" = { - * "default" = "Drupal\block\BlockForm", - * "delete" = "Drupal\block\Form\BlockDeleteForm" - * } - * }, - * admin_permission = "administer blocks", - * entity_keys = { - * "id" = "id", - * "status" = "status" - * }, - * links = { - * "delete-form" = "/admin/structure/block/manage/{block}/delete", - * "edit-form" = "/admin/structure/block/manage/{block}", - * "enable" = "/admin/structure/block/manage/{block}/enable", - * "disable" = "/admin/structure/block/manage/{block}/disable", - * }, - * config_export = { - * "id", - * "theme", - * "region", - * "weight", - * "provider", - * "plugin", - * "settings", - * "visibility", - * }, - * lookup_keys = { - * "theme" - * } - * ) */ +#[ConfigEntityType( + id: 'block', + label: new TranslatableMarkup('Block'), + label_collection: new TranslatableMarkup('Blocks'), + label_singular: new TranslatableMarkup('block'), + label_plural: new TranslatableMarkup('blocks'), + entity_keys: [ + 'id' => 'id', + 'status' => 'status', + ], + handlers: [ + 'access' => BlockAccessControlHandler::class, + 'view_builder' => BlockViewBuilder::class, + 'list_builder' => BlockListBuilder::class, + 'form' => [ + 'default' => BlockForm::class, + 'delete' => BlockDeleteForm::class, + ], + ], + links: [ + 'delete-form' => '/admin/structure/block/manage/{block}/delete', + 'edit-form' => '/admin/structure/block/manage/{block}', + 'enable' => '/admin/structure/block/manage/{block}/enable', + 'disable' => '/admin/structure/block/manage/{block}/disable', + ], + admin_permission: 'administer blocks', + label_count: [ + 'singular' => '@count block', + 'plural' => '@count blocks', + ], + lookup_keys: [ + 'theme', + ], + config_export: [ + 'id', + 'theme', + 'region', + 'weight', + 'provider', + 'plugin', + 'settings', + 'visibility', + ], +)] class Block extends ConfigEntityBase implements BlockInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/block/src/Hook/BlockHooks.php b/core/modules/block/src/Hook/BlockHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1c2147fce54a700394b258287564b7742976b787 --- /dev/null +++ b/core/modules/block/src/Hook/BlockHooks.php @@ -0,0 +1,207 @@ +<?php + +namespace Drupal\block\Hook; + +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\language\ConfigurableLanguageInterface; +use Drupal\system\Entity\Menu; +use Drupal\block\Entity\Block; +use Drupal\Core\Link; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for block. + */ +class BlockHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.block': + $block_content = \Drupal::moduleHandler()->moduleExists('block_content') ? Url::fromRoute('help.page', ['name' => 'block_content'])->toString() : '#'; + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the <a href=":blocks-documentation">online documentation for the Block module</a>.', [':blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Placing and moving blocks') . '</dt>'; + $output .= '<dd>' . t('You can place a new block in a region by selecting <em>Place block</em> on the <a href=":blocks">Block layout page</a>. Once a block is placed, it can be moved to a different region by drag-and-drop or by using the <em>Region</em> drop-down list, and then clicking <em>Save blocks</em>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Toggling between different themes') . '</dt>'; + $output .= '<dd>' . t('Blocks are placed and configured specifically for each theme. The Block layout page opens with the default theme, but you can toggle to other installed themes.') . '</dd>'; + $output .= '<dt>' . t('Demonstrating block regions for a theme') . '</dt>'; + $output .= '<dd>' . t('You can see where the regions are for the current theme by clicking the <em>Demonstrate block regions</em> link on the <a href=":blocks">Block layout page</a>. Regions are specific to each theme.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Configuring block settings') . '</dt>'; + $output .= '<dd>' . t('To change the settings of an individual block click on the <em>Configure</em> link on the <a href=":blocks">Block layout page</a>. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Controlling visibility') . '</dt>'; + $output .= '<dd>' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under <em>Visibility settings</em> of the block configuration.') . '</dd>'; + $output .= '<dt>' . t('Adding content blocks') . '</dt>'; + $output .= '<dd>' . t('You can add content blocks, if the <em>Block Content</em> module is installed. For more information, see the <a href=":blockcontent-help">Block Content help page</a>.', [':blockcontent-help' => $block_content]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + if ($route_name == 'block.admin_display' || $route_name == 'block.admin_display_theme') { + $demo_theme = $route_match->getParameter('theme') ?: \Drupal::config('system.theme')->get('default'); + $themes = \Drupal::service('theme_handler')->listInfo(); + $output = '<p>' . t('Block placement is specific to each theme on your site. Changes will not be saved until you click <em>Save blocks</em> at the bottom of the page.') . '</p>'; + $output .= '<p>' . Link::fromTextAndUrl(t('Demonstrate block regions (@theme)', ['@theme' => $themes[$demo_theme]->info['name']]), Url::fromRoute('block.admin_demo', ['theme' => $demo_theme]))->toString() . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['block' => ['render element' => 'elements']]; + } + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + if (\Drupal::routeMatch()->getRouteName() === 'block.admin_demo') { + $theme = \Drupal::theme()->getActiveTheme()->getName(); + $page_top['backlink'] = [ + '#type' => 'link', + '#title' => t('Exit block region demonstration'), + '#options' => [ + 'attributes' => [ + 'class' => [ + 'block-demo-backlink', + ], + ], + ], + '#weight' => -10, + ]; + if (\Drupal::config('system.theme')->get('default') == $theme) { + $page_top['backlink']['#url'] = Url::fromRoute('block.admin_display'); + } + else { + $page_top['backlink']['#url'] = Url::fromRoute('block.admin_display_theme', ['theme' => $theme]); + } + } + } + + /** + * Implements hook_modules_installed(). + * + * @see block_themes_installed() + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + // block_themes_installed() does not call block_theme_initialize() during site + // installation because block configuration can be optional or provided by the + // profile. Now, when the profile is installed, this configuration exists, + // call block_theme_initialize() for all installed themes. + $profile = \Drupal::installProfile(); + if (in_array($profile, $modules, TRUE)) { + foreach (\Drupal::service('theme_handler')->listInfo() as $theme => $data) { + block_theme_initialize($theme); + } + } + } + + /** + * Implements hook_rebuild(). + */ + #[Hook('rebuild')] + public function rebuild() { + foreach (\Drupal::service('theme_handler')->listInfo() as $theme => $data) { + if ($data->status) { + $regions = system_region_list($theme); + /** @var \Drupal\block\BlockInterface[] $blocks */ + $blocks = \Drupal::entityTypeManager()->getStorage('block')->loadByProperties(['theme' => $theme]); + foreach ($blocks as $block_id => $block) { + // Disable blocks in invalid regions. + if (!isset($regions[$block->getRegion()])) { + if ($block->status()) { + \Drupal::messenger()->addWarning(t('The block %info was assigned to the invalid region %region and has been disabled.', ['%info' => $block_id, '%region' => $block->getRegion()])); + } + $block->setRegion(system_default_region($theme))->disable()->save(); + } + } + } + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for user_role entities. + * + * Removes deleted role from blocks that use it. + */ + #[Hook('user_role_delete')] + public function userRoleDelete($role) { + foreach (Block::loadMultiple() as $block) { + /** @var \Drupal\block\BlockInterface $block */ + $visibility = $block->getVisibility(); + if (isset($visibility['user_role']['roles'][$role->id()])) { + unset($visibility['user_role']['roles'][$role->id()]); + $block->setVisibilityConfig('user_role', $visibility['user_role']); + $block->save(); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for menu entities. + */ + #[Hook('menu_delete')] + public function menuDelete(Menu $menu) { + if (!$menu->isSyncing()) { + foreach (Block::loadMultiple() as $block) { + if ($block->getPluginId() == 'system_menu_block:' . $menu->id()) { + $block->delete(); + } + } + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. + * + * Delete the potential block visibility settings of the deleted language. + */ + #[Hook('configurable_language_delete')] + public function configurableLanguageDelete(ConfigurableLanguageInterface $language) { + // Remove the block visibility settings for the deleted language. + foreach (Block::loadMultiple() as $block) { + /** @var \Drupal\block\BlockInterface $block */ + $visibility = $block->getVisibility(); + if (isset($visibility['language']['langcodes'][$language->id()])) { + unset($visibility['language']['langcodes'][$language->id()]); + $block->setVisibilityConfig('language', $visibility['language']); + $block->save(); + } + } + } + + /** + * Implements hook_block_build_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_build_local_actions_block_alter')] + public function blockBuildLocalActionsBlockAlter(array &$build, BlockPluginInterface $block) { + $build['#lazy_builder_preview'] = [ + '#type' => 'container', + '#attributes' => [ + 'class' => [ + 'invisible', + ], + ], + 'actions' => [ + '#theme' => 'menu_local_action', + '#link' => [ + 'title' => t('Add'), + 'url' => Url::fromUserInput('#'), + ], + ], + ]; + } + +} diff --git a/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php b/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php index f96e223db88a1427358e6a5fb97e3a637bbd5a7a..a826576642a51aab2621a4360a9655afe4558f1e 100644 --- a/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php +++ b/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php @@ -59,7 +59,6 @@ public function query() { // The i18n_string module adds a status column to locale_target. It was // originally 'status' in a later revision it was named 'i18n_status'. - /** @var \Drupal\Core\Database\Schema $db */ if ($this->getDatabase()->schema()->fieldExists('locales_target', 'status')) { $query->addField('lt', 'status', 'i18n_status'); } diff --git a/core/modules/block/tests/modules/block_test/block_test.module b/core/modules/block/tests/modules/block_test/block_test.module deleted file mode 100644 index 94e9ca745f657fa827f42c1135389c22a043db5f..0000000000000000000000000000000000000000 --- a/core/modules/block/tests/modules/block_test/block_test.module +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/** - * @file - * Provide test blocks. - */ - -declare(strict_types=1); - -use Drupal\Core\Block\BlockPluginInterface; -use Drupal\Core\Cache\Cache; - -/** - * Implements hook_block_alter(). - */ -function block_test_block_alter(&$block_info) { - if (\Drupal::state()->get('block_test_info_alter') && isset($block_info['test_block_instantiation'])) { - $block_info['test_block_instantiation']['category'] = t('Custom category'); - } -} - -/** - * Implements hook_block_view_BASE_BLOCK_ID_alter(). - */ -function block_test_block_view_test_cache_alter(array &$build, BlockPluginInterface $block) { - if (\Drupal::state()->get('block_test_view_alter_suffix') !== NULL) { - $build['#attributes']['foo'] = 'bar'; - } - if (\Drupal::state()->get('block_test_view_alter_append_pre_render_prefix') !== NULL) { - $build['#pre_render'][] = '\Drupal\block_test\BlockRenderAlterContent::preRender'; - } -} - -/** - * Implements hook_block_build_BASE_BLOCK_ID_alter(). - */ -function block_test_block_build_test_cache_alter(array &$build, BlockPluginInterface $block) { - // Test altering cache keys, contexts, tags and max-age. - if (\Drupal::state()->get('block_test_block_alter_cache_key') !== NULL) { - $build['#cache']['keys'][] = \Drupal::state()->get('block_test_block_alter_cache_key'); - } - if (\Drupal::state()->get('block_test_block_alter_cache_context') !== NULL) { - $build['#cache']['contexts'][] = \Drupal::state()->get('block_test_block_alter_cache_context'); - } - if (\Drupal::state()->get('block_test_block_alter_cache_tag') !== NULL) { - $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], [\Drupal::state()->get('block_test_block_alter_cache_tag')]); - } - if (\Drupal::state()->get('block_test_block_alter_cache_max_age') !== NULL) { - $build['#cache']['max-age'] = \Drupal::state()->get('block_test_block_alter_cache_max_age'); - } - - // Test setting #create_placeholder. - if (\Drupal::state()->get('block_test_block_alter_create_placeholder') !== NULL) { - $build['#create_placeholder'] = \Drupal::state()->get('block_test_block_alter_create_placeholder'); - } -} diff --git a/core/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php b/core/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..55b167d4946382c655c554e741ca9ed59d12fb48 --- /dev/null +++ b/core/modules/block/tests/modules/block_test/src/Hook/BlockTestHooks.php @@ -0,0 +1,63 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\block_test\Hook; + +use Drupal\Core\Cache\Cache; +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for block_test. + */ +class BlockTestHooks { + + /** + * Implements hook_block_alter(). + */ + #[Hook('block_alter')] + public function blockAlter(&$block_info) { + if (\Drupal::state()->get('block_test_info_alter') && isset($block_info['test_block_instantiation'])) { + $block_info['test_block_instantiation']['category'] = t('Custom category'); + } + } + + /** + * Implements hook_block_view_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_view_test_cache_alter')] + public function blockViewTestCacheAlter(array &$build, BlockPluginInterface $block) { + if (\Drupal::state()->get('block_test_view_alter_suffix') !== NULL) { + $build['#attributes']['foo'] = 'bar'; + } + if (\Drupal::state()->get('block_test_view_alter_append_pre_render_prefix') !== NULL) { + $build['#pre_render'][] = '\Drupal\block_test\BlockRenderAlterContent::preRender'; + } + } + + /** + * Implements hook_block_build_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_build_test_cache_alter')] + public function blockBuildTestCacheAlter(array &$build, BlockPluginInterface $block) { + // Test altering cache keys, contexts, tags and max-age. + if (\Drupal::state()->get('block_test_block_alter_cache_key') !== NULL) { + $build['#cache']['keys'][] = \Drupal::state()->get('block_test_block_alter_cache_key'); + } + if (\Drupal::state()->get('block_test_block_alter_cache_context') !== NULL) { + $build['#cache']['contexts'][] = \Drupal::state()->get('block_test_block_alter_cache_context'); + } + if (\Drupal::state()->get('block_test_block_alter_cache_tag') !== NULL) { + $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], [\Drupal::state()->get('block_test_block_alter_cache_tag')]); + } + if (\Drupal::state()->get('block_test_block_alter_cache_max_age') !== NULL) { + $build['#cache']['max-age'] = \Drupal::state()->get('block_test_block_alter_cache_max_age'); + } + // Test setting #create_placeholder. + if (\Drupal::state()->get('block_test_block_alter_create_placeholder') !== NULL) { + $build['#create_placeholder'] = \Drupal::state()->get('block_test_block_alter_create_placeholder'); + } + } + +} diff --git a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php index f42de9dd5ce0a71a7cfa9a28edd54a2a3a404ecb..6a6bb175b62f3322475e3a6579691f671356af02 100644 --- a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php +++ b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php @@ -38,7 +38,7 @@ class TestAccessBlock extends BlockBase implements ContainerFactoryPluginInterfa * initialize the defined contexts by setting it to an array of context * values keyed by context names. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\State\StateInterface $state diff --git a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml index 95db05ec0d5e125bfee21b5796734790258e8ee3..3bebf6460aebf1fbad0812201f824c2eb62c37dc 100644 --- a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml +++ b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml @@ -37,6 +37,18 @@ display: table: views_test_data field: name title: test_view_block + footer: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + plugin_id: text_custom + empty: false + content: '[view:title]' + tokenize: false block_1: display_plugin: block id: block_1 diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php index 9bf723d57866940fe557ae737b8d2d0c22f40301..5b99aa839bd232383a1c5503fea03d8da6944d9c 100644 --- a/core/modules/block/tests/src/Functional/BlockTest.php +++ b/core/modules/block/tests/src/Functional/BlockTest.php @@ -388,7 +388,7 @@ public function testHideBlockTitle(): void { * The machine name of the theme region to move the block to, for example * 'header' or 'sidebar_first'. */ - public function moveBlockToRegion(array $block, $region) { + public function moveBlockToRegion(array $block, $region): void { // Set the created block to a specific region. $block += ['theme' => $this->config('system.theme')->get('default')]; $edit = []; diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php index 647eadc165a5c206968cf41c621b32696a2af36e..76bc4f86f91c4af7eeb6bbfcf4270c1b26ddabde 100644 --- a/core/modules/block/tests/src/Functional/BlockUiTest.php +++ b/core/modules/block/tests/src/Functional/BlockUiTest.php @@ -34,8 +34,6 @@ class BlockUiTest extends BrowserTestBase { */ protected $defaultTheme = 'stark'; - protected $regions; - /** * The submitted block values used by this test. * diff --git a/core/modules/block/tests/src/Functional/BlockXssTest.php b/core/modules/block/tests/src/Functional/BlockXssTest.php index cb64983565daafc2e54491ff13346d53def1250b..1548cc4a85dd2e1d554d35278d4e46b18ee6ee30 100644 --- a/core/modules/block/tests/src/Functional/BlockXssTest.php +++ b/core/modules/block/tests/src/Functional/BlockXssTest.php @@ -101,7 +101,7 @@ public function testBlockXss(): void { /** * Tests XSS coming from View block labels. */ - protected function doViewTest() { + protected function doViewTest(): void { // Create a View without a custom label for its block Display. The // admin_label of the block then becomes just the View's label. $view = View::create([ @@ -151,7 +151,7 @@ protected function doViewTest() { /** * Tests XSS coming from Menu block labels. */ - protected function doMenuTest() { + protected function doMenuTest(): void { Menu::create([ 'id' => $this->randomMachineName(), 'label' => '<script>alert("menu");</script>', @@ -167,7 +167,7 @@ protected function doMenuTest() { /** * Tests XSS coming from Block Content block info. */ - protected function doBlockContentTest() { + protected function doBlockContentTest(): void { BlockContentType::create([ 'id' => 'basic', 'label' => 'basic', diff --git a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php index b716114547c6640764581f987712f9e62fbfda94..d59ce53842ceb97185eec00f694a4cfdb7d1a4df 100644 --- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php +++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php @@ -267,11 +267,12 @@ public function testBlockRendering(): void { 'views_label' => 'Custom title', 'region' => 'sidebar_first', ]); - $block_title_xpath = $this->assertSession()->buildXPathQuery('//aside[contains(@class, "layout-sidebar-first")]//div[@id = :id]/h2', [ + $block_xpath = $this->assertSession()->buildXPathQuery('//aside[contains(@class, "layout-sidebar-first")]//div[@id = :id]', [ ':id' => 'block-' . $block->id(), ]); $this->drupalGet(''); - $this->assertSession()->elementTextEquals('xpath', $block_title_xpath, 'Custom title'); + $this->assertSession()->elementTextEquals('xpath', "{$block_xpath}/h2", 'Custom title'); + $this->assertSession()->elementTextEquals('xpath', "{$block_xpath}//footer", 'Custom title'); // Don't override the title anymore. $plugin = $block->getPlugin(); @@ -279,14 +280,15 @@ public function testBlockRendering(): void { $block->save(); $this->drupalGet(''); - $this->assertSession()->elementTextEquals('xpath', $block_title_xpath, 'test_view_block'); + $this->assertSession()->elementTextEquals('xpath', "{$block_xpath}/h2", 'test_view_block'); + $this->assertSession()->elementTextEquals('xpath', "{$block_xpath}//footer", 'test_view_block'); // Hide the title. $block->getPlugin()->setConfigurationValue('label_display', FALSE); $block->save(); $this->drupalGet(''); - $this->assertSession()->elementNotExists('xpath', $block_title_xpath); + $this->assertSession()->elementNotExists('xpath', "{$block_xpath}/h2"); $this->assertCacheTags(array_merge($block->getCacheTags(), ['block_view', 'config:block_list', 'config:system.site', 'config:views.view.test_view_block', 'http_response', 'CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form', 'rendered'])); } diff --git a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php index f74a05864f5755cb7b9655569c0d192942a45176..bf0174ed9f9057283d0a07b02e2efc2d382cc48e 100644 --- a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php +++ b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php @@ -17,6 +17,9 @@ */ class BlockInterfaceTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'block', 'block_test', 'user']; /** diff --git a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php index dba36b79252802919d878d603e4a4e6de931e650..70daee8158acfafabf1beb2fc2e20c7e7ed34e29 100644 --- a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php +++ b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php @@ -8,6 +8,7 @@ use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\KernelTests\KernelTestBase; use Drupal\Tests\block\Traits\BlockCreationTrait; +use Drupal\block\Hook\BlockHooks; /** * Tests block_rebuild(). @@ -44,22 +45,12 @@ protected function setUp(): void { $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'stark')->save(); } - /** - * {@inheritdoc} - */ - public static function setUpBeforeClass(): void { - parent::setUpBeforeClass(); - - // @todo Once block_rebuild() is refactored to auto-loadable code, remove - // this require statement. - require_once static::getDrupalRoot() . '/core/modules/block/block.module'; - } - /** * @covers ::block_rebuild */ public function testRebuildNoBlocks(): void { - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); $messages = \Drupal::messenger()->all(); \Drupal::messenger()->deleteAll(); $this->assertEquals([], $messages); @@ -71,7 +62,8 @@ public function testRebuildNoBlocks(): void { public function testRebuildNoInvalidBlocks(): void { $this->placeBlock('system_powered_by_block', ['region' => 'content']); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); $messages = \Drupal::messenger()->all(); \Drupal::messenger()->deleteAll(); $this->assertEquals([], $messages); @@ -102,7 +94,8 @@ public function testRebuildInvalidBlocks(): void { $this->assertSame('INVALID', $block2->getRegion()); $this->assertFalse($block2->status()); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); // Reload block entities. $block1 = Block::load($block1->id()); diff --git a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php index 74447fa6eaeb9b0858c81c017c231d44f7ed9b16..20a394f844fb31e257939042c9262d40ee777910 100644 --- a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php +++ b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php @@ -56,7 +56,7 @@ public function testBlockCRUD(): void { /** * Tests the creation of blocks. */ - protected function createTests() { + protected function createTests(): void { // Attempt to create a block without a plugin. try { $entity = $this->controller->create([]); @@ -111,7 +111,7 @@ protected function createTests() { /** * Tests the loading of blocks. */ - protected function loadTests() { + protected function loadTests(): void { $entity = $this->controller->load('test_block'); $this->assertInstanceOf(Block::class, $entity); @@ -126,7 +126,7 @@ protected function loadTests() { /** * Tests the deleting of blocks. */ - protected function deleteTests() { + protected function deleteTests(): void { $entity = $this->controller->load('test_block'); // Ensure that the storage isn't currently empty. diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php index 83be3828f74ec654b7cac59ad6d14d0e8829ae7f..6866119b0d8d0c0b0a5e5964c5b4da5b8194eb16 100644 --- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php +++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php @@ -147,7 +147,7 @@ public function testBlockViewBuilderCache(): void { * * @see ::testBlockViewBuilderCache() */ - protected function verifyRenderCacheHandling() { + protected function verifyRenderCacheHandling(): void { /** @var \Drupal\Core\Cache\VariationCacheFactoryInterface $variation_cache_factory */ $variation_cache_factory = $this->container->get('variation_cache_factory'); $cache_bin = $variation_cache_factory->get('render'); diff --git a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php index 8fd9422428dad006e2ceae662a09f67c4b630909..9304a4db20b110c2032b92a2fcfcc1368c6ca56c 100644 --- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php +++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\block\Kernel\Migrate\d6; use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase; +use Drupal\block\Hook\BlockHooks; /** * Tests migration of i18n block translations. @@ -49,7 +50,8 @@ protected function setUp(): void { 'd6_block', 'd6_block_translation', ]); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); } /** diff --git a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php index c06f5226d70091c9727e77457db553b35b22a8fe..eb3ad7721e9be98e67f839dba12390e22859dbc7 100644 --- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php +++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php @@ -6,6 +6,7 @@ use Drupal\block\Entity\Block; use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase; +use Drupal\block\Hook\BlockHooks; /** * Tests migration of blocks to configuration entities. @@ -54,7 +55,8 @@ protected function setUp(): void { 'd6_user_role', 'd6_block', ]); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); } /** diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php index d024787870f7e17833d85cbc0185bf3b7e823748..ab2072c508b4751709dd55b286051a40b264a749 100644 --- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php +++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\block\Kernel\Migrate\d7; use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase; +use Drupal\block\Hook\BlockHooks; /** * Tests migration of i18n block translations. @@ -52,7 +53,8 @@ protected function setUp(): void { 'd7_block', 'd7_block_translation', ]); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); } /** diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockNoBlockContentTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockNoBlockContentTest.php index 6bd100d7d1ea2fc027e6771fcb687eee0c0a56da..54fa9605b7a53a239908c695895b4bc0f3e5beef 100644 --- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockNoBlockContentTest.php +++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockNoBlockContentTest.php @@ -6,6 +6,7 @@ use Drupal\block\Entity\Block; use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase; +use Drupal\block\Hook\BlockHooks; /** * Tests the migration of blocks without Block Content installed. @@ -52,7 +53,8 @@ protected function setUp(): void { 'd7_user_role', 'd7_block', ]); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); } /** diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php index 2ef460b60f55cc61b973176e69015824cff97923..41407b41ff6a64c08bc2b1109b2175ac59676f6b 100644 --- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php +++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php @@ -7,6 +7,7 @@ use Drupal\block\Entity\Block; use Drupal\block_content\Entity\BlockContent; use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase; +use Drupal\block\Hook\BlockHooks; /** * Tests migration of blocks to configuration entities. @@ -58,7 +59,8 @@ protected function setUp(): void { 'd7_custom_block', 'd7_block', ]); - block_rebuild(); + $blockRebuild = new BlockHooks(); + $blockRebuild->rebuild(); } /** diff --git a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php index 51be75bc9459901179c25fad6b5816e515edb64d..8d9f14026035ffb709c66d17f5977a644fa9e557 100644 --- a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php +++ b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { parent::setUp(); $this->installConfig(['system']); - /** @var \Drupal\Core\Extension\ThemeInstallerInterface $themeInstaller */ $this->themeInstaller = $this->container->get('theme_installer'); $this->defaultTheme = $this->config('system.theme')->get('default'); } @@ -103,7 +102,7 @@ public function testNewDefaultThemeBlocks(): void { $this->assertEmpty($new_blocks); // Install a hidden base theme and ensure blocks are not copied. - $base_theme = 'test_basetheme'; + $base_theme = 'test_base_theme'; $theme_installer->install([$base_theme]); $new_blocks = $block_storage->getQuery() ->accessCheck(FALSE) @@ -171,7 +170,7 @@ public function testBlockCollision(): void { $this->assertEmpty($new_blocks); // Install a hidden base theme and ensure blocks are not copied. - $base_theme = 'test_basetheme'; + $base_theme = 'test_base_theme'; $theme_installer->install([$base_theme]); $new_blocks = $block_storage->getQuery() ->accessCheck(FALSE) diff --git a/core/modules/block_content/block_content.install b/core/modules/block_content/block_content.install index 8b2652a018dd45ea50ae5fc90808ea2810d18693..07b0bbbb5c39f5e006a65d8b031f4c1abeca8634 100644 --- a/core/modules/block_content/block_content.install +++ b/core/modules/block_content/block_content.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function block_content_update_last_removed() { +function block_content_update_last_removed(): int { return 10300; } diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module index 00fc5a5320d811dc80996b5e097d47fb5d9631d5..7b85ae6de45bab4d8de771fe0ccf4ea60f299502 100644 --- a/core/modules/block_content/block_content.module +++ b/core/modules/block_content/block_content.module @@ -2,73 +2,12 @@ /** * @file - * Allows the creation of content blocks through the user interface. */ -use Drupal\block\BlockInterface; -use Drupal\block_content\BlockContentInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; -use Drupal\Core\Database\Query\SelectInterface; -use Drupal\Core\Database\Query\AlterableInterface; use Drupal\Core\Database\Query\ConditionInterface; -/** - * Implements hook_help(). - */ -function block_content_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.block_content': - $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Block Content module allows you to create and manage custom <em>block types</em> and <em>content-containing blocks</em>. For more information, see the <a href=":online-help">online documentation for the Block Content module</a>.', [':online-help' => 'https://www.drupal.org/documentation/modules/block_content']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating and managing block types') . '</dt>'; - $output .= '<dd>' . t('Users with the <em>Administer blocks</em> permission can create and edit block types with fields and display settings, from the <a href=":types">Block types</a> page under the Structure menu. For more information about managing fields and display settings, see the <a href=":field-ui">Field UI module help</a> and <a href=":field">Field module help</a>.', [':types' => Url::fromRoute('entity.block_content_type.collection')->toString(), ':field-ui' => $field_ui, ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Creating content blocks') . '</dt>'; - $output .= '<dd>' . t('Users with the <em>Administer blocks</em> permission can create, edit, and delete content blocks of each defined block type, from the <a href=":block-library">Content blocks page</a>. After creating a block, place it in a region from the <a href=":blocks">Block layout page</a>, just like blocks provided by other modules.', [':blocks' => Url::fromRoute('block.admin_display')->toString(), ':block-library' => Url::fromRoute('entity.block_content.collection')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function block_content_theme($existing, $type, $theme, $path) { - return [ - 'block_content_add_list' => [ - 'variables' => ['content' => NULL], - 'file' => 'block_content.pages.inc', - ], - ]; -} - -/** - * Implements hook_entity_type_alter(). - */ -function block_content_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - // Add a translation handler for fields if the language module is enabled. - if (\Drupal::moduleHandler()->moduleExists('language')) { - $translation = $entity_types['block_content']->get('translation'); - $translation['block_content'] = TRUE; - $entity_types['block_content']->set('translation', $translation); - } - - // Swap out the default EntityChanged constraint with a custom one with - // different logic for inline blocks. - $constraints = $entity_types['block_content']->getConstraints(); - unset($constraints['EntityChanged']); - $constraints['BlockContentEntityChanged'] = NULL; - $entity_types['block_content']->setConstraints($constraints); -} - /** * Adds the default body field to a block type. * @@ -117,32 +56,6 @@ function block_content_add_body_field($block_type_id, $label = 'Body') { return $field; } -/** - * Implements hook_query_TAG_alter(). - * - * Alters any 'entity_reference' query where the entity type is - * 'block_content' and the query has the tag 'block_content_access'. - * - * These queries should only return reusable blocks unless a condition on - * 'reusable' is explicitly set. - * - * Block_content entities that are not reusable should by default not be - * selectable as entity reference values. A module can still create an instance - * of \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface - * that will allow selection of non-reusable blocks by explicitly setting - * a condition on the 'reusable' field. - * - * @see \Drupal\block_content\BlockContentAccessControlHandler - */ -function block_content_query_entity_reference_alter(AlterableInterface $query) { - if ($query instanceof SelectInterface && $query->getMetaData('entity_type') === 'block_content' && $query->hasTag('block_content_access')) { - $data_table = \Drupal::entityTypeManager()->getDefinition('block_content')->getDataTable(); - if (array_key_exists($data_table, $query->getTables()) && !_block_content_has_reusable_condition($query->conditions(), $query->getTables())) { - $query->condition("$data_table.reusable", TRUE); - } - } -} - /** * Utility function to find nested conditions using the reusable field. * @@ -186,58 +99,3 @@ function _block_content_has_reusable_condition(array $condition, array $tables) } return FALSE; } - -/** - * Implements hook_theme_suggestions_HOOK_alter() for block templates. - */ -function block_content_theme_suggestions_block_alter(array &$suggestions, array $variables) { - $suggestions_new = []; - $content = $variables['elements']['content']; - - $block_content = $variables['elements']['content']['#block_content'] ?? NULL; - - if ($block_content instanceof BlockContentInterface) { - $bundle = $content['#block_content']->bundle(); - $view_mode = strtr($variables['elements']['#configuration']['view_mode'], '.', '_'); - - $suggestions_new[] = 'block__block_content__view__' . $view_mode; - $suggestions_new[] = 'block__block_content__type__' . $bundle; - $suggestions_new[] = 'block__block_content__view_type__' . $bundle . '__' . $view_mode; - - if (!empty($variables['elements']['#id'])) { - $suggestions_new[] = 'block__block_content__id__' . $variables['elements']['#id']; - $suggestions_new[] = 'block__block_content__id_view__' . $variables['elements']['#id'] . '__' . $view_mode; - } - - // Remove duplicate block__block_content. - $suggestions = array_unique($suggestions); - array_splice($suggestions, 1, 0, $suggestions_new); - } - - return $suggestions; -} - -/** - * Implements hook_entity_operation(). - */ -function block_content_entity_operation(EntityInterface $entity): array { - $operations = []; - if ($entity instanceof BlockInterface) { - $plugin = $entity->getPlugin(); - if ($plugin->getBaseId() === 'block_content') { - $custom_block = \Drupal::entityTypeManager()->getStorage('block_content')->loadByProperties([ - 'uuid' => $plugin->getDerivativeId(), - ]); - $custom_block = reset($custom_block); - if ($custom_block && $custom_block->access('update')) { - $operations['block-edit'] = [ - 'title' => t('Edit block'), - 'url' => $custom_block->toUrl('edit-form')->setOptions([]), - 'weight' => 50, - ]; - } - } - } - - return $operations; -} diff --git a/core/modules/block_content/block_content.pages.inc b/core/modules/block_content/block_content.pages.inc index ff1528c265a765c92d44f4207d7dc4711b45cb49..b5124506590a68b90a2ca783fc85b5944c8b249f 100644 --- a/core/modules/block_content/block_content.pages.inc +++ b/core/modules/block_content/block_content.pages.inc @@ -2,7 +2,6 @@ /** * @file - * Provides page callbacks for content blocks. */ use Drupal\Core\Link; diff --git a/core/modules/block_content/block_content.post_update.php b/core/modules/block_content/block_content.post_update.php index 95939311db8ef15af05ebf7b5a413b6d8798c385..592b3ee9714733913767241e7503c5f0ce1c44f2 100644 --- a/core/modules/block_content/block_content.post_update.php +++ b/core/modules/block_content/block_content.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function block_content_removed_post_updates() { +function block_content_removed_post_updates(): array { return [ 'block_content_post_update_add_views_reusable_filter' => '9.0.0', 'block_content_post_update_entity_changed_constraint' => '11.0.0', diff --git a/core/modules/block_content/src/Entity/BlockContent.php b/core/modules/block_content/src/Entity/BlockContent.php index 81e6bfcdaeaa29bcb24d4bb15a4063f861dab9b6..b81cdff4c4df8885e3ac66aff89c60fe3c826519 100644 --- a/core/modules/block_content/src/Entity/BlockContent.php +++ b/core/modules/block_content/src/Entity/BlockContent.php @@ -2,6 +2,20 @@ namespace Drupal\block_content\Entity; +use Drupal\block_content\BlockContentAccessControlHandler; +use Drupal\block_content\BlockContentForm; +use Drupal\block_content\BlockContentListBuilder; +use Drupal\block_content\BlockContentStorageSchema; +use Drupal\block_content\BlockContentTranslationHandler; +use Drupal\block_content\BlockContentViewBuilder; +use Drupal\block_content\BlockContentViewsData; +use Drupal\block_content\Form\BlockContentDeleteForm; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\Entity\Sql\SqlContentEntityStorage; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\block_content\Access\RefinableDependentAccessTrait; use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; @@ -12,79 +26,76 @@ /** * Defines the content block entity class. * - * @ContentEntityType( - * id = "block_content", - * label = @Translation("Content block"), - * label_collection = @Translation("Content blocks"), - * label_singular = @Translation("content block"), - * label_plural = @Translation("content blocks"), - * label_count = @PluralTranslation( - * singular = "@count content block", - * plural = "@count content blocks", - * ), - * bundle_label = @Translation("Block type"), - * handlers = { - * "storage" = "Drupal\Core\Entity\Sql\SqlContentEntityStorage", - * "storage_schema" = "Drupal\block_content\BlockContentStorageSchema", - * "access" = "Drupal\block_content\BlockContentAccessControlHandler", - * "list_builder" = "Drupal\block_content\BlockContentListBuilder", - * "view_builder" = "Drupal\block_content\BlockContentViewBuilder", - * "views_data" = "Drupal\block_content\BlockContentViewsData", - * "form" = { - * "add" = "Drupal\block_content\BlockContentForm", - * "edit" = "Drupal\block_content\BlockContentForm", - * "delete" = "Drupal\block_content\Form\BlockContentDeleteForm", - * "default" = "Drupal\block_content\BlockContentForm", - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "route_provider" = { - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * "translation" = "Drupal\block_content\BlockContentTranslationHandler" - * }, - * admin_permission = "administer block content", - * collection_permission = "access block library", - * base_table = "block_content", - * revision_table = "block_content_revision", - * data_table = "block_content_field_data", - * revision_data_table = "block_content_field_revision", - * show_revision_ui = TRUE, - * links = { - * "canonical" = "/admin/content/block/{block_content}", - * "delete-form" = "/admin/content/block/{block_content}/delete", - * "edit-form" = "/admin/content/block/{block_content}", - * "collection" = "/admin/content/block", - * "create" = "/block", - * "revision-delete-form" = "/admin/content/block/{block_content}/revision/{block_content_revision}/delete", - * "revision-revert-form" = "/admin/content/block/{block_content}/revision/{block_content_revision}/revert", - * "version-history" = "/admin/content/block/{block_content}/revisions", - * }, - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "info", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "published" = "status", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log" - * }, - * bundle_entity_type = "block_content_type", - * field_ui_base_route = "entity.block_content_type.edit_form", - * render_cache = FALSE, - * ) - * * Note that render caching of block_content entities is disabled because they * are always rendered as blocks, and blocks already have their own render * caching. * See https://www.drupal.org/node/2284917#comment-9132521 for more information. */ +#[ContentEntityType( + id: 'block_content', + label: new TranslatableMarkup('Content block'), + label_collection: new TranslatableMarkup('Content blocks'), + label_singular: new TranslatableMarkup('content block'), + label_plural: new TranslatableMarkup('content blocks'), + render_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'info', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'published' => 'status', + ], + handlers: [ + 'storage' => SqlContentEntityStorage::class, + 'storage_schema' => BlockContentStorageSchema::class, + 'access' => BlockContentAccessControlHandler::class, + 'list_builder' => BlockContentListBuilder::class, + 'view_builder' => BlockContentViewBuilder::class, + 'views_data' => BlockContentViewsData::class, + 'form' => [ + 'add' => BlockContentForm::class, + 'edit' => BlockContentForm::class, + 'delete' => BlockContentDeleteForm::class, + 'default' => BlockContentForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'route_provider' => ['revision' => RevisionHtmlRouteProvider::class], + 'translation' => BlockContentTranslationHandler::class, + ], + links: [ + 'canonical' => '/admin/content/block/{block_content}', + 'delete-form' => '/admin/content/block/{block_content}/delete', + 'edit-form' => '/admin/content/block/{block_content}', + 'collection' => '/admin/content/block', + 'create' => '/block', + 'revision-delete-form' => '/admin/content/block/{block_content}/revision/{block_content_revision}/delete', + 'revision-revert-form' => '/admin/content/block/{block_content}/revision/{block_content_revision}/revert', + 'version-history' => '/admin/content/block/{block_content}/revisions', + ], + admin_permission: 'administer block content', + collection_permission: 'access block library', + bundle_entity_type: 'block_content_type', + bundle_label: new TranslatableMarkup('Block type'), + base_table: 'block_content', + data_table: 'block_content_field_data', + revision_table: 'block_content_revision', + revision_data_table: 'block_content_field_revision', + translatable: TRUE, + show_revision_ui: TRUE, + label_count: [ + 'singular' => '@count content block', + 'plural' => '@count content blocks', + ], + field_ui_base_route: 'entity.block_content_type.edit_form', + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log', + ], +)] class BlockContent extends EditorialContentEntityBase implements BlockContentInterface { use RefinableDependentAccessTrait; diff --git a/core/modules/block_content/src/Entity/BlockContentType.php b/core/modules/block_content/src/Entity/BlockContentType.php index c2f22e7fbb5454dbb5299cd0fd3f1dff161ad63a..ecbc6c3866d257074d048aa55f4308c99c33f6b6 100644 --- a/core/modules/block_content/src/Entity/BlockContentType.php +++ b/core/modules/block_content/src/Entity/BlockContentType.php @@ -2,57 +2,64 @@ namespace Drupal\block_content\Entity; +use Drupal\block_content\BlockContentTypeForm; +use Drupal\block_content\BlockContentTypeListBuilder; +use Drupal\block_content\BlockTypeAccessControlHandler; +use Drupal\block_content\Form\BlockContentTypeDeleteForm; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\block_content\BlockContentTypeInterface; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the block type entity. - * - * @ConfigEntityType( - * id = "block_content_type", - * label = @Translation("Block type"), - * label_collection = @Translation("Block types"), - * label_singular = @Translation("block type"), - * label_plural = @Translation("block types"), - * label_count = @PluralTranslation( - * singular = "@count block type", - * plural = "@count block types", - * ), - * handlers = { - * "access" = "Drupal\block_content\BlockTypeAccessControlHandler", - * "form" = { - * "default" = "Drupal\block_content\BlockContentTypeForm", - * "add" = "Drupal\block_content\BlockContentTypeForm", - * "edit" = "Drupal\block_content\BlockContentTypeForm", - * "delete" = "Drupal\block_content\Form\BlockContentTypeDeleteForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider", - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * }, - * "list_builder" = "Drupal\block_content\BlockContentTypeListBuilder" - * }, - * admin_permission = "administer block types", - * config_prefix = "type", - * bundle_of = "block_content", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * links = { - * "delete-form" = "/admin/structure/block-content/manage/{block_content_type}/delete", - * "edit-form" = "/admin/structure/block-content/manage/{block_content_type}", - * "entity-permissions-form" = "/admin/structure/block-content/manage/{block_content_type}/permissions", - * "collection" = "/admin/structure/block-content", - * }, - * config_export = { - * "id", - * "label", - * "revision", - * "description", - * } - * ) */ +#[ConfigEntityType( + id: 'block_content_type', + label: new TranslatableMarkup('Block type'), + label_collection: new TranslatableMarkup('Block types'), + label_singular: new TranslatableMarkup('block type'), + label_plural: new TranslatableMarkup('block types'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => BlockTypeAccessControlHandler::class, + 'form' => [ + 'default' => BlockContentTypeForm::class, + 'add' => BlockContentTypeForm::class, + 'edit' => BlockContentTypeForm::class, + 'delete' => BlockContentTypeDeleteForm::class, + ], + 'route_provider' => [ + 'html' => AdminHtmlRouteProvider::class, + 'permissions' => EntityPermissionsRouteProvider::class, + ], + 'list_builder' => BlockContentTypeListBuilder::class, + ], + links: [ + 'delete-form' => '/admin/structure/block-content/manage/{block_content_type}/delete', + 'edit-form' => '/admin/structure/block-content/manage/{block_content_type}', + 'entity-permissions-form' => '/admin/structure/block-content/manage/{block_content_type}/permissions', + 'collection' => '/admin/structure/block-content', + ], + admin_permission: 'administer block types', + bundle_of: 'block_content', + label_count: [ + 'singular' => '@count block type', + 'plural' => '@count block types', + ], + config_export: [ + 'id', + 'label', + 'revision', + 'description', + ], +)] class BlockContentType extends ConfigEntityBundleBase implements BlockContentTypeInterface { /** diff --git a/core/modules/block_content/src/Hook/BlockContentHooks.php b/core/modules/block_content/src/Hook/BlockContentHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..155d14a5240965070295bb0f436361914eb42638 --- /dev/null +++ b/core/modules/block_content/src/Hook/BlockContentHooks.php @@ -0,0 +1,160 @@ +<?php + +namespace Drupal\block_content\Hook; + +use Drupal\block\BlockInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\block_content\BlockContentInterface; +use Drupal\Core\Database\Query\SelectInterface; +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for block_content. + */ +class BlockContentHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.block_content': + $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Block Content module allows you to create and manage custom <em>block types</em> and <em>content-containing blocks</em>. For more information, see the <a href=":online-help">online documentation for the Block Content module</a>.', [':online-help' => 'https://www.drupal.org/documentation/modules/block_content']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating and managing block types') . '</dt>'; + $output .= '<dd>' . t('Users with the <em>Administer blocks</em> permission can create and edit block types with fields and display settings, from the <a href=":types">Block types</a> page under the Structure menu. For more information about managing fields and display settings, see the <a href=":field-ui">Field UI module help</a> and <a href=":field">Field module help</a>.', [ + ':types' => Url::fromRoute('entity.block_content_type.collection')->toString(), + ':field-ui' => $field_ui, + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Creating content blocks') . '</dt>'; + $output .= '<dd>' . t('Users with the <em>Administer blocks</em> permission can create, edit, and delete content blocks of each defined block type, from the <a href=":block-library">Content blocks page</a>. After creating a block, place it in a region from the <a href=":blocks">Block layout page</a>, just like blocks provided by other modules.', [ + ':blocks' => Url::fromRoute('block.admin_display')->toString(), + ':block-library' => Url::fromRoute('entity.block_content.collection')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + return [ + 'block_content_add_list' => [ + 'variables' => [ + 'content' => NULL, + ], + 'file' => 'block_content.pages.inc', + ], + ]; + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + // Add a translation handler for fields if the language module is enabled. + if (\Drupal::moduleHandler()->moduleExists('language')) { + $translation = $entity_types['block_content']->get('translation'); + $translation['block_content'] = TRUE; + $entity_types['block_content']->set('translation', $translation); + } + // Swap out the default EntityChanged constraint with a custom one with + // different logic for inline blocks. + $constraints = $entity_types['block_content']->getConstraints(); + unset($constraints['EntityChanged']); + $constraints['BlockContentEntityChanged'] = NULL; + $entity_types['block_content']->setConstraints($constraints); + } + + /** + * Implements hook_query_TAG_alter(). + * + * Alters any 'entity_reference' query where the entity type is + * 'block_content' and the query has the tag 'block_content_access'. + * + * These queries should only return reusable blocks unless a condition on + * 'reusable' is explicitly set. + * + * Block_content entities that are not reusable should by default not be + * selectable as entity reference values. A module can still create an instance + * of \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface + * that will allow selection of non-reusable blocks by explicitly setting + * a condition on the 'reusable' field. + * + * @see \Drupal\block_content\BlockContentAccessControlHandler + */ + #[Hook('query_entity_reference_alter')] + public function queryEntityReferenceAlter(AlterableInterface $query) { + if ($query instanceof SelectInterface && $query->getMetaData('entity_type') === 'block_content' && $query->hasTag('block_content_access')) { + $data_table = \Drupal::entityTypeManager()->getDefinition('block_content')->getDataTable(); + if (array_key_exists($data_table, $query->getTables()) && !_block_content_has_reusable_condition($query->conditions(), $query->getTables())) { + $query->condition("{$data_table}.reusable", TRUE); + } + } + } + + /** + * Implements hook_theme_suggestions_HOOK_alter() for block templates. + */ + #[Hook('theme_suggestions_block_alter')] + public function themeSuggestionsBlockAlter(array &$suggestions, array $variables) { + $suggestions_new = []; + $content = $variables['elements']['content']; + $block_content = $variables['elements']['content']['#block_content'] ?? NULL; + if ($block_content instanceof BlockContentInterface) { + $bundle = $content['#block_content']->bundle(); + $view_mode = strtr($variables['elements']['#configuration']['view_mode'], '.', '_'); + $suggestions_new[] = 'block__block_content__view__' . $view_mode; + $suggestions_new[] = 'block__block_content__type__' . $bundle; + $suggestions_new[] = 'block__block_content__view_type__' . $bundle . '__' . $view_mode; + if (!empty($variables['elements']['#id'])) { + $suggestions_new[] = 'block__block_content__id__' . $variables['elements']['#id']; + $suggestions_new[] = 'block__block_content__id_view__' . $variables['elements']['#id'] . '__' . $view_mode; + } + // Remove duplicate block__block_content. + $suggestions = array_unique($suggestions); + array_splice($suggestions, 1, 0, $suggestions_new); + } + return $suggestions; + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) : array { + $operations = []; + if ($entity instanceof BlockInterface) { + $plugin = $entity->getPlugin(); + if ($plugin->getBaseId() === 'block_content') { + $custom_block = \Drupal::entityTypeManager()->getStorage('block_content')->loadByProperties(['uuid' => $plugin->getDerivativeId()]); + $custom_block = reset($custom_block); + if ($custom_block && $custom_block->access('update')) { + $operations['block-edit'] = [ + 'title' => t('Edit block'), + 'url' => $custom_block->toUrl('edit-form')->setOptions([]), + 'weight' => 50, + ]; + } + } + } + return $operations; + } + +} diff --git a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module deleted file mode 100644 index 9ab1194bd51eaaecc70fc87636174cea98510d9e..0000000000000000000000000000000000000000 --- a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -/** - * @file - * A dummy module for testing content block related hooks. - * - * This is a dummy module that implements content block related hooks to test API - * interaction with the block_content module. - */ - -declare(strict_types=1); - -use Drupal\block_content\Entity\BlockContent; - -/** - * Implements hook_block_content_view(). - */ -function block_content_test_block_content_view(array &$build, BlockContent $block_content, $view_mode) { - // Add extra content. - $build['extra_content'] = [ - '#markup' => '<blink>Wow</blink>', - ]; -} - -/** - * Implements hook_block_content_presave(). - */ -function block_content_test_block_content_presave(BlockContent $block_content) { - if ($block_content->label() == 'testing_block_content_presave') { - $block_content->setInfo($block_content->label() . '_presave'); - } - // Determine changes. - if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') { - if ($block_content->original->label() != $block_content->label()) { - $block_content->setInfo($block_content->label() . '_presave'); - // Drupal 1.0 release. - $block_content->changed = 979534800; - } - } -} - -/** - * Implements hook_block_content_update(). - */ -function block_content_test_block_content_update(BlockContent $block_content) { - // Determine changes on update. - if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') { - if ($block_content->original->label() != $block_content->label()) { - $block_content->setInfo($block_content->label() . '_update'); - } - } -} - -/** - * Implements hook_block_content_insert(). - * - * This tests saving a block_content on block_content insert. - * - * @see \Drupal\block_content\Tests\BlockContentSaveTest::testBlockContentSaveOnInsert() - */ -function block_content_test_block_content_insert(BlockContent $block_content) { - // Set the block_content title to the block_content ID and save. - if ($block_content->label() == 'new') { - $block_content->setInfo('BlockContent ' . $block_content->id()); - $block_content->setNewRevision(FALSE); - $block_content->save(); - } - if ($block_content->label() == 'fail_creation') { - throw new Exception('Test exception for rollback.'); - } -} diff --git a/core/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php b/core/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..34acfa50d09df1d0074fa2676c38e635dd6f80d3 --- /dev/null +++ b/core/modules/block_content/tests/modules/block_content_test/src/Hook/BlockContentTestHooks.php @@ -0,0 +1,75 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\block_content_test\Hook; + +use Drupal\block_content\Entity\BlockContent; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for block_content_test. + */ +class BlockContentTestHooks { + + /** + * Implements hook_block_content_view(). + */ + #[Hook('block_content_view')] + public function blockContentView(array &$build, BlockContent $block_content, $view_mode) { + // Add extra content. + $build['extra_content'] = ['#markup' => '<blink>Wow</blink>']; + } + + /** + * Implements hook_block_content_presave(). + */ + #[Hook('block_content_presave')] + public function blockContentPresave(BlockContent $block_content) { + if ($block_content->label() == 'testing_block_content_presave') { + $block_content->setInfo($block_content->label() . '_presave'); + } + // Determine changes. + if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') { + if ($block_content->original->label() != $block_content->label()) { + $block_content->setInfo($block_content->label() . '_presave'); + // Drupal 1.0 release. + $block_content->changed = 979534800; + } + } + } + + /** + * Implements hook_block_content_update(). + */ + #[Hook('block_content_update')] + public function blockContentUpdate(BlockContent $block_content) { + // Determine changes on update. + if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') { + if ($block_content->original->label() != $block_content->label()) { + $block_content->setInfo($block_content->label() . '_update'); + } + } + } + + /** + * Implements hook_block_content_insert(). + * + * This tests saving a block_content on block_content insert. + * + * @see \Drupal\block_content\Tests\BlockContentSaveTest::testBlockContentSaveOnInsert() + */ + #[Hook('block_content_insert')] + public function blockContentInsert(BlockContent $block_content) { + // Set the block_content title to the block_content ID and save. + if ($block_content->label() == 'new') { + $block_content->setInfo('BlockContent ' . $block_content->id()); + $block_content->setNewRevision(FALSE); + $block_content->save(); + } + if ($block_content->label() == 'fail_creation') { + throw new \Exception('Test exception for rollback.'); + } + } + +} diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php index 802d93ba4c951636505b3c21b506b013b0a47aa8..a8734928932121d1138fdc80eaa80f3de339cc9d 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php @@ -59,7 +59,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function setupBundle() { + protected function setupBundle(): void { // Create the basic bundle since it is provided by standard. $bundle = BlockContentType::create([ 'id' => $this->bundle, @@ -109,7 +109,7 @@ protected function getEditValues($values, $langcode, $new = FALSE) { /** * {@inheritdoc} */ - protected function doTestBasicTranslation() { + protected function doTestBasicTranslation(): void { parent::doTestBasicTranslation(); // Ensure that a block translation can be created using the same description @@ -137,7 +137,7 @@ protected function doTestBasicTranslation() { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentTest.php index 9c402c586879135c31d50629fd382e7723c54b1a..e155c86f0f7bd45fa88955f39d50f32eba6fd3a3 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentTest.php @@ -11,6 +11,7 @@ use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\KernelTests\KernelTestBase; use Drupal\Tests\user\Traits\UserCreationTrait; +use Drupal\block_content\Hook\BlockContentHooks; /** * Tests the block content. @@ -60,7 +61,8 @@ public function testOperationLinks(): void { ]); // The anonymous user doesn't have the "administer block" permission. - $this->assertEmpty(block_content_entity_operation($block)); + $blockContentEntityOperation = new BlockContentHooks(); + $this->assertEmpty($blockContentEntityOperation->entityOperation($block)); $this->setUpCurrentUser(['uid' => 1], ['edit any spiffy block content', 'administer blocks']); @@ -71,7 +73,7 @@ public function testOperationLinks(): void { 'url' => $block_content->toUrl('edit-form')->setOptions([]), 'weight' => 50, ], - ], block_content_entity_operation($block)); + ], $blockContentEntityOperation->entityOperation($block)); } } diff --git a/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php b/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php index 426f9c3ec5c8981402588716753110ef443ea72a..5076c80e457dd5ed9856bb66e9a7d90a85838321 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php @@ -8,6 +8,7 @@ use Drupal\block_content\Entity\BlockContent; use Drupal\block_content\Entity\BlockContentType; use Drupal\KernelTests\KernelTestBase; +use Drupal\block_content\Hook\BlockContentHooks; /** * Tests the block_content_theme_suggestions_block() function. @@ -73,7 +74,8 @@ public function testBlockThemeHookSuggestions(): void { $variables['elements']['content']['#block_content'] = $this->blockContent; $suggestions_empty = []; $suggestions_empty[] = 'block__block_content__' . $block->uuid(); - $suggestions = block_content_theme_suggestions_block_alter($suggestions_empty, $variables); + $blockTemplateSuggestionsAlter = new BlockContentHooks(); + $suggestions = $blockTemplateSuggestionsAlter->themeSuggestionsBlockAlter($suggestions_empty, $variables); $this->assertSame([ 'block__block_content__' . $block->uuid(), diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php index bc48e30eea81a69e1775d49dbf045762ce572e9e..09bdc51540b552fc6a12ad99da8b1f1496500886 100644 --- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php +++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php @@ -17,6 +17,9 @@ */ class MigrateBlockContentBodyFieldTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['block', 'block_content', 'filter', 'text']; /** diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php index 1b20314ec835ba572dfab44ef56d0fe5cb9bf187..c9a677f28b95251cd52ea03802ff190e478bc6fb 100644 --- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php +++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php @@ -15,6 +15,9 @@ */ class MigrateBlockContentTypeTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['block', 'block_content', 'filter', 'text']; /** diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php index 7ba7ae83549bb6c3876cbe41a5c478fd8faf1aaa..cb2f5e5a2000a6ce2d2bb31854c0c5ee352924a2 100644 --- a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php +++ b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php @@ -15,6 +15,9 @@ */ class MigrateCustomBlockTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'block_content', 'filter', diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module deleted file mode 100644 index 2b14352a1ab9826f671bb690b644999218bb6d30..0000000000000000000000000000000000000000 --- a/core/modules/breakpoint/breakpoint.module +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -/** - * @file - * Manage breakpoints and breakpoint groups for responsive designs. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function breakpoint_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.breakpoint': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the <a href=":docs">online documentation for the Breakpoint module</a>.', [':docs' => 'https://www.drupal.org/documentation/modules/breakpoint']) . '</p>'; - $output .= '<h4>' . t('Terminology') . '</h4>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Breakpoint') . '</dt>'; - $output .= '<dd>' . t('A breakpoint separates the height or width of viewports (screens, printers, and other media output types) into steps. For instance, a width breakpoint of 40em creates two steps: one for widths up to 40em and one for widths above 40em. Breakpoints can be used to define when layouts should shift from one form to another, when images should be resized, and other changes that need to respond to changes in viewport height or width.') . '</dd>'; - $output .= '<dt>' . t('Media query') . '</dt>'; - $output .= '<dd>' . t('<a href=":w3">Media queries</a> are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.', [':w3' => 'https://www.w3.org/TR/css3-mediaqueries/']) . '</dd>'; - $output .= '<dt>' . t('Resolution multiplier') . '</dt>'; - $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>'; - $output .= '<dt>' . t('Breakpoint group') . '</dt>'; - $output .= '<dd>' . t('Breakpoints can be organized into groups. Modules and themes should use groups to separate out breakpoints that are meant to be used for different purposes, such as breakpoints for layouts or breakpoints for image sizing.') . '</dd>'; - $output .= '</dl>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Defining breakpoints and breakpoint groups') . '</dt>'; - $output .= '<dd>' . t('Modules and themes can use the API provided by the Breakpoint module to define breakpoints and breakpoint groups, and to assign resolution multipliers to breakpoints.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_themes_installed(). - */ -function breakpoint_themes_installed($theme_list) { - \Drupal::service('breakpoint.manager')->clearCachedDefinitions(); -} - -/** - * Implements hook_themes_uninstalled(). - */ -function breakpoint_themes_uninstalled($theme_list) { - \Drupal::service('breakpoint.manager')->clearCachedDefinitions(); -} diff --git a/core/modules/breakpoint/src/Hook/BreakpointHooks.php b/core/modules/breakpoint/src/Hook/BreakpointHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4c6e8fa8f9aebcdbaf12bf0ed6f5d48b063862a6 --- /dev/null +++ b/core/modules/breakpoint/src/Hook/BreakpointHooks.php @@ -0,0 +1,59 @@ +<?php + +namespace Drupal\breakpoint\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for breakpoint. + */ +class BreakpointHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.breakpoint': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the <a href=":docs">online documentation for the Breakpoint module</a>.', [':docs' => 'https://www.drupal.org/documentation/modules/breakpoint']) . '</p>'; + $output .= '<h4>' . t('Terminology') . '</h4>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Breakpoint') . '</dt>'; + $output .= '<dd>' . t('A breakpoint separates the height or width of viewports (screens, printers, and other media output types) into steps. For instance, a width breakpoint of 40em creates two steps: one for widths up to 40em and one for widths above 40em. Breakpoints can be used to define when layouts should shift from one form to another, when images should be resized, and other changes that need to respond to changes in viewport height or width.') . '</dd>'; + $output .= '<dt>' . t('Media query') . '</dt>'; + $output .= '<dd>' . t('<a href=":w3">Media queries</a> are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.', [':w3' => 'https://www.w3.org/TR/css3-mediaqueries/']) . '</dd>'; + $output .= '<dt>' . t('Resolution multiplier') . '</dt>'; + $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>'; + $output .= '<dt>' . t('Breakpoint group') . '</dt>'; + $output .= '<dd>' . t('Breakpoints can be organized into groups. Modules and themes should use groups to separate out breakpoints that are meant to be used for different purposes, such as breakpoints for layouts or breakpoints for image sizing.') . '</dd>'; + $output .= '</dl>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Defining breakpoints and breakpoint groups') . '</dt>'; + $output .= '<dd>' . t('Modules and themes can use the API provided by the Breakpoint module to define breakpoints and breakpoint groups, and to assign resolution multipliers to breakpoints.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_themes_installed(). + */ + #[Hook('themes_installed')] + public function themesInstalled($theme_list) { + \Drupal::service('breakpoint.manager')->clearCachedDefinitions(); + } + + /** + * Implements hook_themes_uninstalled(). + */ + #[Hook('themes_uninstalled')] + public function themesUninstalled($theme_list) { + \Drupal::service('breakpoint.manager')->clearCachedDefinitions(); + } + +} diff --git a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php index b91e65c5fed90a580f75e6d0ab269b6f6c16b308..af58e8aa1c8cd11e72b6e00a4a27ca042db4abb7 100644 --- a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php +++ b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php @@ -56,7 +56,7 @@ protected function setUp(): void { /** * Sets up the breakpoint defaults. */ - protected function setupBreakpoint() { + protected function setupBreakpoint(): void { $this->breakpoint = new Breakpoint([], $this->pluginId, $this->pluginDefinition); $this->breakpoint->setStringTranslation($this->stringTranslation); } diff --git a/core/modules/ckeditor5/ckeditor5.module b/core/modules/ckeditor5/ckeditor5.module index 0c6c44938d8fa767193a630a863ed768fd695e31..caa6f3f50dabd92c2aa11087b2b29dd9f1720417 100644 --- a/core/modules/ckeditor5/ckeditor5.module +++ b/core/modules/ckeditor5/ckeditor5.module @@ -8,7 +8,6 @@ declare(strict_types = 1); use Drupal\ckeditor5\HTMLRestrictions; -use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\InvokeCommand; @@ -16,80 +15,7 @@ use Drupal\Core\Ajax\PrependCommand; use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Ajax\RemoveCommand; -use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function ckeditor5_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.ckeditor5': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The CKEditor 5 module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the <a href=":text_editor">Text Editor module</a>. It requires JavaScript to be enabled in the browser. For more information, see the <a href=":doc_url">online documentation for the CKEditor 5 module</a> and the <a href=":cke5_url">CKEditor 5 website</a>.', [':doc_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5', ':cke5_url' => 'https://ckeditor.com/ckeditor-5/', ':text_editor' => Url::fromRoute('help.page', ['name' => 'editor'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Enabling CKEditor 5 for individual text formats') . '</dt>'; - $output .= '<dd>' . t('CKEditor 5 has to be installed and configured separately for individual text formats from the <a href=":formats">Text formats and editors page</a> because the filter settings for each text format can be different. For more information, see the <a href=":text_editor">Text Editor help page</a> and <a href=":filter">Filter help page</a>.', [':formats' => Url::fromRoute('filter.admin_overview')->toString(), ':text_editor' => Url::fromRoute('help.page', ['name' => 'editor'])->toString(), ':filter' => Url::fromRoute('help.page', ['name' => 'filter'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring the toolbar') . '</dt>'; - $output .= '<dd>' . t('When CKEditor 5 is chosen from the <em>Text editor</em> drop-down menu, its toolbar configuration is displayed. You can add and remove buttons from the <em>Active toolbar</em> by dragging and dropping them. Separators and rows can be added to organize the buttons.') . '</dd>'; - $output .= '<dt>' . t('Filtering HTML content') . '</dt>'; - $output .= '<dd>' . t("Unlike other text editors, plugin configuration determines the tags and attributes allowed in text formats using CKEditor 5. If using the <em>Limit allowed HTML tags and correct faulty HTML</em> filter, this filter's values will be automatically set based on enabled plugins and toolbar items."); - $output .= '<dt>' . t('Toggling between formatted text and HTML source') . '</dt>'; - $output .= '<dd>' . t('If the <em>Source</em> button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the HTML tags allowed via plugin configuration (and not explicity disallowed by filters) to format the text. Tags not enabled via plugin configuration will be stripped out of the HTML source when the user toggles back to the text editor.') . '</dd>'; - $output .= '<dt>' . t('Developing CKEditor 5 plugins in Drupal') . '</dt>'; - $output .= '<dd>' . t('See the <a href=":dev_docs_url">online documentation</a> for detailed information on developing CKEditor 5 plugins for use in Drupal.', [':dev_docs_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5/plugin-and-contrib-module-development']) . '</dd>'; - $output .= '</dd>'; - $output .= '<dt>' . t('Accessibility features') . '</dt>'; - $output .= '<dd>' . t('The built in WYSIWYG editor (CKEditor 5) comes with a number of accessibility features. CKEditor 5 comes with built in <a href=":shortcuts">keyboard shortcuts</a>, which can be beneficial for both power users and keyboard only users.', [':shortcuts' => 'https://ckeditor.com/docs/ckeditor5/latest/features/keyboard-support.html']) . '</dd>'; - $output .= '<dt>' . t('Generating accessible content') . '</dt>'; - $output .= '<dd>'; - $output .= '<ul>'; - $output .= '<li>' . t('HTML tables can be created with table headers and caption/summary elements.') . '</li>'; - $output .= '<li>' . t('Alt text is required by default on images added through CKEditor (note that this can be overridden).') . '</li>'; - $output .= '<li>' . t('Semantic HTML5 figure/figcaption are available to add captions to images.') . '</li>'; - $output .= '<li>' . t('To support multilingual page content, CKEditor 5 can be configured to include a language button in the toolbar.') . '</li>'; - $output .= '</ul>'; - $output .= '</dd>'; - $output .= '</dl>'; - $output .= '<h3 id="migration-settings">' . t('Migrating an Existing Text Format to CKEditor 5') . '</h2>'; - $output .= '<p>' . t('When switching an existing text format to use CKEditor 5, an automatic process is initiated that helps text formats switching to CKEditor 5 from CKEditor 4 (or no text editor) to do so with minimal effort and zero data loss.') . '</p>'; - $output .= '<p>' . t("This process is designed for there to be no data loss risk in switching to CKEditor 5. However some of your editor's functionality may not be 100% equivalent to what was available previously. In most cases, these changes are minimal. After the process completes, status and/or warning messages will summarize any changes that occurred, and more detailed information will be available in the site's logs.") . '</p>'; - $output .= '<p>' . t('CKEditor 5 will attempt to enable plugins that provide equivalent toolbar items to those used prior to switching to CKEditor 5. All core CKEditor 4 plugins and many popular contrib plugins already have CKEditor 5 equivalents. In some cases, functionality that required contrib modules is now built into CKEditor 5. In instances where a plugin does not have an equivalent, no data loss will occur but elements previously provided via the plugin may need to be added manually as HTML via source editing.') . '</p>'; - $output .= '<h4>' . t('Additional migration considerations for text formats with restricted HTML') . '</h4>'; - $output .= '<dl>'; - $output .= '<dt>' . t('The “Allowed HTML tags" field in the “Limit allowed HTML tags and correct Faulty HTML" filter is now read-only') . '</dt>'; - $output .= '<dd>' . t('This field accurately represents the tags/attributes allowed by a text format, but the allowed tags are based on which plugins are enabled and how they are configured. For example, enabling the Underline plugin adds the <u> tag to “Allowed HTML tags".') . '</dd>'; - $output .= '<dt id="required-tags">' . t('The <p> and <br > tags will be automatically added to your text format.') . '</dt>'; - $output .= '<dd>' . t('CKEditor 5 requires the <p> and <br > tags to achieve basic functionality. They will be automatically added to “Allowed HTML tags" on formats that previously did not allow them.') . '</dd>'; - $output .= '<dt id="source-editing">' . t('Tags/attributes that are not explicitly supported by any plugin are supported by Source Editing') . '</dt>'; - $output .= '<dd>' . t('When a necessary tag/attribute is not directly supported by an available plugin, the "Source Editing" plugin is enabled. This plugin is typically used for by passing the CKEditor 5 UI and editing contents as HTML source. In the settings for Source Editing, tags/attributes that aren\'t available via other plugins are added to Source Editing\'s "Manually editable HTML tags" setting so they are supported by the text format.') . '</dd>'; - $output .= '</dl>'; - - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function ckeditor5_theme() { - return [ - // The theme hook is used for rendering the CKEditor 5 toolbar settings in - // the Drupal admin UI. The toolbar settings UI is internal, and utilizing - // it outside of core usages is not supported because the UI can change at - // any point. - // @internal - 'ckeditor5_settings_toolbar' => [ - 'render element' => 'form', - ], - ]; -} /** * Implements hook_module_implements_alter(). @@ -116,117 +42,6 @@ function ckeditor5_module_implements_alter(&$implementations, $hook) { } } -/** - * Implements hook_form_FORM_ID_alter(). - */ -function ckeditor5_form_filter_format_form_alter(array &$form, FormStateInterface $form_state, $form_id) { - $editor = $form_state->get('editor'); - - // CKEditor 5 plugin config determines the available HTML tags. If an HTML - // restricting filter is enabled and the editor is CKEditor 5, the 'Allowed - // HTML tags' field is made read only and automatically populated with the - // values needed by CKEditor 5 plugins. - // @see \Drupal\ckeditor5\Plugin\Editor\CKEditor5::buildConfigurationForm() - if ($editor && $editor->getEditor() === 'ckeditor5') { - if (isset($form['filters']['settings']['filter_html']['allowed_html'])) { - $filter_allowed_html = &$form['filters']['settings']['filter_html']['allowed_html']; - - $filter_allowed_html['#value_callback'] = [CKEditor5::class, 'getGeneratedAllowedHtmlValue']; - // Set readonly and add the form-disabled wrapper class as using #disabled - // or the disabled attribute will prevent the new values from being - // validated. - $filter_allowed_html['#attributes']['readonly'] = TRUE; - $filter_allowed_html['#wrapper_attributes']['class'][] = 'form-disabled'; - - $filter_allowed_html['#description'] = t('With CKEditor 5 this is a - read-only field. The allowed HTML tags and attributes are determined - by the CKEditor 5 configuration. Manually removing tags would break - enabled functionality, and any manually added tags would be removed by - CKEditor 5 on render.'); - - // The media_filter_format_edit_form_validate validator is not needed - // with CKEditor 5 as it exists to enforce the inclusion of specific - // allowed tags that are added automatically by CKEditor 5. The - // validator is removed so it does not conflict with the automatic - // addition of those allowed tags. - $key = array_search('media_filter_format_edit_form_validate', $form['#validate']); - if ($key !== FALSE) { - unset($form['#validate'][$key]); - } - } - } - - // Override the AJAX callbacks for changing editors, so multiple areas of the - // form can be updated on change. - $form['editor']['editor']['#ajax'] = [ - 'callback' => '_update_ckeditor5_html_filter', - 'trigger_as' => ['name' => 'editor_configure'], - ]; - $form['editor']['configure']['#ajax'] = [ - 'callback' => '_update_ckeditor5_html_filter', - ]; - - $form['editor']['settings']['subform']['toolbar']['items']['#ajax'] = [ - 'callback' => '_update_ckeditor5_html_filter', - 'trigger_as' => ['name' => 'editor_configure'], - 'event' => 'change', - 'ckeditor5_only' => 'true', - ]; - - foreach (Element::children($form['filters']['status']) as $filter_type) { - $form['filters']['status'][$filter_type]['#ajax'] = [ - 'callback' => '_update_ckeditor5_html_filter', - 'trigger_as' => ['name' => 'editor_configure'], - 'event' => 'change', - 'ckeditor5_only' => 'true', - ]; - } - - /** - * Recursively adds AJAX listeners to plugin settings elements. - * - * These are added so allowed tags and other fields that have values - * dependent on plugin settings can be updated via AJAX when these settings - * are changed in the editor form. - * - * @param array $plugins_config_form - * The plugins config subform render array. - */ - $add_listener = function (array &$plugins_config_form) use (&$add_listener): void { - $field_types = [ - 'checkbox', - 'select', - 'radios', - 'textarea', - ]; - if (isset($plugins_config_form['#type']) && in_array($plugins_config_form['#type'], $field_types) && !isset($plugins_config_form['#ajax'])) { - $plugins_config_form['#ajax'] = [ - 'callback' => '_update_ckeditor5_html_filter', - 'trigger_as' => ['name' => 'editor_configure'], - 'event' => 'change', - 'ckeditor5_only' => 'true', - ]; - } - - foreach ($plugins_config_form as $key => &$value) { - if (is_array($value) && !str_contains((string) $key, '#')) { - $add_listener($value); - } - } - }; - - if (isset($form['editor']['settings']['subform']['plugins'])) { - $add_listener($form['editor']['settings']['subform']['plugins']); - } - - // Add an ID to the filter settings vertical tabs wrapper to facilitate AJAX - // updates. - $form['filter_settings']['#wrapper_attributes']['id'] = 'filter-settings-wrapper'; - $form['#after_build'][] = [CKEditor5::class, 'assessActiveTextEditorAfterBuild']; - $form['#validate'][] = [CKEditor5::class, 'validateSwitchingToCKEditor5']; - array_unshift($form['actions']['submit']['#submit'], 'ckeditor5_filter_format_edit_form_submit'); -} - /** * Form submission handler for filter format forms. */ @@ -403,184 +218,6 @@ function _ckeditor5_get_langcode_mapping($lang = FALSE) { return $langcodes; } -/** - * Implements hook_library_info_alter(). - */ -function ckeditor5_library_info_alter(&$libraries, $extension) { - if ($extension === 'filter') { - $libraries['drupal.filter.admin']['dependencies'][] = 'ckeditor5/internal.drupal.ckeditor5.filter.admin'; - } - - $moduleHandler = \Drupal::moduleHandler(); - - if ($extension === 'ckeditor5') { - // Add paths to stylesheets specified by a theme's ckeditor5-stylesheets - // config property. - $css = _ckeditor5_theme_css(); - $libraries['internal.drupal.ckeditor5.stylesheets'] = [ - 'css' => [ - 'theme' => array_fill_keys(array_values($css), []), - ], - ]; - } - - if ($extension === 'core') { - // CSS rule to resolve the conflict with z-index between CKEditor 5 and jQuery UI. - $libraries['drupal.dialog']['css']['component']['modules/ckeditor5/css/ckeditor5.dialog.fix.css'] = []; - // Fix the CKEditor 5 focus management in dialogs. Modify the library - // declaration to ensure this file is always loaded after - // drupal.dialog.jquery-ui.js. - $libraries['drupal.dialog']['js']['modules/ckeditor5/js/ckeditor5.dialog.fix.js'] = []; - } - - // Only add translation processing if the locale module is enabled. - if (!$moduleHandler->moduleExists('locale')) { - return; - } - // All possibles CKEditor 5 languages that can be used by Drupal. - $ckeditor_langcodes = array_values(_ckeditor5_get_langcode_mapping()); - - if ($extension === 'core') { - // Generate libraries for each of the CKEditor 5 translation files so that - // the correct translation file can be attached depending on the current - // language. This makes sure that caching caches the appropriate language. - // Only create libraries for languages that have a mapping to Drupal. - foreach ($ckeditor_langcodes as $langcode) { - $libraries['ckeditor5.translations.' . $langcode] = [ - 'remote' => $libraries['ckeditor5']['remote'], - 'version' => $libraries['ckeditor5']['version'], - 'license' => $libraries['ckeditor5']['license'], - 'dependencies' => [ - 'core/ckeditor5', - 'core/ckeditor5.translations', - ], - ]; - } - } - - // Copied from \Drupal\Core\Asset\LibraryDiscoveryParser::buildByExtension(). - if ($extension === 'core') { - $path = 'core'; - } - else { - if ($moduleHandler->moduleExists($extension)) { - $extension_type = 'module'; - } - else { - $extension_type = 'theme'; - } - $path = \Drupal::getContainer()->get('extension.path.resolver')->getPath($extension_type, $extension); - } - - foreach ($libraries as &$library) { - // The way to know if a library has a translation is to depend on the - // special "core/ckeditor5.translations" library. - if (empty($library['js']) || empty($library['dependencies']) || !in_array('core/ckeditor5.translations', $library['dependencies'])) { - continue; - } - - foreach ($library['js'] as $file => $options) { - // Only look for translations on libraries defined with a relative path. - if (!empty($options['type']) && $options['type'] === 'external') { - continue; - } - // Path relative to the current extension folder. - $dirname = dirname($file); - // Path of the folder in the filesystem relative to the Drupal root. - $dir = $path . '/' . $dirname; - // Exclude protocol-free URI. - if (str_starts_with($dirname, '//')) { - continue; - } - // CKEditor 5 plugins are most likely added through composer and - // installed in the module exposing it. Suppose the file path is - // relative to the module and not in the /libraries/ folder. - // Collect translations based on filename, and add all existing - // translations files to the plugin library. Unnecessary translations - // will be filtered in ckeditor5_js_alter() hook. - $files = scandir("$dir/translations"); - foreach ($files as $file) { - if (str_ends_with($file, '.js')) { - $langcode = basename($file, '.js'); - // Only add languages that Drupal can understands. - if (in_array($langcode, $ckeditor_langcodes)) { - $library['js']["$dirname/translations/$langcode.js"] = [ - // Used in ckeditor5_js_alter() to filter unwanted translations. - 'ckeditor5_langcode' => $langcode, - 'minified' => TRUE, - 'preprocess' => TRUE, - ]; - } - } - } - } - } -} - -/** - * Implements hook_js_alter(). - */ -function ckeditor5_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { - // This file means CKEditor 5 translations are in use on the page. - // @see locale_js_alter() - $placeholder_file = 'core/assets/vendor/ckeditor5/translation.js'; - // This file is used to get a weight that will make it possible to aggregate - // all translation files in a single aggregate. - $ckeditor_dll_file = 'core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js'; - if (isset($javascript[$placeholder_file])) { - // Use the placeholder file weight to set all the translations files weights - // so they can be aggregated together as expected. - $default_weight = $javascript[$placeholder_file]['weight']; - if (isset($javascript[$ckeditor_dll_file])) { - $default_weight = $javascript[$ckeditor_dll_file]['weight']; - } - // The placeholder file is not a real file, remove it from the list. - unset($javascript[$placeholder_file]); - - // When the locale module isn't installed there are no translations. - if (!\Drupal::moduleHandler()->moduleExists('locale')) { - return; - } - - $ckeditor5_language = _ckeditor5_get_langcode_mapping($language->getId()); - - // Remove all CKEditor 5 translations files that are not in the current - // language. - foreach ($javascript as $index => &$item) { - // This is not a CKEditor 5 translation file, skip it. - if (empty($item['ckeditor5_langcode'])) { - continue; - } - // This file is the correct translation for this page. - if ($item['ckeditor5_langcode'] === $ckeditor5_language) { - // Set the weight for the translation file to be able to have the - // translation files aggregated. - $item['weight'] = $default_weight; - } - // When the file doesn't match the langcode remove it from the page. - else { - // Remove files that don't match the language requested. - unset($javascript[$index]); - } - } - } -} - -/** - * Implements hook_config_schema_info_alter(). - */ -function ckeditor5_config_schema_info_alter(&$definitions) { - // In \Drupal\Tests\config\Functional\ConfigImportAllTest, this hook may be - // called without ckeditor5.pair.schema.yml being active. - if (!isset($definitions['ckeditor5_valid_pair__format_and_editor'])) { - return; - } - // @see filter.format.*.filters - $definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['filters'] = $definitions['filter.format.*']['mapping']['filters']; - // @see @see editor.editor.*.image_upload - $definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['image_upload'] = $definitions['editor.editor.*']['mapping']['image_upload']; -} - /** * Retrieves the default theme's CKEditor 5 stylesheets. * diff --git a/core/modules/ckeditor5/ckeditor5.post_update.php b/core/modules/ckeditor5/ckeditor5.post_update.php index f9b4e846c16d064d8ba9b36b64e0322ade4a779e..db795a147d0982dfc640e013348a31b86f00d40f 100644 --- a/core/modules/ckeditor5/ckeditor5.post_update.php +++ b/core/modules/ckeditor5/ckeditor5.post_update.php @@ -10,7 +10,7 @@ /** * Implements hook_removed_post_updates(). */ -function ckeditor5_removed_post_updates() { +function ckeditor5_removed_post_updates(): array { return [ 'ckeditor5_post_update_alignment_buttons' => '10.0.0', 'ckeditor5_post_update_image_toolbar_item' => '11.0.0', diff --git a/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php b/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php index 4492f4ec99450f4f19aefe5a8142191366809a42..b07ef54b59d781a38c953d601f19440ecbda63d4 100644 --- a/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php +++ b/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php @@ -82,8 +82,11 @@ public static function create(ContainerInterface $container) { */ public function upload(Request $request): Response { // Getting the UploadedFile directly from the request. - /** @var \Symfony\Component\HttpFoundation\File\UploadedFile $upload */ + /** @var \Symfony\Component\HttpFoundation\File\UploadedFile|null $upload */ $upload = $request->files->get('upload'); + if ($upload === NULL || !$upload->isValid()) { + throw new HttpException(500, $upload?->getErrorMessage() ?: 'Invalid file upload'); + } $filename = $upload->getClientOriginalName(); /** @var \Drupal\editor\EditorInterface $editor */ diff --git a/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php b/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f89a1cbd222e17a5958f392a8ea2b72820eae6f1 --- /dev/null +++ b/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php @@ -0,0 +1,362 @@ +<?php + +namespace Drupal\ckeditor5\Hook; + +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\Core\Render\Element; +use Drupal\ckeditor5\Plugin\Editor\CKEditor5; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for ckeditor5. + */ +class Ckeditor5Hooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.ckeditor5': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The CKEditor 5 module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the <a href=":text_editor">Text Editor module</a>. It requires JavaScript to be enabled in the browser. For more information, see the <a href=":doc_url">online documentation for the CKEditor 5 module</a> and the <a href=":cke5_url">CKEditor 5 website</a>.', [ + ':doc_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5', + ':cke5_url' => 'https://ckeditor.com/ckeditor-5/', + ':text_editor' => Url::fromRoute('help.page', [ + 'name' => 'editor', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Enabling CKEditor 5 for individual text formats') . '</dt>'; + $output .= '<dd>' . t('CKEditor 5 has to be installed and configured separately for individual text formats from the <a href=":formats">Text formats and editors page</a> because the filter settings for each text format can be different. For more information, see the <a href=":text_editor">Text Editor help page</a> and <a href=":filter">Filter help page</a>.', [ + ':formats' => Url::fromRoute('filter.admin_overview')->toString(), + ':text_editor' => Url::fromRoute('help.page', [ + 'name' => 'editor', + ])->toString(), + ':filter' => Url::fromRoute('help.page', [ + 'name' => 'filter', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring the toolbar') . '</dt>'; + $output .= '<dd>' . t('When CKEditor 5 is chosen from the <em>Text editor</em> drop-down menu, its toolbar configuration is displayed. You can add and remove buttons from the <em>Active toolbar</em> by dragging and dropping them. Separators and rows can be added to organize the buttons.') . '</dd>'; + $output .= '<dt>' . t('Filtering HTML content') . '</dt>'; + $output .= '<dd>' . t("Unlike other text editors, plugin configuration determines the tags and attributes allowed in text formats using CKEditor 5. If using the <em>Limit allowed HTML tags and correct faulty HTML</em> filter, this filter's values will be automatically set based on enabled plugins and toolbar items."); + $output .= '<dt>' . t('Toggling between formatted text and HTML source') . '</dt>'; + $output .= '<dd>' . t('If the <em>Source</em> button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the HTML tags allowed via plugin configuration (and not explicity disallowed by filters) to format the text. Tags not enabled via plugin configuration will be stripped out of the HTML source when the user toggles back to the text editor.') . '</dd>'; + $output .= '<dt>' . t('Developing CKEditor 5 plugins in Drupal') . '</dt>'; + $output .= '<dd>' . t('See the <a href=":dev_docs_url">online documentation</a> for detailed information on developing CKEditor 5 plugins for use in Drupal.', [ + ':dev_docs_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5/plugin-and-contrib-module-development', + ]) . '</dd>'; + $output .= '</dd>'; + $output .= '<dt>' . t('Accessibility features') . '</dt>'; + $output .= '<dd>' . t('The built in WYSIWYG editor (CKEditor 5) comes with a number of accessibility features. CKEditor 5 comes with built in <a href=":shortcuts">keyboard shortcuts</a>, which can be beneficial for both power users and keyboard only users.', [ + ':shortcuts' => 'https://ckeditor.com/docs/ckeditor5/latest/features/keyboard-support.html', + ]) . '</dd>'; + $output .= '<dt>' . t('Generating accessible content') . '</dt>'; + $output .= '<dd>'; + $output .= '<ul>'; + $output .= '<li>' . t('HTML tables can be created with table headers and caption/summary elements.') . '</li>'; + $output .= '<li>' . t('Alt text is required by default on images added through CKEditor (note that this can be overridden).') . '</li>'; + $output .= '<li>' . t('Semantic HTML5 figure/figcaption are available to add captions to images.') . '</li>'; + $output .= '<li>' . t('To support multilingual page content, CKEditor 5 can be configured to include a language button in the toolbar.') . '</li>'; + $output .= '</ul>'; + $output .= '</dd>'; + $output .= '</dl>'; + $output .= '<h3 id="migration-settings">' . t('Migrating an Existing Text Format to CKEditor 5') . '</h2>'; + $output .= '<p>' . t('When switching an existing text format to use CKEditor 5, an automatic process is initiated that helps text formats switching to CKEditor 5 from CKEditor 4 (or no text editor) to do so with minimal effort and zero data loss.') . '</p>'; + $output .= '<p>' . t("This process is designed for there to be no data loss risk in switching to CKEditor 5. However some of your editor's functionality may not be 100% equivalent to what was available previously. In most cases, these changes are minimal. After the process completes, status and/or warning messages will summarize any changes that occurred, and more detailed information will be available in the site's logs.") . '</p>'; + $output .= '<p>' . t('CKEditor 5 will attempt to enable plugins that provide equivalent toolbar items to those used prior to switching to CKEditor 5. All core CKEditor 4 plugins and many popular contrib plugins already have CKEditor 5 equivalents. In some cases, functionality that required contrib modules is now built into CKEditor 5. In instances where a plugin does not have an equivalent, no data loss will occur but elements previously provided via the plugin may need to be added manually as HTML via source editing.') . '</p>'; + $output .= '<h4>' . t('Additional migration considerations for text formats with restricted HTML') . '</h4>'; + $output .= '<dl>'; + $output .= '<dt>' . t('The “Allowed HTML tags" field in the “Limit allowed HTML tags and correct Faulty HTML" filter is now read-only') . '</dt>'; + $output .= '<dd>' . t('This field accurately represents the tags/attributes allowed by a text format, but the allowed tags are based on which plugins are enabled and how they are configured. For example, enabling the Underline plugin adds the <u> tag to “Allowed HTML tags".') . '</dd>'; + $output .= '<dt id="required-tags">' . t('The <p> and <br > tags will be automatically added to your text format.') . '</dt>'; + $output .= '<dd>' . t('CKEditor 5 requires the <p> and <br > tags to achieve basic functionality. They will be automatically added to “Allowed HTML tags" on formats that previously did not allow them.') . '</dd>'; + $output .= '<dt id="source-editing">' . t('Tags/attributes that are not explicitly supported by any plugin are supported by Source Editing') . '</dt>'; + $output .= '<dd>' . t('When a necessary tag/attribute is not directly supported by an available plugin, the "Source Editing" plugin is enabled. This plugin is typically used for by passing the CKEditor 5 UI and editing contents as HTML source. In the settings for Source Editing, tags/attributes that aren\'t available via other plugins are added to Source Editing\'s "Manually editable HTML tags" setting so they are supported by the text format.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['ckeditor5_settings_toolbar' => ['render element' => 'form']]; + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_filter_format_form_alter')] + public function formFilterFormatFormAlter(array &$form, FormStateInterface $form_state, $form_id) : void { + $editor = $form_state->get('editor'); + // CKEditor 5 plugin config determines the available HTML tags. If an HTML + // restricting filter is enabled and the editor is CKEditor 5, the 'Allowed + // HTML tags' field is made read only and automatically populated with the + // values needed by CKEditor 5 plugins. + // @see \Drupal\ckeditor5\Plugin\Editor\CKEditor5::buildConfigurationForm() + if ($editor && $editor->getEditor() === 'ckeditor5') { + if (isset($form['filters']['settings']['filter_html']['allowed_html'])) { + $filter_allowed_html =& $form['filters']['settings']['filter_html']['allowed_html']; + $filter_allowed_html['#value_callback'] = [CKEditor5::class, 'getGeneratedAllowedHtmlValue']; + // Set readonly and add the form-disabled wrapper class as using #disabled + // or the disabled attribute will prevent the new values from being + // validated. + $filter_allowed_html['#attributes']['readonly'] = TRUE; + $filter_allowed_html['#wrapper_attributes']['class'][] = 'form-disabled'; + $filter_allowed_html['#description'] = t('With CKEditor 5 this is a + read-only field. The allowed HTML tags and attributes are determined + by the CKEditor 5 configuration. Manually removing tags would break + enabled functionality, and any manually added tags would be removed by + CKEditor 5 on render.'); + // The media_filter_format_edit_form_validate validator is not needed + // with CKEditor 5 as it exists to enforce the inclusion of specific + // allowed tags that are added automatically by CKEditor 5. The + // validator is removed so it does not conflict with the automatic + // addition of those allowed tags. + $key = array_search('media_filter_format_edit_form_validate', $form['#validate']); + if ($key !== FALSE) { + unset($form['#validate'][$key]); + } + } + } + // Override the AJAX callbacks for changing editors, so multiple areas of the + // form can be updated on change. + $form['editor']['editor']['#ajax'] = [ + 'callback' => '_update_ckeditor5_html_filter', + 'trigger_as' => [ + 'name' => 'editor_configure', + ], + ]; + $form['editor']['configure']['#ajax'] = ['callback' => '_update_ckeditor5_html_filter']; + $form['editor']['settings']['subform']['toolbar']['items']['#ajax'] = [ + 'callback' => '_update_ckeditor5_html_filter', + 'trigger_as' => [ + 'name' => 'editor_configure', + ], + 'event' => 'change', + 'ckeditor5_only' => 'true', + ]; + foreach (Element::children($form['filters']['status']) as $filter_type) { + $form['filters']['status'][$filter_type]['#ajax'] = [ + 'callback' => '_update_ckeditor5_html_filter', + 'trigger_as' => [ + 'name' => 'editor_configure', + ], + 'event' => 'change', + 'ckeditor5_only' => 'true', + ]; + } + /** + * Recursively adds AJAX listeners to plugin settings elements. + * + * These are added so allowed tags and other fields that have values + * dependent on plugin settings can be updated via AJAX when these settings + * are changed in the editor form. + * + * @param array $plugins_config_form + * The plugins config subform render array. + */ + $add_listener = function (array &$plugins_config_form) use (&$add_listener) : void { + $field_types = ['checkbox', 'select', 'radios', 'textarea']; + if (isset($plugins_config_form['#type']) && in_array($plugins_config_form['#type'], $field_types) && !isset($plugins_config_form['#ajax'])) { + $plugins_config_form['#ajax'] = [ + 'callback' => '_update_ckeditor5_html_filter', + 'trigger_as' => [ + 'name' => 'editor_configure', + ], + 'event' => 'change', + 'ckeditor5_only' => 'true', + ]; + } + foreach ($plugins_config_form as $key => &$value) { + if (is_array($value) && !str_contains((string) $key, '#')) { + $add_listener($value); + } + } + }; + if (isset($form['editor']['settings']['subform']['plugins'])) { + $add_listener($form['editor']['settings']['subform']['plugins']); + } + // Add an ID to the filter settings vertical tabs wrapper to facilitate AJAX + // updates. + $form['filter_settings']['#wrapper_attributes']['id'] = 'filter-settings-wrapper'; + $form['#after_build'][] = [ + CKEditor5::class, + 'assessActiveTextEditorAfterBuild', + ]; + $form['#validate'][] = [CKEditor5::class, 'validateSwitchingToCKEditor5']; + array_unshift($form['actions']['submit']['#submit'], 'ckeditor5_filter_format_edit_form_submit'); + } + + /** + * Implements hook_library_info_alter(). + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(&$libraries, $extension) { + if ($extension === 'filter') { + $libraries['drupal.filter.admin']['dependencies'][] = 'ckeditor5/internal.drupal.ckeditor5.filter.admin'; + } + $moduleHandler = \Drupal::moduleHandler(); + if ($extension === 'ckeditor5') { + // Add paths to stylesheets specified by a theme's ckeditor5-stylesheets + // config property. + $css = _ckeditor5_theme_css(); + $libraries['internal.drupal.ckeditor5.stylesheets'] = ['css' => ['theme' => array_fill_keys(array_values($css), [])]]; + } + if ($extension === 'core') { + // CSS rule to resolve the conflict with z-index between CKEditor 5 and jQuery UI. + $libraries['drupal.dialog']['css']['component']['modules/ckeditor5/css/ckeditor5.dialog.fix.css'] = []; + // Fix the CKEditor 5 focus management in dialogs. Modify the library + // declaration to ensure this file is always loaded after + // drupal.dialog.jquery-ui.js. + $libraries['drupal.dialog']['js']['modules/ckeditor5/js/ckeditor5.dialog.fix.js'] = []; + } + // Only add translation processing if the locale module is enabled. + if (!$moduleHandler->moduleExists('locale')) { + return; + } + // All possibles CKEditor 5 languages that can be used by Drupal. + $ckeditor_langcodes = array_values(_ckeditor5_get_langcode_mapping()); + if ($extension === 'core') { + // Generate libraries for each of the CKEditor 5 translation files so that + // the correct translation file can be attached depending on the current + // language. This makes sure that caching caches the appropriate language. + // Only create libraries for languages that have a mapping to Drupal. + foreach ($ckeditor_langcodes as $langcode) { + $libraries['ckeditor5.translations.' . $langcode] = [ + 'remote' => $libraries['ckeditor5']['remote'], + 'version' => $libraries['ckeditor5']['version'], + 'license' => $libraries['ckeditor5']['license'], + 'dependencies' => [ + 'core/ckeditor5', + 'core/ckeditor5.translations', + ], + ]; + } + } + // Copied from \Drupal\Core\Asset\LibraryDiscoveryParser::buildByExtension(). + if ($extension === 'core') { + $path = 'core'; + } + else { + if ($moduleHandler->moduleExists($extension)) { + $extension_type = 'module'; + } + else { + $extension_type = 'theme'; + } + $path = \Drupal::getContainer()->get('extension.path.resolver')->getPath($extension_type, $extension); + } + foreach ($libraries as &$library) { + // The way to know if a library has a translation is to depend on the + // special "core/ckeditor5.translations" library. + if (empty($library['js']) || empty($library['dependencies']) || !in_array('core/ckeditor5.translations', $library['dependencies'])) { + continue; + } + foreach ($library['js'] as $file => $options) { + // Only look for translations on libraries defined with a relative path. + if (!empty($options['type']) && $options['type'] === 'external') { + continue; + } + // Path relative to the current extension folder. + $dirname = dirname($file); + // Path of the folder in the filesystem relative to the Drupal root. + $dir = $path . '/' . $dirname; + // Exclude protocol-free URI. + if (str_starts_with($dirname, '//')) { + continue; + } + // CKEditor 5 plugins are most likely added through composer and + // installed in the module exposing it. Suppose the file path is + // relative to the module and not in the /libraries/ folder. + // Collect translations based on filename, and add all existing + // translations files to the plugin library. Unnecessary translations + // will be filtered in ckeditor5_js_alter() hook. + $files = scandir("{$dir}/translations"); + foreach ($files as $file) { + if (str_ends_with($file, '.js')) { + $langcode = basename($file, '.js'); + // Only add languages that Drupal can understands. + if (in_array($langcode, $ckeditor_langcodes)) { + $library['js']["{$dirname}/translations/{$langcode}.js"] = ['ckeditor5_langcode' => $langcode, 'minified' => TRUE, 'preprocess' => TRUE]; + } + } + } + } + } + } + + /** + * Implements hook_js_alter(). + */ + #[Hook('js_alter')] + public function jsAlter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { + // This file means CKEditor 5 translations are in use on the page. + // @see locale_js_alter() + $placeholder_file = 'core/assets/vendor/ckeditor5/translation.js'; + // This file is used to get a weight that will make it possible to aggregate + // all translation files in a single aggregate. + $ckeditor_dll_file = 'core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js'; + if (isset($javascript[$placeholder_file])) { + // Use the placeholder file weight to set all the translations files weights + // so they can be aggregated together as expected. + $default_weight = $javascript[$placeholder_file]['weight']; + if (isset($javascript[$ckeditor_dll_file])) { + $default_weight = $javascript[$ckeditor_dll_file]['weight']; + } + // The placeholder file is not a real file, remove it from the list. + unset($javascript[$placeholder_file]); + // When the locale module isn't installed there are no translations. + if (!\Drupal::moduleHandler()->moduleExists('locale')) { + return; + } + $ckeditor5_language = _ckeditor5_get_langcode_mapping($language->getId()); + // Remove all CKEditor 5 translations files that are not in the current + // language. + foreach ($javascript as $index => &$item) { + // This is not a CKEditor 5 translation file, skip it. + if (empty($item['ckeditor5_langcode'])) { + continue; + } + // This file is the correct translation for this page. + if ($item['ckeditor5_langcode'] === $ckeditor5_language) { + // Set the weight for the translation file to be able to have the + // translation files aggregated. + $item['weight'] = $default_weight; + } + else { + // Remove files that don't match the language requested. + unset($javascript[$index]); + } + } + } + } + + /** + * Implements hook_config_schema_info_alter(). + */ + #[Hook('config_schema_info_alter')] + public function configSchemaInfoAlter(&$definitions) { + // In \Drupal\Tests\config\Functional\ConfigImportAllTest, this hook may be + // called without ckeditor5.pair.schema.yml being active. + if (!isset($definitions['ckeditor5_valid_pair__format_and_editor'])) { + return; + } + // @see filter.format.*.filters + $definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['filters'] = $definitions['filter.format.*']['mapping']['filters']; + // @see @see editor.editor.*.image_upload + $definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['image_upload'] = $definitions['editor.editor.*']['mapping']['image_upload']; + } + +} diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php index d7b1bbaf81ec05479ff077aa90d35cac50cfbc1a..5afc5515f8922b68fcb7b80de7f6d48475ed39ae 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php @@ -34,7 +34,7 @@ class Language extends CKEditor5PluginDefault implements CKEditor5PluginConfigur * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php index c6b9f345a98ab15a08e76a86bcf5d40cda93788a..e06b2422ada859fd14c523fea60e6077bb3acea3 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php @@ -43,7 +43,7 @@ class Media extends CKEditor5PluginDefault implements ContainerFactoryPluginInte * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php index 17a2188f662c2af006386a8c2a998b39b4f56e76..47f04ac02d861ef618e29b7c5c6566cd37cd3b38 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php @@ -39,7 +39,7 @@ class MediaLibrary extends CKEditor5PluginDefault implements ContainerFactoryPlu * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php b/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php index f239e226bc2654792a88c8f9d0be37e284030659..b374e35e6d7c936eaef221398edf1bfe74945c6b 100644 --- a/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php +++ b/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php @@ -47,30 +47,40 @@ public function apply(string $configName, mixed $value): void { throw new ConfigActionException(sprintf('The %s config action only works with editors that use CKEditor 5.', $this->pluginId)); } - $editor_settings = $editor->getSettings(); if (is_string($value)) { - $editor_settings['toolbar']['items'][] = $item_name = $value; + $value = ['item_name' => $value]; } - else { - assert(is_array($value)); + assert(is_array($value)); - $item_name = $value['item_name']; - assert(is_string($item_name)); + $item_name = $value['item_name']; + assert(is_string($item_name)); - $replace = $value['replace'] ?? FALSE; - assert(is_bool($replace)); + $replace = $value['replace'] ?? FALSE; + assert(is_bool($replace)); - $position = $value['position'] ?? NULL; - if (is_int($position)) { - // If we want to replace the item at this position, then `replace` - // should be true. This would be useful if, for example, we wanted to - // replace the Image button with the Media Library. - array_splice($editor_settings['toolbar']['items'], $position, $replace ? 1 : 0, $item_name); - } - else { - $editor_settings['toolbar']['items'][] = $item_name; - } + $position = $value['position'] ?? NULL; + + $allow_duplicate = $value['allow_duplicate'] ?? FALSE; + assert(is_bool($allow_duplicate)); + + $editor_settings = $editor->getSettings(); + + // If the item is already in the toolbar and we're not allowing duplicate + // items, we're done. + if (in_array($item_name, $editor_settings['toolbar']['items'], TRUE) && $allow_duplicate === FALSE && $item_name !== '|') { + return; + } + + if (is_int($position)) { + // If we want to replace the item at this position, then `replace` + // should be true. This would be useful if, for example, we wanted to + // replace the Image button with the Media Library. + array_splice($editor_settings['toolbar']['items'], $position, $replace ? 1 : 0, $item_name); } + else { + $editor_settings['toolbar']['items'][] = $item_name; + } + // If we're just adding a vertical separator, there's nothing else we need // to do at this point. if ($item_name === '|') { diff --git a/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php b/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php index 60cdff3ac65f8aa076542941473471760b1d99ef..5ae70acb889c7e2429a3560cb3809824a2d7dd10 100644 --- a/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php +++ b/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php @@ -111,7 +111,7 @@ class CKEditor5 extends EditorBase implements ContainerFactoryPluginInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface $ckeditor5_plugin_manager diff --git a/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/ckeditor5_read_only_mode.module b/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/ckeditor5_read_only_mode.module deleted file mode 100644 index 4fff4a0b24f56c5348911a848ac92a7f15f92644..0000000000000000000000000000000000000000 --- a/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/ckeditor5_read_only_mode.module +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Implements hooks for the CKEditor 5 read-only mode test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_form_alter(). - */ -function ckeditor5_read_only_mode_form_node_page_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { - $form['body']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_body_enabled', FALSE); - $form['field_second_ckeditor5_field']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_second_ckeditor5_field_enabled', FALSE); -} diff --git a/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/src/Hook/Ckeditor5ReadOnlyModeHooks.php b/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/src/Hook/Ckeditor5ReadOnlyModeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..00507324e61c8de4c109d3e036698b261b323332 --- /dev/null +++ b/core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/src/Hook/Ckeditor5ReadOnlyModeHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\ckeditor5_read_only_mode\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for ckeditor5_read_only_mode. + */ +class Ckeditor5ReadOnlyModeHooks { + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_node_page_form_alter')] + public function formNodePageFormAlter(array &$form, FormStateInterface $form_state, string $form_id) : void { + $form['body']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_body_enabled', FALSE); + $form['field_second_ckeditor5_field']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_second_ckeditor5_field_enabled', FALSE); + } + +} diff --git a/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/ckeditor5_test_module_allowed_image.module b/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/ckeditor5_test_module_allowed_image.module deleted file mode 100644 index 49269eecc2f732334a609954fa5e0f5fccf0a79c..0000000000000000000000000000000000000000 --- a/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/ckeditor5_test_module_allowed_image.module +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * A module to add a custom image type for CKEditor 5. - */ - -declare(strict_types=1); - -use Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition; - -/** - * Implements hook_ckeditor5_plugin_info_alter(). - */ -function ckeditor5_test_module_allowed_image_ckeditor5_plugin_info_alter(array &$plugin_definitions): void { - // Add a custom file type to the image upload plugin. Note that 'svg+xml' - // below should be an IANA image media type Name, with the "image/" prefix - // omitted. In other words: a subtype of type image. - // @see https://www.iana.org/assignments/media-types/media-types.xhtml#image - // @see https://ckeditor.com/docs/ckeditor5/latest/api/module_image_imageconfig-ImageUploadConfig.html#member-types - $image_upload_plugin_definition = $plugin_definitions['ckeditor5_imageUpload']->toArray(); - $image_upload_plugin_definition['ckeditor5']['config']['image']['upload']['types'][] = 'svg+xml'; - $plugin_definitions['ckeditor5_imageUpload'] = new CKEditor5PluginDefinition($image_upload_plugin_definition); -} diff --git a/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/src/Hook/Ckeditor5TestModuleAllowedImageHooks.php b/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/src/Hook/Ckeditor5TestModuleAllowedImageHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..21ea4cfe2ecc6b6195c3b6e134bfacf37692cf3a --- /dev/null +++ b/core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/src/Hook/Ckeditor5TestModuleAllowedImageHooks.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\ckeditor5_test_module_allowed_image\Hook; + +use Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for ckeditor5_test_module_allowed_image. + */ +class Ckeditor5TestModuleAllowedImageHooks { + + /** + * Implements hook_ckeditor5_plugin_info_alter(). + */ + #[Hook('ckeditor5_plugin_info_alter')] + public function ckeditor5PluginInfoAlter(array &$plugin_definitions) : void { + // Add a custom file type to the image upload plugin. Note that 'svg+xml' + // below should be an IANA image media type Name, with the "image/" prefix + // omitted. In other words: a subtype of type image. + // @see https://www.iana.org/assignments/media-types/media-types.xhtml#image + // @see https://ckeditor.com/docs/ckeditor5/latest/api/module_image_imageconfig-ImageUploadConfig.html#member-types + $image_upload_plugin_definition = $plugin_definitions['ckeditor5_imageUpload']->toArray(); + $image_upload_plugin_definition['ckeditor5']['config']['image']['upload']['types'][] = 'svg+xml'; + $plugin_definitions['ckeditor5_imageUpload'] = new CKEditor5PluginDefinition($image_upload_plugin_definition); + } + +} diff --git a/core/modules/ckeditor5/tests/modules/ckeditor_test/ckeditor_test.module b/core/modules/ckeditor5/tests/modules/ckeditor_test/ckeditor_test.module deleted file mode 100644 index 452f4039670f8fd46f4cd4d418199a5f6dae65cc..0000000000000000000000000000000000000000 --- a/core/modules/ckeditor5/tests/modules/ckeditor_test/ckeditor_test.module +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @file - * Implements hooks for the CKEditor test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_editor_info_alter(). - */ -function ckeditor_test_editor_info_alter(array &$editors) { - // Drupal 9 used to have an editor called ckeditor. Copy the Unicorn editor to - // it to be able to test upgrading to CKEditor 5. - $editors['ckeditor'] = $editors['unicorn']; -} diff --git a/core/modules/ckeditor5/tests/modules/ckeditor_test/src/Hook/CkeditorTestHooks.php b/core/modules/ckeditor5/tests/modules/ckeditor_test/src/Hook/CkeditorTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1b82c66b05b596aa035f36c66be4f9141c76742b --- /dev/null +++ b/core/modules/ckeditor5/tests/modules/ckeditor_test/src/Hook/CkeditorTestHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\ckeditor_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for ckeditor_test. + */ +class CkeditorTestHooks { + + /** + * Implements hook_editor_info_alter(). + */ + #[Hook('editor_info_alter')] + public function editorInfoAlter(array &$editors) { + // Drupal 9 used to have an editor called ckeditor. Copy the Unicorn editor to + // it to be able to test upgrading to CKEditor 5. + $editors['ckeditor'] = $editors['unicorn']; + } + +} diff --git a/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php b/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php index d54a315a6d4dbb744ae3679e844f2a1ef7f7ca86..c69a8c9642cac40842de27bfe665e9ecca90c7c7 100644 --- a/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php +++ b/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php @@ -10,7 +10,7 @@ use Drupal\Tests\BrowserTestBase; use Drupal\user\RoleInterface; use Drupal\user\Entity\User; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Test the ckeditor5-stylesheets theme config property. @@ -73,7 +73,7 @@ protected function setUp(): void { ]); $this->editor->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair($this->editor, $filtered_html_format)) diff --git a/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php b/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php index 29e50adaabfb48bda418f5c352988809d5620202..28e6262eb599bbf576ab32966d49df64588e5e6b 100644 --- a/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php +++ b/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php @@ -13,6 +13,7 @@ use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\ResponseInterface; /** * Test image upload. @@ -161,7 +162,7 @@ public function testLockAfterFailedValidation(): void { * @return \Psr\Http\Message\ResponseInterface * The response. */ - protected function uploadRequest(Url $url, string $file_contents, string $file_name) { + protected function uploadRequest(Url $url, string $file_contents, string $file_name): ResponseInterface { $request_options[RequestOptions::HEADERS] = [ 'Accept' => 'application/json', ]; @@ -192,7 +193,7 @@ protected function getUploadUrl() { * * @throws \Drupal\Core\Entity\EntityStorageException */ - protected function createBasicFormat() { + protected function createBasicFormat(): void { $basic_html_format = FilterFormat::create([ 'format' => 'basic_html', 'name' => 'Basic HTML', diff --git a/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php b/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php index d4af20d6bf9893b68625db6a44ef73b2c9716753..2601e97e4902108b5ab24dd0a8c39ec0c6ab8c99 100644 --- a/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php +++ b/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php @@ -19,7 +19,7 @@ use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; use Drupal\user\Entity\User; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests the media entity metadata API. @@ -167,7 +167,7 @@ protected function setUp(): void { ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair($this->editor, $filtered_html_format)) diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php index 924faeaa616a20659e140231d76102517261e7c1..734bc3b430c2db015198db4977ccab05791735aa 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php @@ -9,7 +9,7 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\user\RoleInterface; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests for CKEditor 5 to ensure correct focus management in dialogs. @@ -53,7 +53,7 @@ public function testCKEditor5FocusInTooltipsInDialog(): void { ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php index c0df58e9a3459229c8dad1674a16f0fdddd39fc8..3557f2df2448aa70ccc03900f62a515cb47fa60f 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php @@ -12,7 +12,7 @@ use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore esque mÄori sourceediting splitbutton upcasted @@ -68,7 +68,7 @@ public function testAttributeEncoding(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -174,7 +174,7 @@ public function testComments(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -319,7 +319,7 @@ public function testStylesAndScripts(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php index 853e26d5b1cb168e503721e8cf4f5aa1e7ea49f8..10a32513fb2ac1aa7e1e949021ad125ea623c4c5 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php @@ -14,7 +14,7 @@ use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore esque mÄori sourceediting splitbutton upcasted @@ -181,7 +181,7 @@ public function testLanguageOfPartsPlugin(): void { /** * Helper to configure CKEditor5 with Language plugin. */ - public function languageOfPartsPluginInitialConfigurationHelper($page, $assert_session) { + public function languageOfPartsPluginInitialConfigurationHelper($page, $assert_session): void { $this->createNewTextFormat($page, $assert_session); // Press arrow down key to add the button to the active toolbar. $this->assertNotEmpty($assert_session->waitForElement('css', '.ckeditor5-toolbar-item-textPartLanguage')); @@ -219,7 +219,7 @@ public function languageOfPartsPluginInitialConfigurationHelper($page, $assert_s /** * Helper to set language list option for CKEditor. */ - public function languageOfPartsPluginConfigureLanguageListHelper($page, $assert_session, $option) { + public function languageOfPartsPluginConfigureLanguageListHelper($page, $assert_session, $option): void { $this->drupalGet('admin/config/content/formats/manage/ckeditor5'); $this->assertNotEmpty($assert_session->waitForElement('css', 'a[href^="#edit-editor-settings-plugins-ckeditor5-language"]')); @@ -238,7 +238,7 @@ public function languageOfPartsPluginConfigureLanguageListHelper($page, $assert_ /** * Validate expected languages available in editor. */ - public function languageOfPartsPluginTestHelper($page, $assert_session, $configured_languages) { + public function languageOfPartsPluginTestHelper($page, $assert_session, $configured_languages): void { $this->drupalGet('node/add/page'); $this->assertNotEmpty($assert_session->waitForText('Choose language')); @@ -583,7 +583,7 @@ public function testListPlugin(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -673,7 +673,7 @@ public function testSave(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -694,7 +694,7 @@ function (ConstraintViolation $v) { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php index 8b84878ed74e19507374175a334c3ea3af2e1e8d..3cea918850951f66e30d4be8f9256e28a32a1fe0 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php @@ -9,7 +9,7 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\user\Entity\User; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests for CKEditor 5 editor UI with Toolbar module. @@ -60,7 +60,7 @@ protected function setUp(): void { 'settings' => [], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php index 2e21e55880586a5086b2631b37cc27010271c007..e5c772e93e9c2370f10bae0faacf8c05c7cac485 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php @@ -9,7 +9,7 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests emphasis in CKEditor 5. @@ -90,7 +90,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php index fe9631d2c497c6490b9429c228e03e62e114efe6..ed3cbf2ec255673760abbeb39f1594c0ed462c21 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php @@ -8,7 +8,7 @@ use Drupal\file\Entity\File; use Drupal\filter\Entity\FilterFormat; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore imageresize imageupload @@ -77,7 +77,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTestBase.php index 32aca17335369cbf23d70eee709151cb68e227f4..5d0d6c50c824330a5633c3f7888769abe406945d 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTestBase.php @@ -7,7 +7,7 @@ use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore imageresize @@ -65,7 +65,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php index 9344a24778467454a53857931c36280226481cb6..ccf189d484a27d09bfd143ddf30d6f95ffa97444 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php @@ -13,7 +13,7 @@ use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\TestFileCreationTrait; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore arrakis complote détruire harkonnen @@ -97,7 +97,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php index f7abb57ebbf9a043c42b6a828279a40bc05a6f0f..d22a3705798862f6484cd74ce9f38239b93a8823 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php @@ -7,7 +7,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media @@ -47,7 +47,7 @@ public function testLinkedMediaArbitraryHtml(bool $unrestricted): void { $editor->save(); $filter_format->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index e67981212006872a5026cb591627587e82c87f1d..92a3c3d2feecaaf10771bbf903bb27cb6372d71b 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -15,7 +15,7 @@ use Drupal\media\Entity\Media; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore alternatif hurlant layercake tatou texte zartan @@ -116,7 +116,7 @@ protected function testMediaSplitList(): void { $filter_format->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -170,7 +170,7 @@ public function testMediaArbitraryHtml(): void { ]); $filter_format->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -710,7 +710,7 @@ public function testDrupalMediaStyleWithClass(): void { $editor->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php index 3384ec7fa483a06b2b41e0209a1775c72327963d..ea8a8c83573f27df064a9567f5cfe9cb5fdac51e 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTestBase.php @@ -15,7 +15,7 @@ use Drupal\Tests\TestFileCreationTrait; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * Base class for CKEditor 5 Media integration tests. @@ -145,7 +145,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -255,7 +255,7 @@ protected function assertSourceAttributeSame(string $attribute, ?string $value): * @return int * The size of the bytes transferred. */ - protected function getLastPreviewRequestTransferSize() { + protected function getLastPreviewRequestTransferSize(): int { $javascript = <<<JS (function(){ return window.performance diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingEmptyElementTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingEmptyElementTest.php index 08ee449677604c90a9319cd62f4d9f3422f9a5d6..004853276e6cf6e11e000237762b87b06b32e286 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingEmptyElementTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingEmptyElementTest.php @@ -8,7 +8,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore sourceediting @@ -60,7 +60,7 @@ public function testEmptyInlineElement(string $input, ?string $expected_output_w // Verify the text format and editor are still a valid pair. $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( @@ -85,7 +85,7 @@ function (ConstraintViolation $v) { // Verify the text format and editor are still a valid pair. $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index c0ba04b846b0b222690b7da7762608442e55f578..31e6d07ca31d267fe853b1016434b73b4916282f 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -8,7 +8,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore gramma sourceediting @@ -95,7 +95,7 @@ public function testAllowingExtraAttributes(): void { // Verify the text format and editor are still a valid pair. $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php index c14b6805044fd7d16d7e1f6d8562f9eac56b2fae..9442f379ee770e45a3bd4a0198996ede45fa5411 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php @@ -8,7 +8,7 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore sourceediting @@ -97,7 +97,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php index 67d33b3726b6ab075b673e2a414c30e82f7bebb6..e53a50571774553f9aad70b1cb6fabb4777d00fa 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php @@ -10,7 +10,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style @@ -245,7 +245,7 @@ public function testStyleFunctionality(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php index 188f36974b9602a770911adba42e27e46c34dac4..1d3dadbe4c3a284392649365a82b139ee038a6d0 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php @@ -9,7 +9,7 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * For testing the table plugin. @@ -97,7 +97,7 @@ protected function setUp(): void { ], ])->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php index 7c0dd5adc91ba23e81dd3b331d34bf66bec135fd..4f7adb49e8711ef58d110f84f89a3689b4e59f3f 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php @@ -93,7 +93,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function enableModules(array $modules) { + protected function enableModules(array $modules): void { parent::enableModules($modules); // Ensure the CKEditor 5 plugin manager instance on the test reflects the // status after the module is installed. diff --git a/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php b/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php index c4c8b8e953aee0be256395bebf131844d6e10672..836751ef813396ad4e0f4ee7e6e2b88d6af5ebd2 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php @@ -69,6 +69,8 @@ protected function setUp(): void { * [{"item_name": "sourceEditing"}, ["heading", "bold", "italic", "sourceEditing"]] * [{"item_name": "sourceEditing", "position": 1}, ["heading", "sourceEditing", "bold", "italic"]] * [{"item_name": "sourceEditing", "position": 1, "replace": true}, ["heading", "sourceEditing", "italic"]] + * [{"item_name": "bold"}, ["heading", "bold", "italic"]] + * [{"item_name": "bold", "allow_duplicate": true}, ["heading", "bold", "italic", "bold"]] */ public function testAddItemToToolbar(string|array $action, array $expected_toolbar_items): void { $recipe = $this->createRecipe([ @@ -86,8 +88,11 @@ public function testAddItemToToolbar(string|array $action, array $expected_toolb /** @var array{toolbar: array{items: string[]}, plugins: array<string, array<mixed>>} $settings */ $settings = Editor::load('filter_test')?->getSettings(); $this->assertSame($expected_toolbar_items, $settings['toolbar']['items']); + // The plugin's default settings should have been added. - $this->assertSame([], $settings['plugins']['ckeditor5_sourceEditing']['allowed_tags']); + if (in_array('sourceEditing', $expected_toolbar_items, TRUE)) { + $this->assertSame([], $settings['plugins']['ckeditor5_sourceEditing']['allowed_tags']); + } } public function testAddNonExistentItem(): void { diff --git a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php index 03ac68cc76e0fd01095721ae7f314e53377fec70..8c87a78752ed1c6d02f3a92bc6e62ef45c5b351b 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php @@ -97,7 +97,6 @@ public function test(array $ckeditor5_settings, array $expected_violations): voi ); $violations = $typed_config->validate(); - $actual_violations = self::violationsToArray($violations); $this->assertSame($expected_violations, self::violationsToArray($violations)); if (empty($expected_violations)) { diff --git a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php index c5d7b6587108686a3d95f386de761a904fad95c9..e1d57ed910a2239a9cd5059b5ff0cd9b90d1450a 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php @@ -8,7 +8,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\KernelTests\KernelTestBase; -use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; /** * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig @@ -84,7 +84,7 @@ public function testGhsConfiguration(string $filter_html_allowed, array $source_ $editor = Editor::create($editor_config); $editor->save(); $this->assertSame([], array_map( - function (ConstraintViolation $v) { + function (ConstraintViolationInterface $v) { return (string) $v->getMessage(); }, iterator_to_array(CKEditor5::validatePair( diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index 53a0c61d5997a96f04d211193df32b2543da90bf..e86e629a34394e86062dcd9f243db5da25b24904 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -11,7 +11,7 @@ /** * Implements hook_uninstall(). */ -function comment_uninstall() { +function comment_uninstall(): void { // Remove the comment fields. $storage = \Drupal::entityTypeManager()->getStorage('field_storage_config'); $fields = $storage->loadByProperties(['type' => 'comment']); @@ -24,7 +24,7 @@ function comment_uninstall() { /** * Implements hook_install(). */ -function comment_install() { +function comment_install(): void { // By default, maintain entity statistics for comments. // @see \Drupal\comment\CommentStatisticsInterface \Drupal::state()->set('comment.maintain_entity_statistics', TRUE); @@ -114,6 +114,6 @@ function comment_schema() { /** * Implements hook_update_last_removed(). */ -function comment_update_last_removed() { +function comment_update_last_removed(): int { return 10100; } diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 0928695ed156de4b00bb5705823440f381221152..fc3b898dfb334edbcf4ba1388035fd6bb27cee31 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -2,31 +2,14 @@ /** * @file - * Enables users to comment on published content. - * - * When installed, the Comment module creates a field that facilitates a - * discussion board for each Drupal entity to which a comment field is attached. - * Users can post comments to discuss a story, user etc. */ use Drupal\comment\CommentInterface; -use Drupal\comment\Entity\CommentType; -use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; -use Drupal\Core\Entity\Entity\EntityViewMode; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Field\FieldTypeCategoryManagerInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Render\Element; use Drupal\Core\Link; use Drupal\Core\Url; -use Drupal\field\FieldConfigInterface; -use Drupal\field\FieldStorageConfigInterface; -use Drupal\node\NodeInterface; -use Drupal\user\RoleInterface; -use Drupal\user\UserInterface; /** * The time cutoff for comments marked as read for entity types other node. @@ -39,35 +22,6 @@ */ define('COMMENT_NEW_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); -/** - * Implements hook_help(). - */ -function comment_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.comment': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Comment module allows users to comment on site content, set commenting defaults and permissions, and moderate comments. For more information, see the <a href=":comment">online documentation for the Comment module</a>.', [':comment' => 'https://www.drupal.org/documentation/modules/comment']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Enabling commenting') . '</dt>'; - $output .= '<dd>' . t('Comment functionality can be enabled for any entity sub-type (for example, a <a href=":content-type">content type</a>) by adding a <em>Comments</em> field on its <em>Manage fields page</em>. Adding or removing commenting for an entity through the user interface requires the <a href=":field_ui">Field UI</a> module to be installed, even though the commenting functionality works without it. For more information on fields and entities, see the <a href=":field">Field module help page</a>.', [':content-type' => (\Drupal::moduleHandler()->moduleExists('node')) ? Url::fromRoute('entity.node_type.collection')->toString() : '#', ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Configuring commenting settings') . '</dt>'; - $output .= '<dd>' . t('Commenting settings can be configured by editing the <em>Comments</em> field on the <em>Manage fields page</em> of an entity type if the <em>Field UI module</em> is installed. Configuration includes the label of the comments field, the number of comments to be displayed, and whether they are shown in threaded list. Commenting can be configured as: <em>Open</em> to allow new comments, <em>Closed</em> to view existing comments, but prevent new comments, or <em>Hidden</em> to hide existing comments and prevent new comments. Changing this configuration for an entity type will not change existing entity items.') . '</dd>'; - $output .= '<dt>' . t('Overriding default settings') . '</dt>'; - $output .= '<dd>' . t('Users with the appropriate permissions can override the default commenting settings of an entity type when they create an item of that type.') . '</dd>'; - $output .= '<dt>' . t('Adding comment types') . '</dt>'; - $output .= '<dd>' . t('Additional <em>comment types</em> can be created per entity sub-type and added on the <a href=":field">Comment types page</a>. If there are multiple comment types available you can select the appropriate one after adding a <em>Comments field</em>.', [':field' => Url::fromRoute('entity.comment_type.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Approving and managing comments') . '</dt>'; - $output .= '<dd>' . t('Comments from users who have the <em>Skip comment approval</em> permission are published immediately. All other comments are placed in the <a href=":comment-approval">Unapproved comments</a> queue, until a user who has permission to <em>Administer comments and comment settings</em> publishes or deletes them. Published comments can be bulk managed on the <a href=":admin-comment">Published comments</a> administration page. When a comment has no replies, it remains editable by its author, as long as the author has <em>Edit own comments</em> permission.', [':comment-approval' => Url::fromRoute('comment.admin_approval')->toString(), ':admin-comment' => Url::fromRoute('comment.admin')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.comment_type.collection': - $output = '<p>' . t('This page provides a list of all comment types on the site and allows you to manage the fields, form and display settings for each.') . '</p>'; - return $output; - } -} - /** * Entity URI callback. */ @@ -81,258 +35,6 @@ function comment_uri(CommentInterface $comment) { ); } -/** - * Implements hook_entity_extra_field_info(). - */ -function comment_entity_extra_field_info() { - $return = []; - foreach (CommentType::loadMultiple() as $comment_type) { - $return['comment'][$comment_type->id()] = [ - 'form' => [ - 'author' => [ - 'label' => t('Author'), - 'description' => t('Author textfield'), - 'weight' => -2, - ], - ], - ]; - $return['comment'][$comment_type->id()]['display']['links'] = [ - 'label' => t('Links'), - 'description' => t('Comment operation links'), - 'weight' => 100, - 'visible' => TRUE, - ]; - } - - return $return; -} - -/** - * Implements hook_theme(). - */ -function comment_theme() { - return [ - 'comment' => [ - 'render element' => 'elements', - ], - 'field__comment' => [ - 'base hook' => 'field', - ], - ]; -} - -/** - * Implements hook_ENTITY_TYPE_create() for 'field_config'. - */ -function comment_field_config_create(FieldConfigInterface $field) { - if ($field->getType() == 'comment' && !$field->isSyncing()) { - // Assign default values for the field. - $default_value = $field->getDefaultValueLiteral(); - $default_value += [[]]; - $default_value[0] += [ - 'status' => CommentItemInterface::OPEN, - 'cid' => 0, - 'last_comment_timestamp' => 0, - 'last_comment_name' => '', - 'last_comment_uid' => 0, - 'comment_count' => 0, - ]; - $field->setDefaultValue($default_value); - } -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_config'. - */ -function comment_field_config_update(FieldConfigInterface $field) { - if ($field->getType() == 'comment') { - // Comment field settings also affects the rendering of *comment* entities, - // not only the *commented* entities. - \Drupal::entityTypeManager()->getViewBuilder('comment')->resetCache(); - } -} - -/** - * Implements hook_ENTITY_TYPE_insert() for 'field_storage_config'. - */ -function comment_field_storage_config_insert(FieldStorageConfigInterface $field_storage) { - if ($field_storage->getType() == 'comment') { - // Check that the target entity type uses an integer ID. - $entity_type_id = $field_storage->getTargetEntityTypeId(); - if (!_comment_entity_uses_integer_id($entity_type_id)) { - throw new \UnexpectedValueException('You cannot attach a comment field to an entity with a non-integer ID field'); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'field_config'. - */ -function comment_field_config_delete(FieldConfigInterface $field) { - if ($field->getType() == 'comment') { - // Delete all comments that used by the entity bundle. - $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); - $entity_query->condition('entity_type', $field->getEntityTypeId()); - $entity_query->condition('field_name', $field->getName()); - $cids = $entity_query->execute(); - $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); - $comments = $comment_storage->loadMultiple($cids); - $comment_storage->delete($comments); - } -} - -/** - * Implements hook_node_links_alter(). - */ -function comment_node_links_alter(array &$links, NodeInterface $node, array &$context) { - // Comment links are only added to node entity type for backwards - // compatibility. Should you require comment links for other entity types you - // can do so by implementing a new field formatter. - // @todo Make this configurable from the formatter. See - // https://www.drupal.org/node/1901110. - - $comment_links = \Drupal::service('comment.link_builder')->buildCommentedEntityLinks($node, $context); - $links += $comment_links; -} - -/** - * Implements hook_entity_view(). - */ -function comment_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { - if ($entity instanceof FieldableEntityInterface && $view_mode == 'rss' && $display->getComponent('links')) { - /** @var \Drupal\comment\CommentManagerInterface $comment_manager */ - $comment_manager = \Drupal::service('comment.manager'); - $fields = $comment_manager->getFields($entity->getEntityTypeId()); - foreach ($fields as $field_name => $detail) { - if ($entity->hasField($field_name) && $entity->get($field_name)->status != CommentItemInterface::HIDDEN) { - // Add a comments RSS element which is a URL to the comments of this - // entity. - $options = [ - 'fragment' => 'comments', - 'absolute' => TRUE, - ]; - $entity->rss_elements[] = [ - 'key' => 'comments', - 'value' => $entity->toUrl('canonical', $options)->toString(), - ]; - } - } - } -} - -/** - * Implements hook_ENTITY_TYPE_view_alter() for node entities. - */ -function comment_node_view_alter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) { - if (\Drupal::moduleHandler()->moduleExists('history')) { - $build['#attributes']['data-history-node-id'] = $node->id(); - } -} - -/** - * Implements hook_form_FORM_ID_alter() for field_ui_field_storage_add_form. - */ -function comment_form_field_ui_field_storage_add_form_alter(&$form, FormStateInterface $form_state) { - $route_match = \Drupal::routeMatch(); - if ($form_state->get('entity_type_id') == 'comment' && $route_match->getParameter('commented_entity_type')) { - $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); - } -} - -/** - * Implements hook_field_info_entity_type_ui_definitions_alter(). - */ -function comment_field_info_entity_type_ui_definitions_alter(array &$ui_definitions, string $entity_type_id) { - if (!_comment_entity_uses_integer_id($entity_type_id)) { - unset($ui_definitions['comment']); - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function comment_form_field_ui_form_display_overview_form_alter(&$form, FormStateInterface $form_state) { - $route_match = \Drupal::routeMatch(); - if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) { - $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function comment_form_field_ui_display_overview_form_alter(&$form, FormStateInterface $form_state) { - $route_match = \Drupal::routeMatch(); - if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) { - $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); - } -} - -/** - * Implements hook_entity_storage_load(). - * - * @see \Drupal\comment\Plugin\Field\FieldType\CommentItem::propertyDefinitions() - */ -function comment_entity_storage_load($entities, $entity_type) { - // Comments can only be attached to content entities, so skip others. - if (!\Drupal::entityTypeManager()->getDefinition($entity_type)->entityClassImplements(FieldableEntityInterface::class)) { - return; - } - if (!\Drupal::service('comment.manager')->getFields($entity_type)) { - // Do not query database when entity has no comment fields. - return; - } - // Load comment information from the database and update the entity's - // comment statistics properties, which are defined on each CommentItem field. - $result = \Drupal::service('comment.statistics')->read($entities, $entity_type); - foreach ($result as $record) { - // Skip fields that entity does not have. - if (!$entities[$record->entity_id]->hasField($record->field_name)) { - continue; - } - $comment_statistics = $entities[$record->entity_id]->get($record->field_name); - $comment_statistics->cid = $record->cid; - $comment_statistics->last_comment_timestamp = $record->last_comment_timestamp; - $comment_statistics->last_comment_name = $record->last_comment_name; - $comment_statistics->last_comment_uid = $record->last_comment_uid; - $comment_statistics->comment_count = $record->comment_count; - } -} - -/** - * Implements hook_entity_insert(). - */ -function comment_entity_insert(EntityInterface $entity) { - // Allow bulk updates and inserts to temporarily disable the - // maintenance of the {comment_entity_statistics} table. - if (\Drupal::state()->get('comment.maintain_entity_statistics') && - $fields = \Drupal::service('comment.manager')->getFields($entity->getEntityTypeId())) { - \Drupal::service('comment.statistics')->create($entity, $fields); - } -} - -/** - * Implements hook_entity_predelete(). - */ -function comment_entity_predelete(EntityInterface $entity) { - // Entities can have non-numeric IDs, but {comment} and - // {comment_entity_statistics} tables have integer columns for entity ID, and - // PostgreSQL throws exceptions if you attempt query conditions with - // mismatched types. So, we need to verify that the ID is numeric (even for an - // entity type that has an integer ID, $entity->id() might be a string - // containing a number), and then cast it to an integer when querying. - if ($entity instanceof FieldableEntityInterface && is_numeric($entity->id())) { - $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); - $entity_query->condition('entity_id', (int) $entity->id()); - $entity_query->condition('entity_type', $entity->getEntityTypeId()); - $cids = $entity_query->execute(); - $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); - $comments = $comment_storage->loadMultiple($cids); - $comment_storage->delete($comments); - \Drupal::service('comment.statistics')->delete($entity); - } -} - /** * Determines if an entity type is using an integer-based ID definition. * @@ -354,143 +56,6 @@ function _comment_entity_uses_integer_id($entity_type_id) { return $entity_type_id_definition->getType() === 'integer'; } -/** - * Implements hook_node_update_index(). - */ -function comment_node_update_index(EntityInterface $node) { - $index_comments = &drupal_static(__FUNCTION__); - - if ($index_comments === NULL) { - // Do not index in the following three cases: - // 1. 'Authenticated user' can search content but can't access comments. - // 2. 'Anonymous user' can search content but can't access comments. - // 3. Any role can search content but can't access comments and access - // comments is not granted by the 'authenticated user' role. In this case - // all users might have both permissions from various roles but it is also - // possible to set up a user to have only search content and so a user - // edit could change the security situation so it is not safe to index the - // comments. - $index_comments = TRUE; - $roles = \Drupal::entityTypeManager()->getStorage('user_role')->loadMultiple(); - $authenticated_can_access = $roles[RoleInterface::AUTHENTICATED_ID]->hasPermission('access comments'); - foreach ($roles as $rid => $role) { - if ($role->hasPermission('search content') && !$role->hasPermission('access comments')) { - if ($rid == RoleInterface::AUTHENTICATED_ID || $rid == RoleInterface::ANONYMOUS_ID || !$authenticated_can_access) { - $index_comments = FALSE; - break; - } - } - } - } - - $build = []; - - if ($index_comments) { - foreach (\Drupal::service('comment.manager')->getFields('node') as $field_name => $info) { - // Skip fields that entity does not have. - if (!$node->hasField($field_name)) { - continue; - } - $field_definition = $node->getFieldDefinition($field_name); - $mode = $field_definition->getSetting('default_mode'); - $comments_per_page = $field_definition->getSetting('per_page'); - if ($node->get($field_name)->status) { - $comments = \Drupal::entityTypeManager()->getStorage('comment') - ->loadThread($node, $field_name, $mode, $comments_per_page); - if ($comments) { - $build[] = \Drupal::entityTypeManager()->getViewBuilder('comment')->viewMultiple($comments); - } - } - } - } - return \Drupal::service('renderer')->renderInIsolation($build); -} - -/** - * Implements hook_cron(). - */ -function comment_cron() { - // Store the maximum possible comments per thread (used for node search - // ranking by reply count). - \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1, \Drupal::service('comment.statistics')->getMaximumCount('node'))); -} - -/** - * Implements hook_node_search_result(). - * - * Formats a comment count string and returns it, for display with search - * results. - */ -function comment_node_search_result(EntityInterface $node) { - $comment_fields = \Drupal::service('comment.manager')->getFields('node'); - $comments = 0; - $open = FALSE; - foreach ($comment_fields as $field_name => $info) { - // Skip fields that entity does not have. - if (!$node->hasField($field_name)) { - continue; - } - // Do not make a string if comments are hidden. - $status = $node->get($field_name)->status; - if (\Drupal::currentUser()->hasPermission('access comments') && $status != CommentItemInterface::HIDDEN) { - if ($status == CommentItemInterface::OPEN) { - // At least one comment field is open. - $open = TRUE; - } - $comments += $node->get($field_name)->comment_count; - } - } - // Do not make a string if there are no comment fields, or no comments exist - // or all comment fields are hidden. - if ($comments > 0 || $open) { - return ['comment' => \Drupal::translation()->formatPlural($comments, '1 comment', '@count comments')]; - } -} - -/** - * Implements hook_user_cancel(). - */ -function comment_user_cancel($edit, UserInterface $account, $method) { - switch ($method) { - case 'user_cancel_block_unpublish': - $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]); - foreach ($comments as $comment) { - $comment->setUnpublished(); - $comment->save(); - } - break; - - case 'user_cancel_reassign': - /** @var \Drupal\comment\CommentInterface[] $comments */ - $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]); - foreach ($comments as $comment) { - $langcodes = array_keys($comment->getTranslationLanguages()); - // For efficiency manually save the original comment before applying any - // changes. - $comment->original = clone $comment; - foreach ($langcodes as $langcode) { - $comment_translated = $comment->getTranslation($langcode); - $comment_translated->setOwnerId(0); - $comment_translated->setAuthorName(\Drupal::config('user.settings')->get('anonymous')); - } - $comment->save(); - } - break; - } -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for user entities. - */ -function comment_user_predelete($account) { - $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); - $entity_query->condition('uid', $account->id()); - $cids = $entity_query->execute(); - $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); - $comments = $comment_storage->loadMultiple($cids); - $comment_storage->delete($comments); -} - /** * Generates a comment preview. * @@ -728,59 +293,3 @@ function comment_preprocess_field(&$variables) { $variables['comment_form'] = $element[0]['comment_form']; } } - -/** - * Implements hook_ranking(). - */ -function comment_ranking() { - return \Drupal::service('comment.statistics')->getRankingInfo(); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for entity_view_display entities. - */ -function comment_entity_view_display_presave(EntityViewDisplayInterface $display) { - // Act only on comment view displays being disabled. - if ($display->isNew() || $display->getTargetEntityTypeId() !== 'comment' || $display->status()) { - return; - } - $storage = \Drupal::entityTypeManager()->getStorage('entity_view_display'); - if (!$storage->loadUnchanged($display->getOriginalId())->status()) { - return; - } - - // Disable the comment field formatter when the used view display is disabled. - foreach ($storage->loadMultiple() as $view_display) { - $changed = FALSE; - /** @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface $view_display */ - foreach ($view_display->getComponents() as $field => $component) { - if (isset($component['type']) && ($component['type'] === 'comment_default')) { - if ($component['settings']['view_mode'] === $display->getMode()) { - $view_display->removeComponent($field); - /** @var \Drupal\Core\Entity\EntityViewModeInterface $mode */ - $mode = EntityViewMode::load($display->getTargetEntityTypeId() . '.' . $display->getMode()); - $arguments = [ - '@id' => $view_display->id(), - '@name' => $field, - '@display' => $mode->label(), - '@mode' => $display->getMode(), - ]; - \Drupal::logger('system')->warning("View display '@id': Comment field formatter '@name' was disabled because it is using the comment view display '@display' (@mode) that was just disabled.", $arguments); - $changed = TRUE; - } - } - } - if ($changed) { - $view_display->save(); - } - } -} - -/** - * Implements hook_field_type_category_info_alter(). - */ -function comment_field_type_category_info_alter(&$definitions) { - // The `comment` field type belongs in the `general` category, so the - // libraries need to be attached using an alter hook. - $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'comment/drupal.comment-icon'; -} diff --git a/core/modules/comment/comment.post_update.php b/core/modules/comment/comment.post_update.php index 2c07518c49c3db33de3320ab2f6a699347095e86..9c49d3645f7711b97e8d54b153c5a95c11fa2d84 100644 --- a/core/modules/comment/comment.post_update.php +++ b/core/modules/comment/comment.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function comment_removed_post_updates() { +function comment_removed_post_updates(): array { return [ 'comment_post_update_enable_comment_admin_view' => '9.0.0', 'comment_post_update_add_ip_address_setting' => '9.0.0', diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc deleted file mode 100644 index 3268b683476cca80182672fa76a36cf35b965d4c..0000000000000000000000000000000000000000 --- a/core/modules/comment/comment.tokens.inc +++ /dev/null @@ -1,278 +0,0 @@ -<?php - -/** - * @file - * Builds placeholder replacement tokens for comment-related data. - */ - -use Drupal\Component\Utility\UrlHelper; -use Drupal\Core\Datetime\Entity\DateFormat; -use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\FieldableEntityInterface; -use Drupal\Core\Render\BubbleableMetadata; - -/** - * Implements hook_token_info(). - */ -function comment_token_info() { - $type = [ - 'name' => t('Comments'), - 'description' => t('Tokens for comments posted on the site.'), - 'needs-data' => 'comment', - ]; - - $tokens = []; - // Provides an integration for each entity type except comment. - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type_id == 'comment' || !$entity_type->entityClassImplements(ContentEntityInterface::class)) { - continue; - } - - if (\Drupal::service('comment.manager')->getFields($entity_type_id)) { - // Get the correct token type. - $token_type = ($entity_type_id == 'taxonomy_term') ? 'term' : $entity_type_id; - - // @todo Make this work per field. See https://www.drupal.org/node/2031903. - $tokens[$token_type]['comment-count'] = [ - 'name' => t("Comment count"), - 'description' => t("The number of comments posted on an entity."), - ]; - $tokens[$token_type]['comment-count-new'] = [ - 'name' => t("New comment count"), - 'description' => t("The number of comments posted on an entity since the reader last viewed it."), - ]; - } - } - - // Core comment tokens - $comment['cid'] = [ - 'name' => t("Comment ID"), - 'description' => t("The unique ID of the comment."), - ]; - $comment['hostname'] = [ - 'name' => t("IP Address"), - 'description' => t("The IP address of the computer the comment was posted from."), - ]; - $comment['mail'] = [ - 'name' => t("Email address"), - 'description' => t("The email address left by the comment author."), - ]; - $comment['homepage'] = [ - 'name' => t("Home page"), - 'description' => t("The home page URL left by the comment author."), - ]; - $comment['title'] = [ - 'name' => t("Title"), - 'description' => t("The title of the comment."), - ]; - $comment['body'] = [ - 'name' => t("Content"), - 'description' => t("The formatted content of the comment itself."), - ]; - $comment['langcode'] = [ - 'name' => t('Language code'), - 'description' => t('The language code of the language the comment is written in.'), - ]; - $comment['url'] = [ - 'name' => t("URL"), - 'description' => t("The URL of the comment."), - ]; - $comment['edit-url'] = [ - 'name' => t("Edit URL"), - 'description' => t("The URL of the comment's edit page."), - ]; - - // Chained tokens for comments - $comment['created'] = [ - 'name' => t("Date created"), - 'description' => t("The date the comment was posted."), - 'type' => 'date', - ]; - $comment['changed'] = [ - 'name' => t("Date changed"), - 'description' => t("The date the comment was most recently updated."), - 'type' => 'date', - ]; - $comment['parent'] = [ - 'name' => t("Parent"), - 'description' => t("The comment's parent, if comment threading is active."), - 'type' => 'comment', - ]; - $comment['entity'] = [ - 'name' => t("Entity"), - 'description' => t("The entity the comment was posted to."), - 'type' => 'entity', - ]; - $comment['author'] = [ - 'name' => t("Author"), - 'description' => t("The author name of the comment."), - 'type' => 'user', - ]; - - return [ - 'types' => ['comment' => $type], - 'tokens' => [ - 'comment' => $comment, - ] + $tokens, - ]; -} - -/** - * Implements hook_tokens(). - */ -function comment_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $token_service = \Drupal::token(); - - $url_options = ['absolute' => TRUE]; - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = NULL; - } - $replacements = []; - - if ($type == 'comment' && !empty($data['comment'])) { - /** @var \Drupal\comment\CommentInterface $comment */ - $comment = $data['comment']; - - foreach ($tokens as $name => $original) { - switch ($name) { - // Simple key values on the comment. - case 'cid': - $replacements[$original] = $comment->id(); - break; - - // Poster identity information for comments. - case 'hostname': - $replacements[$original] = $comment->getHostname(); - break; - - case 'mail': - $mail = $comment->getAuthorEmail(); - // Add the user cacheability metadata in case the author of the comment - // is not the anonymous user. - if ($comment->getOwnerId()) { - $bubbleable_metadata->addCacheableDependency($comment->getOwner()); - } - $replacements[$original] = $mail; - break; - - case 'homepage': - $replacements[$original] = UrlHelper::stripDangerousProtocols($comment->getHomepage()); - break; - - case 'title': - $replacements[$original] = $comment->getSubject(); - break; - - case 'body': - // "processed" returns a \Drupal\Component\Render\MarkupInterface via - // check_markup(). - $replacements[$original] = $comment->comment_body->processed; - break; - - case 'langcode': - $replacements[$original] = $comment->language()->getId(); - break; - - // Comment related URLs. - case 'url': - $url_options['fragment'] = 'comment-' . $comment->id(); - $replacements[$original] = $comment->toUrl('canonical', $url_options)->toString(); - break; - - case 'edit-url': - $url_options['fragment'] = NULL; - $replacements[$original] = $comment->toUrl('edit-form', $url_options)->toString(); - break; - - case 'author': - $name = $comment->getAuthorName(); - // Add the user cacheability metadata in case the author of the comment - // is not the anonymous user. - if ($comment->getOwnerId()) { - $bubbleable_metadata->addCacheableDependency($comment->getOwner()); - } - $replacements[$original] = $name; - break; - - case 'parent': - if ($comment->hasParentComment()) { - $parent = $comment->getParentComment(); - $bubbleable_metadata->addCacheableDependency($parent); - $replacements[$original] = $parent->getSubject(); - } - break; - - case 'created': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($comment->getCreatedTime(), 'medium', '', NULL, $langcode); - break; - - case 'changed': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($comment->getChangedTime(), 'medium', '', NULL, $langcode); - break; - - case 'entity': - $entity = $comment->getCommentedEntity(); - $bubbleable_metadata->addCacheableDependency($entity); - $title = $entity->label(); - $replacements[$original] = $title; - break; - } - } - - // Chained token relationships. - if ($entity_tokens = $token_service->findwithPrefix($tokens, 'entity')) { - $entity = $comment->getCommentedEntity(); - $replacements += $token_service->generate($comment->getCommentedEntityTypeId(), $entity_tokens, [$comment->getCommentedEntityTypeId() => $entity], $options, $bubbleable_metadata); - } - - if ($date_tokens = $token_service->findwithPrefix($tokens, 'created')) { - $replacements += $token_service->generate('date', $date_tokens, ['date' => $comment->getCreatedTime()], $options, $bubbleable_metadata); - } - - if ($date_tokens = $token_service->findwithPrefix($tokens, 'changed')) { - $replacements += $token_service->generate('date', $date_tokens, ['date' => $comment->getChangedTime()], $options, $bubbleable_metadata); - } - - if (($parent_tokens = $token_service->findwithPrefix($tokens, 'parent')) && $parent = $comment->getParentComment()) { - $replacements += $token_service->generate('comment', $parent_tokens, ['comment' => $parent], $options, $bubbleable_metadata); - } - - if (($author_tokens = $token_service->findwithPrefix($tokens, 'author')) && $account = $comment->getOwner()) { - $replacements += $token_service->generate('user', $author_tokens, ['user' => $account], $options, $bubbleable_metadata); - } - } - // Replacement tokens for any content entities that have comment field. - elseif (!empty($data[$type]) && $data[$type] instanceof FieldableEntityInterface) { - /** @var \Drupal\Core\Entity\FieldableEntityInterface $entity */ - $entity = $data[$type]; - - foreach ($tokens as $name => $original) { - switch ($name) { - case 'comment-count': - $count = 0; - $fields = array_keys(\Drupal::service('comment.manager')->getFields($entity->getEntityTypeId())); - $definitions = array_keys($entity->getFieldDefinitions()); - $valid_fields = array_intersect($fields, $definitions); - foreach ($valid_fields as $field_name) { - $count += $entity->get($field_name)->comment_count; - } - $replacements[$original] = $count; - break; - - case 'comment-count-new': - $replacements[$original] = \Drupal::service('comment.manager')->getCountNewComments($entity); - break; - } - } - } - - return $replacements; -} diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc deleted file mode 100644 index f9d83dbef96b43efd729b38423adcede481c9e57..0000000000000000000000000000000000000000 --- a/core/modules/comment/comment.views.inc +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/** - * @file - * Provide views data for comment.module. - */ - -use Drupal\Core\Entity\ContentEntityInterface; - -/** - * Implements hook_views_data_alter(). - */ -function comment_views_data_alter(&$data) { - // New comments are only supported for node table because it requires the - // history table. - $data['node']['new_comments'] = [ - 'title' => t('New comments'), - 'help' => t('The number of new comments on the node.'), - 'field' => [ - 'id' => 'node_new_comments', - 'no group by' => TRUE, - ], - ]; - - // Provides an integration for each entity type except comment. - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type_id == 'comment' || !$entity_type->entityClassImplements(ContentEntityInterface::class) || !$entity_type->getBaseTable()) { - continue; - } - $fields = \Drupal::service('comment.manager')->getFields($entity_type_id); - $base_table = $entity_type->getDataTable() ?: $entity_type->getBaseTable(); - $args = ['@entity_type' => $entity_type_id]; - - if ($fields) { - $data[$base_table]['comments_link'] = [ - 'field' => [ - 'title' => t('Add comment link'), - 'help' => t('Display the standard add comment link used on regular @entity_type, which will only display if the viewing user has access to add a comment.', $args), - 'id' => 'comment_entity_link', - ], - ]; - - // Multilingual properties are stored in data table. - if (!($table = $entity_type->getDataTable())) { - $table = $entity_type->getBaseTable(); - } - $data[$table]['uid_touch'] = [ - 'title' => t('User posted or commented'), - 'help' => t('Display nodes only if a user posted the @entity_type or commented on the @entity_type.', $args), - 'argument' => [ - 'field' => 'uid', - 'name table' => 'users_field_data', - 'name field' => 'name', - 'id' => 'argument_comment_user_uid', - 'no group by' => TRUE, - 'entity_type' => $entity_type_id, - 'entity_id' => $entity_type->getKey('id'), - ], - 'filter' => [ - 'field' => 'uid', - 'name table' => 'users_field_data', - 'name field' => 'name', - 'id' => 'comment_user_uid', - 'entity_type' => $entity_type_id, - 'entity_id' => $entity_type->getKey('id'), - ], - ]; - - foreach ($fields as $field_name => $field) { - $data[$base_table][$field_name . '_cid'] = [ - 'title' => t('Comments of the @entity_type using field: @field_name', $args + ['@field_name' => $field_name]), - 'help' => t('Relate all comments on the @entity_type. This will create 1 duplicate record for every comment. Usually if you need this it is better to create a comment view.', $args), - 'relationship' => [ - 'group' => t('Comment'), - 'label' => t('Comments'), - 'base' => 'comment_field_data', - 'base field' => 'entity_id', - 'relationship field' => $entity_type->getKey('id'), - 'id' => 'standard', - 'extra' => [ - [ - 'field' => 'entity_type', - 'value' => $entity_type_id, - ], - [ - 'field' => 'field_name', - 'value' => $field_name, - ], - ], - ], - ]; - } - } - } -} diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php index 43123b7a17ff697b5a34a5d3fc85938aa4f586f3..5d734aeecd771f26bef408c93271f2f8231004e3 100644 --- a/core/modules/comment/src/Entity/Comment.php +++ b/core/modules/comment/src/Entity/Comment.php @@ -2,6 +2,17 @@ namespace Drupal\comment\Entity; +use Drupal\comment\CommentAccessControlHandler; +use Drupal\comment\CommentForm; +use Drupal\comment\CommentStorage; +use Drupal\comment\CommentStorageSchema; +use Drupal\comment\CommentTranslationHandler; +use Drupal\comment\CommentViewBuilder; +use Drupal\comment\CommentViewsData; +use Drupal\comment\Form\DeleteForm; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\EntityListBuilder; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Component\Utility\Number; use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityBase; @@ -17,57 +28,56 @@ /** * Defines the comment entity class. - * - * @ContentEntityType( - * id = "comment", - * label = @Translation("Comment"), - * label_singular = @Translation("comment"), - * label_plural = @Translation("comments"), - * label_count = @PluralTranslation( - * singular = "@count comment", - * plural = "@count comments", - * ), - * bundle_label = @Translation("Comment type"), - * handlers = { - * "storage" = "Drupal\comment\CommentStorage", - * "storage_schema" = "Drupal\comment\CommentStorageSchema", - * "access" = "Drupal\comment\CommentAccessControlHandler", - * "list_builder" = "Drupal\Core\Entity\EntityListBuilder", - * "view_builder" = "Drupal\comment\CommentViewBuilder", - * "views_data" = "Drupal\comment\CommentViewsData", - * "form" = { - * "default" = "Drupal\comment\CommentForm", - * "delete" = "Drupal\comment\Form\DeleteForm" - * }, - * "translation" = "Drupal\comment\CommentTranslationHandler" - * }, - * base_table = "comment", - * data_table = "comment_field_data", - * uri_callback = "comment_uri", - * translatable = TRUE, - * entity_keys = { - * "id" = "cid", - * "bundle" = "comment_type", - * "label" = "subject", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "published" = "status", - * "owner" = "uid", - * }, - * links = { - * "canonical" = "/comment/{comment}", - * "delete-form" = "/comment/{comment}/delete", - * "delete-multiple-form" = "/admin/content/comment/delete", - * "edit-form" = "/comment/{comment}/edit", - * "create" = "/comment", - * }, - * bundle_entity_type = "comment_type", - * field_ui_base_route = "entity.comment_type.edit_form", - * constraints = { - * "CommentName" = {} - * } - * ) */ +#[ContentEntityType( + id: 'comment', + label: new TranslatableMarkup('Comment'), + label_singular: new TranslatableMarkup('comment'), + label_plural: new TranslatableMarkup('comments'), + entity_keys: [ + 'id' => 'cid', + 'bundle' => 'comment_type', + 'label' => 'subject', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'published' => 'status', + 'owner' => 'uid', + ], + handlers: [ + 'storage' => CommentStorage::class, + 'storage_schema' => CommentStorageSchema::class, + 'access' => CommentAccessControlHandler::class, + 'list_builder' => EntityListBuilder::class, + 'view_builder' => CommentViewBuilder::class, + 'views_data' => CommentViewsData::class, + 'form' => [ + 'default' => CommentForm::class, + 'delete' => DeleteForm::class, + ], + 'translation' => CommentTranslationHandler::class, + ], + links: [ + 'canonical' => '/comment/{comment}', + 'delete-form' => '/comment/{comment}/delete', + 'delete-multiple-form' => '/admin/content/comment/delete', + 'edit-form' => '/comment/{comment}/edit', + 'create' => '/comment', + ], + bundle_entity_type: 'comment_type', + bundle_label: new TranslatableMarkup('Comment type'), + base_table: 'comment', + data_table: 'comment_field_data', + translatable: TRUE, + label_count: [ + 'singular' => '@count comment', + 'plural' => '@count comments', + ], + uri_callback: 'comment_uri', + field_ui_base_route: 'entity.comment_type.edit_form', + constraints: [ + 'CommentName' => [], + ], +)] class Comment extends ContentEntityBase implements CommentInterface { use EntityChangedTrait; diff --git a/core/modules/comment/src/Entity/CommentType.php b/core/modules/comment/src/Entity/CommentType.php index 5cee3668898d2c2e60fc50954dba43d5fd87af7e..6dcf75d9e8a750e3be194be1f17bce5b28e30b67 100644 --- a/core/modules/comment/src/Entity/CommentType.php +++ b/core/modules/comment/src/Entity/CommentType.php @@ -2,55 +2,60 @@ namespace Drupal\comment\Entity; +use Drupal\comment\CommentTypeForm; +use Drupal\comment\CommentTypeListBuilder; +use Drupal\comment\Form\CommentTypeDeleteForm; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\comment\CommentTypeInterface; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the comment type entity. - * - * @ConfigEntityType( - * id = "comment_type", - * label = @Translation("Comment type"), - * label_singular = @Translation("comment type"), - * label_plural = @Translation("comment types"), - * label_count = @PluralTranslation( - * singular = "@count comment type", - * plural = "@count comment types", - * ), - * handlers = { - * "form" = { - * "default" = "Drupal\comment\CommentTypeForm", - * "add" = "Drupal\comment\CommentTypeForm", - * "edit" = "Drupal\comment\CommentTypeForm", - * "delete" = "Drupal\comment\Form\CommentTypeDeleteForm" - * }, - * "route_provider" = { - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * }, - * "list_builder" = "Drupal\comment\CommentTypeListBuilder" - * }, - * admin_permission = "administer comment types", - * config_prefix = "type", - * bundle_of = "comment", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * links = { - * "delete-form" = "/admin/structure/comment/manage/{comment_type}/delete", - * "edit-form" = "/admin/structure/comment/manage/{comment_type}", - * "add-form" = "/admin/structure/comment/types/add", - * "entity-permissions-form" = "/admin/structure/comment/manage/{comment_type}/permissions", - * "collection" = "/admin/structure/comment", - * }, - * config_export = { - * "id", - * "label", - * "target_entity_type_id", - * "description", - * } - * ) */ +#[ConfigEntityType( + id: 'comment_type', + label: new TranslatableMarkup('Comment type'), + label_singular: new TranslatableMarkup('comment type'), + label_plural: new TranslatableMarkup('comment types'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'form' => [ + 'default' => CommentTypeForm::class, + 'add' => CommentTypeForm::class, + 'edit' => CommentTypeForm::class, + 'delete' => CommentTypeDeleteForm::class, + ], + 'route_provider' => [ + 'permissions' => EntityPermissionsRouteProvider::class, + ], + 'list_builder' => CommentTypeListBuilder::class, + ], + links: [ + 'delete-form' => '/admin/structure/comment/manage/{comment_type}/delete', + 'edit-form' => '/admin/structure/comment/manage/{comment_type}', + 'add-form' => '/admin/structure/comment/types/add', + 'entity-permissions-form' => '/admin/structure/comment/manage/{comment_type}/permissions', + 'collection' => '/admin/structure/comment', + ], + admin_permission: 'administer comment types', + bundle_of: 'comment', + label_count: [ + 'singular' => '@count comment type', + 'plural' => '@count comment types', + ], + config_export: [ + 'id', + 'label', + 'target_entity_type_id', + 'description', + ], +)] class CommentType extends ConfigEntityBundleBase implements CommentTypeInterface { /** diff --git a/core/modules/comment/src/Form/CommentAdminOverview.php b/core/modules/comment/src/Form/CommentAdminOverview.php index c3fd67074b3263d4ba24c3c25b2d531e3ab4c283..1eedf157cd3aea855824996366373e6d01308a12 100644 --- a/core/modules/comment/src/Form/CommentAdminOverview.php +++ b/core/modules/comment/src/Form/CommentAdminOverview.php @@ -227,7 +227,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $type = ' 'title' => $this->t('Edit'), 'url' => $comment->toUrl('edit-form', $comment_uri_options), ]; - if ($this->moduleHandler->moduleExists('content_translation') && $this->moduleHandler->invoke('content_translation', 'translate_access', [$comment])->isAllowed()) { + if ($this->moduleHandler->moduleExists('content_translation') && content_translation_translate_access($comment)->isAllowed()) { $links['translate'] = [ 'title' => $this->t('Translate'), 'url' => $comment->toUrl('drupal:content-translation-overview', $comment_uri_options), diff --git a/core/modules/comment/src/Hook/CommentHooks.php b/core/modules/comment/src/Hook/CommentHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..cf65ee0489d78141f11d53b45ea1e4071b247ccf --- /dev/null +++ b/core/modules/comment/src/Hook/CommentHooks.php @@ -0,0 +1,530 @@ +<?php + +namespace Drupal\comment\Hook; + +use Drupal\Core\Field\FieldTypeCategoryManagerInterface; +use Drupal\Core\Entity\Entity\EntityViewMode; +use Drupal\user\UserInterface; +use Drupal\user\RoleInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Entity\FieldableEntityInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\node\NodeInterface; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; +use Drupal\field\FieldConfigInterface; +use Drupal\comment\Entity\CommentType; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for comment. + */ +class CommentHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.comment': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Comment module allows users to comment on site content, set commenting defaults and permissions, and moderate comments. For more information, see the <a href=":comment">online documentation for the Comment module</a>.', [':comment' => 'https://www.drupal.org/documentation/modules/comment']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Enabling commenting') . '</dt>'; + $output .= '<dd>' . t('Comment functionality can be enabled for any entity sub-type (for example, a <a href=":content-type">content type</a>) by adding a <em>Comments</em> field on its <em>Manage fields page</em>. Adding or removing commenting for an entity through the user interface requires the <a href=":field_ui">Field UI</a> module to be installed, even though the commenting functionality works without it. For more information on fields and entities, see the <a href=":field">Field module help page</a>.', [ + ':content-type' => \Drupal::moduleHandler()->moduleExists('node') ? Url::fromRoute('entity.node_type.collection')->toString() : '#', + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring commenting settings') . '</dt>'; + $output .= '<dd>' . t('Commenting settings can be configured by editing the <em>Comments</em> field on the <em>Manage fields page</em> of an entity type if the <em>Field UI module</em> is installed. Configuration includes the label of the comments field, the number of comments to be displayed, and whether they are shown in threaded list. Commenting can be configured as: <em>Open</em> to allow new comments, <em>Closed</em> to view existing comments, but prevent new comments, or <em>Hidden</em> to hide existing comments and prevent new comments. Changing this configuration for an entity type will not change existing entity items.') . '</dd>'; + $output .= '<dt>' . t('Overriding default settings') . '</dt>'; + $output .= '<dd>' . t('Users with the appropriate permissions can override the default commenting settings of an entity type when they create an item of that type.') . '</dd>'; + $output .= '<dt>' . t('Adding comment types') . '</dt>'; + $output .= '<dd>' . t('Additional <em>comment types</em> can be created per entity sub-type and added on the <a href=":field">Comment types page</a>. If there are multiple comment types available you can select the appropriate one after adding a <em>Comments field</em>.', [ + ':field' => Url::fromRoute('entity.comment_type.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Approving and managing comments') . '</dt>'; + $output .= '<dd>' . t('Comments from users who have the <em>Skip comment approval</em> permission are published immediately. All other comments are placed in the <a href=":comment-approval">Unapproved comments</a> queue, until a user who has permission to <em>Administer comments and comment settings</em> publishes or deletes them. Published comments can be bulk managed on the <a href=":admin-comment">Published comments</a> administration page. When a comment has no replies, it remains editable by its author, as long as the author has <em>Edit own comments</em> permission.', [ + ':comment-approval' => Url::fromRoute('comment.admin_approval')->toString(), + ':admin-comment' => Url::fromRoute('comment.admin')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.comment_type.collection': + $output = '<p>' . t('This page provides a list of all comment types on the site and allows you to manage the fields, form and display settings for each.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $return = []; + foreach (CommentType::loadMultiple() as $comment_type) { + $return['comment'][$comment_type->id()] = [ + 'form' => [ + 'author' => [ + 'label' => t('Author'), + 'description' => t('Author textfield'), + 'weight' => -2, + ], + ], + ]; + $return['comment'][$comment_type->id()]['display']['links'] = [ + 'label' => t('Links'), + 'description' => t('Comment operation links'), + 'weight' => 100, + 'visible' => TRUE, + ]; + } + return $return; + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'comment' => [ + 'render element' => 'elements', + ], + 'field__comment' => [ + 'base hook' => 'field', + ], + ]; + } + + /** + * Implements hook_ENTITY_TYPE_create() for 'field_config'. + */ + #[Hook('field_config_create')] + public function fieldConfigCreate(FieldConfigInterface $field) { + if ($field->getType() == 'comment' && !$field->isSyncing()) { + // Assign default values for the field. + $default_value = $field->getDefaultValueLiteral(); + $default_value += [[]]; + $default_value[0] += [ + 'status' => CommentItemInterface::OPEN, + 'cid' => 0, + 'last_comment_timestamp' => 0, + 'last_comment_name' => '', + 'last_comment_uid' => 0, + 'comment_count' => 0, + ]; + $field->setDefaultValue($default_value); + } + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_config'. + */ + #[Hook('field_config_update')] + public function fieldConfigUpdate(FieldConfigInterface $field) { + if ($field->getType() == 'comment') { + // Comment field settings also affects the rendering of *comment* entities, + // not only the *commented* entities. + \Drupal::entityTypeManager()->getViewBuilder('comment')->resetCache(); + } + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'field_storage_config'. + */ + #[Hook('field_storage_config_insert')] + public function fieldStorageConfigInsert(FieldStorageConfigInterface $field_storage) { + if ($field_storage->getType() == 'comment') { + // Check that the target entity type uses an integer ID. + $entity_type_id = $field_storage->getTargetEntityTypeId(); + if (!_comment_entity_uses_integer_id($entity_type_id)) { + throw new \UnexpectedValueException('You cannot attach a comment field to an entity with a non-integer ID field'); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'field_config'. + */ + #[Hook('field_config_delete')] + public function fieldConfigDelete(FieldConfigInterface $field) { + if ($field->getType() == 'comment') { + // Delete all comments that used by the entity bundle. + $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); + $entity_query->condition('entity_type', $field->getEntityTypeId()); + $entity_query->condition('field_name', $field->getName()); + $cids = $entity_query->execute(); + $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); + $comments = $comment_storage->loadMultiple($cids); + $comment_storage->delete($comments); + } + } + + /** + * Implements hook_node_links_alter(). + */ + #[Hook('node_links_alter')] + public function nodeLinksAlter(array &$links, NodeInterface $node, array &$context) { + // Comment links are only added to node entity type for backwards + // compatibility. Should you require comment links for other entity types you + // can do so by implementing a new field formatter. + // @todo Make this configurable from the formatter. See + // https://www.drupal.org/node/1901110. + $comment_links = \Drupal::service('comment.link_builder')->buildCommentedEntityLinks($node, $context); + $links += $comment_links; + } + + /** + * Implements hook_entity_view(). + */ + #[Hook('entity_view')] + public function entityView(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { + if ($entity instanceof FieldableEntityInterface && $view_mode == 'rss' && $display->getComponent('links')) { + /** @var \Drupal\comment\CommentManagerInterface $comment_manager */ + $comment_manager = \Drupal::service('comment.manager'); + $fields = $comment_manager->getFields($entity->getEntityTypeId()); + foreach ($fields as $field_name => $detail) { + if ($entity->hasField($field_name) && $entity->get($field_name)->status != CommentItemInterface::HIDDEN) { + // Add a comments RSS element which is a URL to the comments of this + // entity. + $options = ['fragment' => 'comments', 'absolute' => TRUE]; + $entity->rss_elements[] = [ + 'key' => 'comments', + 'value' => $entity->toUrl('canonical', $options)->toString(), + ]; + } + } + } + } + + /** + * Implements hook_ENTITY_TYPE_view_alter() for node entities. + */ + #[Hook('node_view_alter')] + public function nodeViewAlter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) { + if (\Drupal::moduleHandler()->moduleExists('history')) { + $build['#attributes']['data-history-node-id'] = $node->id(); + } + } + + /** + * Implements hook_form_FORM_ID_alter() for field_ui_field_storage_add_form. + */ + #[Hook('form_field_ui_field_storage_add_form_alter')] + public function formFieldUiFieldStorageAddFormAlter(&$form, FormStateInterface $form_state) : void { + $route_match = \Drupal::routeMatch(); + if ($form_state->get('entity_type_id') == 'comment' && $route_match->getParameter('commented_entity_type')) { + $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); + } + } + + /** + * Implements hook_field_info_entity_type_ui_definitions_alter(). + */ + #[Hook('field_info_entity_type_ui_definitions_alter')] + public function fieldInfoEntityTypeUiDefinitionsAlter(array &$ui_definitions, string $entity_type_id) { + if (!_comment_entity_uses_integer_id($entity_type_id)) { + unset($ui_definitions['comment']); + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_field_ui_form_display_overview_form_alter')] + public function formFieldUiFormDisplayOverviewFormAlter(&$form, FormStateInterface $form_state) : void { + $route_match = \Drupal::routeMatch(); + if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) { + $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_field_ui_display_overview_form_alter')] + public function formFieldUiDisplayOverviewFormAlter(&$form, FormStateInterface $form_state) : void { + $route_match = \Drupal::routeMatch(); + if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) { + $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name')); + } + } + + /** + * Implements hook_entity_storage_load(). + * + * @see \Drupal\comment\Plugin\Field\FieldType\CommentItem::propertyDefinitions() + */ + #[Hook('entity_storage_load')] + public function entityStorageLoad($entities, $entity_type) { + // Comments can only be attached to content entities, so skip others. + if (!\Drupal::entityTypeManager()->getDefinition($entity_type)->entityClassImplements(FieldableEntityInterface::class)) { + return; + } + if (!\Drupal::service('comment.manager')->getFields($entity_type)) { + // Do not query database when entity has no comment fields. + return; + } + // Load comment information from the database and update the entity's + // comment statistics properties, which are defined on each CommentItem field. + $result = \Drupal::service('comment.statistics')->read($entities, $entity_type); + foreach ($result as $record) { + // Skip fields that entity does not have. + if (!$entities[$record->entity_id]->hasField($record->field_name)) { + continue; + } + $comment_statistics = $entities[$record->entity_id]->get($record->field_name); + $comment_statistics->cid = $record->cid; + $comment_statistics->last_comment_timestamp = $record->last_comment_timestamp; + $comment_statistics->last_comment_name = $record->last_comment_name; + $comment_statistics->last_comment_uid = $record->last_comment_uid; + $comment_statistics->comment_count = $record->comment_count; + } + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + // Allow bulk updates and inserts to temporarily disable the + // maintenance of the {comment_entity_statistics} table. + if (\Drupal::state()->get('comment.maintain_entity_statistics') && ($fields = \Drupal::service('comment.manager')->getFields($entity->getEntityTypeId()))) { + \Drupal::service('comment.statistics')->create($entity, $fields); + } + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + // Entities can have non-numeric IDs, but {comment} and + // {comment_entity_statistics} tables have integer columns for entity ID, and + // PostgreSQL throws exceptions if you attempt query conditions with + // mismatched types. So, we need to verify that the ID is numeric (even for an + // entity type that has an integer ID, $entity->id() might be a string + // containing a number), and then cast it to an integer when querying. + if ($entity instanceof FieldableEntityInterface && is_numeric($entity->id())) { + $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); + $entity_query->condition('entity_id', (int) $entity->id()); + $entity_query->condition('entity_type', $entity->getEntityTypeId()); + $cids = $entity_query->execute(); + $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); + $comments = $comment_storage->loadMultiple($cids); + $comment_storage->delete($comments); + \Drupal::service('comment.statistics')->delete($entity); + } + } + + /** + * Implements hook_node_update_index(). + */ + #[Hook('node_update_index')] + public function nodeUpdateIndex(EntityInterface $node) { + $index_comments =& drupal_static('comment_node_update_index'); + if ($index_comments === NULL) { + // Do not index in the following three cases: + // 1. 'Authenticated user' can search content but can't access comments. + // 2. 'Anonymous user' can search content but can't access comments. + // 3. Any role can search content but can't access comments and access + // comments is not granted by the 'authenticated user' role. In this case + // all users might have both permissions from various roles but it is also + // possible to set up a user to have only search content and so a user + // edit could change the security situation so it is not safe to index the + // comments. + $index_comments = TRUE; + $roles = \Drupal::entityTypeManager()->getStorage('user_role')->loadMultiple(); + $authenticated_can_access = $roles[RoleInterface::AUTHENTICATED_ID]->hasPermission('access comments'); + foreach ($roles as $rid => $role) { + if ($role->hasPermission('search content') && !$role->hasPermission('access comments')) { + if ($rid == RoleInterface::AUTHENTICATED_ID || $rid == RoleInterface::ANONYMOUS_ID || !$authenticated_can_access) { + $index_comments = FALSE; + break; + } + } + } + } + $build = []; + if ($index_comments) { + foreach (\Drupal::service('comment.manager')->getFields('node') as $field_name => $info) { + // Skip fields that entity does not have. + if (!$node->hasField($field_name)) { + continue; + } + $field_definition = $node->getFieldDefinition($field_name); + $mode = $field_definition->getSetting('default_mode'); + $comments_per_page = $field_definition->getSetting('per_page'); + if ($node->get($field_name)->status) { + $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadThread($node, $field_name, $mode, $comments_per_page); + if ($comments) { + $build[] = \Drupal::entityTypeManager()->getViewBuilder('comment')->viewMultiple($comments); + } + } + } + } + return \Drupal::service('renderer')->renderInIsolation($build); + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + // Store the maximum possible comments per thread (used for node search + // ranking by reply count). + \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1, \Drupal::service('comment.statistics')->getMaximumCount('node'))); + } + + /** + * Implements hook_node_search_result(). + * + * Formats a comment count string and returns it, for display with search + * results. + */ + #[Hook('node_search_result')] + public function nodeSearchResult(EntityInterface $node) { + $comment_fields = \Drupal::service('comment.manager')->getFields('node'); + $comments = 0; + $open = FALSE; + foreach ($comment_fields as $field_name => $info) { + // Skip fields that entity does not have. + if (!$node->hasField($field_name)) { + continue; + } + // Do not make a string if comments are hidden. + $status = $node->get($field_name)->status; + if (\Drupal::currentUser()->hasPermission('access comments') && $status != CommentItemInterface::HIDDEN) { + if ($status == CommentItemInterface::OPEN) { + // At least one comment field is open. + $open = TRUE; + } + $comments += $node->get($field_name)->comment_count; + } + } + // Do not make a string if there are no comment fields, or no comments exist + // or all comment fields are hidden. + if ($comments > 0 || $open) { + return [ + 'comment' => \Drupal::translation()->formatPlural($comments, '1 comment', '@count comments'), + ]; + } + } + + /** + * Implements hook_user_cancel(). + */ + #[Hook('user_cancel')] + public function userCancel($edit, UserInterface $account, $method) { + switch ($method) { + case 'user_cancel_block_unpublish': + $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]); + foreach ($comments as $comment) { + $comment->setUnpublished(); + $comment->save(); + } + break; + + case 'user_cancel_reassign': + /** @var \Drupal\comment\CommentInterface[] $comments */ + $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]); + foreach ($comments as $comment) { + $langcodes = array_keys($comment->getTranslationLanguages()); + // For efficiency manually save the original comment before applying any + // changes. + $comment->original = clone $comment; + foreach ($langcodes as $langcode) { + $comment_translated = $comment->getTranslation($langcode); + $comment_translated->setOwnerId(0); + $comment_translated->setAuthorName(\Drupal::config('user.settings')->get('anonymous')); + } + $comment->save(); + } + break; + } + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for user entities. + */ + #[Hook('user_predelete')] + public function userPredelete($account) { + $entity_query = \Drupal::entityQuery('comment')->accessCheck(FALSE); + $entity_query->condition('uid', $account->id()); + $cids = $entity_query->execute(); + $comment_storage = \Drupal::entityTypeManager()->getStorage('comment'); + $comments = $comment_storage->loadMultiple($cids); + $comment_storage->delete($comments); + } + + /** + * Implements hook_ranking(). + */ + #[Hook('ranking')] + public function ranking() { + return \Drupal::service('comment.statistics')->getRankingInfo(); + } + + /** + * Implements hook_ENTITY_TYPE_presave() for entity_view_display entities. + */ + #[Hook('entity_view_display_presave')] + public function entityViewDisplayPresave(EntityViewDisplayInterface $display) { + // Act only on comment view displays being disabled. + if ($display->isNew() || $display->getTargetEntityTypeId() !== 'comment' || $display->status()) { + return; + } + $storage = \Drupal::entityTypeManager()->getStorage('entity_view_display'); + if (!$storage->loadUnchanged($display->getOriginalId())->status()) { + return; + } + // Disable the comment field formatter when the used view display is disabled. + foreach ($storage->loadMultiple() as $view_display) { + $changed = FALSE; + /** @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface $view_display */ + foreach ($view_display->getComponents() as $field => $component) { + if (isset($component['type']) && $component['type'] === 'comment_default') { + if ($component['settings']['view_mode'] === $display->getMode()) { + $view_display->removeComponent($field); + /** @var \Drupal\Core\Entity\EntityViewModeInterface $mode */ + $mode = EntityViewMode::load($display->getTargetEntityTypeId() . '.' . $display->getMode()); + $arguments = [ + '@id' => $view_display->id(), + '@name' => $field, + '@display' => $mode->label(), + '@mode' => $display->getMode(), + ]; + \Drupal::logger('system')->warning("View display '@id': Comment field formatter '@name' was disabled because it is using the comment view display '@display' (@mode) that was just disabled.", $arguments); + $changed = TRUE; + } + } + } + if ($changed) { + $view_display->save(); + } + } + } + + /** + * Implements hook_field_type_category_info_alter(). + */ + #[Hook('field_type_category_info_alter')] + public function fieldTypeCategoryInfoAlter(&$definitions) { + // The `comment` field type belongs in the `general` category, so the + // libraries need to be attached using an alter hook. + $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'comment/drupal.comment-icon'; + } + +} diff --git a/core/modules/comment/src/Hook/CommentTokensHooks.php b/core/modules/comment/src/Hook/CommentTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f151b047120ceadee618dff6f5cbd38b652e168b --- /dev/null +++ b/core/modules/comment/src/Hook/CommentTokensHooks.php @@ -0,0 +1,259 @@ +<?php + +namespace Drupal\comment\Hook; + +use Drupal\Core\Entity\FieldableEntityInterface; +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\Component\Utility\UrlHelper; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for comment. + */ +class CommentTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $type = [ + 'name' => t('Comments'), + 'description' => t('Tokens for comments posted on the site.'), + 'needs-data' => 'comment', + ]; + $tokens = []; + // Provides an integration for each entity type except comment. + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { + if ($entity_type_id == 'comment' || !$entity_type->entityClassImplements(ContentEntityInterface::class)) { + continue; + } + if (\Drupal::service('comment.manager')->getFields($entity_type_id)) { + // Get the correct token type. + $token_type = $entity_type_id == 'taxonomy_term' ? 'term' : $entity_type_id; + // @todo Make this work per field. See https://www.drupal.org/node/2031903. + $tokens[$token_type]['comment-count'] = [ + 'name' => t("Comment count"), + 'description' => t("The number of comments posted on an entity."), + ]; + $tokens[$token_type]['comment-count-new'] = [ + 'name' => t("New comment count"), + 'description' => t("The number of comments posted on an entity since the reader last viewed it."), + ]; + } + } + // Core comment tokens + $comment['cid'] = ['name' => t("Comment ID"), 'description' => t("The unique ID of the comment.")]; + $comment['uuid'] = ['name' => t('UUID'), 'description' => t("The UUID of the comment.")]; + $comment['hostname'] = [ + 'name' => t("IP Address"), + 'description' => t("The IP address of the computer the comment was posted from."), + ]; + $comment['mail'] = [ + 'name' => t("Email address"), + 'description' => t("The email address left by the comment author."), + ]; + $comment['homepage'] = [ + 'name' => t("Home page"), + 'description' => t("The home page URL left by the comment author."), + ]; + $comment['title'] = ['name' => t("Title"), 'description' => t("The title of the comment.")]; + $comment['body'] = [ + 'name' => t("Content"), + 'description' => t("The formatted content of the comment itself."), + ]; + $comment['langcode'] = [ + 'name' => t('Language code'), + 'description' => t('The language code of the language the comment is written in.'), + ]; + $comment['url'] = ['name' => t("URL"), 'description' => t("The URL of the comment.")]; + $comment['edit-url'] = [ + 'name' => t("Edit URL"), + 'description' => t("The URL of the comment's edit page."), + ]; + // Chained tokens for comments + $comment['created'] = [ + 'name' => t("Date created"), + 'description' => t("The date the comment was posted."), + 'type' => 'date', + ]; + $comment['changed'] = [ + 'name' => t("Date changed"), + 'description' => t("The date the comment was most recently updated."), + 'type' => 'date', + ]; + $comment['parent'] = [ + 'name' => t("Parent"), + 'description' => t("The comment's parent, if comment threading is active."), + 'type' => 'comment', + ]; + $comment['entity'] = [ + 'name' => t("Entity"), + 'description' => t("The entity the comment was posted to."), + 'type' => 'entity', + ]; + $comment['author'] = [ + 'name' => t("Author"), + 'description' => t("The author name of the comment."), + 'type' => 'user', + ]; + return ['types' => ['comment' => $type], 'tokens' => ['comment' => $comment] + $tokens]; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + $url_options = ['absolute' => TRUE]; + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = NULL; + } + $replacements = []; + if ($type == 'comment' && !empty($data['comment'])) { + /** @var \Drupal\comment\CommentInterface $comment */ + $comment = $data['comment']; + foreach ($tokens as $name => $original) { + switch ($name) { + // Simple key values on the comment. + case 'cid': + $replacements[$original] = $comment->id(); + break; + + case 'uuid': + $replacements[$original] = $comment->uuid(); + break; + + // Poster identity information for comments. + case 'hostname': + $replacements[$original] = $comment->getHostname(); + break; + + case 'mail': + $mail = $comment->getAuthorEmail(); + // Add the user cacheability metadata in case the author of the comment + // is not the anonymous user. + if ($comment->getOwnerId()) { + $bubbleable_metadata->addCacheableDependency($comment->getOwner()); + } + $replacements[$original] = $mail; + break; + + case 'homepage': + $replacements[$original] = UrlHelper::stripDangerousProtocols($comment->getHomepage()); + break; + + case 'title': + $replacements[$original] = $comment->getSubject(); + break; + + case 'body': + // "processed" returns a \Drupal\Component\Render\MarkupInterface via + // check_markup(). + $replacements[$original] = $comment->comment_body->processed; + break; + + case 'langcode': + $replacements[$original] = $comment->language()->getId(); + break; + + // Comment related URLs. + case 'url': + $url_options['fragment'] = 'comment-' . $comment->id(); + $replacements[$original] = $comment->toUrl('canonical', $url_options)->toString(); + break; + + case 'edit-url': + $url_options['fragment'] = NULL; + $replacements[$original] = $comment->toUrl('edit-form', $url_options)->toString(); + break; + + case 'author': + $name = $comment->getAuthorName(); + // Add the user cacheability metadata in case the author of the comment + // is not the anonymous user. + if ($comment->getOwnerId()) { + $bubbleable_metadata->addCacheableDependency($comment->getOwner()); + } + $replacements[$original] = $name; + break; + + case 'parent': + if ($comment->hasParentComment()) { + $parent = $comment->getParentComment(); + $bubbleable_metadata->addCacheableDependency($parent); + $replacements[$original] = $parent->getSubject(); + } + break; + + case 'created': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($comment->getCreatedTime(), 'medium', '', NULL, $langcode); + break; + + case 'changed': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($comment->getChangedTime(), 'medium', '', NULL, $langcode); + break; + + case 'entity': + $entity = $comment->getCommentedEntity(); + $bubbleable_metadata->addCacheableDependency($entity); + $title = $entity->label(); + $replacements[$original] = $title; + break; + } + } + // Chained token relationships. + if ($entity_tokens = $token_service->findwithPrefix($tokens, 'entity')) { + $entity = $comment->getCommentedEntity(); + $replacements += $token_service->generate($comment->getCommentedEntityTypeId(), $entity_tokens, [$comment->getCommentedEntityTypeId() => $entity], $options, $bubbleable_metadata); + } + if ($date_tokens = $token_service->findwithPrefix($tokens, 'created')) { + $replacements += $token_service->generate('date', $date_tokens, ['date' => $comment->getCreatedTime()], $options, $bubbleable_metadata); + } + if ($date_tokens = $token_service->findwithPrefix($tokens, 'changed')) { + $replacements += $token_service->generate('date', $date_tokens, ['date' => $comment->getChangedTime()], $options, $bubbleable_metadata); + } + if (($parent_tokens = $token_service->findwithPrefix($tokens, 'parent')) && ($parent = $comment->getParentComment())) { + $replacements += $token_service->generate('comment', $parent_tokens, ['comment' => $parent], $options, $bubbleable_metadata); + } + if (($author_tokens = $token_service->findwithPrefix($tokens, 'author')) && ($account = $comment->getOwner())) { + $replacements += $token_service->generate('user', $author_tokens, ['user' => $account], $options, $bubbleable_metadata); + } + } + elseif (!empty($data[$type]) && $data[$type] instanceof FieldableEntityInterface) { + /** @var \Drupal\Core\Entity\FieldableEntityInterface $entity */ + $entity = $data[$type]; + foreach ($tokens as $name => $original) { + switch ($name) { + case 'comment-count': + $count = 0; + $fields = array_keys(\Drupal::service('comment.manager')->getFields($entity->getEntityTypeId())); + $definitions = array_keys($entity->getFieldDefinitions()); + $valid_fields = array_intersect($fields, $definitions); + foreach ($valid_fields as $field_name) { + $count += $entity->get($field_name)->comment_count; + } + $replacements[$original] = $count; + break; + + case 'comment-count-new': + $replacements[$original] = \Drupal::service('comment.manager')->getCountNewComments($entity); + break; + } + } + } + return $replacements; + } + +} diff --git a/core/modules/comment/src/Hook/CommentViewsHooks.php b/core/modules/comment/src/Hook/CommentViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..03140709c4a3ec789d76fb1da6cb335ae0479deb --- /dev/null +++ b/core/modules/comment/src/Hook/CommentViewsHooks.php @@ -0,0 +1,99 @@ +<?php + +namespace Drupal\comment\Hook; + +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for comment. + */ +class CommentViewsHooks { + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + // New comments are only supported for node table because it requires the + // history table. + $data['node']['new_comments'] = [ + 'title' => t('New comments'), + 'help' => t('The number of new comments on the node.'), + 'field' => [ + 'id' => 'node_new_comments', + 'no group by' => TRUE, + ], + ]; + // Provides an integration for each entity type except comment. + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { + if ($entity_type_id == 'comment' || !$entity_type->entityClassImplements(ContentEntityInterface::class) || !$entity_type->getBaseTable()) { + continue; + } + $fields = \Drupal::service('comment.manager')->getFields($entity_type_id); + $base_table = $entity_type->getDataTable() ?: $entity_type->getBaseTable(); + $args = ['@entity_type' => $entity_type_id]; + if ($fields) { + $data[$base_table]['comments_link'] = [ + 'field' => [ + 'title' => t('Add comment link'), + 'help' => t('Display the standard add comment link used on regular @entity_type, which will only display if the viewing user has access to add a comment.', $args), + 'id' => 'comment_entity_link', + ], + ]; + // Multilingual properties are stored in data table. + if (!($table = $entity_type->getDataTable())) { + $table = $entity_type->getBaseTable(); + } + $data[$table]['uid_touch'] = [ + 'title' => t('User posted or commented'), + 'help' => t('Display nodes only if a user posted the @entity_type or commented on the @entity_type.', $args), + 'argument' => [ + 'field' => 'uid', + 'name table' => 'users_field_data', + 'name field' => 'name', + 'id' => 'argument_comment_user_uid', + 'no group by' => TRUE, + 'entity_type' => $entity_type_id, + 'entity_id' => $entity_type->getKey('id'), + ], + 'filter' => [ + 'field' => 'uid', + 'name table' => 'users_field_data', + 'name field' => 'name', + 'id' => 'comment_user_uid', + 'entity_type' => $entity_type_id, + 'entity_id' => $entity_type->getKey('id'), + ], + ]; + foreach ($fields as $field_name => $field) { + $data[$base_table][$field_name . '_cid'] = [ + 'title' => t('Comments of the @entity_type using field: @field_name', $args + [ + '@field_name' => $field_name, + ]), + 'help' => t('Relate all comments on the @entity_type. This will create 1 duplicate record for every comment. Usually if you need this it is better to create a comment view.', $args), + 'relationship' => [ + 'group' => t('Comment'), + 'label' => t('Comments'), + 'base' => 'comment_field_data', + 'base field' => 'entity_id', + 'relationship field' => $entity_type->getKey('id'), + 'id' => 'standard', + 'extra' => [ + [ + 'field' => 'entity_type', + 'value' => $entity_type_id, + ], + [ + 'field' => 'field_name', + 'value' => $field_name, + ], + ], + ], + ]; + } + } + } + } + +} diff --git a/core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php b/core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php index fbc51eac505138ce55c186a250d932a43c9b1765..d46189b81044f41229cbb94ca95ded2799322527 100644 --- a/core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php +++ b/core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php @@ -103,7 +103,7 @@ public static function create(ContainerInterface $container, array $configuratio * Constructs a new CommentDefaultFormatter. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php b/core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php index 7c587c86807ff8f025ada919e2386df6fa7aa510..f82556252a12b1d7064a136a565d9ba5d7c5ea35 100644 --- a/core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php +++ b/core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php @@ -28,7 +28,7 @@ class UnapprovedComments extends LocalTaskDefault implements ContainerFactoryPlu * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\comment\CommentStorageInterface $comment_storage diff --git a/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php b/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php index 23d025f8f575cda9aefcd25556d91be2f76fed8d..474d1cad41e21d391a0bd4e53f1141a96bd456b6 100644 --- a/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php +++ b/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php @@ -39,7 +39,7 @@ class EntityComment extends EntityContentBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/comment/src/Plugin/views/argument/UserUid.php b/core/modules/comment/src/Plugin/views/argument/UserUid.php index 9c64f511e78d79d452c07d7f2bb8cd80eb1c01a0..792b63cbe5db3e92c6120c0bcc9cf8abb29316ad 100644 --- a/core/modules/comment/src/Plugin/views/argument/UserUid.php +++ b/core/modules/comment/src/Plugin/views/argument/UserUid.php @@ -32,7 +32,7 @@ class UserUid extends ArgumentPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database diff --git a/core/modules/comment/src/Plugin/views/field/NodeNewComments.php b/core/modules/comment/src/Plugin/views/field/NodeNewComments.php index aeabfe3bca2fc5601eca49be825fbd41496bc645..60f0d3808f0557d73931a8c26536751674e7aa77 100644 --- a/core/modules/comment/src/Plugin/views/field/NodeNewComments.php +++ b/core/modules/comment/src/Plugin/views/field/NodeNewComments.php @@ -57,7 +57,7 @@ public function usesGroupBy() { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php index 811258c8a243c9de6716179563289a724a5ae9bc..098b6855c564b54f31db1a2b2ecfcef6e7209861 100644 --- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php +++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php @@ -18,13 +18,13 @@ class StatisticsLastCommentName extends FieldPluginBase { /** * The users table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected ?string $user_table; /** * The user name field. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected string $user_field; /** diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php index 91807deb4b13070d4e073b9025063d2124574e05..a24a654e881bb82f51f32c98e76049ced7135a53 100644 --- a/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php +++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php @@ -16,7 +16,7 @@ class StatisticsLastUpdated extends Date { /** * The node table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected ?string $node_table; public function query() { diff --git a/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php index bbeeb0f5a36b84402670311fa314bccb279e2c66..950bffc78ebc4549a38afb874ee5403095dc9c18 100644 --- a/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php +++ b/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php @@ -16,7 +16,7 @@ class StatisticsLastUpdated extends Date { /** * The node table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected ?string $node_table; public function query() { diff --git a/core/modules/comment/src/Plugin/views/row/Rss.php b/core/modules/comment/src/Plugin/views/row/Rss.php index 72b53cd4ec43a44a964f9fc353d33182ce1b6249..3e687308df0fd247807def66bcde01e34b60e347 100644 --- a/core/modules/comment/src/Plugin/views/row/Rss.php +++ b/core/modules/comment/src/Plugin/views/row/Rss.php @@ -23,19 +23,19 @@ class Rss extends RssPluginBase { /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $base_table = 'comment_field_data'; /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $base_field = 'cid'; /** * The field alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $field_alias; /** diff --git a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php index df66c96ca0618475c8af545c1d97b538ea6d1a0c..e752cb6cc9d377ca54b9c7ba1d1c0688a6efef73 100644 --- a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php +++ b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php @@ -16,13 +16,13 @@ class StatisticsLastCommentName extends SortPluginBase { /** * The users table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected ?string $user_table; /** * The user name field. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected string $user_field; public function query() { diff --git a/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php index 48b8c433583e2af83cd39c75323285a853842d81..f12bf36abe3bc8d81a77557bb309b13bb280c928 100644 --- a/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php +++ b/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php @@ -16,13 +16,13 @@ class StatisticsLastUpdated extends Date { /** * The node table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected ?string $node_table; /** * The field alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected string $field_alias; public function query() { diff --git a/core/modules/comment/tests/modules/comment_base_field_test/src/Entity/CommentTestBaseField.php b/core/modules/comment/tests/modules/comment_base_field_test/src/Entity/CommentTestBaseField.php index 30fe7b00438a5b81a46ef0f98a27c578c982c0a3..de39ded5f7f5c2d144c9d94b459fbd89fbb389a0 100644 --- a/core/modules/comment/tests/modules/comment_base_field_test/src/Entity/CommentTestBaseField.php +++ b/core/modules/comment/tests/modules/comment_base_field_test/src/Entity/CommentTestBaseField.php @@ -4,6 +4,8 @@ namespace Drupal\comment_base_field_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; @@ -11,18 +13,17 @@ /** * Defines a test entity class for comment as a base field. - * - * @ContentEntityType( - * id = "comment_test_base_field", - * label = @Translation("Test comment - base field"), - * base_table = "comment_test_base_field", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type" - * }, - * ) */ +#[ContentEntityType( + id: 'comment_test_base_field', + label: new TranslatableMarkup('Test comment - base field'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + ], + base_table: 'comment_test_base_field' +)] class CommentTestBaseField extends EntityTest { public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { diff --git a/core/modules/comment/tests/modules/comment_display_configurable_test/comment_display_configurable_test.module b/core/modules/comment/tests/modules/comment_display_configurable_test/comment_display_configurable_test.module deleted file mode 100644 index c4399d32b52d4541c275c6c38c152a72a61811f4..0000000000000000000000000000000000000000 --- a/core/modules/comment/tests/modules/comment_display_configurable_test/comment_display_configurable_test.module +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * A module for testing making comment base fields' displays configurable. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function comment_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'comment') { - foreach (['created', 'uid', 'pid', 'subject'] as $field) { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ - $base_field_definitions[$field]->setDisplayConfigurable('view', TRUE); - } - } -} - -/** - * Implements hook_entity_type_build(). - */ -function comment_display_configurable_test_entity_type_build(array &$entity_types) { - // Allow skipping of extra preprocessing for configurable display. - $entity_types['comment']->set('enable_base_field_custom_preprocess_skipping', TRUE); -} diff --git a/core/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php b/core/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a25c75c37e114a83e1133decdfde50843f1771dd --- /dev/null +++ b/core/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\comment_display_configurable_test\Hook; + +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for comment_display_configurable_test. + */ +class CommentDisplayConfigurableTestHooks { + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$base_field_definitions, EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'comment') { + foreach (['created', 'uid', 'pid', 'subject'] as $field) { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ + $base_field_definitions[$field]->setDisplayConfigurable('view', TRUE); + } + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + // Allow skipping of extra preprocessing for configurable display. + $entity_types['comment']->set('enable_base_field_custom_preprocess_skipping', TRUE); + } + +} diff --git a/core/modules/comment/tests/modules/comment_test/comment_test.module b/core/modules/comment/tests/modules/comment_test/comment_test.module deleted file mode 100644 index 3199a0808cd9cd72bc0a1e592fba9ec5a5ce6b2a..0000000000000000000000000000000000000000 --- a/core/modules/comment/tests/modules/comment_test/comment_test.module +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * @file - * Implements comment-related hooks to test API interactions. - */ - -declare(strict_types=1); - -use Drupal\comment\CommentInterface; -use Drupal\Core\Url; - -/** - * Implements hook_entity_type_alter(). - */ -function comment_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - if (\Drupal::languageManager()->isMultilingual()) { - // Enable language handling for comment fields. - $translation = $entity_types['comment']->get('translation'); - $translation['comment_test'] = TRUE; - $entity_types['comment']->set('translation', $translation); - } -} - -/** - * Implements hook_comment_links_alter(). - */ -function comment_test_comment_links_alter(array &$links, CommentInterface &$entity, array &$context) { - // Allow tests to enable or disable this alter hook. - if (!\Drupal::state()->get('comment_test_links_alter_enabled', FALSE)) { - return; - } - - $links['comment_test'] = [ - '#theme' => 'links__comment__comment_test', - '#attributes' => ['class' => ['links', 'inline']], - '#links' => [ - 'comment-report' => [ - 'title' => t('Report'), - 'url' => Url::fromRoute('comment_test.report', ['comment' => $entity->id()], ['query' => ['token' => \Drupal::getContainer()->get('csrf_token')->get("comment/{$entity->id()}/report")]]), - ], - ], - ]; -} diff --git a/core/modules/comment/tests/modules/comment_test/src/Hook/CommentTestHooks.php b/core/modules/comment/tests/modules/comment_test/src/Hook/CommentTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..616df00e848c66894e770793762fbeb01c8293ca --- /dev/null +++ b/core/modules/comment/tests/modules/comment_test/src/Hook/CommentTestHooks.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\comment_test\Hook; + +use Drupal\Core\Url; +use Drupal\comment\CommentInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for comment_test. + */ +class CommentTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + if (\Drupal::languageManager()->isMultilingual()) { + // Enable language handling for comment fields. + $translation = $entity_types['comment']->get('translation'); + $translation['comment_test'] = TRUE; + $entity_types['comment']->set('translation', $translation); + } + } + + /** + * Implements hook_comment_links_alter(). + */ + #[Hook('comment_links_alter')] + public function commentLinksAlter(array &$links, CommentInterface &$entity, array &$context) { + // Allow tests to enable or disable this alter hook. + if (!\Drupal::state()->get('comment_test_links_alter_enabled', FALSE)) { + return; + } + $links['comment_test'] = [ + '#theme' => 'links__comment__comment_test', + '#attributes' => [ + 'class' => [ + 'links', + 'inline', + ], + ], + '#links' => [ + 'comment-report' => [ + 'title' => t('Report'), + 'url' => Url::fromRoute('comment_test.report', [ + 'comment' => $entity->id(), + ], [ + 'query' => [ + 'token' => \Drupal::getContainer()->get('csrf_token')->get("comment/{$entity->id()}/report"), + ], + ]), + ], + ], + ]; + } + +} diff --git a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php index bce7eb07200fe9ec48f8390db204aafc91ee2bf5..b227e6cf22c84f907354a80aad1b2827888c5a41 100644 --- a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php +++ b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php @@ -17,9 +17,7 @@ class CommentFieldsTest extends CommentTestBase { /** - * Install the field UI. - * - * @var array + * {@inheritdoc} */ protected static $modules = ['field_ui']; diff --git a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php index 20d1c06e9fbc448cfda521686da51cb91374db9b..43837759b59813dc3b6f1dc5d73d70a09fa8d98d 100644 --- a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php +++ b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php @@ -11,6 +11,9 @@ */ class CommentLinksAlterTest extends CommentTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['comment_test']; /** diff --git a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php index aab5333504238add11a4cf7e01d3fa33f6021309..0bd4650aeeeac4d2fcf5319ff3d2fba6bd82f5a6 100644 --- a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php +++ b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php @@ -9,6 +9,7 @@ use Drupal\comment\CommentInterface; use Drupal\Core\Url; use Drupal\comment\Entity\Comment; +use Psr\Http\Message\ResponseInterface; /** * Tests the 'new' indicator posted on comments. @@ -40,7 +41,7 @@ class CommentNewIndicatorTest extends CommentTestBase { * @return \Psr\Http\Message\ResponseInterface * The HTTP response. */ - protected function renderNewCommentsNodeLinks(array $node_ids) { + protected function renderNewCommentsNodeLinks(array $node_ids): ResponseInterface { $client = $this->getHttpClient(); $url = Url::fromRoute('comment.new_comments_node_links'); diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php index 67a498278f68cb0157da04a6cfd08f635d8d89af..ebee837f4de548bc494a3ad6b81a47dbe42dfa20 100644 --- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php +++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php @@ -27,6 +27,9 @@ class CommentNonNodeTest extends BrowserTestBase { use FieldUiTestTrait; use CommentTestTrait; + /** + * {@inheritdoc} + */ protected static $modules = [ 'comment', 'user', @@ -230,7 +233,7 @@ public function commentContactInfoAvailable() { * @param bool $approval * Operation is found on approval page. */ - public function performCommentOperation($comment, $operation, $approval = FALSE) { + public function performCommentOperation($comment, $operation, $approval = FALSE): void { $edit = []; $edit['operation'] = $operation; $edit['comments[' . $comment->id() . ']'] = TRUE; diff --git a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php index 9bbc1e8c530aae55314604f5ef5b73cbfe23a615..b582958f35f66aa42895e6346dbf7ead75345487 100644 --- a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php +++ b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php @@ -78,6 +78,7 @@ public function testCommentTokenReplacement(): void { // Generate and test tokens. $tests = []; $tests['[comment:cid]'] = $comment->id(); + $tests['[comment:uuid]'] = $comment->uuid(); $tests['[comment:hostname]'] = $comment->getHostname(); $tests['[comment:author]'] = Html::escape($comment->getAuthorName()); $tests['[comment:mail]'] = $this->adminUser->getEmail(); @@ -91,6 +92,7 @@ public function testCommentTokenReplacement(): void { $tests['[comment:created:since]'] = \Drupal::service('date.formatter')->formatTimeDiffSince($comment->getCreatedTime(), ['langcode' => $language_interface->getId()]); $tests['[comment:changed:since]'] = \Drupal::service('date.formatter')->formatTimeDiffSince($comment->getChangedTimeAcrossTranslations(), ['langcode' => $language_interface->getId()]); $tests['[comment:parent:cid]'] = $comment->hasParentComment() ? $comment->getParentComment()->id() : NULL; + $tests['[comment:parent:uuid]'] = $comment->hasParentComment() ? $comment->getParentComment()->uuid() : NULL; $tests['[comment:parent:title]'] = $parent_comment->getSubject(); $tests['[comment:entity]'] = Html::escape($node->getTitle()); // Test node specific tokens. @@ -102,6 +104,7 @@ public function testCommentTokenReplacement(): void { $base_bubbleable_metadata = BubbleableMetadata::createFromObject($comment); $metadata_tests = []; $metadata_tests['[comment:cid]'] = $base_bubbleable_metadata; + $metadata_tests['[comment:uuid]'] = $base_bubbleable_metadata; $metadata_tests['[comment:hostname]'] = $base_bubbleable_metadata; $bubbleable_metadata = clone $base_bubbleable_metadata; $bubbleable_metadata->addCacheableDependency($this->adminUser); @@ -123,6 +126,7 @@ public function testCommentTokenReplacement(): void { $metadata_tests['[comment:changed:since]'] = $bubbleable_metadata->setCacheMaxAge(0); $bubbleable_metadata = clone $base_bubbleable_metadata; $metadata_tests['[comment:parent:cid]'] = $bubbleable_metadata->addCacheTags(['comment:1']); + $metadata_tests['[comment:parent:uuid]'] = $bubbleable_metadata->addCacheTags(['comment:1']); $metadata_tests['[comment:parent:title]'] = $bubbleable_metadata; $bubbleable_metadata = clone $base_bubbleable_metadata; $metadata_tests['[comment:entity]'] = $bubbleable_metadata->addCacheTags(['node:2']); diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php index 531a54127b52878906512001aaf1edbd68a01eeb..79779f6be3a3c2accf679b1e0c4fe4d19a75efe8 100644 --- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php +++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php @@ -77,7 +77,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function setupBundle() { + public function setupBundle(): void { parent::setupBundle(); $this->drupalCreateContentType(['type' => 'article', 'name' => 'article']); // Add a comment field to the article content type. @@ -139,7 +139,7 @@ protected function getNewEntityValues($langcode) { /** * {@inheritdoc} */ - protected function doTestPublishedStatus() { + protected function doTestPublishedStatus(): void { $entity_type_manager = \Drupal::entityTypeManager(); $storage = $entity_type_manager->getStorage($this->entityTypeId); @@ -163,7 +163,7 @@ protected function doTestPublishedStatus() { /** * {@inheritdoc} */ - protected function doTestAuthoringInfo() { + protected function doTestAuthoringInfo(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); @@ -219,7 +219,7 @@ public function testTranslateLinkCommentAdminPage(): void { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php index a0e4ae3e38a69db394cabd278c5b71c10ee70f8b..177a25335bb20a8d2461498fd8c969c192f3592f 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php @@ -151,7 +151,7 @@ public function testFilters(): void { * @param string $display_id * The display ID. */ - protected function doTestFilters($display_id) { + protected function doTestFilters($display_id): void { $comment = $this->comments[0]; $comment_anonymous = $this->comments[1]; /** @var \Drupal\Core\Session\AccountSwitcherInterface $account_switcher */ diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php index e0b88a22e3f092563070c003de58b8c20410475d..80820e96028dcff1db827fcc0d4a1e5c3ee41350 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\comment\Kernel\Views; use Drupal\comment\Entity\Comment; +use Drupal\comment\Entity\CommentType; use Drupal\Core\Session\AnonymousUserSession; use Drupal\entity_test\Entity\EntityTest; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; @@ -57,6 +58,7 @@ protected function setUp($import_test_views = TRUE): void { $admin_role = Role::create([ 'id' => 'admin', 'permissions' => [ + 'view test entity', 'administer comments', 'access user profiles', 'access comments', @@ -79,6 +81,13 @@ protected function setUp($import_test_views = TRUE): void { $host = EntityTest::create(['name' => $this->randomString()]); $host->save(); + $commentType = CommentType::create([ + 'id' => 'entity_test_comment', + 'label' => t('Entity Test Comment'), + 'target_entity_type_id' => 'entity_test', + ]); + $commentType->save(); + // Create some comments. $comment = Comment::create([ 'subject' => 'My comment title', @@ -87,7 +96,7 @@ protected function setUp($import_test_views = TRUE): void { 'entity_type' => 'entity_test', 'field_name' => 'comment', 'entity_id' => $host->id(), - 'comment_type' => 'entity_test', + 'comment_type' => 'entity_test_comment', 'status' => 1, ]); $comment->save(); @@ -101,7 +110,7 @@ protected function setUp($import_test_views = TRUE): void { 'entity_type' => 'entity_test', 'field_name' => 'comment', 'entity_id' => $host->id(), - 'comment_type' => 'entity_test', + 'comment_type' => 'entity_test_comment', 'created' => 123456, 'status' => 1, ]); diff --git a/core/modules/config/config.module b/core/modules/config/config.module deleted file mode 100644 index 3a0fd7961f2e15b86110fc1909a89933a4912dbf..0000000000000000000000000000000000000000 --- a/core/modules/config/config.module +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -/** - * @file - * Allows site administrators to modify configuration. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\StreamWrapper\StreamWrapperManager; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function config_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.config': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Configuration Manager module provides a user interface for importing and exporting configuration changes between installations of your website in different environments. Configuration is stored in YAML format. For more information, see the <a href=":url">online documentation for the Configuration Manager module</a>.', [':url' => 'https://www.drupal.org/documentation/administer/config']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Exporting the full configuration') . '</dt>'; - $output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', [':url' => Url::fromRoute('config.export_full')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Importing a full configuration') . '</dt>'; - $output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', [':url' => Url::fromRoute('config.import_full')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Synchronizing configuration') . '</dt>'; - $output .= '<dd>' . t('You can review differences between the active configuration and an imported configuration archive on the <a href=":synchronize">Synchronize</a> page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', [':synchronize' => Url::fromRoute('config.sync')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Exporting a single configuration item') . '</dt>'; - $output .= '<dd>' . t('You can export a single configuration item by selecting a <em>Configuration type</em> and <em>Configuration name</em> on the <a href=":single-export">Single export</a> page. The configuration and its corresponding <em>*.yml file name</em> are then displayed on the page for you to copy.', [':single-export' => Url::fromRoute('config.export_single')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Importing a single configuration item') . '</dt>'; - $output .= '<dd>' . t('You can import a single configuration item by pasting it in YAML format into the form on the <a href=":single-import">Single import</a> page.', [':single-import' => Url::fromRoute('config.import_single')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'config.sync': - $output = ''; - $output .= '<p>' . t('Compare the configuration uploaded to your sync directory with the active configuration before completing the import.') . '</p>'; - return $output; - - case 'config.export_full': - $output = ''; - $output .= '<p>' . t('Export and download the full configuration of this site as a gzipped tar file.') . '</p>'; - return $output; - - case 'config.import_full': - $output = ''; - $output .= '<p>' . t('Upload a full site configuration archive to the sync directory. It can then be compared and imported on the Synchronize page.') . '</p>'; - return $output; - - case 'config.export_single': - $output = ''; - $output .= '<p>' . t('Choose a configuration item to display its YAML structure.') . '</p>'; - return $output; - - case 'config.import_single': - $output = ''; - $output .= '<p>' . t('Import a single configuration item by pasting its YAML structure into the text field.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_file_download(). - */ -function config_file_download($uri) { - $scheme = StreamWrapperManager::getScheme($uri); - $target = StreamWrapperManager::getTarget($uri); - if ($scheme == 'temporary' && $target == 'config.tar.gz') { - if (\Drupal::currentUser()->hasPermission('export configuration')) { - $request = \Drupal::request(); - $date = DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME')); - $date_string = $date->format('Y-m-d-H-i'); - $hostname = str_replace('.', '-', $request->getHttpHost()); - $filename = 'config-' . $hostname . '-' . $date_string . '.tar.gz'; - $disposition = 'attachment; filename="' . $filename . '"'; - return [ - 'Content-disposition' => $disposition, - ]; - } - return -1; - } -} diff --git a/core/modules/config/src/Hook/ConfigHooks.php b/core/modules/config/src/Hook/ConfigHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..909ea5deff4ad72cacd9aee2dd16213dc9a82abc --- /dev/null +++ b/core/modules/config/src/Hook/ConfigHooks.php @@ -0,0 +1,92 @@ +<?php + +namespace Drupal\config\Hook; + +use Drupal\Core\StreamWrapper\StreamWrapperManager; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config. + */ +class ConfigHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.config': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Configuration Manager module provides a user interface for importing and exporting configuration changes between installations of your website in different environments. Configuration is stored in YAML format. For more information, see the <a href=":url">online documentation for the Configuration Manager module</a>.', [':url' => 'https://www.drupal.org/documentation/administer/config']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Exporting the full configuration') . '</dt>'; + $output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', [':url' => Url::fromRoute('config.export_full')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Importing a full configuration') . '</dt>'; + $output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', [':url' => Url::fromRoute('config.import_full')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Synchronizing configuration') . '</dt>'; + $output .= '<dd>' . t('You can review differences between the active configuration and an imported configuration archive on the <a href=":synchronize">Synchronize</a> page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', [':synchronize' => Url::fromRoute('config.sync')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Exporting a single configuration item') . '</dt>'; + $output .= '<dd>' . t('You can export a single configuration item by selecting a <em>Configuration type</em> and <em>Configuration name</em> on the <a href=":single-export">Single export</a> page. The configuration and its corresponding <em>*.yml file name</em> are then displayed on the page for you to copy.', [ + ':single-export' => Url::fromRoute('config.export_single')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Importing a single configuration item') . '</dt>'; + $output .= '<dd>' . t('You can import a single configuration item by pasting it in YAML format into the form on the <a href=":single-import">Single import</a> page.', [ + ':single-import' => Url::fromRoute('config.import_single')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'config.sync': + $output = ''; + $output .= '<p>' . t('Compare the configuration uploaded to your sync directory with the active configuration before completing the import.') . '</p>'; + return $output; + + case 'config.export_full': + $output = ''; + $output .= '<p>' . t('Export and download the full configuration of this site as a gzipped tar file.') . '</p>'; + return $output; + + case 'config.import_full': + $output = ''; + $output .= '<p>' . t('Upload a full site configuration archive to the sync directory. It can then be compared and imported on the Synchronize page.') . '</p>'; + return $output; + + case 'config.export_single': + $output = ''; + $output .= '<p>' . t('Choose a configuration item to display its YAML structure.') . '</p>'; + return $output; + + case 'config.import_single': + $output = ''; + $output .= '<p>' . t('Import a single configuration item by pasting its YAML structure into the text field.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_file_download(). + */ + #[Hook('file_download')] + public function fileDownload($uri) { + $scheme = StreamWrapperManager::getScheme($uri); + $target = StreamWrapperManager::getTarget($uri); + if ($scheme == 'temporary' && $target == 'config.tar.gz') { + if (\Drupal::currentUser()->hasPermission('export configuration')) { + $request = \Drupal::request(); + $date = \DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME')); + $date_string = $date->format('Y-m-d-H-i'); + $hostname = str_replace('.', '-', $request->getHttpHost()); + $filename = 'config-' . $hostname . '-' . $date_string . '.tar.gz'; + $disposition = 'attachment; filename="' . $filename . '"'; + return ['Content-disposition' => $disposition]; + } + return -1; + } + } + +} diff --git a/core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module b/core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module deleted file mode 100644 index 13f65cd36452512e12f5a77dfddffdb3ef818a41..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/** - * @file - * Provides configuration entity static cache test helpers. - */ - -declare(strict_types=1); - -use Drupal\Component\Utility\Random; - -/** - * Implements hook_ENTITY_TYPE_load() for 'static_cache_test_config_test'. - */ -function config_entity_static_cache_test_config_test_load($entities) { - static $random; - if (!$random) { - $random = new Random(); - } - foreach ($entities as $entity) { - // Add a random stamp for every load(), so that during tests, we can tell - // if an entity was retrieved from cache (unchanged stamp) or reloaded. - $entity->_loadStamp = $random->string(8, TRUE); - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function config_entity_static_cache_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['config_test']->set('static_cache', TRUE); -} diff --git a/core/modules/config/tests/config_entity_static_cache_test/src/Hook/ConfigEntityStaticCacheTestHooks.php b/core/modules/config/tests/config_entity_static_cache_test/src/Hook/ConfigEntityStaticCacheTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..92e617c3b2f1d62b158695681da9fe45186cd41a --- /dev/null +++ b/core/modules/config/tests/config_entity_static_cache_test/src/Hook/ConfigEntityStaticCacheTestHooks.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_entity_static_cache_test\Hook; + +use Drupal\Component\Utility\Random; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_entity_static_cache_test. + */ +class ConfigEntityStaticCacheTestHooks { + + /** + * Implements hook_ENTITY_TYPE_load() for 'static_cache_test_config_test'. + */ + #[Hook('config_test_load')] + public function configTestLoad($entities) { + static $random; + if (!$random) { + $random = new Random(); + } + foreach ($entities as $entity) { + // Add a random stamp for every load(), so that during tests, we can tell + // if an entity was retrieved from cache (unchanged stamp) or reloaded. + $entity->_loadStamp = $random->string(8, TRUE); + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['config_test']->set('static_cache', TRUE); + } + +} diff --git a/core/modules/config/tests/config_import_test/config_import_test.module b/core/modules/config/tests/config_import_test/config_import_test.module index 766e3c417c2ba132186823e3f8009b0e44726598..efb5f189ada272da5cbcacad38ce2e59a05ac569 100644 --- a/core/modules/config/tests/config_import_test/config_import_test.module +++ b/core/modules/config/tests/config_import_test/config_import_test.module @@ -9,13 +9,6 @@ use Drupal\Core\Config\ConfigImporter; -/** - * Implements hook_config_import_steps_alter(). - */ -function config_import_test_config_import_steps_alter(&$sync_steps) { - $sync_steps[] = '_config_import_test_config_import_steps_alter'; -} - /** * Implements configuration synchronization step added by an alter for testing. * diff --git a/core/modules/config/tests/config_import_test/src/Hook/ConfigImportTestHooks.php b/core/modules/config/tests/config_import_test/src/Hook/ConfigImportTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4a1c7d2c65737d030aa213a34934137eaf3645e7 --- /dev/null +++ b/core/modules/config/tests/config_import_test/src/Hook/ConfigImportTestHooks.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_import_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_import_test. + */ +class ConfigImportTestHooks { + + /** + * Implements hook_config_import_steps_alter(). + */ + #[Hook('config_import_steps_alter')] + public function configImportStepsAlter(&$sync_steps) { + $sync_steps[] = '_config_import_test_config_import_steps_alter'; + } + +} diff --git a/core/modules/config/tests/config_install_dependency_test/config_install_dependency_test.module b/core/modules/config/tests/config_install_dependency_test/config_install_dependency_test.module deleted file mode 100644 index 47736c39005090f9858b0d964194067b9810c8f7..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_install_dependency_test/config_install_dependency_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provides hook implementations for testing purposes. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; - -/** - * Implements hook_ENTITY_TYPE_create(). - */ -function config_install_dependency_test_config_test_create(EntityInterface $entity) { - // Add an enforced dependency on this module so that we can test if this is - // possible during module installation. - $entity->setEnforcedDependencies(['module' => ['config_install_dependency_test']]); -} diff --git a/core/modules/config/tests/config_install_dependency_test/src/Hook/ConfigInstallDependencyTestHooks.php b/core/modules/config/tests/config_install_dependency_test/src/Hook/ConfigInstallDependencyTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..72c99b89915913e8a507c6de086e083ca9c57eab --- /dev/null +++ b/core/modules/config/tests/config_install_dependency_test/src/Hook/ConfigInstallDependencyTestHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_install_dependency_test\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_install_dependency_test. + */ +class ConfigInstallDependencyTestHooks { + + /** + * Implements hook_ENTITY_TYPE_create(). + */ + #[Hook('config_test_create')] + public function configTestCreate(EntityInterface $entity) { + // Add an enforced dependency on this module so that we can test if this is + // possible during module installation. + $entity->setEnforcedDependencies(['module' => ['config_install_dependency_test']]); + } + +} diff --git a/core/modules/config/tests/config_override_message_test/config_override_message_test.module b/core/modules/config/tests/config_override_message_test/config_override_message_test.module deleted file mode 100644 index 3ccbf84fad9bd04569d3d7205c85ae9e3cff2cea..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_override_message_test/config_override_message_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Tests configuration override message functionality. - */ - -declare(strict_types=1); - -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function config_override_message_test_form_system_site_information_settings_alter(array &$form, FormStateInterface $form_state, string $form_id): void { - // Set a weight to a negative amount to ensure the config overrides message - // is above it. - $form['site_information']['#weight'] = -5; -} diff --git a/core/modules/config/tests/config_override_message_test/src/Hook/ConfigOverrideMessageTestHooks.php b/core/modules/config/tests/config_override_message_test/src/Hook/ConfigOverrideMessageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..34d8c1a44a7b03f8feec1ee5a92db96cf554133e --- /dev/null +++ b/core/modules/config/tests/config_override_message_test/src/Hook/ConfigOverrideMessageTestHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_override_message_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_override_message_test. + */ +class ConfigOverrideMessageTestHooks { + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_system_site_information_settings_alter')] + public function formSystemSiteInformationSettingsAlter(array &$form, FormStateInterface $form_state, string $form_id) : void { + // Set a weight to a negative amount to ensure the config overrides message + // is above it. + $form['site_information']['#weight'] = -5; + } + +} diff --git a/core/modules/config/tests/config_schema_test/config_schema_test.module b/core/modules/config/tests/config_schema_test/config_schema_test.module deleted file mode 100644 index 8ef2d716ce67f4b1e192620cccc4dd05470ad5fe..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_schema_test/config_schema_test.module +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @file - * Tests configuration schema functionality. - */ - -declare(strict_types=1); - -/** - * Implements hook_config_schema_info_alter(). - */ -function config_schema_test_config_schema_info_alter(&$definitions) { - if (\Drupal::state()->get('config_schema_test_exception_add')) { - $definitions['config_schema_test.hook_added_definition'] = $definitions['config_schema_test.hook']; - } - if (\Drupal::state()->get('config_schema_test_exception_remove')) { - unset($definitions['config_schema_test.hook']); - } - - // Since code can not be unloaded only alter the definition if it exists. - if (isset($definitions['config_schema_test.hook'])) { - $definitions['config_schema_test.hook']['additional_metadata'] = 'new schema info'; - } - - // @see \Drupal\KernelTests\Core\TypedData\ValidKeysConstraintValidatorTest - if (\Drupal::state()->get('config_schema_test_block_fully_validatable')) { - $definitions['block.block.*']['constraints']['FullyValidatable'] = NULL; - } - else { - unset($definitions['block.block.*']['constraints']); - } - - // @see \Drupal\Tests\node\Kernel\NodeTypeValidationTest::testThirdPartySettingsMenuUi() - if (\Drupal::state()->get('config_schema_test_menu_ui_third_party_settings_fully_validatable')) { - $definitions['node.type.*.third_party.menu_ui']['constraints']['FullyValidatable'] = NULL; - } - else { - unset($definitions['node.type.*.third_party.menu_ui']['constraints']); - } -} diff --git a/core/modules/config/tests/config_schema_test/src/Hook/ConfigSchemaTestHooks.php b/core/modules/config/tests/config_schema_test/src/Hook/ConfigSchemaTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7901b84fa2d3279c1e65a54e5040010087d6e44a --- /dev/null +++ b/core/modules/config/tests/config_schema_test/src/Hook/ConfigSchemaTestHooks.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_schema_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_schema_test. + */ +class ConfigSchemaTestHooks { + + /** + * Implements hook_config_schema_info_alter(). + */ + #[Hook('config_schema_info_alter')] + public function configSchemaInfoAlter(&$definitions) { + if (\Drupal::state()->get('config_schema_test_exception_add')) { + $definitions['config_schema_test.hook_added_definition'] = $definitions['config_schema_test.hook']; + } + if (\Drupal::state()->get('config_schema_test_exception_remove')) { + unset($definitions['config_schema_test.hook']); + } + // Since code can not be unloaded only alter the definition if it exists. + if (isset($definitions['config_schema_test.hook'])) { + $definitions['config_schema_test.hook']['additional_metadata'] = 'new schema info'; + } + // @see \Drupal\KernelTests\Core\TypedData\ValidKeysConstraintValidatorTest + if (\Drupal::state()->get('config_schema_test_block_fully_validatable')) { + $definitions['block.block.*']['constraints']['FullyValidatable'] = NULL; + } + else { + unset($definitions['block.block.*']['constraints']); + } + // @see \Drupal\Tests\node\Kernel\NodeTypeValidationTest::testThirdPartySettingsMenuUi() + if (\Drupal::state()->get('config_schema_test_menu_ui_third_party_settings_fully_validatable')) { + $definitions['node.type.*.third_party.menu_ui']['constraints']['FullyValidatable'] = NULL; + } + else { + unset($definitions['node.type.*.third_party.menu_ui']['constraints']); + } + } + +} diff --git a/core/modules/config/tests/config_test/config_test.hooks.inc b/core/modules/config/tests/config_test/config_test.hooks.inc deleted file mode 100644 index 7712cafdb0b166ede10c7f107256085e8b396286..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_test/config_test.hooks.inc +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/** - * @file - * Fake third-party hook implementations for ConfigTest entities. - * - * Testing the module/hook system is not the purpose of this test helper module. - * Therefore, this file implements hooks on behalf of config_test module for - * config_test entity hooks themselves. - */ - -declare(strict_types=1); - -use Drupal\config_test\Entity\ConfigTest; - -/** - * Implements hook_config_test_load(). - */ -function config_test_config_test_load() { - $GLOBALS['hook_config_test']['load'] = __FUNCTION__; -} - -/** - * Implements hook_ENTITY_TYPE_create() for 'config_test'. - */ -function config_test_config_test_create(ConfigTest $config_test) { - if (\Drupal::state()->get('config_test.prepopulate')) { - $config_test->set('foo', 'baz'); - } - _config_test_update_is_syncing_store('create', $config_test); -} - -/** - * Implements hook_config_test_presave(). - */ -function config_test_config_test_presave(ConfigTest $config_test) { - $GLOBALS['hook_config_test']['presave'] = __FUNCTION__; - _config_test_update_is_syncing_store('presave', $config_test); -} - -/** - * Implements hook_config_test_insert(). - */ -function config_test_config_test_insert(ConfigTest $config_test) { - $GLOBALS['hook_config_test']['insert'] = __FUNCTION__; - _config_test_update_is_syncing_store('insert', $config_test); -} - -/** - * Implements hook_config_test_update(). - */ -function config_test_config_test_update(ConfigTest $config_test) { - $GLOBALS['hook_config_test']['update'] = __FUNCTION__; - _config_test_update_is_syncing_store('update', $config_test); -} - -/** - * Implements hook_config_test_predelete(). - */ -function config_test_config_test_predelete(ConfigTest $config_test) { - $GLOBALS['hook_config_test']['predelete'] = __FUNCTION__; - _config_test_update_is_syncing_store('predelete', $config_test); -} - -/** - * Implements hook_config_test_delete(). - */ -function config_test_config_test_delete(ConfigTest $config_test) { - $GLOBALS['hook_config_test']['delete'] = __FUNCTION__; - _config_test_update_is_syncing_store('delete', $config_test); -} - -/** - * Helper function for testing hooks during configuration sync. - * - * @param string $hook - * The fired hook. - * @param \Drupal\config_test\Entity\ConfigTest $config_test - * The ConfigTest entity. - */ -function _config_test_update_is_syncing_store($hook, ConfigTest $config_test) { - $current_value = \Drupal::state()->get('config_test.store_isSyncing', FALSE); - if ($current_value !== FALSE) { - $current_value['global_state::' . $hook] = \Drupal::isConfigSyncing(); - $current_value['entity_state::' . $hook] = $config_test->isSyncing(); - \Drupal::state()->set('config_test.store_isSyncing', $current_value); - } -} diff --git a/core/modules/config/tests/config_test/config_test.module b/core/modules/config/tests/config_test/config_test.module deleted file mode 100644 index a9e4e09d932387886da6cbd064a9283de4bf66f2..0000000000000000000000000000000000000000 --- a/core/modules/config/tests/config_test/config_test.module +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @file - * Provides Config module hook implementations for testing purposes. - */ - -declare(strict_types=1); - -require_once dirname(__FILE__) . '/config_test.hooks.inc'; - -use Drupal\Core\Entity\Query\QueryInterface; - -/** - * Implements hook_cache_flush(). - */ -function config_test_cache_flush() { - // Set a global value we can check in test code. - $GLOBALS['hook_cache_flush'] = __FUNCTION__; -} - -/** - * Implements hook_entity_type_alter(). - */ -function config_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - // The 'translatable' entity key is not supposed to change over time. In this - // case we can safely do it because we set it once and we do not change it for - // all the duration of the test session. - $entity_types['config_test']->set('translatable', \Drupal::service('state')->get('config_test.translatable')); - - // Create a clone of config_test that does not have a status. - $entity_types['config_test_no_status'] = clone $entity_types['config_test']; - $config_test_no_status = &$entity_types['config_test_no_status']; - $config_test_no_status->setLinkTemplate('edit-form', '/admin/structure/config_test/manage/{config_test_no_status}'); - $config_test_no_status->setLinkTemplate('delete-form', '/admin/structure/config_test/manage/{config_test_no_status}/delete'); - - $keys = $config_test_no_status->getKeys(); - unset($keys['status']); - $config_test_no_status->set('id', 'config_test_no_status'); - $config_test_no_status->set('entity_keys', $keys); - $config_test_no_status->set('config_prefix', 'no_status'); - $config_test_no_status->set('mergedConfigExport', ['id' => 'id', 'label' => 'label', 'uuid' => 'uuid', 'langcode' => 'langcode']); - if (\Drupal::service('state')->get('config_test.lookup_keys', FALSE)) { - $entity_types['config_test']->set('lookup_keys', ['uuid', 'style']); - } - - if (\Drupal::service('state')->get('config_test.class_override', FALSE)) { - $entity_types['config_test']->setClass(\Drupal::service('state')->get('config_test.class_override')); - } -} - -/** - * Implements hook_entity_query_tag__ENTITY_TYPE__TAG_alter(). - * - * Entity type is 'config_query_test' and tag is - * 'config_entity_query_alter_hook_test'. - * - * @see Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::testAlterHook - */ -function config_test_entity_query_tag__config_query_test__config_entity_query_alter_hook_test_alter(QueryInterface $query): void { - $query->condition('id', '7', '<>'); -} diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php index 44afcb4ea3aa34f9bbbe7682b6974f1bb4048be2..0e36c3d58f93e531bbac867439354584be3597ed 100644 --- a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php +++ b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php @@ -4,34 +4,40 @@ namespace Drupal\config_test\Entity; +use Drupal\config_test\ConfigTestForm; +use Drupal\config_test\ConfigTestStorage; +use Drupal\Core\Config\Entity\ConfigEntityListBuilder; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; + /** * Defines the ConfigQueryTest configuration entity used by the query test. * - * @ConfigEntityType( - * id = "config_query_test", - * label = @Translation("Test configuration for query"), - * handlers = { - * "storage" = "Drupal\config_test\ConfigTestStorage", - * "list_builder" = "Drupal\Core\Config\Entity\ConfigEntityListBuilder", - * "form" = { - * "default" = "Drupal\config_test\ConfigTestForm" - * } - * }, - * config_prefix = "query", - * config_export = { - * "id", - * "label", - * "array", - * "number", - * }, - * entity_keys = { - * "id" = "id", - * "label" = "label" - * } - * ) * * @see \Drupal\system\Tests\Entity\ConfigEntityQueryTest */ +#[ConfigEntityType( + id: 'config_query_test', + label: new TranslatableMarkup('Test configuration for query'), + config_prefix: 'query', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'storage' => ConfigTestStorage::class, + 'list_builder' => ConfigEntityListBuilder::class, + 'form' => [ + 'default' => ConfigTestForm::class, + ], + ], + config_export: [ + 'id', + 'label', + 'array', + 'number', + ], +)] class ConfigQueryTest extends ConfigTest { /** diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php index 80022dc60e3fb77236227bb39c0897db88ab8c8a..412aff95ae1d038b43cd27ce0470c5bf192c2e65 100644 --- a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php @@ -4,53 +4,57 @@ namespace Drupal\config_test\Entity; +use Drupal\config_test\ConfigTestAccessControlHandler; +use Drupal\config_test\ConfigTestForm; +use Drupal\config_test\ConfigTestInterface; +use Drupal\config_test\ConfigTestListBuilder; +use Drupal\config_test\ConfigTestStorage; use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBase; -use Drupal\config_test\ConfigTestInterface; use Drupal\Core\Config\Entity\ConfigEntityInterface; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityDeleteForm; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; /** * Defines the ConfigTest configuration entity. - * - * @ConfigEntityType( - * id = "config_test", - * label = @Translation("Test configuration"), - * handlers = { - * "storage" = "Drupal\config_test\ConfigTestStorage", - * "list_builder" = "Drupal\config_test\ConfigTestListBuilder", - * "form" = { - * "default" = "Drupal\config_test\ConfigTestForm", - * "delete" = "Drupal\Core\Entity\EntityDeleteForm" - * }, - * "access" = "Drupal\config_test\ConfigTestAccessControlHandler" - * }, - * config_prefix = "dynamic", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "status" = "status" - * }, - * config_export = { - * "id", - * "label", - * "weight", - * "style", - * "size", - * "size_value", - * "protected_property", - * "array_property", - * }, - * links = { - * "edit-form" = "/admin/structure/config_test/manage/{config_test}", - * "delete-form" = "/admin/structure/config_test/manage/{config_test}/delete", - * "enable" = "/admin/structure/config_test/manage/{config_test}/enable", - * "disable" = "/admin/structure/config_test/manage/{config_test}/disable", - * "collection" = "/admin/structure/config_test", - * } - * ) */ +#[ConfigEntityType( + id: 'config_test', + label: new TranslatableMarkup('Test configuration'), + config_prefix: 'dynamic', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'status' => 'status', + ], + handlers: [ + 'storage' => ConfigTestStorage::class, + 'list_builder' => ConfigTestListBuilder::class, + 'form' => [ + 'default' => ConfigTestForm::class, + 'delete' => EntityDeleteForm::class, + ], + 'access' => ConfigTestAccessControlHandler::class, + ], + links: [ + 'edit-form' => '/admin/structure/config_test/manage/{config_test}', + 'delete-form' => '/admin/structure/config_test/manage/{config_test}/delete', + 'enable' => '/admin/structure/config_test/manage/{config_test}/enable', + 'disable' => '/admin/structure/config_test/manage/{config_test}/disable', + 'collection' => '/admin/structure/config_test', + ], + config_export: [ + 'id', + 'label', + 'weight', + 'style', + 'size', + 'size_value', + 'protected_property', + 'array_property', + ])] class ConfigTest extends ConfigEntityBase implements ConfigTestInterface { /** diff --git a/core/modules/config/tests/config_test/src/Hook/ConfigTestHooks.php b/core/modules/config/tests/config_test/src/Hook/ConfigTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7e570ea39ceafeeba4692f7d4000ec718d824bb3 --- /dev/null +++ b/core/modules/config/tests/config_test/src/Hook/ConfigTestHooks.php @@ -0,0 +1,66 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_test\Hook; + +use Drupal\Core\Entity\Query\QueryInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_test. + */ +class ConfigTestHooks { + + /** + * Implements hook_cache_flush(). + */ + #[Hook('cache_flush')] + public function cacheFlush() { + // Set a global value we can check in test code. + $GLOBALS['hook_cache_flush'] = 'config_test_cache_flush'; + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + // The 'translatable' entity key is not supposed to change over time. In this + // case we can safely do it because we set it once and we do not change it for + // all the duration of the test session. + $entity_types['config_test']->set('translatable', \Drupal::service('state')->get('config_test.translatable')); + // Create a clone of config_test that does not have a status. + $entity_types['config_test_no_status'] = clone $entity_types['config_test']; + $config_test_no_status =& $entity_types['config_test_no_status']; + $config_test_no_status->setLinkTemplate('edit-form', '/admin/structure/config_test/manage/{config_test_no_status}'); + $config_test_no_status->setLinkTemplate('delete-form', '/admin/structure/config_test/manage/{config_test_no_status}/delete'); + $keys = $config_test_no_status->getKeys(); + unset($keys['status']); + $config_test_no_status->set('id', 'config_test_no_status'); + $config_test_no_status->set('entity_keys', $keys); + $config_test_no_status->set('config_prefix', 'no_status'); + $config_test_no_status->set('mergedConfigExport', ['id' => 'id', 'label' => 'label', 'uuid' => 'uuid', 'langcode' => 'langcode']); + if (\Drupal::service('state')->get('config_test.lookup_keys', FALSE)) { + $entity_types['config_test']->set('lookup_keys', ['uuid', 'style']); + } + if (\Drupal::service('state')->get('config_test.class_override', FALSE)) { + $entity_types['config_test']->setClass(\Drupal::service('state')->get('config_test.class_override')); + } + } + + /** + * Implements hook_entity_query_tag__ENTITY_TYPE__TAG_alter(). + * + * Entity type is 'config_query_test' and tag is + * 'config_entity_query_alter_hook_test'. + * + * @see Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::testAlterHook + */ + #[Hook('entity_query_tag__config_query_test__config_entity_query_alter_hook_test_alter')] + public function entityQueryTagConfigQueryTestConfigEntityQueryAlterHookTestAlter(QueryInterface $query) : void { + $query->condition('id', '7', '<>'); + } + +} diff --git a/core/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php b/core/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7656407408659b9bc9b1093e081ec4c86466abc9 --- /dev/null +++ b/core/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php @@ -0,0 +1,96 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_test\Hook; + +use Drupal\config_test\Entity\ConfigTest; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_test. + */ +class ConfigTestHooksHooks { + + /** + * Implements hook_config_test_load(). + */ + #[Hook('config_test_load')] + public function configTestLoad() { + $GLOBALS['hook_config_test']['load'] = 'config_test_config_test_load'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for 'config_test'. + */ + #[Hook('config_test_create')] + public function configTestCreate(ConfigTest $config_test) { + if (\Drupal::state()->get('config_test.prepopulate')) { + $config_test->set('foo', 'baz'); + } + $this->updateIsSyncingStore('create', $config_test); + } + + /** + * Implements hook_config_test_presave(). + */ + #[Hook('config_test_presave')] + public function configTestPresave(ConfigTest $config_test) { + $GLOBALS['hook_config_test']['presave'] = 'config_test_config_test_presave'; + $this->updateIsSyncingStore('presave', $config_test); + } + + /** + * Implements hook_config_test_insert(). + */ + #[Hook('config_test_insert')] + public function configTestInsert(ConfigTest $config_test) { + $GLOBALS['hook_config_test']['insert'] = 'config_test_config_test_insert'; + $this->updateIsSyncingStore('insert', $config_test); + } + + /** + * Implements hook_config_test_update(). + */ + #[Hook('config_test_update')] + public function configTestUpdate(ConfigTest $config_test) { + $GLOBALS['hook_config_test']['update'] = 'config_test_config_test_update'; + $this->updateIsSyncingStore('update', $config_test); + } + + /** + * Implements hook_config_test_predelete(). + */ + #[Hook('config_test_predelete')] + public function configTestPredelete(ConfigTest $config_test) { + $GLOBALS['hook_config_test']['predelete'] = 'config_test_config_test_predelete'; + $this->updateIsSyncingStore('predelete', $config_test); + } + + /** + * Implements hook_config_test_delete(). + */ + #[Hook('config_test_delete')] + public function configTestDelete(ConfigTest $config_test) { + $GLOBALS['hook_config_test']['delete'] = 'config_test_config_test_delete'; + $this->updateIsSyncingStore('delete', $config_test); + } + + /** + * Helper function for testing hooks during configuration sync. + * + * @param string $hook + * The fired hook. + * @param \Drupal\config_test\Entity\ConfigTest $config_test + * The ConfigTest entity. + */ + protected function updateIsSyncingStore($hook, ConfigTest $config_test) { + $current_value = \Drupal::state()->get('config_test.store_isSyncing', FALSE); + if ($current_value !== FALSE) { + $current_value['global_state::' . $hook] = \Drupal::isConfigSyncing(); + $current_value['entity_state::' . $hook] = $config_test->isSyncing(); + \Drupal::state()->set('config_test.store_isSyncing', $current_value); + } + } + +} diff --git a/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php index 4a559c293108a46f767a8dbda5cda85685f8e1e1..b5486e86e557fb810f73f10b968232c2392bc160 100644 --- a/core/modules/config/tests/src/Functional/ConfigImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php @@ -394,7 +394,7 @@ public function testConfigUninstallConfigException(): void { $this->assertSession()->pageTextContains('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.'); } - public function prepareSiteNameUpdate($new_site_name) { + public function prepareSiteNameUpdate($new_site_name): void { $sync = $this->container->get('config.storage.sync'); // Create updated configuration object. $config_data = $this->config('system.site')->get(); @@ -515,9 +515,9 @@ public function testExtensionValidation(): void { unset($core['module']['text']); $module_data = $this->container->get('extension.list.module')->getList(); $this->assertTrue(isset($module_data['node']->requires['text']), 'The Node module depends on the Text module.'); - unset($core['theme']['test_basetheme']); + unset($core['theme']['test_base_theme']); $theme_data = \Drupal::service('extension.list.theme')->reset()->getList(); - $this->assertTrue(isset($theme_data['test_subtheme']->requires['test_basetheme']), 'The Test Subtheme theme depends on the Test Basetheme theme.'); + $this->assertTrue(isset($theme_data['test_subtheme']->requires['test_base_theme']), 'The Test Subtheme theme depends on the Test Base_theme theme.'); // This module does not exist. $core['module']['does_not_exist'] = 0; // This theme does not exist. diff --git a/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php b/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php index df839d0ff1d97e539f6505348727620eee0118c0..9cf4407470a750c37dc519adfc7557100f22c225 100644 --- a/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php +++ b/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php @@ -40,7 +40,7 @@ class ConfigInstallProfileUnmetDependenciesTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->copyTestingOverrides(); } @@ -48,7 +48,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - public function setUpSettings() { + public function setUpSettings(): void { // During set up an UnmetDependenciesException should be thrown, which will // be re-thrown by TestHttpClientMiddleware as a standard Exception. try { @@ -62,7 +62,7 @@ public function setUpSettings() { /** * {@inheritdoc} */ - public function setUpSite() { + public function setUpSite(): void { // This step can no longer be reached. } @@ -72,7 +72,7 @@ public function setUpSite() { * So we can change the configuration to include a dependency that can not be * met. File API functions are not available yet. */ - protected function copyTestingOverrides() { + protected function copyTestingOverrides(): void { $dest = $this->siteDirectory . '/profiles/testing_config_overrides'; mkdir($dest, 0777, TRUE); $source = DRUPAL_ROOT . '/core/profiles/testing_config_overrides'; diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module deleted file mode 100644 index 5e8482752a69a53c9b42d33c0d4f4c0780a981f1..0000000000000000000000000000000000000000 --- a/core/modules/config_translation/config_translation.module +++ /dev/null @@ -1,200 +0,0 @@ -<?php - -/** - * @file - * Configuration Translation module. - */ - -use Drupal\Core\Url; -use Drupal\Core\Config\Entity\ConfigEntityInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\field\FieldConfigInterface; - -/** - * Implements hook_help(). - */ -function config_translation_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.config_translation': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules <a href=":language">Language</a>, <a href=":content-translation">Content Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":doc_url">online documentation for the Configuration Translation module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', ':config' => Url::fromRoute('help.page', ['name' => 'config'])->toString(), ':language' => Url::fromRoute('help.page', ['name' => 'language'])->toString(), ':locale' => Url::fromRoute('help.page', ['name' => 'locale'])->toString(), ':content-translation' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? Url::fromRoute('help.page', ['name' => 'content_translation'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Enabling translation') . '</dt>'; - $output .= '<dd>' . t('In order to translate configuration, the website must have at least two <a href=":url">languages</a>.', [':url' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Translating configuration text') . '</dt>'; - $output .= '<dd>' . t('Users with the <em>Translate user edited configuration</em> permission can access the configuration translation overview, and manage translations for specific languages. The <a href=":translation-page">Configuration translation</a> page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on <em>Translate</em>, you are provided with a list of all languages. You can <em>add</em> or <em>edit</em> a translation for a specific language. Users with specific configuration permissions can also <em>edit</em> the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', [':translation-page' => Url::fromRoute('config_translation.mapper_list')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Translating date formats') . '</dt>'; - $output .= '<dd>' . t('You can choose to translate date formats on the <a href=":translation-page">Configuration translation</a> page. This allows you not only to translate the label text, but also to set a language-specific <em>PHP date format</em>.', [':translation-page' => Url::fromRoute('config_translation.mapper_list')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'config_translation.mapper_list': - $output = '<p>' . t('This page lists all configuration items on your site that have translatable text, like your site name, role names, etc.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function config_translation_theme() { - return [ - 'config_translation_manage_form_element' => [ - 'render element' => 'element', - 'template' => 'config_translation_manage_form_element', - ], - ]; -} - -/** - * Implements hook_themes_installed(). - */ -function config_translation_themes_installed() { - // Themes can provide *.config_translation.yml declarations. - // @todo Make ThemeHandler trigger an event instead and make - // ConfigMapperManager plugin manager subscribe to it. - // @see https://www.drupal.org/node/2206347 - \Drupal::service('plugin.manager.config_translation.mapper')->clearCachedDefinitions(); -} - -/** - * Implements hook_themes_uninstalled(). - */ -function config_translation_themes_uninstalled() { - // Themes can provide *.config_translation.yml declarations. - // @todo Make ThemeHandler trigger an event instead and make - // ConfigMapperManager plugin manager subscribe to it. - // @see https://www.drupal.org/node/2206347 - \Drupal::service('plugin.manager.config_translation.mapper')->clearCachedDefinitions(); -} - -/** - * Implements hook_entity_type_alter(). - */ -function config_translation_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - foreach ($entity_types as $entity_type_id => $entity_type) { - if ($entity_type->entityClassImplements(ConfigEntityInterface::class)) { - if ($entity_type_id == 'block') { - $class = 'Drupal\config_translation\Controller\ConfigTranslationBlockListBuilder'; - } - elseif ($entity_type_id == 'field_config') { - $class = 'Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder'; - // Will be filled in dynamically, see \Drupal\field\Entity\FieldConfig::linkTemplates(). - $entity_type->setLinkTemplate('config-translation-overview', $entity_type->getLinkTemplate('edit-form') . '/translate'); - } - else { - $class = 'Drupal\config_translation\Controller\ConfigTranslationEntityListBuilder'; - } - $entity_type->setHandlerClass('config_translation_list', $class); - - if ($entity_type->hasLinkTemplate('edit-form')) { - $entity_type->setLinkTemplate('config-translation-overview', $entity_type->getLinkTemplate('edit-form') . '/translate'); - } - } - } -} - -/** - * Implements hook_config_translation_info(). - */ -function config_translation_config_translation_info(&$info) { - $entity_type_manager = \Drupal::entityTypeManager(); - - // If field UI is not enabled, the base routes of the type - // "entity.field_config.{$entity_type}_field_edit_form" are not defined. - if (\Drupal::moduleHandler()->moduleExists('field_ui')) { - // Add fields entity mappers to all fieldable entity types defined. - foreach ($entity_type_manager->getDefinitions() as $entity_type_id => $entity_type) { - // Make sure entity type has field UI enabled and has a base route. - if ($entity_type->get('field_ui_base_route')) { - $info[$entity_type_id . '_fields'] = [ - 'base_route_name' => "entity.field_config.{$entity_type_id}_field_edit_form", - 'entity_type' => 'field_config', - 'class' => '\Drupal\config_translation\ConfigFieldMapper', - 'base_entity_type' => $entity_type_id, - 'weight' => 10, - ]; - } - } - } - - // Discover configuration entities automatically. - foreach ($entity_type_manager->getDefinitions() as $entity_type_id => $entity_type) { - // Determine base path for entities automatically if provided via the - // configuration entity. - if ( - !$entity_type->entityClassImplements(ConfigEntityInterface::class) || - !$entity_type->hasLinkTemplate('edit-form') - ) { - // Do not record this entity mapper if the entity type does not - // provide a base route. We'll surely not be able to do anything with - // it anyway. Configuration entities with a dynamic base path, such as - // fields, need special treatment. See above. - continue; - } - - // Use the entity type as the plugin ID. - $base_route_name = "entity.$entity_type_id.edit_form"; - $info[$entity_type_id] = [ - 'class' => '\Drupal\config_translation\ConfigEntityMapper', - 'base_route_name' => $base_route_name, - 'title' => $entity_type->getSingularLabel(), - 'names' => [], - 'entity_type' => $entity_type_id, - 'weight' => 10, - ]; - } -} - -/** - * Implements hook_entity_operation(). - */ -function config_translation_entity_operation(EntityInterface $entity) { - $operations = []; - $entity_type = $entity->getEntityType(); - if ($entity_type->entityClassImplements(ConfigEntityInterface::class) && - $entity->hasLinkTemplate('config-translation-overview') && - \Drupal::currentUser()->hasPermission('translate configuration')) { - - $link_template = 'config-translation-overview'; - if ($entity instanceof FieldConfigInterface) { - $link_template = "config-translation-overview.{$entity->getTargetEntityTypeId()}"; - } - - $operations['translate'] = [ - 'title' => t('Translate'), - 'weight' => 50, - 'url' => $entity->toUrl($link_template), - ]; - } - - return $operations; -} - -/** - * Implements hook_config_schema_info_alter(). - */ -function config_translation_config_schema_info_alter(&$definitions) { - $map = [ - 'label' => '\Drupal\config_translation\FormElement\Textfield', - 'text' => '\Drupal\config_translation\FormElement\Textarea', - 'date_format' => '\Drupal\config_translation\FormElement\DateFormat', - 'text_format' => '\Drupal\config_translation\FormElement\TextFormat', - 'mapping' => '\Drupal\config_translation\FormElement\ListElement', - 'sequence' => '\Drupal\config_translation\FormElement\ListElement', - 'plural_label' => '\Drupal\config_translation\FormElement\PluralVariants', - ]; - - // Enhance the text and date type definitions with classes to generate proper - // form elements in ConfigTranslationFormBase. Other translatable types will - // appear as a one line textfield. - foreach ($definitions as $type => &$definition) { - if (isset($map[$type]) && !isset($definition['form_element_class'])) { - $definition['form_element_class'] = $map[$type]; - } - } -} diff --git a/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php b/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a9251d8b13cd5ac575bebbad7cab295a54eb8d97 --- /dev/null +++ b/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php @@ -0,0 +1,220 @@ +<?php + +namespace Drupal\config_translation\Hook; + +use Drupal\field\FieldConfigInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Config\Entity\ConfigEntityInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_translation. + */ +class ConfigTranslationHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.config_translation': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules <a href=":language">Language</a>, <a href=":content-translation">Content Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":doc_url">online documentation for the Configuration Translation module</a>.', [ + ':doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', + ':config' => Url::fromRoute('help.page', [ + 'name' => 'config', + ])->toString(), + ':language' => Url::fromRoute('help.page', [ + 'name' => 'language', + ])->toString(), + ':locale' => Url::fromRoute('help.page', [ + 'name' => 'locale', + ])->toString(), + ':content-translation' => \Drupal::moduleHandler()->moduleExists('content_translation') ? Url::fromRoute('help.page', [ + 'name' => 'content_translation', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Enabling translation') . '</dt>'; + $output .= '<dd>' . t('In order to translate configuration, the website must have at least two <a href=":url">languages</a>.', [ + ':url' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Translating configuration text') . '</dt>'; + $output .= '<dd>' . t('Users with the <em>Translate user edited configuration</em> permission can access the configuration translation overview, and manage translations for specific languages. The <a href=":translation-page">Configuration translation</a> page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on <em>Translate</em>, you are provided with a list of all languages. You can <em>add</em> or <em>edit</em> a translation for a specific language. Users with specific configuration permissions can also <em>edit</em> the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', [ + ':translation-page' => Url::fromRoute('config_translation.mapper_list')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Translating date formats') . '</dt>'; + $output .= '<dd>' . t('You can choose to translate date formats on the <a href=":translation-page">Configuration translation</a> page. This allows you not only to translate the label text, but also to set a language-specific <em>PHP date format</em>.', [ + ':translation-page' => Url::fromRoute('config_translation.mapper_list')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'config_translation.mapper_list': + $output = '<p>' . t('This page lists all configuration items on your site that have translatable text, like your site name, role names, etc.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'config_translation_manage_form_element' => [ + 'render element' => 'element', + 'template' => 'config_translation_manage_form_element', + ], + ]; + } + + /** + * Implements hook_themes_installed(). + */ + #[Hook('themes_installed')] + public function themesInstalled() { + // Themes can provide *.config_translation.yml declarations. + // @todo Make ThemeHandler trigger an event instead and make + // ConfigMapperManager plugin manager subscribe to it. + // @see https://www.drupal.org/node/2206347 + \Drupal::service('plugin.manager.config_translation.mapper')->clearCachedDefinitions(); + } + + /** + * Implements hook_themes_uninstalled(). + */ + #[Hook('themes_uninstalled')] + public function themesUninstalled() { + // Themes can provide *.config_translation.yml declarations. + // @todo Make ThemeHandler trigger an event instead and make + // ConfigMapperManager plugin manager subscribe to it. + // @see https://www.drupal.org/node/2206347 + \Drupal::service('plugin.manager.config_translation.mapper')->clearCachedDefinitions(); + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + foreach ($entity_types as $entity_type_id => $entity_type) { + if ($entity_type->entityClassImplements(ConfigEntityInterface::class)) { + if ($entity_type_id == 'block') { + $class = 'Drupal\config_translation\Controller\ConfigTranslationBlockListBuilder'; + } + elseif ($entity_type_id == 'field_config') { + $class = 'Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder'; + // Will be filled in dynamically, see \Drupal\field\Entity\FieldConfig::linkTemplates(). + $entity_type->setLinkTemplate('config-translation-overview', $entity_type->getLinkTemplate('edit-form') . '/translate'); + } + else { + $class = 'Drupal\config_translation\Controller\ConfigTranslationEntityListBuilder'; + } + $entity_type->setHandlerClass('config_translation_list', $class); + if ($entity_type->hasLinkTemplate('edit-form')) { + $entity_type->setLinkTemplate('config-translation-overview', $entity_type->getLinkTemplate('edit-form') . '/translate'); + } + } + } + } + + /** + * Implements hook_config_translation_info(). + */ + #[Hook('config_translation_info')] + public function configTranslationInfo(&$info) { + $entity_type_manager = \Drupal::entityTypeManager(); + // If field UI is not enabled, the base routes of the type + // "entity.field_config.{$entity_type}_field_edit_form" are not defined. + if (\Drupal::moduleHandler()->moduleExists('field_ui')) { + // Add fields entity mappers to all fieldable entity types defined. + foreach ($entity_type_manager->getDefinitions() as $entity_type_id => $entity_type) { + // Make sure entity type has field UI enabled and has a base route. + if ($entity_type->get('field_ui_base_route')) { + $info[$entity_type_id . '_fields'] = [ + 'base_route_name' => "entity.field_config.{$entity_type_id}_field_edit_form", + 'entity_type' => 'field_config', + 'class' => '\Drupal\config_translation\ConfigFieldMapper', + 'base_entity_type' => $entity_type_id, + 'weight' => 10, + ]; + } + } + } + // Discover configuration entities automatically. + foreach ($entity_type_manager->getDefinitions() as $entity_type_id => $entity_type) { + // Determine base path for entities automatically if provided via the + // configuration entity. + if (!$entity_type->entityClassImplements(ConfigEntityInterface::class) || !$entity_type->hasLinkTemplate('edit-form')) { + // Do not record this entity mapper if the entity type does not + // provide a base route. We'll surely not be able to do anything with + // it anyway. Configuration entities with a dynamic base path, such as + // fields, need special treatment. See above. + continue; + } + // Use the entity type as the plugin ID. + $base_route_name = "entity.{$entity_type_id}.edit_form"; + $info[$entity_type_id] = [ + 'class' => '\Drupal\config_translation\ConfigEntityMapper', + 'base_route_name' => $base_route_name, + 'title' => $entity_type->getSingularLabel(), + 'names' => [], + 'entity_type' => $entity_type_id, + 'weight' => 10, + ]; + } + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + $operations = []; + $entity_type = $entity->getEntityType(); + if ($entity_type->entityClassImplements(ConfigEntityInterface::class) && $entity->hasLinkTemplate('config-translation-overview') && \Drupal::currentUser()->hasPermission('translate configuration')) { + $link_template = 'config-translation-overview'; + if ($entity instanceof FieldConfigInterface) { + $link_template = "config-translation-overview.{$entity->getTargetEntityTypeId()}"; + } + $operations['translate'] = [ + 'title' => t('Translate'), + 'weight' => 50, + 'url' => $entity->toUrl($link_template), + ]; + } + return $operations; + } + + /** + * Implements hook_config_schema_info_alter(). + */ + #[Hook('config_schema_info_alter')] + public function configSchemaInfoAlter(&$definitions) { + $map = [ + 'label' => '\Drupal\config_translation\FormElement\Textfield', + 'text' => '\Drupal\config_translation\FormElement\Textarea', + 'date_format' => '\Drupal\config_translation\FormElement\DateFormat', + 'text_format' => '\Drupal\config_translation\FormElement\TextFormat', + 'mapping' => '\Drupal\config_translation\FormElement\ListElement', + 'sequence' => '\Drupal\config_translation\FormElement\ListElement', + 'plural_label' => '\Drupal\config_translation\FormElement\PluralVariants', + ]; + // Enhance the text and date type definitions with classes to generate proper + // form elements in ConfigTranslationFormBase. Other translatable types will + // appear as a one line textfield. + foreach ($definitions as $type => &$definition) { + if (isset($map[$type]) && !isset($definition['form_element_class'])) { + $definition['form_element_class'] = $map[$type]; + } + } + } + +} diff --git a/core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module b/core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module deleted file mode 100644 index 892433b303d9db7d633fa9c63e3a8aae21bba654..0000000000000000000000000000000000000000 --- a/core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/** - * @file - * Configuration Translation Test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_system_info_alter(). - */ -function config_translation_test_system_info_alter(array &$info, Extension $file, $type) { - // @see \Drupal\config_translation\Tests\ConfigTranslationUiThemeTest - if ($file->getType() == 'theme' && $file->getName() == 'config_translation_test_theme') { - $info['hidden'] = FALSE; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function config_translation_test_entity_type_alter(array &$entity_types) { - // Remove entity definition for these entity types from config_test module. - unset($entity_types['config_test_no_status']); - unset($entity_types['config_query_test']); -} - -/** - * Implements hook_config_translation_info_alter(). - */ -function config_translation_test_config_translation_info_alter(&$info) { - if (\Drupal::state()->get('config_translation_test_config_translation_info_alter')) { - // Limit account settings config files to only one of them. - $info['entity.user.admin_form']['names'] = ['user.settings']; - - // Add one more config file to the site information page. - $info['system.site_information_settings']['names'][] = 'system.rss'; - } -} - -/** - * Implements hook_form_BASE_FORM_ID_alter() for ConfigTranslationFormBase. - * - * Adds a list of configuration names to the top of the configuration - * translation form. - * - * @see \Drupal\config_translation\Form\ConfigTranslationFormBase - */ -function config_translation_test_form_config_translation_form_alter(&$form, FormStateInterface $form_state) { - if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { - $form['#base_altered'] = TRUE; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for ConfigTranslationAddForm. - * - * Changes the title to include the source language. - * - * @see \Drupal\config_translation\Form\ConfigTranslationAddForm - */ -function config_translation_test_form_config_translation_add_form_alter(&$form, FormStateInterface $form_state) { - if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { - $form['#altered'] = TRUE; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for ConfigTranslationEditForm. - * - * Adds a column to the configuration translation edit form that shows the - * current translation. Note that this column would not be displayed by default, - * as the columns are hardcoded in - * config_translation_manage_form_element.html.twig. The template would need to - * be overridden for the column to be displayed. - * - * @see \Drupal\config_translation\Form\ConfigTranslationEditForm - */ -function config_translation_test_form_config_translation_edit_form_alter(&$form, FormStateInterface $form_state) { - if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { - $form['#altered'] = TRUE; - } -} diff --git a/core/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php b/core/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..3b8d38f5dce402c7478c40e320bc1dae38033850 --- /dev/null +++ b/core/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php @@ -0,0 +1,97 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_translation_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_translation_test. + */ +class ConfigTranslationTestHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(array &$info, Extension $file, $type) { + // @see \Drupal\config_translation\Tests\ConfigTranslationUiThemeTest + if ($file->getType() == 'theme' && $file->getName() == 'config_translation_test_theme') { + $info['hidden'] = FALSE; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Remove entity definition for these entity types from config_test module. + unset($entity_types['config_test_no_status']); + unset($entity_types['config_query_test']); + } + + /** + * Implements hook_config_translation_info_alter(). + */ + #[Hook('config_translation_info_alter')] + public function configTranslationInfoAlter(&$info) { + if (\Drupal::state()->get('config_translation_test_config_translation_info_alter')) { + // Limit account settings config files to only one of them. + $info['entity.user.admin_form']['names'] = ['user.settings']; + // Add one more config file to the site information page. + $info['system.site_information_settings']['names'][] = 'system.rss'; + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for ConfigTranslationFormBase. + * + * Adds a list of configuration names to the top of the configuration + * translation form. + * + * @see \Drupal\config_translation\Form\ConfigTranslationFormBase + */ + #[Hook('form_config_translation_form_alter')] + public function formConfigTranslationFormAlter(&$form, FormStateInterface $form_state) : void { + if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { + $form['#base_altered'] = TRUE; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for ConfigTranslationAddForm. + * + * Changes the title to include the source language. + * + * @see \Drupal\config_translation\Form\ConfigTranslationAddForm + */ + #[Hook('form_config_translation_add_form_alter')] + public function formConfigTranslationAddFormAlter(&$form, FormStateInterface $form_state) : void { + if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { + $form['#altered'] = TRUE; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for ConfigTranslationEditForm. + * + * Adds a column to the configuration translation edit form that shows the + * current translation. Note that this column would not be displayed by default, + * as the columns are hardcoded in + * config_translation_manage_form_element.html.twig. The template would need to + * be overridden for the column to be displayed. + * + * @see \Drupal\config_translation\Form\ConfigTranslationEditForm + */ + #[Hook('form_config_translation_edit_form_alter')] + public function formConfigTranslationEditFormAlter(&$form, FormStateInterface $form_state) : void { + if (\Drupal::state()->get('config_translation_test_alter_form_alter')) { + $form['#altered'] = TRUE; + } + } + +} diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php index 021fe1f173633cf333dabda60720d80e4359ffc2..0c6a5ada3c97e008718e459ddc706139000a2a09 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php @@ -14,6 +14,9 @@ */ class ConfigTranslationDateFormatUiTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'config_translation', diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php index 87bddc258e8cd5f323019fc95ec9bc8aaefa02da..feecfb0319075c6260f2be70056264334f3240bf 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php @@ -29,7 +29,7 @@ class ConfigTranslationInstallTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.eo.po', $this->getPo('eo')); diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index 4947c4b504ffc82e26f000de9e1b85d110764667..563cb5549193061c5d1895ae75358e7eeed9370b 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -101,7 +101,7 @@ protected function setUp(): void { * There are no blocks placed in the testing profile. Add one, then check * for Translate operation. */ - protected function doBlockListTest() { + protected function doBlockListTest(): void { // Add a test block, any block will do. // Set the machine name so the translate link can be built later. $id = $this->randomMachineName(16); @@ -122,7 +122,7 @@ protected function doBlockListTest() { /** * Tests the menu listing for the translate operation. */ - protected function doMenuListTest() { + protected function doMenuListTest(): void { // Create a test menu to decouple looking for translate operations link so // this does not test more than necessary. $this->drupalGet('admin/structure/menu/add'); @@ -170,7 +170,7 @@ protected function doMenuListTest() { /** * Tests the vocabulary listing for the translate operation. */ - protected function doVocabularyListTest() { + protected function doVocabularyListTest(): void { // Create a test vocabulary to decouple looking for translate operations // link so this does not test more than necessary. $vocabulary = Vocabulary::create([ @@ -200,7 +200,7 @@ protected function doVocabularyListTest() { /** * Tests the content block listing for the translate operation. */ - public function doCustomContentTypeListTest() { + public function doCustomContentTypeListTest(): void { // Create a test block type to decouple looking for translate // operations link so this does not test more than necessary. $block_content_type = BlockContentType::create([ @@ -225,7 +225,7 @@ public function doCustomContentTypeListTest() { /** * Tests the contact forms listing for the translate operation. */ - public function doContactFormsListTest() { + public function doContactFormsListTest(): void { // Create a test contact form to decouple looking for translate operations // link so this does not test more than necessary. $contact_form = ContactForm::create([ @@ -249,7 +249,7 @@ public function doContactFormsListTest() { /** * Tests the content type listing for the translate operation. */ - public function doContentTypeListTest() { + public function doContentTypeListTest(): void { // Create a test content type to decouple looking for translate operations // link so this does not test more than necessary. $content_type = $this->drupalCreateContentType([ @@ -272,7 +272,7 @@ public function doContentTypeListTest() { /** * Tests the formats listing for the translate operation. */ - public function doFormatsListTest() { + public function doFormatsListTest(): void { // Create a test format to decouple looking for translate operations // link so this does not test more than necessary. $filter_format = FilterFormat::create([ @@ -296,7 +296,7 @@ public function doFormatsListTest() { /** * Tests the shortcut listing for the translate operation. */ - public function doShortcutListTest() { + public function doShortcutListTest(): void { // Create a test shortcut to decouple looking for translate operations // link so this does not test more than necessary. $shortcut = ShortcutSet::create([ @@ -320,7 +320,7 @@ public function doShortcutListTest() { /** * Tests the role listing for the translate operation. */ - public function doUserRoleListTest() { + public function doUserRoleListTest(): void { // Create a test role to decouple looking for translate operations // link so this does not test more than necessary. $role_id = $this->randomMachineName(16); @@ -341,7 +341,7 @@ public function doUserRoleListTest() { /** * Tests the language listing for the translate operation. */ - public function doLanguageListTest() { + public function doLanguageListTest(): void { // Create a test language to decouple looking for translate operations // link so this does not test more than necessary. ConfigurableLanguage::createFromLangcode('ga')->save(); @@ -361,7 +361,7 @@ public function doLanguageListTest() { /** * Tests the image style listing for the translate operation. */ - public function doImageStyleListTest() { + public function doImageStyleListTest(): void { // Get the image style listing. $this->drupalGet('admin/config/media/image-styles'); @@ -377,7 +377,7 @@ public function doImageStyleListTest() { /** * Tests the responsive image mapping listing for the translate operation. */ - public function doResponsiveImageListTest() { + public function doResponsiveImageListTest(): void { $edit = []; $edit['label'] = $this->randomMachineName(); $edit['id'] = strtolower($edit['label']); @@ -402,7 +402,7 @@ public function doResponsiveImageListTest() { /** * Tests the field listing for the translate operation. */ - public function doFieldListTest() { + public function doFieldListTest(): void { // Create a base content type. $content_type = $this->drupalCreateContentType([ 'type' => $this->randomMachineName(16), @@ -458,7 +458,7 @@ public function doFieldListTest() { /** * Tests the date format listing for the translate operation. */ - public function doDateFormatListTest() { + public function doDateFormatListTest(): void { // Get the date format listing. $this->drupalGet('admin/config/regional/date-time'); @@ -477,7 +477,7 @@ public function doDateFormatListTest() { * @param string $link * URL of the settings page to test. */ - public function doSettingsPageTest($link) { + public function doSettingsPageTest($link): void { // Get the settings page. $this->drupalGet($link); diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php index 627ff292e9ccaab4d8469d8d25300e6d8de06254..1d017a01cca901207101211e7f4184717af88038 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php @@ -123,11 +123,11 @@ protected function setUp(): void { /** * Gets translation from locale storage. * - * @param $config_name + * @param string $config_name * Configuration object. - * @param $key + * @param string $key * Translation configuration field key. - * @param $langcode + * @param string $langcode * String language code to load translation. * * @return bool|mixed diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php index 1c6c8a852b42b9386391d638cb6a640e26fdce8a..9bbd0fe41f7b876f3949ad2b686de0ebfecfa281 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php @@ -13,6 +13,9 @@ */ class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'config_translation', diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php index 64e67ad63fcd7bccd85b4b1760dc4ac1f5e17eb9..e80a6fe6eeba681d3f05f2833f033773d7c98977 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php @@ -13,6 +13,9 @@ */ class MigrateSystemSiteTranslationTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'config_translation', diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php index c18edc10f1da38e0c190890fa841fcc5936051f0..a565bd100fbf1a62d2f82ef00b93b6cee5783356 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php @@ -16,6 +16,9 @@ class MigrateUserConfigsTranslationTest extends MigrateDrupal6TestBase { use SchemaCheckTestTrait; + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'locale', diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php index d0fc20ddbaf5be81f7ef30812d1cf2db96074d58..3d23b377fe4ec106154c640c43cfd36d5dffd9f8 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php @@ -13,6 +13,9 @@ */ class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'config_translation', diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php index 8982dbb808efc81f4018a3c841a796f88f4a8548..5bbe2b9a3098f3ecf944245ab0692f300a038dc5 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php @@ -679,7 +679,7 @@ public function getInternalLangcode() { * @param array $config_names * The configuration names. */ - public function setConfigNames(array $config_names) { + public function setConfigNames(array $config_names): void { $this->pluginDefinition['names'] = $config_names; } @@ -689,7 +689,7 @@ public function setConfigNames(array $config_names) { * @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory to set. */ - public function setConfigFactory(ConfigFactoryInterface $config_factory) { + public function setConfigFactory(ConfigFactoryInterface $config_factory): void { $this->configFactory = $config_factory; } diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 5f0f18c2ad293aa59f6f9b0871516ce0676610ed..9fa4732bfe0a207a999496f9e14005b1a261231c 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -2,206 +2,9 @@ /** * @file - * Enables the use of personal and site-wide contact forms. */ -use Drupal\Core\Url; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\contact\Plugin\rest\resource\ContactMessageResource; -use Drupal\user\Entity\User; - -/** - * Implements hook_help(). - */ -function contact_help($route_name, RouteMatchInterface $route_match) { - - switch ($route_name) { - case 'help.page.contact': - $menu_page = \Drupal::moduleHandler()->moduleExists('menu_ui') ? Url::fromRoute('entity.menu.collection')->toString() : '#'; - $block_page = \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#'; - $contact_page = Url::fromRoute('entity.contact_form.collection')->toString(); - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Contact module allows visitors to contact registered users on your site, using the personal contact form, and also allows you to set up site-wide contact forms. For more information, see the <a href=":contact">online documentation for the Contact module</a>.', [':contact' => 'https://www.drupal.org/documentation/modules/contact']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Using the personal contact form') . '</dt>'; - $output .= '<dd>' . t("Site visitors can email registered users on your site by using the personal contact form, without knowing or learning the email address of the recipient. When a site visitor is viewing a user profile, the viewer will see a <em>Contact</em> tab or link, which leads to the personal contact form. The personal contact link is not shown when you are viewing your own profile, and users must have both <em>View user information</em> (to see user profiles) and <em>Use users' personal contact forms</em> permission to see the link. The user whose profile is being viewed must also have their personal contact form enabled (this is a user account setting); viewers with <em>Administer users</em> permission can bypass this setting.") . '</dd>'; - $output .= '<dt>' . t('Configuring contact forms') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":contact_admin">Contact forms page</a>, you can configure the fields and display of the personal contact form, and you can set up one or more site-wide contact forms. Each site-wide contact form has a machine name, a label, and one or more defined recipients; when a site visitor submits the form, the field values are sent to those recipients.', [':contact_admin' => $contact_page]) . '</dd>'; - $output .= '<dt>' . t('Linking to contact forms') . '</dt>'; - $output .= '<dd>' . t('One site-wide contact form can be designated as the default contact form. If you choose to designate a default form, the <em>Contact</em> menu link in the <em>Footer</em> menu will link to it. You can modify this link from the <a href=":menu-settings">Menus page</a> if you have the Menu UI module installed. You can also create links to other contact forms; the URL for each form you have set up has format <em>contact/machine_name_of_form</em>.', [':menu-settings' => $menu_page]) . '</p>'; - $output .= '<dt>' . t('Adding content to contact forms') . '</dt>'; - $output .= '<dd>' . t('From the <a href=":contact_admin">Contact forms page</a>, you can configure the fields to be shown on contact forms, including their labels and help text. If you would like other content (such as text or images) to appear on a contact form, use a block. You can create and edit blocks on the <a href=":blocks">Block layout page</a>, if the Block module is installed.', [':blocks' => $block_page, ':contact_admin' => $contact_page]) . '</dd>'; - $output .= '</dl>'; - return $output; - - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function contact_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['user']->setLinkTemplate('contact-form', '/user/{user}/contact'); -} - -/** - * Implements hook_entity_extra_field_info(). - */ -function contact_entity_extra_field_info() { - $fields = []; - foreach (array_keys(\Drupal::service('entity_type.bundle.info')->getBundleInfo('contact_message')) as $bundle) { - $fields['contact_message'][$bundle]['form']['name'] = [ - 'label' => t('Sender name'), - 'description' => t('Text'), - 'weight' => -50, - ]; - $fields['contact_message'][$bundle]['form']['mail'] = [ - 'label' => t('Sender email'), - 'description' => t('Email'), - 'weight' => -40, - ]; - if ($bundle == 'personal') { - $fields['contact_message'][$bundle]['form']['recipient'] = [ - 'label' => t('Recipient username'), - 'description' => t('User'), - 'weight' => -30, - ]; - } - $fields['contact_message'][$bundle]['form']['preview'] = [ - 'label' => t('Preview sender message'), - 'description' => t('Preview'), - 'weight' => 40, - ]; - $fields['contact_message'][$bundle]['form']['copy'] = [ - 'label' => t('Send copy to sender'), - 'description' => t('Option'), - 'weight' => 50, - ]; - } - - $fields['user']['user']['form']['contact'] = [ - 'label' => t('Contact settings'), - 'description' => t('Contact module form element.'), - 'weight' => 5, - ]; - return $fields; -} - -/** - * Implements hook_menu_local_tasks_alter(). - * - * Hides the 'Contact' tab on the user profile if the user does not have an - * email address configured. - */ -function contact_menu_local_tasks_alter(&$data, $route_name) { - if ($route_name == 'entity.user.canonical') { - foreach ($data['tabs'][0] as $href => $tab_data) { - if ($href == 'entity.user.contact_form') { - $link_params = $tab_data['#link']['url']->getRouteParameters(); - $account = User::load($link_params['user']); - if (!$account->getEmail()) { - unset($data['tabs'][0]['entity.user.contact_form']); - } - } - } - } -} - -/** - * Implements hook_mail(). - */ -function contact_mail($key, &$message, $params) { - $contact_message = $params['contact_message']; - /** @var \Drupal\user\UserInterface $sender */ - $sender = $params['sender']; - $language = \Drupal::languageManager()->getLanguage($message['langcode']); - - $variables = [ - '@site-name' => \Drupal::config('system.site')->get('name'), - '@subject' => $contact_message->getSubject(), - '@form' => !empty($params['contact_form']) ? $params['contact_form']->label() : '', - '@form-url' => Url::fromRoute('<current>', [], ['absolute' => TRUE, 'language' => $language])->toString(), - '@sender-name' => $sender->getDisplayName(), - ]; - if ($sender->isAuthenticated()) { - $variables['@sender-url'] = $sender->toUrl('canonical', ['absolute' => TRUE, 'language' => $language])->toString(); - } - else { - $variables['@sender-url'] = $params['sender']->getEmail() ?? ''; - } - - $options = ['langcode' => $language->getId()]; - - switch ($key) { - case 'page_mail': - case 'page_copy': - $message['subject'] .= t('[@form] @subject', $variables, $options); - $message['body'][] = t("@sender-name (@sender-url) sent a message using the contact form at @form-url.", $variables, $options); - $build = \Drupal::entityTypeManager() - ->getViewBuilder('contact_message') - ->view($contact_message, 'mail'); - $message['body'][] = \Drupal::service('renderer')->renderInIsolation($build); - break; - - case 'page_autoreply': - $message['subject'] .= t('[@form] @subject', $variables, $options); - $message['body'][] = $params['contact_form']->getReply(); - break; - - case 'user_mail': - case 'user_copy': - $variables += [ - '@recipient-name' => $params['recipient']->getDisplayName(), - '@recipient-edit-url' => $params['recipient']->toUrl('edit-form', ['absolute' => TRUE, 'language' => $language])->toString(), - ]; - $message['subject'] .= t('[@site-name] @subject', $variables, $options); - $message['body'][] = t('Hello @recipient-name,', $variables, $options); - $message['body'][] = t("@sender-name (@sender-url) has sent you a message via your contact form at @site-name.", $variables, $options); - // Only include the opt-out line in the original email and not in the - // copy to the sender. Also exclude this if the email was sent from a - // user administrator because they can always send emails even if the - // contacted user has disabled their contact form. - if ($key === 'user_mail' && !$params['sender']->hasPermission('administer users')) { - $message['body'][] = t("If you don't want to receive such messages, you can change your settings at @recipient-edit-url.", $variables, $options); - } - $build = \Drupal::entityTypeManager() - ->getViewBuilder('contact_message') - ->view($contact_message, 'mail'); - $message['body'][] = \Drupal::service('renderer')->renderInIsolation($build); - break; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for \Drupal\user\ProfileForm. - * - * Add the enable personal contact form to an individual user's account page. - * - * @see \Drupal\user\ProfileForm::form() - */ -function contact_form_user_form_alter(&$form, FormStateInterface $form_state) { - $form['contact'] = [ - '#type' => 'details', - '#title' => t('Contact settings'), - '#open' => TRUE, - '#weight' => 5, - ]; - $account = $form_state->getFormObject()->getEntity(); - if (!\Drupal::currentUser()->isAnonymous() && $account->id()) { - $account_data = \Drupal::service('user.data')->get('contact', $account->id(), 'enabled'); - } - $form['contact']['contact'] = [ - '#type' => 'checkbox', - '#title' => t('Personal contact form'), - '#default_value' => $account_data ?? \Drupal::config('contact.settings')->get('user_default_enabled'), - '#description' => t('Allow other users to contact you via a personal contact form which keeps your email address hidden. Note that some privileged users such as site administrators are still able to contact you even if you choose to disable this feature.'), - ]; - $form['actions']['submit']['#submit'][] = 'contact_user_profile_form_submit'; -} /** * Form submission handler for \Drupal\user\ProfileForm. @@ -215,28 +18,6 @@ function contact_user_profile_form_submit($form, FormStateInterface $form_state) } } -/** - * Implements hook_form_FORM_ID_alter() for \Drupal\user\AccountSettingsForm. - * - * Adds the default personal contact setting on the user settings page. - */ -function contact_form_user_admin_settings_alter(&$form, FormStateInterface $form_state) { - $form['contact'] = [ - '#type' => 'details', - '#title' => t('Contact settings'), - '#open' => TRUE, - '#weight' => 0, - ]; - $form['contact']['contact_default_status'] = [ - '#type' => 'checkbox', - '#title' => t('Enable the personal contact form by default for new users'), - '#description' => t('Changing this setting will not affect existing users.'), - '#default_value' => \Drupal::configFactory()->getEditable('contact.settings')->get('user_default_enabled'), - ]; - // Add submit handler to save contact configuration. - $form['#submit'][] = 'contact_form_user_admin_settings_submit'; -} - /** * Form submission handler for \Drupal\user\AccountSettingsForm. * @@ -247,10 +28,3 @@ function contact_form_user_admin_settings_submit($form, FormStateInterface $form ->set('user_default_enabled', $form_state->getValue('contact_default_status')) ->save(); } - -/** - * Implements hook_rest_resource_alter(). - */ -function contact_rest_resource_alter(&$definitions) { - $definitions['entity:contact_message']['class'] = ContactMessageResource::class; -} diff --git a/core/modules/contact/contact.post_update.php b/core/modules/contact/contact.post_update.php index a04a58ef15bcb1acb44e1567d38dca8cb4860086..9e8f3e62c4f4cc41ecae196832c7cbe5756264c0 100644 --- a/core/modules/contact/contact.post_update.php +++ b/core/modules/contact/contact.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function contact_removed_post_updates() { +function contact_removed_post_updates(): array { return [ 'contact_post_update_add_message_redirect_field_to_contact_form' => '9.0.0', 'contact_post_update_set_empty_default_form_to_null' => '11.0.0', diff --git a/core/modules/contact/contact.views.inc b/core/modules/contact/contact.views.inc deleted file mode 100644 index a18c9e796f32369c5e140847dbacfec4b5a940b2..0000000000000000000000000000000000000000 --- a/core/modules/contact/contact.views.inc +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provide views data for contact.module. - */ - -/** - * Implements hook_views_data_alter(). - */ -function contact_views_data_alter(&$data) { - $data['users']['contact'] = [ - 'field' => [ - 'title' => t('Contact link'), - 'help' => t('Provide a simple link to the user contact page.'), - 'id' => 'contact_link', - ], - ]; -} diff --git a/core/modules/contact/src/Controller/ContactController.php b/core/modules/contact/src/Controller/ContactController.php index 709ae33245d444b88be3966fa5eff0a9b42b63cf..ac512b448581171e971380907cd94d01a782af0e 100644 --- a/core/modules/contact/src/Controller/ContactController.php +++ b/core/modules/contact/src/Controller/ContactController.php @@ -81,6 +81,12 @@ public function contactSitePage(?ContactFormInterface $contact_form = NULL) { $form['#title'] = $contact_form->label(); $form['#cache']['contexts'][] = 'user.permissions'; $this->renderer->addCacheableDependency($form, $config); + + // The form might not have the correct cacheability metadata, so make it + // uncacheable by default. + // @todo Remove this in https://www.drupal.org/node/3395506. + $form['#cache']['max-age'] = 0; + return $form; } diff --git a/core/modules/contact/src/Entity/ContactForm.php b/core/modules/contact/src/Entity/ContactForm.php index 641243b66d4fcb60c4d9a7f936ba6ee24a045c60..d24ceb2c50319f61da44bac68464c91536b0603d 100644 --- a/core/modules/contact/src/Entity/ContactForm.php +++ b/core/modules/contact/src/Entity/ContactForm.php @@ -2,62 +2,65 @@ namespace Drupal\contact\Entity; +use Drupal\contact\ContactFormAccessControlHandler; +use Drupal\contact\ContactFormEditForm; +use Drupal\contact\ContactFormInterface; +use Drupal\contact\ContactFormListBuilder; use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; -use Drupal\contact\ContactFormInterface; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityDeleteForm; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the contact form entity. - * - * @ConfigEntityType( - * id = "contact_form", - * label = @Translation("Contact form"), - * label_collection = @Translation("Contact forms"), - * label_singular = @Translation("contact form"), - * label_plural = @Translation("contact forms"), - * label_count = @PluralTranslation( - * singular = "@count contact form", - * plural = "@count contact forms", - * ), - * handlers = { - * "access" = "Drupal\contact\ContactFormAccessControlHandler", - * "list_builder" = "Drupal\contact\ContactFormListBuilder", - * "form" = { - * "add" = "Drupal\contact\ContactFormEditForm", - * "edit" = "Drupal\contact\ContactFormEditForm", - * "delete" = "Drupal\Core\Entity\EntityDeleteForm" - * }, - * "route_provider" = { - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * } - * }, - * config_prefix = "form", - * admin_permission = "administer contact forms", - * bundle_of = "contact_message", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * links = { - * "delete-form" = "/admin/structure/contact/manage/{contact_form}/delete", - * "edit-form" = "/admin/structure/contact/manage/{contact_form}", - * "entity-permissions-form" = "/admin/structure/contact/manage/{contact_form}/permissions", - * "collection" = "/admin/structure/contact", - * "canonical" = "/contact/{contact_form}", - * }, - * config_export = { - * "id", - * "label", - * "recipients", - * "reply", - * "weight", - * "message", - * "redirect", - * } - * ) */ +#[ConfigEntityType( + id: 'contact_form', + label: new TranslatableMarkup('Contact form'), + label_collection: new TranslatableMarkup('Contact forms'), + label_singular: new TranslatableMarkup('contact form'), + label_plural: new TranslatableMarkup('contact forms'), + config_prefix: 'form', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => ContactFormAccessControlHandler::class, + 'list_builder' => ContactFormListBuilder::class, + 'form' => [ + 'add' => ContactFormEditForm::class, + 'edit' => ContactFormEditForm::class, + 'delete' => EntityDeleteForm::class, + ], + 'route_provider' => ['permissions' => EntityPermissionsRouteProvider::class], + ], + links: [ + 'delete-form' => '/admin/structure/contact/manage/{contact_form}/delete', + 'edit-form' => '/admin/structure/contact/manage/{contact_form}', + 'entity-permissions-form' => '/admin/structure/contact/manage/{contact_form}/permissions', + 'collection' => '/admin/structure/contact', + 'canonical' => '/contact/{contact_form}', + ], + admin_permission: 'administer contact forms', + bundle_of: 'contact_message', + label_count: [ + 'singular' => '@count contact form', + 'plural' => '@count contact forms', + ], + config_export: [ + 'id', + 'label', + 'recipients', + 'reply', + 'weight', + 'message', + 'redirect', + ], +)] class ContactForm extends ConfigEntityBundleBase implements ContactFormInterface { /** diff --git a/core/modules/contact/src/Entity/Message.php b/core/modules/contact/src/Entity/Message.php index f41d9f106f058b552a441ab2a1db877e301e3cdd..16eae76660c470c6c7112ae930d956c373a9918c 100644 --- a/core/modules/contact/src/Entity/Message.php +++ b/core/modules/contact/src/Entity/Message.php @@ -2,6 +2,12 @@ namespace Drupal\contact\Entity; +use Drupal\contact\ContactMessageAccessControlHandler; +use Drupal\contact\MessageForm; +use Drupal\contact\MessageViewBuilder; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\ContentEntityNullStorage; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\contact\MessageInterface; use Drupal\Core\Entity\EntityTypeInterface; @@ -9,36 +15,33 @@ /** * Defines the contact message entity. - * - * @ContentEntityType( - * id = "contact_message", - * label = @Translation("Contact message"), - * label_collection = @Translation("Contact messages"), - * label_singular = @Translation("contact message"), - * label_plural = @Translation("contact messages"), - * label_count = @PluralTranslation( - * singular = "@count contact message", - * plural = "@count contact messages", - * ), - * bundle_label = @Translation("Contact form"), - * handlers = { - * "access" = "Drupal\contact\ContactMessageAccessControlHandler", - * "storage" = "Drupal\Core\Entity\ContentEntityNullStorage", - * "view_builder" = "Drupal\contact\MessageViewBuilder", - * "form" = { - * "default" = "Drupal\contact\MessageForm" - * } - * }, - * admin_permission = "administer contact forms", - * entity_keys = { - * "bundle" = "contact_form", - * "uuid" = "uuid", - * "langcode" = "langcode" - * }, - * bundle_entity_type = "contact_form", - * field_ui_base_route = "entity.contact_form.edit_form", - * ) */ +#[ContentEntityType( + id: 'contact_message', + label: new TranslatableMarkup('Contact message'), + label_collection: new TranslatableMarkup('Contact messages'), + label_singular: new TranslatableMarkup('contact message'), + label_plural: new TranslatableMarkup('contact messages'), + entity_keys: [ + 'bundle' => 'contact_form', + 'uuid' => 'uuid', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => ContactMessageAccessControlHandler::class, + 'storage' => ContentEntityNullStorage::class, + 'view_builder' => MessageViewBuilder::class, + 'form' => ['default' => MessageForm::class], + ], + admin_permission: 'administer contact forms', + bundle_entity_type: 'contact_form', + bundle_label: new TranslatableMarkup('Contact form'), + label_count: [ + 'singular' => '@count contact message', + 'plural' => '@count contact messages', + ], + field_ui_base_route: 'entity.contact_form.edit_form' +)] class Message extends ContentEntityBase implements MessageInterface { /** diff --git a/core/modules/contact/src/Hook/ContactHooks.php b/core/modules/contact/src/Hook/ContactHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ac5d8058e9d2313c147a76dc5b439cc60e07e14a --- /dev/null +++ b/core/modules/contact/src/Hook/ContactHooks.php @@ -0,0 +1,230 @@ +<?php + +namespace Drupal\contact\Hook; + +use Drupal\contact\Plugin\rest\resource\ContactMessageResource; +use Drupal\Core\Form\FormStateInterface; +use Drupal\user\Entity\User; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contact. + */ +class ContactHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.contact': + $menu_page = \Drupal::moduleHandler()->moduleExists('menu_ui') ? Url::fromRoute('entity.menu.collection')->toString() : '#'; + $block_page = \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#'; + $contact_page = Url::fromRoute('entity.contact_form.collection')->toString(); + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Contact module allows visitors to contact registered users on your site, using the personal contact form, and also allows you to set up site-wide contact forms. For more information, see the <a href=":contact">online documentation for the Contact module</a>.', [':contact' => 'https://www.drupal.org/documentation/modules/contact']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Using the personal contact form') . '</dt>'; + $output .= '<dd>' . t("Site visitors can email registered users on your site by using the personal contact form, without knowing or learning the email address of the recipient. When a site visitor is viewing a user profile, the viewer will see a <em>Contact</em> tab or link, which leads to the personal contact form. The personal contact link is not shown when you are viewing your own profile, and users must have both <em>View user information</em> (to see user profiles) and <em>Use users' personal contact forms</em> permission to see the link. The user whose profile is being viewed must also have their personal contact form enabled (this is a user account setting); viewers with <em>Administer users</em> permission can bypass this setting.") . '</dd>'; + $output .= '<dt>' . t('Configuring contact forms') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":contact_admin">Contact forms page</a>, you can configure the fields and display of the personal contact form, and you can set up one or more site-wide contact forms. Each site-wide contact form has a machine name, a label, and one or more defined recipients; when a site visitor submits the form, the field values are sent to those recipients.', [':contact_admin' => $contact_page]) . '</dd>'; + $output .= '<dt>' . t('Linking to contact forms') . '</dt>'; + $output .= '<dd>' . t('One site-wide contact form can be designated as the default contact form. If you choose to designate a default form, the <em>Contact</em> menu link in the <em>Footer</em> menu will link to it. You can modify this link from the <a href=":menu-settings">Menus page</a> if you have the Menu UI module installed. You can also create links to other contact forms; the URL for each form you have set up has format <em>contact/machine_name_of_form</em>.', [':menu-settings' => $menu_page]) . '</p>'; + $output .= '<dt>' . t('Adding content to contact forms') . '</dt>'; + $output .= '<dd>' . t('From the <a href=":contact_admin">Contact forms page</a>, you can configure the fields to be shown on contact forms, including their labels and help text. If you would like other content (such as text or images) to appear on a contact form, use a block. You can create and edit blocks on the <a href=":blocks">Block layout page</a>, if the Block module is installed.', [':blocks' => $block_page, ':contact_admin' => $contact_page]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['user']->setLinkTemplate('contact-form', '/user/{user}/contact'); + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $fields = []; + foreach (array_keys(\Drupal::service('entity_type.bundle.info')->getBundleInfo('contact_message')) as $bundle) { + $fields['contact_message'][$bundle]['form']['name'] = ['label' => t('Sender name'), 'description' => t('Text'), 'weight' => -50]; + $fields['contact_message'][$bundle]['form']['mail'] = ['label' => t('Sender email'), 'description' => t('Email'), 'weight' => -40]; + if ($bundle == 'personal') { + $fields['contact_message'][$bundle]['form']['recipient'] = ['label' => t('Recipient username'), 'description' => t('User'), 'weight' => -30]; + } + $fields['contact_message'][$bundle]['form']['preview'] = [ + 'label' => t('Preview sender message'), + 'description' => t('Preview'), + 'weight' => 40, + ]; + $fields['contact_message'][$bundle]['form']['copy'] = [ + 'label' => t('Send copy to sender'), + 'description' => t('Option'), + 'weight' => 50, + ]; + } + $fields['user']['user']['form']['contact'] = [ + 'label' => t('Contact settings'), + 'description' => t('Contact module form element.'), + 'weight' => 5, + ]; + return $fields; + } + + /** + * Implements hook_menu_local_tasks_alter(). + * + * Hides the 'Contact' tab on the user profile if the user does not have an + * email address configured. + */ + #[Hook('menu_local_tasks_alter')] + public function menuLocalTasksAlter(&$data, $route_name) { + if ($route_name == 'entity.user.canonical' && isset($data['tabs'][0])) { + foreach ($data['tabs'][0] as $href => $tab_data) { + if ($href == 'entity.user.contact_form') { + $link_params = $tab_data['#link']['url']->getRouteParameters(); + $account = User::load($link_params['user']); + if (!$account->getEmail()) { + unset($data['tabs'][0]['entity.user.contact_form']); + } + } + } + } + } + + /** + * Implements hook_mail(). + */ + #[Hook('mail')] + public function mail($key, &$message, $params) { + $contact_message = $params['contact_message']; + /** @var \Drupal\user\UserInterface $sender */ + $sender = $params['sender']; + $language = \Drupal::languageManager()->getLanguage($message['langcode']); + $variables = [ + '@site-name' => \Drupal::config('system.site')->get('name'), + '@subject' => $contact_message->getSubject(), + '@form' => !empty($params['contact_form']) ? $params['contact_form']->label() : '', + '@form-url' => Url::fromRoute('<current>', [], [ + 'absolute' => TRUE, + 'language' => $language, + ])->toString(), + '@sender-name' => $sender->getDisplayName(), + ]; + if ($sender->isAuthenticated()) { + $variables['@sender-url'] = $sender->toUrl('canonical', ['absolute' => TRUE, 'language' => $language])->toString(); + } + else { + $variables['@sender-url'] = $params['sender']->getEmail() ?? ''; + } + $options = ['langcode' => $language->getId()]; + switch ($key) { + case 'page_mail': + case 'page_copy': + $message['subject'] .= t('[@form] @subject', $variables, $options); + $message['body'][] = t("@sender-name (@sender-url) sent a message using the contact form at @form-url.", $variables, $options); + $build = \Drupal::entityTypeManager()->getViewBuilder('contact_message')->view($contact_message, 'mail'); + $message['body'][] = \Drupal::service('renderer')->renderInIsolation($build); + break; + + case 'page_autoreply': + $message['subject'] .= t('[@form] @subject', $variables, $options); + $message['body'][] = $params['contact_form']->getReply(); + break; + + case 'user_mail': + case 'user_copy': + $variables += [ + '@recipient-name' => $params['recipient']->getDisplayName(), + '@recipient-edit-url' => $params['recipient']->toUrl('edit-form', [ + 'absolute' => TRUE, + 'language' => $language, + ])->toString(), + ]; + $message['subject'] .= t('[@site-name] @subject', $variables, $options); + $message['body'][] = t('Hello @recipient-name,', $variables, $options); + $message['body'][] = t("@sender-name (@sender-url) has sent you a message via your contact form at @site-name.", $variables, $options); + // Only include the opt-out line in the original email and not in the + // copy to the sender. Also exclude this if the email was sent from a + // user administrator because they can always send emails even if the + // contacted user has disabled their contact form. + if ($key === 'user_mail' && !$params['sender']->hasPermission('administer users')) { + $message['body'][] = t("If you don't want to receive such messages, you can change your settings at @recipient-edit-url.", $variables, $options); + } + $build = \Drupal::entityTypeManager()->getViewBuilder('contact_message')->view($contact_message, 'mail'); + $message['body'][] = \Drupal::service('renderer')->renderInIsolation($build); + break; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for \Drupal\user\ProfileForm. + * + * Add the enable personal contact form to an individual user's account page. + * + * @see \Drupal\user\ProfileForm::form() + */ + #[Hook('form_user_form_alter')] + public function formUserFormAlter(&$form, FormStateInterface $form_state) : void { + $form['contact'] = [ + '#type' => 'details', + '#title' => t('Contact settings'), + '#open' => TRUE, + '#weight' => 5, + ]; + $account = $form_state->getFormObject()->getEntity(); + if (!\Drupal::currentUser()->isAnonymous() && $account->id()) { + $account_data = \Drupal::service('user.data')->get('contact', $account->id(), 'enabled'); + } + $form['contact']['contact'] = [ + '#type' => 'checkbox', + '#title' => t('Personal contact form'), + '#default_value' => $account_data ?? \Drupal::config('contact.settings')->get('user_default_enabled'), + '#description' => t('Allow other users to contact you via a personal contact form which keeps your email address hidden. Note that some privileged users such as site administrators are still able to contact you even if you choose to disable this feature.'), + ]; + $form['actions']['submit']['#submit'][] = 'contact_user_profile_form_submit'; + } + + /** + * Implements hook_form_FORM_ID_alter() for \Drupal\user\AccountSettingsForm. + * + * Adds the default personal contact setting on the user settings page. + */ + #[Hook('form_user_admin_settings_alter')] + public function formUserAdminSettingsAlter(&$form, FormStateInterface $form_state) : void { + $form['contact'] = [ + '#type' => 'details', + '#title' => t('Contact settings'), + '#open' => TRUE, + '#weight' => 0, + ]; + $form['contact']['contact_default_status'] = [ + '#type' => 'checkbox', + '#title' => t('Enable the personal contact form by default for new users'), + '#description' => t('Changing this setting will not affect existing users.'), + '#default_value' => \Drupal::configFactory()->getEditable('contact.settings')->get('user_default_enabled'), + ]; + // Add submit handler to save contact configuration. + $form['#submit'][] = 'contact_form_user_admin_settings_submit'; + } + + /** + * Implements hook_rest_resource_alter(). + */ + #[Hook('rest_resource_alter')] + public function restResourceAlter(&$definitions) { + $definitions['entity:contact_message']['class'] = ContactMessageResource::class; + } + +} diff --git a/core/modules/contact/src/Hook/ContactViewsHooks.php b/core/modules/contact/src/Hook/ContactViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fa1eab062d99ed7a3115ea0eb8e4655dfb6ccb7a --- /dev/null +++ b/core/modules/contact/src/Hook/ContactViewsHooks.php @@ -0,0 +1,30 @@ +<?php + +namespace Drupal\contact\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contact. + */ +class ContactViewsHooks { + /** + * @file + * Provide views data for contact.module. + */ + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $data['users']['contact'] = [ + 'field' => [ + 'title' => t('Contact link'), + 'help' => t('Provide a simple link to the user contact page.'), + 'id' => 'contact_link', + ], + ]; + } + +} diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install index 1ccb97b58ad1a324abb1fdefb6216329e6d14e0e..708bbafcd62dfc1e00eb6cc830dfcbeb17529de7 100644 --- a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install +++ b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install @@ -12,7 +12,7 @@ /** * Implements hook_install(). */ -function contact_storage_test_install() { +function contact_storage_test_install(): void { $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); $original = $entity_definition_update_manager->getEntityType('contact_message'); diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module index 7cc20a33250e307096cf0f3dd7a8525116770aeb..792bd4758edc4480befbd2749085a30647c46757 100644 --- a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module +++ b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module @@ -8,56 +8,8 @@ declare(strict_types=1); use Drupal\contact\ContactFormInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Form\FormStateInterface; -/** - * Implements hook_entity_base_field_info(). - */ -function contact_storage_test_entity_base_field_info(EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'contact_message') { - $fields = []; - - $fields['id'] = BaseFieldDefinition::create('integer') - ->setLabel(t('Message ID')) - ->setDescription(t('The message ID.')) - ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE); - - return $fields; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function contact_storage_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - // Set the controller class for nodes to an alternate implementation of the - // Drupal\Core\Entity\EntityStorageInterface interface. - $entity_types['contact_message']->setStorageClass('\Drupal\Core\Entity\Sql\SqlContentEntityStorage'); - $keys = $entity_types['contact_message']->getKeys(); - $keys['id'] = 'id'; - $entity_types['contact_message']->set('entity_keys', $keys); - $entity_types['contact_message']->set('base_table', 'contact_message'); -} - -/** - * Implements hook_form_FORM_ID_alter() for contact_form_form(). - */ -function contact_storage_test_form_contact_form_form_alter(&$form, FormStateInterface $form_state) { - /** @var \Drupal\contact\ContactFormInterface $contact_form */ - $contact_form = $form_state->getFormObject()->getEntity(); - $form['send_a_pony'] = [ - '#type' => 'checkbox', - '#title' => t('Send submitters a voucher for a free pony.'), - '#description' => t('Enable to send an additional email with a free pony voucher to anyone who submits the form.'), - '#default_value' => $contact_form->getThirdPartySetting('contact_storage_test', 'send_a_pony', FALSE), - ]; - $form['#entity_builders'][] = 'contact_storage_test_contact_form_form_builder'; -} - /** * Entity builder for the contact form edit form with third party options. * diff --git a/core/modules/contact/tests/modules/contact_storage_test/src/Hook/ContactStorageTestHooks.php b/core/modules/contact/tests/modules/contact_storage_test/src/Hook/ContactStorageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c5dd5ca65f2651c4a997d478bf7eec0303677009 --- /dev/null +++ b/core/modules/contact/tests/modules/contact_storage_test/src/Hook/ContactStorageTestHooks.php @@ -0,0 +1,60 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\contact_storage_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contact_storage_test. + */ +class ContactStorageTestHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'contact_message') { + $fields = []; + $fields['id'] = BaseFieldDefinition::create('integer')->setLabel(t('Message ID'))->setDescription(t('The message ID.'))->setReadOnly(TRUE)->setSetting('unsigned', TRUE); + return $fields; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + // Set the controller class for nodes to an alternate implementation of the + // Drupal\Core\Entity\EntityStorageInterface interface. + $entity_types['contact_message']->setStorageClass('\Drupal\Core\Entity\Sql\SqlContentEntityStorage'); + $keys = $entity_types['contact_message']->getKeys(); + $keys['id'] = 'id'; + $entity_types['contact_message']->set('entity_keys', $keys); + $entity_types['contact_message']->set('base_table', 'contact_message'); + } + + /** + * Implements hook_form_FORM_ID_alter() for contact_form_form(). + */ + #[Hook('form_contact_form_form_alter')] + public function formContactFormFormAlter(&$form, FormStateInterface $form_state) : void { + /** @var \Drupal\contact\ContactFormInterface $contact_form */ + $contact_form = $form_state->getFormObject()->getEntity(); + $form['send_a_pony'] = [ + '#type' => 'checkbox', + '#title' => t('Send submitters a voucher for a free pony.'), + '#description' => t('Enable to send an additional email with a free pony voucher to anyone who submits the form.'), + '#default_value' => $contact_form->getThirdPartySetting('contact_storage_test', 'send_a_pony', FALSE), + ]; + $form['#entity_builders'][] = 'contact_storage_test_contact_form_form_builder'; + } + +} diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php index 2eb8a79adf879a45bc291ad0b785972f6d0f8f69..c4c7a1db5d3cea6705e927e4ef530eb13abc521a 100644 --- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php +++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php @@ -299,7 +299,7 @@ public function testAdminContact(): void { * @param bool $contact_value * (optional) The value the contact field should be set too. */ - protected function checkContactAccess($response, $contact_value = NULL) { + protected function checkContactAccess($response, $contact_value = NULL): void { $this->drupalLogin($this->adminUser); $this->drupalGet('admin/people/create'); if ($this->config('contact.settings')->get('user_default_enabled', TRUE)) { diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php index a2d877b38616fba2847f84dd6bd90efaed47c2c5..b90d0dbade1bc773b745764558b87a8935d0934d 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -521,7 +521,7 @@ public function testAutoReply(): void { * @param array $third_party_settings * Array of third party settings to be added to the posted form data. */ - public function addContactForm($id, $label, $recipients, $reply, $selected, $message = 'Your message has been sent.', $third_party_settings = []) { + public function addContactForm($id, $label, $recipients, $reply, $selected, $message = 'Your message has been sent.', $third_party_settings = []): void { $edit = []; $edit['label'] = $label; $edit['id'] = $id; @@ -558,7 +558,7 @@ public function addContactForm($id, $label, $recipients, $reply, $selected, $mes * @param string $redirect * The path where user will be redirect after this form has been submitted.. */ - public function updateContactForm($id, $label, $recipients, $reply, $selected, $message = 'Your message has been sent.', $redirect = '/') { + public function updateContactForm($id, $label, $recipients, $reply, $selected, $message = 'Your message has been sent.', $redirect = '/'): void { $edit = []; $edit['label'] = $label; $edit['recipients'] = $recipients; @@ -584,7 +584,7 @@ public function updateContactForm($id, $label, $recipients, $reply, $selected, $ * @param string $message * The message body. */ - public function submitContact($name, $mail, $subject, $id, $message) { + public function submitContact($name, $mail, $subject, $id, $message): void { $edit = []; $edit['name'] = $name; $edit['mail'] = $mail; @@ -603,7 +603,7 @@ public function submitContact($name, $mail, $subject, $id, $message) { /** * Deletes all forms. */ - public function deleteContactForms() { + public function deleteContactForms(): void { $contact_forms = ContactForm::loadMultiple(); foreach ($contact_forms as $id => $contact_form) { if ($id == 'personal') { diff --git a/core/modules/contact/tests/src/Unit/ContactTest.php b/core/modules/contact/tests/src/Unit/ContactTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b11c9cef7e1881314361f799d08fa99119dbc491 --- /dev/null +++ b/core/modules/contact/tests/src/Unit/ContactTest.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\contact\Unit; + +use Drupal\Tests\UnitTestCase; +use Drupal\contact\Hook\ContactHooks; + +/** + * @group contact + */ +class ContactTest extends UnitTestCase { + + /** + * Test contact_menu_local_tasks_alter doesn't throw warnings. + */ + public function testLocalTasksAlter(): void { + require_once $this->root . '/core/modules/contact/contact.module'; + $data = []; + $contactMenuLocalTasksAlter = new ContactHooks(); + $contactMenuLocalTasksAlter->menuLocalTasksAlter($data, 'entity.user.canonical'); + $this->assertTrue(TRUE, 'No warning thrown'); + } + +} diff --git a/core/modules/content_moderation/content_moderation.install b/core/modules/content_moderation/content_moderation.install index d3e817c5671397cb9b4b007f5bf1470c979ebc7e..546e580e41a31ea9c9a923a89843516e46b4e425 100644 --- a/core/modules/content_moderation/content_moderation.install +++ b/core/modules/content_moderation/content_moderation.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function content_moderation_update_last_removed() { +function content_moderation_update_last_removed(): int { return 8700; } diff --git a/core/modules/content_moderation/content_moderation.module b/core/modules/content_moderation/content_moderation.module index 71bb1025398034d02d4dcd48e883e037ddd5ce42..fc3ad6cf133bd1264c974c72c1d36616ca5731d9 100644 --- a/core/modules/content_moderation/content_moderation.module +++ b/core/modules/content_moderation/content_moderation.module @@ -2,168 +2,9 @@ /** * @file - * Contains content_moderation.module. */ -use Drupal\content_moderation\EntityOperations; -use Drupal\content_moderation\EntityTypeInfo; use Drupal\content_moderation\ContentPreprocess; -use Drupal\content_moderation\Plugin\Action\ModerationOptOutPublish; -use Drupal\content_moderation\Plugin\Action\ModerationOptOutUnpublish; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\Display\EntityFormDisplayInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityPublishedInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Url; -use Drupal\views\Plugin\views\filter\Broken; -use Drupal\views\ViewExecutable; -use Drupal\views\Views; -use Drupal\workflows\WorkflowInterface; -use Drupal\Core\Action\Plugin\Action\PublishAction; -use Drupal\Core\Action\Plugin\Action\UnpublishAction; -use Drupal\workflows\Entity\Workflow; -use Drupal\views\Entity\View; - -/** - * Implements hook_help(). - */ -function content_moderation_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - // Main module help for the content_moderation module. - case 'help.page.content_moderation': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Content Moderation module allows you to expand on Drupal\'s "unpublished" and "published" states for content. It allows you to have a published version that is live, but have a separate working copy that is undergoing review before it is published. This is achieved by using <a href=":workflows">Workflows</a> to apply different states and transitions to entities as needed. For more information, see the <a href=":content_moderation">online documentation for the Content Moderation module</a>.', [':content_moderation' => 'https://www.drupal.org/documentation/modules/content_moderation', ':workflows' => Url::fromRoute('help.page', ['name' => 'workflows'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Applying workflows') . '</dt>'; - $output .= '<dd>' . t('Content Moderation allows you to apply <a href=":workflows">Workflows</a> to content, content blocks, and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>, to provide more fine-grained publishing options. For example, a Basic page might have states such as Draft and Published, with allowed transitions such as Draft to Published (making the current revision "live"), and Published to Draft (making a new draft revision of published content).', [':workflows' => Url::fromRoute('help.page', ['name' => 'workflows'])->toString(), ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</dd>'; - if (\Drupal::moduleHandler()->moduleExists('views')) { - $moderated_content_view = View::load('moderated_content'); - if (isset($moderated_content_view) && $moderated_content_view->status() === TRUE) { - $output .= '<dt>' . t('Moderating content') . '</dt>'; - $output .= '<dd>' . t('You can view a list of content awaiting moderation on the <a href=":moderated">moderated content page</a>. This will show any content in an unpublished state, such as Draft or Archived, to help surface content that requires more work from content editors.', [':moderated' => Url::fromRoute('view.moderated_content.moderated_content')->toString()]) . '</dd>'; - } - } - $output .= '<dt>' . t('Configure Content Moderation permissions') . '</dt>'; - $output .= '<dd>' . t('Each transition is exposed as a permission. If a user has the permission for a transition, they can use the transition to change the state of the content item, from Draft to Published.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_entity_base_field_info(). - */ -function content_moderation_entity_base_field_info(EntityTypeInterface $entity_type) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityBaseFieldInfo($entity_type); -} - -/** - * Implements hook_entity_bundle_field_info(). - */ -function content_moderation_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { - if (isset($base_field_definitions['moderation_state'])) { - // Add the target bundle to the moderation state field. Since each bundle - // can be attached to a different moderation workflow, adding this - // information to the field definition allows the associated workflow to be - // derived where a field definition is present. - $base_field_definitions['moderation_state']->setTargetBundle($bundle); - return [ - 'moderation_state' => $base_field_definitions['moderation_state'], - ]; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function content_moderation_entity_type_alter(array &$entity_types) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityTypeAlter($entity_types); -} - -/** - * Implements hook_entity_presave(). - */ -function content_moderation_entity_presave(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityPresave($entity); -} - -/** - * Implements hook_entity_insert(). - */ -function content_moderation_entity_insert(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityInsert($entity); -} - -/** - * Implements hook_entity_update(). - */ -function content_moderation_entity_update(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityUpdate($entity); -} - -/** - * Implements hook_entity_delete(). - */ -function content_moderation_entity_delete(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityDelete($entity); -} - -/** - * Implements hook_entity_revision_delete(). - */ -function content_moderation_entity_revision_delete(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityRevisionDelete($entity); -} - -/** - * Implements hook_entity_translation_delete(). - */ -function content_moderation_entity_translation_delete(EntityInterface $translation) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityTranslationDelete($translation); -} - -/** - * Implements hook_entity_prepare_form(). - */ -function content_moderation_entity_prepare_form(EntityInterface $entity, $operation, FormStateInterface $form_state) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityPrepareForm($entity, $operation, $form_state); -} - -/** - * Implements hook_form_alter(). - */ -function content_moderation_form_alter(&$form, FormStateInterface $form_state, $form_id) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->formAlter($form, $form_state, $form_id); -} /** * Implements hook_preprocess_HOOK(). @@ -173,212 +14,3 @@ function content_moderation_preprocess_node(&$variables) { ->getInstanceFromDefinition(ContentPreprocess::class) ->preprocessNode($variables); } - -/** - * Implements hook_entity_extra_field_info(). - */ -function content_moderation_entity_extra_field_info() { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityExtraFieldInfo(); -} - -/** - * Implements hook_entity_view(). - */ -function content_moderation_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityView($build, $entity, $display, $view_mode); -} - -/** - * Implements hook_entity_form_display_alter(). - */ -function content_moderation_entity_form_display_alter(EntityFormDisplayInterface $form_display, array $context) { - if ($context['form_mode'] === 'layout_builder') { - $form_display->setComponent('moderation_state', [ - 'type' => 'moderation_state_default', - 'weight' => -900, - 'settings' => [], - ]); - } -} - -/** - * Implements hook_entity_access(). - * - * Entities should be viewable if unpublished and the user has the appropriate - * permission. This permission is therefore effectively mandatory for any user - * that wants to moderate things. - */ -function content_moderation_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */ - $moderation_info = Drupal::service('content_moderation.moderation_information'); - - $access_result = NULL; - if ($operation === 'view') { - $access_result = (($entity instanceof EntityPublishedInterface) && !$entity->isPublished()) - ? AccessResult::allowedIfHasPermission($account, 'view any unpublished content') - : AccessResult::neutral(); - - $access_result->addCacheableDependency($entity); - } - elseif ($operation === 'update' && $moderation_info->isModeratedEntity($entity) && $entity->moderation_state) { - /** @var \Drupal\content_moderation\StateTransitionValidation $transition_validation */ - $transition_validation = \Drupal::service('content_moderation.state_transition_validation'); - - $valid_transition_targets = $transition_validation->getValidTransitions($entity, $account); - $access_result = $valid_transition_targets ? AccessResult::neutral() : AccessResult::forbidden('No valid transitions exist for given account.'); - - $access_result->addCacheableDependency($entity); - $workflow = $moderation_info->getWorkflowForEntity($entity); - $access_result->addCacheableDependency($workflow); - // The state transition validation service returns a list of transitions - // based on the user's permission to use them. - $access_result->cachePerPermissions(); - } - - // Do not allow users to delete the state that is configured as the default - // state for the workflow. - if ($entity instanceof WorkflowInterface) { - $configuration = $entity->getTypePlugin()->getConfiguration(); - if (!empty($configuration['default_moderation_state']) && $operation === sprintf('delete-state:%s', $configuration['default_moderation_state'])) { - return AccessResult::forbidden()->addCacheableDependency($entity); - } - } - - return $access_result; -} - -/** - * Implements hook_entity_field_access(). - */ -function content_moderation_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - if ($items && $operation === 'edit') { - /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */ - $moderation_info = Drupal::service('content_moderation.moderation_information'); - - $entity_type = \Drupal::entityTypeManager()->getDefinition($field_definition->getTargetEntityTypeId()); - - $entity = $items->getEntity(); - - // Deny edit access to the published field if the entity is being moderated. - if ($entity_type->hasKey('published') && $moderation_info->isModeratedEntity($entity) && $entity->moderation_state && $field_definition->getName() == $entity_type->getKey('published')) { - return AccessResult::forbidden('Cannot edit the published field of moderated entities.'); - } - } - - return AccessResult::neutral(); -} - -/** - * Implements hook_theme(). - */ -function content_moderation_theme() { - return ['entity_moderation_form' => ['render element' => 'form']]; -} - -/** - * Implements hook_action_info_alter(). - */ -function content_moderation_action_info_alter(&$definitions) { - - // The publish/unpublish actions are not valid on moderated entities. So swap - // their implementations out for alternates that will become a no-op on a - // moderated entity. If another module has already swapped out those classes, - // though, we'll be polite and do nothing. - foreach ($definitions as &$definition) { - if ($definition['id'] === 'entity:publish_action' && $definition['class'] == PublishAction::class) { - $definition['class'] = ModerationOptOutPublish::class; - } - if ($definition['id'] === 'entity:unpublish_action' && $definition['class'] == UnpublishAction::class) { - $definition['class'] = ModerationOptOutUnpublish::class; - } - } -} - -/** - * Implements hook_entity_bundle_info_alter(). - */ -function content_moderation_entity_bundle_info_alter(&$bundles) { - $translatable = FALSE; - /** @var \Drupal\workflows\WorkflowInterface $workflow */ - foreach (Workflow::loadMultipleByType('content_moderation') as $workflow) { - /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $plugin */ - $plugin = $workflow->getTypePlugin(); - foreach ($plugin->getEntityTypes() as $entity_type_id) { - foreach ($plugin->getBundlesForEntityType($entity_type_id) as $bundle_id) { - if (isset($bundles[$entity_type_id][$bundle_id])) { - $bundles[$entity_type_id][$bundle_id]['workflow'] = $workflow->id(); - // If we have even one moderation-enabled translatable bundle, we need - // to make the moderation state bundle translatable as well, to enable - // the revision translation merge logic also for content moderation - // state revisions. - if (!empty($bundles[$entity_type_id][$bundle_id]['translatable'])) { - $translatable = TRUE; - } - } - } - } - } - $bundles['content_moderation_state']['content_moderation_state']['translatable'] = $translatable; -} - -/** - * Implements hook_entity_bundle_delete(). - */ -function content_moderation_entity_bundle_delete($entity_type_id, $bundle_id) { - // Remove non-configuration based bundles from content moderation based - // workflows when they are removed. - foreach (Workflow::loadMultipleByType('content_moderation') as $workflow) { - if ($workflow->getTypePlugin()->appliesToEntityTypeAndBundle($entity_type_id, $bundle_id)) { - $workflow->getTypePlugin()->removeEntityTypeAndBundle($entity_type_id, $bundle_id); - $workflow->save(); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_insert(). - */ -function content_moderation_workflow_insert(WorkflowInterface $entity) { - // Clear bundle cache so workflow gets added or removed from the bundle - // information. - \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); - // Clear field cache so extra field is added or removed. - \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions(); - // Clear the views data cache so the extra field is available in views. - if (\Drupal::moduleHandler()->moduleExists('views')) { - Views::viewsData()->clear(); - } -} - -/** - * Implements hook_ENTITY_TYPE_update(). - */ -function content_moderation_workflow_update(WorkflowInterface $entity) { - // Clear bundle cache so workflow gets added or removed from the bundle - // information. - \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); - // Clear field cache so extra field is added or removed. - \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions(); - // Clear the views data cache so the extra field is available in views. - if (\Drupal::moduleHandler()->moduleExists('views')) { - Views::viewsData()->clear(); - } -} - -/** - * Implements hook_views_post_execute(). - */ -function content_moderation_views_post_execute(ViewExecutable $view) { - // @todo Remove this once broken handlers in views configuration result in - // a view no longer returning results. https://www.drupal.org/node/2907954. - foreach ($view->filter as $id => $filter) { - if (str_starts_with($id, 'moderation_state') && $filter instanceof Broken) { - $view->result = []; - break; - } - } -} diff --git a/core/modules/content_moderation/content_moderation.post_update.php b/core/modules/content_moderation/content_moderation.post_update.php index 57a61b629f427df2a5019a750bbade24f4517135..7456b2b446b812a98bc61fb5f76e6f6e60d7e9b3 100644 --- a/core/modules/content_moderation/content_moderation.post_update.php +++ b/core/modules/content_moderation/content_moderation.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function content_moderation_removed_post_updates() { +function content_moderation_removed_post_updates(): array { return [ 'content_moderation_post_update_update_cms_default_revisions' => '9.0.0', 'content_moderation_post_update_set_default_moderation_state' => '9.0.0', diff --git a/core/modules/content_moderation/content_moderation.views.inc b/core/modules/content_moderation/content_moderation.views.inc index 799af942410d1965c4f77a6a5a2c938878036daa..5c1b9e1ff24afefd4894ed0fa6d32ceaf117a4a6 100644 --- a/core/modules/content_moderation/content_moderation.views.inc +++ b/core/modules/content_moderation/content_moderation.views.inc @@ -2,20 +2,10 @@ /** * @file - * Provide views data for content_moderation.module. - * - * @ingroup views_module_handlers */ use Drupal\content_moderation\ViewsData; -/** - * Implements hook_views_data(). - */ -function content_moderation_views_data() { - return _content_moderation_views_data_object()->getViewsData(); -} - /** * Creates a ViewsData object to respond to views hooks. * diff --git a/core/modules/content_moderation/content_moderation.views_execution.inc b/core/modules/content_moderation/content_moderation.views_execution.inc deleted file mode 100644 index fcf5f95dc4b5b79b7bdbef0a8b8b80f8513e7597..0000000000000000000000000000000000000000 --- a/core/modules/content_moderation/content_moderation.views_execution.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Provide views runtime hooks for content_moderation.module. - */ - -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_query_substitutions(). - */ -function content_moderation_views_query_substitutions(ViewExecutable $view) { - $account = \Drupal::currentUser(); - return [ - '***VIEW_ANY_UNPUBLISHED_NODES***' => intval($account->hasPermission('view any unpublished content')), - ]; -} diff --git a/core/modules/content_moderation/src/Entity/ContentModerationState.php b/core/modules/content_moderation/src/Entity/ContentModerationState.php index 31d7856194a37f70283c0d9910d63919b935cbbf..85ef099318566ce8d4e057aac393a10c88dbfa36 100644 --- a/core/modules/content_moderation/src/Entity/ContentModerationState.php +++ b/core/modules/content_moderation/src/Entity/ContentModerationState.php @@ -2,51 +2,56 @@ namespace Drupal\content_moderation\Entity; +use Drupal\content_moderation\ContentModerationStateAccessControlHandler; +use Drupal\content_moderation\ContentModerationStateStorageSchema; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\TypedData\TranslatableInterface; use Drupal\user\EntityOwnerTrait; +use Drupal\views\EntityViewsData; /** * Defines the Content moderation state entity. * - * @ContentEntityType( - * id = "content_moderation_state", - * label = @Translation("Content moderation state"), - * label_singular = @Translation("content moderation state"), - * label_plural = @Translation("content moderation states"), - * label_count = @PluralTranslation( - * singular = "@count content moderation state", - * plural = "@count content moderation states" - * ), - * handlers = { - * "storage_schema" = "Drupal\content_moderation\ContentModerationStateStorageSchema", - * "views_data" = "\Drupal\views\EntityViewsData", - * "access" = "Drupal\content_moderation\ContentModerationStateAccessControlHandler", - * }, - * base_table = "content_moderation_state", - * revision_table = "content_moderation_state_revision", - * data_table = "content_moderation_state_field_data", - * revision_data_table = "content_moderation_state_field_revision", - * translatable = TRUE, - * internal = TRUE, - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * "uuid" = "uuid", - * "uid" = "uid", - * "owner" = "uid", - * "langcode" = "langcode", - * } - * ) * * @internal * This entity is marked internal because it should not be used directly to * alter the moderation state of an entity. Instead, the computed * moderation_state field should be set on the entity directly. */ +#[ContentEntityType( + id: 'content_moderation_state', + label: new TranslatableMarkup('Content moderation state'), + label_singular: new TranslatableMarkup('content moderation state'), + label_plural: new TranslatableMarkup('content moderation states'), + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + 'uuid' => 'uuid', + 'uid' => 'uid', + 'owner' => 'uid', + 'langcode' => 'langcode', + ], + handlers: [ + 'storage_schema' => ContentModerationStateStorageSchema::class, + 'views_data' => EntityViewsData::class, + 'access' => ContentModerationStateAccessControlHandler::class, + ], + base_table: 'content_moderation_state', + data_table: 'content_moderation_state_field_data', + revision_table: 'content_moderation_state_revision', + revision_data_table: 'content_moderation_state_field_revision', + internal: TRUE, + translatable: TRUE, + label_count: [ + 'singular' => '@count content moderation state', + 'plural' => '@count content moderation states', + ], +)] class ContentModerationState extends ContentEntityBase implements ContentModerationStateInterface { use EntityOwnerTrait; diff --git a/core/modules/content_moderation/src/Hook/ContentModerationHooks.php b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4b4b558311c885c13c76999a91bf41200a809d13 --- /dev/null +++ b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php @@ -0,0 +1,374 @@ +<?php + +namespace Drupal\content_moderation\Hook; + +use Drupal\views\Plugin\views\filter\Broken; +use Drupal\views\ViewExecutable; +use Drupal\views\Views; +use Drupal\workflows\Entity\Workflow; +use Drupal\content_moderation\Plugin\Action\ModerationOptOutUnpublish; +use Drupal\Core\Action\Plugin\Action\UnpublishAction; +use Drupal\content_moderation\Plugin\Action\ModerationOptOutPublish; +use Drupal\Core\Action\Plugin\Action\PublishAction; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\workflows\WorkflowInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Entity\EntityPublishedInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\Display\EntityFormDisplayInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\content_moderation\EntityOperations; +use Drupal\Core\Entity\EntityInterface; +use Drupal\content_moderation\EntityTypeInfo; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\views\Entity\View; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_moderation. + */ +class ContentModerationHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the content_moderation module. + case 'help.page.content_moderation': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Content Moderation module allows you to expand on Drupal\'s "unpublished" and "published" states for content. It allows you to have a published version that is live, but have a separate working copy that is undergoing review before it is published. This is achieved by using <a href=":workflows">Workflows</a> to apply different states and transitions to entities as needed. For more information, see the <a href=":content_moderation">online documentation for the Content Moderation module</a>.', [ + ':content_moderation' => 'https://www.drupal.org/documentation/modules/content_moderation', + ':workflows' => Url::fromRoute('help.page', [ + 'name' => 'workflows', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Applying workflows') . '</dt>'; + $output .= '<dd>' . t('Content Moderation allows you to apply <a href=":workflows">Workflows</a> to content, content blocks, and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>, to provide more fine-grained publishing options. For example, a Basic page might have states such as Draft and Published, with allowed transitions such as Draft to Published (making the current revision "live"), and Published to Draft (making a new draft revision of published content).', [ + ':workflows' => Url::fromRoute('help.page', [ + 'name' => 'workflows', + ])->toString(), + ':field_help' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</dd>'; + if (\Drupal::moduleHandler()->moduleExists('views')) { + $moderated_content_view = View::load('moderated_content'); + if (isset($moderated_content_view) && $moderated_content_view->status() === TRUE) { + $output .= '<dt>' . t('Moderating content') . '</dt>'; + $output .= '<dd>' . t('You can view a list of content awaiting moderation on the <a href=":moderated">moderated content page</a>. This will show any content in an unpublished state, such as Draft or Archived, to help surface content that requires more work from content editors.', [ + ':moderated' => Url::fromRoute('view.moderated_content.moderated_content')->toString(), + ]) . '</dd>'; + } + } + $output .= '<dt>' . t('Configure Content Moderation permissions') . '</dt>'; + $output .= '<dd>' . t('Each transition is exposed as a permission. If a user has the permission for a transition, they can use the transition to change the state of the content item, from Draft to Published.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityBaseFieldInfo($entity_type); + } + + /** + * Implements hook_entity_bundle_field_info(). + */ + #[Hook('entity_bundle_field_info')] + public function entityBundleFieldInfo(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { + if (isset($base_field_definitions['moderation_state'])) { + // Add the target bundle to the moderation state field. Since each bundle + // can be attached to a different moderation workflow, adding this + // information to the field definition allows the associated workflow to be + // derived where a field definition is present. + $base_field_definitions['moderation_state']->setTargetBundle($bundle); + return ['moderation_state' => $base_field_definitions['moderation_state']]; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityTypeAlter($entity_types); + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityPresave($entity); + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityInsert($entity); + } + + /** + * Implements hook_entity_update(). + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityUpdate($entity); + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityDelete($entity); + } + + /** + * Implements hook_entity_revision_delete(). + */ + #[Hook('entity_revision_delete')] + public function entityRevisionDelete(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityRevisionDelete($entity); + } + + /** + * Implements hook_entity_translation_delete(). + */ + #[Hook('entity_translation_delete')] + public function entityTranslationDelete(EntityInterface $translation) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityTranslationDelete($translation); + } + + /** + * Implements hook_entity_prepare_form(). + */ + #[Hook('entity_prepare_form')] + public function entityPrepareForm(EntityInterface $entity, $operation, FormStateInterface $form_state) { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityPrepareForm($entity, $operation, $form_state); + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->formAlter($form, $form_state, $form_id); + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityExtraFieldInfo(); + } + + /** + * Implements hook_entity_view(). + */ + #[Hook('entity_view')] + public function entityView(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityView($build, $entity, $display, $view_mode); + } + + /** + * Implements hook_entity_form_display_alter(). + */ + #[Hook('entity_form_display_alter')] + public function entityFormDisplayAlter(EntityFormDisplayInterface $form_display, array $context) { + if ($context['form_mode'] === 'layout_builder') { + $form_display->setComponent('moderation_state', ['type' => 'moderation_state_default', 'weight' => -900, 'settings' => []]); + } + } + + /** + * Implements hook_entity_access(). + * + * Entities should be viewable if unpublished and the user has the appropriate + * permission. This permission is therefore effectively mandatory for any user + * that wants to moderate things. + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */ + $moderation_info = \Drupal::service('content_moderation.moderation_information'); + $access_result = NULL; + if ($operation === 'view') { + $access_result = $entity instanceof EntityPublishedInterface && !$entity->isPublished() ? AccessResult::allowedIfHasPermission($account, 'view any unpublished content') : AccessResult::neutral(); + $access_result->addCacheableDependency($entity); + } + elseif ($operation === 'update' && $moderation_info->isModeratedEntity($entity) && $entity->moderation_state) { + /** @var \Drupal\content_moderation\StateTransitionValidation $transition_validation */ + $transition_validation = \Drupal::service('content_moderation.state_transition_validation'); + $valid_transition_targets = $transition_validation->getValidTransitions($entity, $account); + $access_result = $valid_transition_targets ? AccessResult::neutral() : AccessResult::forbidden('No valid transitions exist for given account.'); + $access_result->addCacheableDependency($entity); + $workflow = $moderation_info->getWorkflowForEntity($entity); + $access_result->addCacheableDependency($workflow); + // The state transition validation service returns a list of transitions + // based on the user's permission to use them. + $access_result->cachePerPermissions(); + } + // Do not allow users to delete the state that is configured as the default + // state for the workflow. + if ($entity instanceof WorkflowInterface) { + $configuration = $entity->getTypePlugin()->getConfiguration(); + if (!empty($configuration['default_moderation_state']) && $operation === sprintf('delete-state:%s', $configuration['default_moderation_state'])) { + return AccessResult::forbidden()->addCacheableDependency($entity); + } + } + return $access_result; + } + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + if ($items && $operation === 'edit') { + /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */ + $moderation_info = \Drupal::service('content_moderation.moderation_information'); + $entity_type = \Drupal::entityTypeManager()->getDefinition($field_definition->getTargetEntityTypeId()); + $entity = $items->getEntity(); + // Deny edit access to the published field if the entity is being moderated. + if ($entity_type->hasKey('published') && $moderation_info->isModeratedEntity($entity) && $entity->moderation_state && $field_definition->getName() == $entity_type->getKey('published')) { + return AccessResult::forbidden('Cannot edit the published field of moderated entities.'); + } + } + return AccessResult::neutral(); + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['entity_moderation_form' => ['render element' => 'form']]; + } + + /** + * Implements hook_action_info_alter(). + */ + #[Hook('action_info_alter')] + public function actionInfoAlter(&$definitions) { + // The publish/unpublish actions are not valid on moderated entities. So swap + // their implementations out for alternates that will become a no-op on a + // moderated entity. If another module has already swapped out those classes, + // though, we'll be polite and do nothing. + foreach ($definitions as &$definition) { + if ($definition['id'] === 'entity:publish_action' && $definition['class'] == PublishAction::class) { + $definition['class'] = ModerationOptOutPublish::class; + } + if ($definition['id'] === 'entity:unpublish_action' && $definition['class'] == UnpublishAction::class) { + $definition['class'] = ModerationOptOutUnpublish::class; + } + } + } + + /** + * Implements hook_entity_bundle_info_alter(). + */ + #[Hook('entity_bundle_info_alter')] + public function entityBundleInfoAlter(&$bundles) { + $translatable = FALSE; + /** @var \Drupal\workflows\WorkflowInterface $workflow */ + foreach (Workflow::loadMultipleByType('content_moderation') as $workflow) { + /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $plugin */ + $plugin = $workflow->getTypePlugin(); + foreach ($plugin->getEntityTypes() as $entity_type_id) { + foreach ($plugin->getBundlesForEntityType($entity_type_id) as $bundle_id) { + if (isset($bundles[$entity_type_id][$bundle_id])) { + $bundles[$entity_type_id][$bundle_id]['workflow'] = $workflow->id(); + // If we have even one moderation-enabled translatable bundle, we need + // to make the moderation state bundle translatable as well, to enable + // the revision translation merge logic also for content moderation + // state revisions. + if (!empty($bundles[$entity_type_id][$bundle_id]['translatable'])) { + $translatable = TRUE; + } + } + } + } + } + $bundles['content_moderation_state']['content_moderation_state']['translatable'] = $translatable; + } + + /** + * Implements hook_entity_bundle_delete(). + */ + #[Hook('entity_bundle_delete')] + public function entityBundleDelete($entity_type_id, $bundle_id) { + // Remove non-configuration based bundles from content moderation based + // workflows when they are removed. + foreach (Workflow::loadMultipleByType('content_moderation') as $workflow) { + if ($workflow->getTypePlugin()->appliesToEntityTypeAndBundle($entity_type_id, $bundle_id)) { + $workflow->getTypePlugin()->removeEntityTypeAndBundle($entity_type_id, $bundle_id); + $workflow->save(); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_insert(). + */ + #[Hook('workflow_insert')] + public function workflowInsert(WorkflowInterface $entity) { + // Clear bundle cache so workflow gets added or removed from the bundle + // information. + \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); + // Clear field cache so extra field is added or removed. + \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions(); + // Clear the views data cache so the extra field is available in views. + if (\Drupal::moduleHandler()->moduleExists('views')) { + Views::viewsData()->clear(); + } + } + + /** + * Implements hook_ENTITY_TYPE_update(). + */ + #[Hook('workflow_update')] + public function workflowUpdate(WorkflowInterface $entity) { + // Clear bundle cache so workflow gets added or removed from the bundle + // information. + \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); + // Clear field cache so extra field is added or removed. + \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions(); + // Clear the views data cache so the extra field is available in views. + if (\Drupal::moduleHandler()->moduleExists('views')) { + Views::viewsData()->clear(); + } + } + + /** + * Implements hook_views_post_execute(). + */ + #[Hook('views_post_execute')] + public function viewsPostExecute(ViewExecutable $view) { + // @todo Remove this once broken handlers in views configuration result in + // a view no longer returning results. https://www.drupal.org/node/2907954. + foreach ($view->filter as $id => $filter) { + if (str_starts_with($id, 'moderation_state') && $filter instanceof Broken) { + $view->result = []; + break; + } + } + } + +} diff --git a/core/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php b/core/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2fe6a0791fb0d36aa7a7f786dcbe738aab29f396 --- /dev/null +++ b/core/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php @@ -0,0 +1,24 @@ +<?php + +namespace Drupal\content_moderation\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_moderation. + */ +class ContentModerationViewsExecutionHooks { + + /** + * Implements hook_views_query_substitutions(). + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + $account = \Drupal::currentUser(); + return [ + '***VIEW_ANY_UNPUBLISHED_NODES***' => intval($account->hasPermission('view any unpublished content')), + ]; + } + +} diff --git a/core/modules/content_moderation/src/Hook/ContentModerationViewsHooks.php b/core/modules/content_moderation/src/Hook/ContentModerationViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1a632964bd04c9012cd253969d2b483598c97d0a --- /dev/null +++ b/core/modules/content_moderation/src/Hook/ContentModerationViewsHooks.php @@ -0,0 +1,20 @@ +<?php + +namespace Drupal\content_moderation\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_moderation. + */ +class ContentModerationViewsHooks { + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + return _content_moderation_views_data_object()->getViewsData(); + } + +} diff --git a/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutPublish.php b/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutPublish.php index 0b63f78f2abb0c95201123a14f73975be8e17810..935e054133292861470a3ae15a51a3cf433b9153 100644 --- a/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutPublish.php +++ b/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutPublish.php @@ -46,7 +46,7 @@ class ModerationOptOutPublish extends PublishAction implements ContainerFactoryP * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutUnpublish.php b/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutUnpublish.php index 541429fecc0156d4143c62d4059879d5d2980f72..8d6755b9b006636aff1a5fb61f4601d055dbde83 100644 --- a/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutUnpublish.php +++ b/core/modules/content_moderation/src/Plugin/Action/ModerationOptOutUnpublish.php @@ -45,7 +45,7 @@ class ModerationOptOutUnpublish extends UnpublishAction { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php index d05d34cb645d981f386b91aadd639dacb20f8cb3..df7ddcd47b9a5745e20379a3ec503451543c74bf 100644 --- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php +++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php @@ -63,7 +63,7 @@ class ContentModeration extends WorkflowTypeBase implements ContentModerationInt * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/content_moderation/src/Plugin/views/sort/ModerationStateSort.php b/core/modules/content_moderation/src/Plugin/views/sort/ModerationStateSort.php index 26e2962e4bb80312c71d499c6fd446a78b79e10b..1e7c34a05e95642e5444912fbba96c75643a2f18 100644 --- a/core/modules/content_moderation/src/Plugin/views/sort/ModerationStateSort.php +++ b/core/modules/content_moderation/src/Plugin/views/sort/ModerationStateSort.php @@ -31,7 +31,7 @@ class ModerationStateSort extends SortPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install index aad9057f44693a374f6bc8905631887533c09efb..8682af1f7631508fb9112b3c070f5ae17b6ab4ab 100644 --- a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install +++ b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function content_moderation_test_resave_install() { +function content_moderation_test_resave_install(): void { // Make sure that this module's hooks are run before Content Moderation's // hooks. module_set_weight('content_moderation_test_resave', -10); diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.module b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.module deleted file mode 100644 index 609ca0c65dbc2f242dae154454a18f7612ad0531..0000000000000000000000000000000000000000 --- a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.module +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for the Content moderation test re-save module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; - -/** - * Implements hook_entity_insert(). - */ -function content_moderation_test_resave_entity_insert(EntityInterface $entity) { - /** @var \Drupal\content_moderation\ModerationInformationInterface $content_moderation */ - $content_moderation = \Drupal::service('content_moderation.moderation_information'); - if ($content_moderation->isModeratedEntity($entity)) { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - // Saving the passed entity object would populate its loaded revision ID, - // which we want to avoid. Thus, save a clone of the original object. - $cloned_entity = clone $entity; - // Set the entity's syncing status, as we do not want Content Moderation to - // create new revisions for the re-saving. Without this call Content - // Moderation would end up creating two separate content moderation state - // entities: one for the re-save revision and one for the initial revision. - $cloned_entity->setSyncing(TRUE)->save(); - - // Record the fact that a re-save happened. - \Drupal::state()->set('content_moderation_test_resave', TRUE); - } -} diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/src/Hook/ContentModerationTestResaveHooks.php b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/src/Hook/ContentModerationTestResaveHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..8bcb56c4b57028fd7360c321225c55b288244aee --- /dev/null +++ b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/src/Hook/ContentModerationTestResaveHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\content_moderation_test_resave\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_moderation_test_resave. + */ +class ContentModerationTestResaveHooks { + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + /** @var \Drupal\content_moderation\ModerationInformationInterface $content_moderation */ + $content_moderation = \Drupal::service('content_moderation.moderation_information'); + if ($content_moderation->isModeratedEntity($entity)) { + /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ + // Saving the passed entity object would populate its loaded revision ID, + // which we want to avoid. Thus, save a clone of the original object. + $cloned_entity = clone $entity; + // Set the entity's syncing status, as we do not want Content Moderation to + // create new revisions for the re-saving. Without this call Content + // Moderation would end up creating two separate content moderation state + // entities: one for the re-save revision and one for the initial revision. + $cloned_entity->setSyncing(TRUE)->save(); + // Record the fact that a re-save happened. + \Drupal::state()->set('content_moderation_test_resave', TRUE); + } + } + +} diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_views/content_moderation_test_views.module b/core/modules/content_moderation/tests/modules/content_moderation_test_views/content_moderation_test_views.module deleted file mode 100644 index b465af77169532d173716854f383c80ff21ceb2a..0000000000000000000000000000000000000000 --- a/core/modules/content_moderation/tests/modules/content_moderation_test_views/content_moderation_test_views.module +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/** - * @file - * Module file for the content moderation test views module. - */ - -declare(strict_types=1); - -use Drupal\views\Plugin\views\query\QueryPluginBase; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_query_alter(). - * - * @see \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateSortTest::testSortRevisionBaseTable() - */ -function content_moderation_test_views_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { - // Add a secondary sort order to ensure consistent builds when testing click - // and table sorting. - if ($view->id() === 'test_content_moderation_state_sort_revision_table') { - $query->addOrderBy('node_field_revision', 'vid', 'ASC'); - } -} - -/** - * Implements hook_views_data_alter(). - * - * @see \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateFilterTest - */ -function content_moderation_test_views_views_data_alter(array &$data) { - if (isset($data['users_field_data'])) { - $data['users_field_data']['uid_revision_test'] = [ - 'help' => t('Relate the content revision to the user who created it.'), - 'real field' => 'uid', - 'relationship' => [ - 'title' => t('Content revision authored'), - 'help' => t('Relate the content revision to the user who created it. This relationship will create one record for each content revision item created by the user.'), - 'id' => 'standard', - 'base' => 'node_field_revision', - 'base field' => 'uid', - 'field' => 'uid', - 'label' => t('node revisions'), - ], - ]; - } -} diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_views/src/Hook/ContentModerationTestViewsHooks.php b/core/modules/content_moderation/tests/modules/content_moderation_test_views/src/Hook/ContentModerationTestViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f4d6e5601e0fedda6280cefd04c4a9107315c3e8 --- /dev/null +++ b/core/modules/content_moderation/tests/modules/content_moderation_test_views/src/Hook/ContentModerationTestViewsHooks.php @@ -0,0 +1,54 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\content_moderation_test_views\Hook; + +use Drupal\views\Plugin\views\query\QueryPluginBase; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_moderation_test_views. + */ +class ContentModerationTestViewsHooks { + + /** + * Implements hook_views_query_alter(). + * + * @see \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateSortTest::testSortRevisionBaseTable() + */ + #[Hook('views_query_alter')] + public function viewsQueryAlter(ViewExecutable $view, QueryPluginBase $query) { + // Add a secondary sort order to ensure consistent builds when testing click + // and table sorting. + if ($view->id() === 'test_content_moderation_state_sort_revision_table') { + $query->addOrderBy('node_field_revision', 'vid', 'ASC'); + } + } + + /** + * Implements hook_views_data_alter(). + * + * @see \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateFilterTest + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(array &$data) { + if (isset($data['users_field_data'])) { + $data['users_field_data']['uid_revision_test'] = [ + 'help' => t('Relate the content revision to the user who created it.'), + 'real field' => 'uid', + 'relationship' => [ + 'title' => t('Content revision authored'), + 'help' => t('Relate the content revision to the user who created it. This relationship will create one record for each content revision item created by the user.'), + 'id' => 'standard', + 'base' => 'node_field_revision', + 'base field' => 'uid', + 'field' => 'uid', + 'label' => t('node revisions'), + ], + ]; + } + } + +} diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php index 039556243921c37976ee3656a41217e03a73531e..ea6d277506f7b1240b62fad09ed522d52c17fffd 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php @@ -7,6 +7,7 @@ use Drupal\Tests\BrowserTestBase; use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait; use Drupal\Tests\content_translation\Traits\ContentTranslationTestTrait; +use Drupal\user\Entity\Role; /** * Test content_moderation functionality with content_translation. @@ -34,14 +35,6 @@ class ModerationContentTranslationTest extends BrowserTestBase { 'content_translation', ]; - /** - * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 - */ - protected bool $usesSuperUserAccessPolicy = TRUE; - /** * {@inheritdoc} */ @@ -52,7 +45,12 @@ class ModerationContentTranslationTest extends BrowserTestBase { */ protected function setUp(): void { parent::setUp(); - $this->drupalLogin($this->rootUser); + $this->adminUser = $this->drupalCreateUser([ + 'bypass node access', + 'create content translations', + 'translate any entity', + ]); + $this->drupalLogin($this->adminUser); // Create an Article content type. $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article'])->save(); static::createLanguageFromLangcode('fr'); @@ -91,7 +89,7 @@ public function testModerationWithExistingContent(): void { $workflow = $this->createEditorialWorkflow(); $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'article'); $workflow->save(); - $this->drupalLogin($this->rootUser); + $this->grantPermissions(Role::load(Role::AUTHENTICATED_ID), ['use editorial transition publish']); // Edit the English node. $this->drupalGet('node/' . $english_node->id() . '/edit'); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index f9a0a753ee0bf77a6ef338e9fb8ea77dd064b7e0..8688e5ad034caf2e078c4df4ef5b227e6447cb7d 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -29,16 +29,20 @@ class ModerationFormTest extends ModerationStateTestBase { /** * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 */ - protected bool $usesSuperUserAccessPolicy = TRUE; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ - protected $defaultTheme = 'stark'; + protected function getAdministratorPermissions(): array { + return array_merge($this->permissions, [ + 'administer entity_test content', + 'view test entity', + 'translate any entity', + 'bypass node access', + ]); + } /** * {@inheritdoc} @@ -196,7 +200,8 @@ public function testModerationForm(): void { * Tests moderation non-bundle entity type. */ public function testNonBundleModerationForm(): void { - $this->drupalLogin($this->rootUser); + $this->adminUser = $this->drupalCreateUser($this->getAdministratorPermissions()); + $this->drupalLogin($this->adminUser); $this->workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub'); $this->workflow->save(); @@ -290,7 +295,8 @@ public function testModerationFormSetsRevisionAuthor(): void { * Tests translated and moderated nodes. */ public function testContentTranslationNodeForm(): void { - $this->drupalLogin($this->rootUser); + $this->adminUser = $this->drupalCreateUser($this->getAdministratorPermissions()); + $this->drupalLogin($this->adminUser); // Add French language. static::createLanguageFromLangcode('fr'); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php index 1710c550f76a17b54389f5142e953cf4c43fd288..a3b8abe12361c85f98e2685ec1b33bf8c8a51a98 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php @@ -29,16 +29,19 @@ class ModerationLocaleTest extends ModerationStateTestBase { /** * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 */ - protected bool $usesSuperUserAccessPolicy = TRUE; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ - protected $defaultTheme = 'stark'; + protected function getAdministratorPermissions(): array { + return array_merge($this->permissions, [ + 'create content translations', + 'bypass node access', + 'translate any entity', + ]); + } /** * {@inheritdoc} @@ -46,8 +49,8 @@ class ModerationLocaleTest extends ModerationStateTestBase { protected function setUp(): void { parent::setUp(); - $this->drupalLogin($this->rootUser); - + $this->adminUser = $this->drupalCreateUser($this->getAdministratorPermissions()); + $this->drupalLogin($this->adminUser); // Enable moderation on Article node type. $this->createContentTypeFromUi('Article', 'article', TRUE); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php index 5880df23bd6717c5254b645937b346ff76187e34..4ab3497c058fb3855ca24811b97f1200bbad83e2 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php @@ -16,16 +16,18 @@ class ModerationStateBlockTest extends ModerationStateTestBase { /** * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 */ - protected bool $usesSuperUserAccessPolicy = TRUE; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ - protected $defaultTheme = 'stark'; + protected function getAdministratorPermissions(): array { + return array_merge($this->permissions, [ + 'administer blocks', + 'administer block content', + ]); + } /** * {@inheritdoc} @@ -64,7 +66,8 @@ protected function setUp(): void { * @see \Drupal\content_moderation\Tests\ModerationFormTest::testModerationForm */ public function testCustomBlockModeration(): void { - $this->drupalLogin($this->rootUser); + $this->adminUser = $this->drupalCreateUser($this->getAdministratorPermissions()); + $this->drupalLogin($this->adminUser); // Enable moderation for content blocks. $edit['bundles[basic]'] = TRUE; diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php index fd86154bf8f0c77e845dd5385bb96594b311c557..e7c0b8f9e8f18f2ff02d7e485005a8e7f5471bdb 100644 --- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php @@ -251,7 +251,7 @@ public function testWorkflowChanges($view_id): void { * An associative array mapping the columns of the result set from the view * (as keys) and the expected result set (as values). */ - protected function executeAndAssertIdenticalResultset(ViewEntityInterface $view_entity, $expected, $column_map) { + protected function executeAndAssertIdenticalResultset(ViewEntityInterface $view_entity, $expected, $column_map): void { $executable = $this->container->get('views.executable')->get($view_entity); $this->executeView($executable); $this->assertIdenticalResultset($executable, $expected, $column_map); diff --git a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php index 5829390ecc6b334bbe3e9654925754f9e6304f87..5446bf2675448c4db881e867079ac0e3bb5b8108 100644 --- a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php +++ b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php @@ -24,16 +24,18 @@ class WorkspaceContentModerationIntegrationTest extends ModerationStateTestBase /** * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 */ - protected bool $usesSuperUserAccessPolicy = TRUE; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ - protected $defaultTheme = 'stark'; + protected function getAdministratorPermissions(): array { + return array_merge($this->permissions, [ + 'bypass node access', + 'view any workspace', + ]); + } /** * {@inheritdoc} @@ -41,7 +43,8 @@ class WorkspaceContentModerationIntegrationTest extends ModerationStateTestBase protected function setUp(): void { parent::setUp(); - $this->drupalLogin($this->rootUser); + $this->adminUser = $this->drupalCreateUser($this->getAdministratorPermissions()); + $this->drupalLogin($this->adminUser); // Enable moderation on Article node type. $this->createContentTypeFromUi('Article', 'article', TRUE); diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index 30d12fbb81096231f454f4c811c9f664e3f0c140..2c8fe2ef91f39e5de0e8945a4036d117b9256075 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -834,7 +834,7 @@ protected function createEntity($entity_type_id, $moderation_state = 'published' * @return \Drupal\Core\Entity\EntityInterface * The reloaded entity. */ - protected function reloadEntity(EntityInterface $entity, $revision_id = FALSE) { + protected function reloadEntity(EntityInterface $entity, $revision_id = FALSE): EntityInterface { /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */ $storage = \Drupal::entityTypeManager()->getStorage($entity->getEntityTypeId()); $storage->resetCache([$entity->id()]); diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php index 69c1b93a9c7cba355bf338f47fe02773d3176aad..f7ab296b5f9a64704290dc61b1476808ad268f85 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { /** * Creates a page node type to test with, ensuring that it's moderated. */ - protected function createNodeType() { + protected function createNodeType(): void { $node_type = NodeType::create([ 'type' => 'page', 'name' => 'Page', diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php index e769818a9cb20144f8c5dc4cd6a7221616b173cd..3b74d1afe38258d71808359595c8ad5e85e90de0 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php @@ -33,14 +33,6 @@ class EntityStateChangeValidationTest extends KernelTestBase { 'workflows', ]; - /** - * {@inheritdoc} - * - * @todo Remove and fix test to not rely on super user. - * @see https://www.drupal.org/project/drupal/issues/3437620 - */ - protected bool $usesSuperUserAccessPolicy = TRUE; - /** * An admin user. * @@ -69,7 +61,6 @@ protected function setUp(): void { * @covers ::validate */ public function testValidTransition(): void { - $this->setCurrentUser($this->adminUser); $node_type = NodeType::create([ 'type' => 'example', @@ -87,6 +78,7 @@ public function testValidTransition(): void { $node->moderation_state->value = 'draft'; $node->save(); + $this->setCurrentUser($this->createUser(['use editorial transition publish'])); $node->moderation_state->value = 'published'; $this->assertCount(0, $node->validate()); $node->save(); @@ -153,7 +145,6 @@ public function testInvalidState(): void { * Tests validation with no initial state or an invalid state. */ public function testInvalidStateWithoutExisting(): void { - $this->setCurrentUser($this->adminUser); // Create content without moderation enabled for the content type. $node_type = NodeType::create([ 'type' => 'example', @@ -173,6 +164,7 @@ public function testInvalidStateWithoutExisting(): void { $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example'); $workflow->save(); + $this->setCurrentUser($this->createUser(['use editorial transition create_new_draft'])); // Validate the invalid state. $node = Node::load($node->id()); $node->moderation_state->value = 'invalid_state'; @@ -203,7 +195,6 @@ public function testInvalidStateWithoutExisting(): void { * Tests state transition validation with multiple languages. */ public function testInvalidStateMultilingual(): void { - $this->setCurrentUser($this->adminUser); ConfigurableLanguage::createFromLangcode('fr')->save(); $node_type = NodeType::create([ @@ -216,6 +207,7 @@ public function testInvalidStateMultilingual(): void { $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example'); $workflow->save(); + $this->setCurrentUser($this->createUser(['use editorial transition archive'])); $node = Node::create([ 'type' => 'example', 'title' => 'English Published Node', @@ -261,7 +253,6 @@ public function testInvalidStateMultilingual(): void { * Tests that content without prior moderation information can be moderated. */ public function testExistingContentWithNoModeration(): void { - $this->setCurrentUser($this->adminUser); $node_type = NodeType::create([ 'type' => 'example', @@ -282,6 +273,7 @@ public function testExistingContentWithNoModeration(): void { $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example'); $workflow->save(); + $this->setCurrentUser($this->createUser(['use editorial transition publish'])); $node = Node::load($nid); // Having no previous state should not break validation. diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php index eac3febc2123028f496c882a48aaca16e99964d5..cfa1b9101e3b341e173a90efe25d42edd04da1d3 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php @@ -142,7 +142,7 @@ public function testEntityBaseFieldProvider(): void { /** * Add moderation to an entity type and bundle. */ - protected function enableModeration($entity_type_id, $bundle) { + protected function enableModeration($entity_type_id, $bundle): void { $workflow = $this->createEditorialWorkflow(); $workflow->getTypePlugin()->addEntityTypeAndBundle($entity_type_id, $bundle); $workflow->save(); diff --git a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php index 80e274146dbf523c78cccf95fbc1efd2e1e67ee3..844bfc8b688f518345be8c83850d840ce4acbc62 100644 --- a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php @@ -301,7 +301,7 @@ protected function createEditorialWorkflow() { /** * {@inheritdoc} */ - protected function addEntityTypeAndBundleToWorkflow(WorkflowInterface $workflow, $entity_type_id, $bundle) { + protected function addEntityTypeAndBundleToWorkflow(WorkflowInterface $workflow, $entity_type_id, $bundle): void { $this->workspaceManager->executeOutsideWorkspace(function () use ($workflow, $entity_type_id, $bundle) { $this->traitAddEntityTypeAndBundleToWorkflow($workflow, $entity_type_id, $bundle); }); diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index 9d703c71ff0b1ac2839f3ca9ec20673a6cc229ab..6180db9cce22c6a1febb23d9377de493f3e7a9c7 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -42,7 +42,7 @@ protected function setUp(): void { /** * Creates the entity type manager mock returning entity type objects. */ - protected function setupEntityTypes() { + protected function setupEntityTypes(): void { $definition = $this->createMock(EntityTypeInterface::class); $definition->expects($this->any()) ->method('getClass') diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index c038550b623b963c864bb7a0389a5d0d2d3363ba..b12d94e05bf7d549e7ce2836d9bc14602c5658d9 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -2,7 +2,6 @@ /** * @file - * The content translation administration forms. */ use Drupal\content_translation\BundleTranslationSettingsInterface; @@ -78,7 +77,7 @@ function content_translation_field_sync_widget(FieldDefinitionInterface $field, /** * (proxied) Implements hook_form_FORM_ID_alter(). */ -function _content_translation_form_language_content_settings_form_alter(array &$form, FormStateInterface $form_state) { +function _content_translation_form_language_content_settings_form_alter(array &$form, FormStateInterface $form_state): void { // Inject into the content language settings the translation settings if the // user has the required permission. if (!\Drupal::currentUser()->hasPermission('administer content translation')) { diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index ba67d2141eb5bb7274ab8fc4f7cc933e083ebb1d..a5a8b7dfdf8ef843d7ba09d8aab74f8f341505a0 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -11,7 +11,7 @@ /** * Implements hook_install(). */ -function content_translation_install() { +function content_translation_install(): void { // Assign a fairly low weight to ensure our implementation of // hook_module_implements_alter() is run among the last ones. module_set_weight('content_translation', 10); @@ -41,6 +41,6 @@ function content_translation_install() { /** * Implements hook_update_last_removed(). */ -function content_translation_update_last_removed() { +function content_translation_update_last_removed(): int { return 8400; } diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index eba279690f0663d6dd9e7cab55b9e31532c4e364..b78d838ef509f09bd762e5ab481df5f8ee499eb9 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -2,56 +2,13 @@ /** * @file - * Allows entities to be translated into different languages. */ -use Drupal\Core\Url; -use Drupal\content_translation\BundleTranslationSettingsInterface; -use Drupal\content_translation\ContentTranslationManager; use Drupal\Core\Access\AccessResult; -use Drupal\Core\Cache\CacheableMetadata; -use Drupal\Core\Entity\ContentEntityFormInterface; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\StringTranslation\TranslatableMarkup; -use Drupal\language\ContentLanguageSettingsInterface; - -/** - * Implements hook_help(). - */ -function content_translation_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.content_translation': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Content Translation module allows you to translate content, comments, content blocks, taxonomy terms, users and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>. Together with the modules <a href=":language">Language</a>, <a href=":config-trans">Configuration Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":translation-entity">online documentation for the Content Translation module</a>.', [':locale' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#', ':config-trans' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? Url::fromRoute('help.page', ['name' => 'config_translation'])->toString() : '#', ':language' => Url::fromRoute('help.page', ['name' => 'language'])->toString(), ':translation-entity' => 'https://www.drupal.org/docs/8/core/modules/content-translation', ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Enabling translation') . '</dt>'; - $output .= '<dd>' . t('In order to translate content, the website must have at least two <a href=":url">languages</a>. When that is the case, you can enable translation for the desired content entities on the <a href=":translation-entity">Content language</a> page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', [':url' => Url::fromRoute('entity.configurable_language.collection')->toString(), ':translation-entity' => Url::fromRoute('language.content_settings_page')->toString(), ':language-help' => Url::fromRoute('help.page', ['name' => 'language'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Enabling field translation') . '</dt>'; - $output .= '<dd>' . t('You can define which fields of a content entity can be translated. For example, you might want to translate the title and body field while leaving the image field untranslated. If you exclude a field from being translated, it will still show up in the content editing form, but any changes made to that field will be applied to <em>all</em> translations of that content.') . '</dd>'; - $output .= '<dt>' . t('Translating content') . '</dt>'; - $output .= '<dd>' . t('If translation is enabled you can translate a content entity via the Translate tab (or Translate link). The Translations page of a content entity gives an overview of the translation status for the current content and lets you add, edit, and delete its translations. This process is similar for every translatable content entity on your site.') . '</dd>'; - $output .= '<dt>' . t('Changing the source language for a translation') . '</dt>'; - $output .= '<dd>' . t('When you add a new translation, the original text you are translating is displayed in the edit form as the <em>source</em>. If at least one translation of the original content already exists when you add a new translation, you can choose either the original content (default) or one of the other translations as the source, using the select list in the Source language section. After saving the translation, the chosen source language is then listed on the Translate tab of the content.') . '</dd>'; - $output .= '<dt>' . t('Setting status of translations') . '</dt>'; - $output .= '<dd>' . t('If you edit a translation in one language you may want to set the status of the other translations as <em>out-of-date</em>. You can set this status by selecting the <em>Flag other translations as outdated</em> checkbox in the Translation section of the content editing form. The status will be visible on the Translations page.') . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'language.content_settings_page': - $output = ''; - if (!\Drupal::languageManager()->isMultilingual()) { - $output .= '<p>' . t('Before you can translate content, there must be at least two languages added on the <a href=":url">languages administration</a> page.', [':url' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</p>'; - } - return $output; - } -} /** * Implements hook_module_implements_alter(). @@ -75,145 +32,6 @@ function content_translation_module_implements_alter(&$implementations, $hook) { } } -/** - * Implements hook_language_type_info_alter(). - */ -function content_translation_language_types_info_alter(array &$language_types) { - // Make content language negotiation configurable by removing the 'locked' - // flag. - $language_types[LanguageInterface::TYPE_CONTENT]['locked'] = FALSE; - unset($language_types[LanguageInterface::TYPE_CONTENT]['fixed']); -} - -/** - * Implements hook_entity_type_alter(). - * - * The content translation UI relies on the entity info to provide its features. - * See the documentation of hook_entity_type_build() in the Entity API - * documentation for more details on all the entity info keys that may be - * defined. - * - * To make Content Translation automatically support an entity type some keys - * may need to be defined, but none of them is required unless the entity path - * is different from the usual /ENTITY_TYPE/{ENTITY_TYPE} pattern (for instance - * "/taxonomy/term/{taxonomy_term}"). Here are a list of those optional keys: - * - canonical: This key (in the 'links' entity info property) must be defined - * if the entity path is different from /ENTITY_TYPE/{ENTITY_TYPE} - * - translation: This key (in the 'handlers' entity annotation property) - * specifies the translation handler for the entity type. If an entity type is - * translatable and no translation handler is defined, - * \Drupal\content_translation\ContentTranslationHandler will be assumed. - * Every translation handler must implement - * \Drupal\content_translation\ContentTranslationHandlerInterface. - * - content_translation_ui_skip: By default, entity types that do not have a - * canonical link template cannot be enabled for translation. Setting this key - * to TRUE overrides that. When that key is set, the Content Translation - * module will not provide any UI for translating the entity type, and the - * entity type should implement its own UI. For instance, this is useful for - * entity types that are embedded into others for editing (which would not - * need a canonical link, but could still support translation). - * - content_translation_metadata: To implement its business logic the content - * translation UI relies on various metadata items describing the translation - * state. The default implementation is provided by - * \Drupal\content_translation\ContentTranslationMetadataWrapper, which is - * relying on one field for each metadata item (field definitions are provided - * by the translation handler). Entity types needing to customize this - * behavior can specify an alternative class through the - * 'content_translation_metadata' key in the entity type definition. Every - * content translation metadata wrapper needs to implement - * \Drupal\content_translation\ContentTranslationMetadataWrapperInterface. - * - * If the entity paths match the default pattern above and there is no need for - * an entity-specific translation handler, Content Translation will provide - * built-in support for the entity. However enabling translation for each - * translatable bundle will be required. - * - * @see \Drupal\Core\Entity\Annotation\EntityType - */ -function content_translation_entity_type_alter(array &$entity_types) { - // Provide defaults for translation info. - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - foreach ($entity_types as $entity_type) { - if ($entity_type->isTranslatable()) { - if (!$entity_type->hasHandlerClass('translation')) { - $entity_type->setHandlerClass('translation', 'Drupal\content_translation\ContentTranslationHandler'); - } - if (!$entity_type->get('content_translation_metadata')) { - $entity_type->set('content_translation_metadata', 'Drupal\content_translation\ContentTranslationMetadataWrapper'); - } - if (!$entity_type->getFormClass('content_translation_deletion')) { - $entity_type->setFormClass('content_translation_deletion', '\Drupal\content_translation\Form\ContentTranslationDeleteForm'); - } - - $translation = $entity_type->get('translation'); - if (!$translation || !isset($translation['content_translation'])) { - $translation['content_translation'] = []; - } - - if ($entity_type->hasLinkTemplate('canonical')) { - // Provide default route names for the translation paths. - if (!$entity_type->hasLinkTemplate('drupal:content-translation-overview')) { - $translations_path = $entity_type->getLinkTemplate('canonical') . '/translations'; - $entity_type->setLinkTemplate('drupal:content-translation-overview', $translations_path); - $entity_type->setLinkTemplate('drupal:content-translation-add', $translations_path . '/add/{source}/{target}'); - $entity_type->setLinkTemplate('drupal:content-translation-edit', $translations_path . '/edit/{language}'); - $entity_type->setLinkTemplate('drupal:content-translation-delete', $translations_path . '/delete/{language}'); - } - // @todo Remove this as soon as menu access checks rely on the - // controller. See https://www.drupal.org/node/2155787. - $translation['content_translation'] += [ - 'access_callback' => 'content_translation_translate_access', - ]; - } - $entity_type->set('translation', $translation); - } - - $entity_type->addConstraint('ContentTranslationSynchronizedFields'); - } -} - -/** - * Implements hook_ENTITY_TYPE_insert(). - * - * Installs Content Translation's field storage definitions for the target - * entity type, if required. - * - * Also clears the bundle information cache so that the bundle's translatability - * will be set properly. - * - * @see content_translation_entity_bundle_info_alter() - * @see \Drupal\content_translation\ContentTranslationManager::isEnabled() - */ -function content_translation_language_content_settings_insert(ContentLanguageSettingsInterface $settings) { - if ($settings->getThirdPartySetting('content_translation', 'enabled', FALSE)) { - _content_translation_install_field_storage_definitions($settings->getTargetEntityTypeId()); - } - - \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); -} - -/** - * Implements hook_ENTITY_TYPE_update(). - * - * Installs Content Translation's field storage definitions for the target - * entity type, if required. - * - * Also clears the bundle information cache so that the bundle's translatability - * will be changed properly. - * - * @see content_translation_entity_bundle_info_alter() - * @see \Drupal\content_translation\ContentTranslationManager::isEnabled() - */ -function content_translation_language_content_settings_update(ContentLanguageSettingsInterface $settings) { - $original_settings = $settings->original; - if ($settings->getThirdPartySetting('content_translation', 'enabled', FALSE) - && !$original_settings->getThirdPartySetting('content_translation', 'enabled', FALSE) - ) { - _content_translation_install_field_storage_definitions($settings->getTargetEntityTypeId()); - } - \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); -} - /** * Installs Content Translation's fields for a given entity type. * @@ -241,127 +59,6 @@ function _content_translation_install_field_storage_definitions($entity_type_id) } } -/** - * Implements hook_entity_bundle_info_alter(). - */ -function content_translation_entity_bundle_info_alter(&$bundles) { - /** @var \Drupal\content_translation\ContentTranslationManagerInterface $content_translation_manager */ - $content_translation_manager = \Drupal::service('content_translation.manager'); - foreach ($bundles as $entity_type_id => &$info) { - foreach ($info as $bundle => &$bundle_info) { - $bundle_info['translatable'] = $content_translation_manager->isEnabled($entity_type_id, $bundle); - if ($bundle_info['translatable'] && $content_translation_manager instanceof BundleTranslationSettingsInterface) { - $settings = $content_translation_manager->getBundleTranslationSettings($entity_type_id, $bundle); - // If pending revision support is enabled for this bundle, we need to - // hide untranslatable field widgets, otherwise changes in pending - // revisions might be overridden by changes in later default revisions. - $bundle_info['untranslatable_fields.default_translation_affected'] = - !empty($settings['untranslatable_fields_hide']) || ContentTranslationManager::isPendingRevisionSupportEnabled($entity_type_id, $bundle); - } - } - } -} - -/** - * Implements hook_entity_base_field_info(). - */ -function content_translation_entity_base_field_info(EntityTypeInterface $entity_type) { - /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ - $manager = \Drupal::service('content_translation.manager'); - $entity_type_id = $entity_type->id(); - if ($manager->isSupported($entity_type_id)) { - $definitions = $manager->getTranslationHandler($entity_type_id)->getFieldDefinitions(); - $installed_storage_definitions = \Drupal::service('entity.last_installed_schema.repository')->getLastInstalledFieldStorageDefinitions($entity_type_id); - // We return metadata storage fields whenever content translation is enabled - // or it was enabled before, so that we keep translation metadata around - // when translation is disabled. - // @todo Re-evaluate this approach and consider removing field storage - // definitions and the related field data if the entity type has no bundle - // enabled for translation. - // @see https://www.drupal.org/node/2907777 - if ($manager->isEnabled($entity_type_id) || array_intersect_key($definitions, $installed_storage_definitions)) { - return $definitions; - } - } -} - -/** - * Implements hook_field_info_alter(). - * - * Content translation extends the @FieldType annotation with following key: - * - column_groups: contains information about the field type properties - * which columns should be synchronized across different translations and - * which are translatable. This is useful for instance to translate the - * "alt" and "title" textual elements of an image field, while keeping the - * same image on every translation. Each group has the following keys: - * - title: Title of the column group. - * - translatable: (optional) If the column group should be translatable by - * default, defaults to FALSE. - * - columns: (optional) A list of columns of this group. Defaults to the - * name of the group as the single column. - * - require_all_groups_for_translation: (optional) Set to TRUE to enforce - * that making this column group translatable requires all others to be - * translatable too. - * - * @see Drupal\image\Plugin\Field\FieldType\ImageItem - */ -function content_translation_field_info_alter(&$info) { - foreach ($info as $key => $settings) { - // Supply the column_groups key if it's not there. - if (empty($settings['column_groups'])) { - $info[$key]['column_groups'] = []; - } - } -} - -/** - * Implements hook_entity_operation(). - */ -function content_translation_entity_operation(EntityInterface $entity) { - $operations = []; - if ($entity->hasLinkTemplate('drupal:content-translation-overview') && content_translation_translate_access($entity)->isAllowed()) { - $operations['translate'] = [ - 'title' => t('Translate'), - 'url' => $entity->toUrl('drupal:content-translation-overview'), - 'weight' => 50, - ]; - } - return $operations; -} - -/** - * Implements hook_views_data_alter(). - */ -function content_translation_views_data_alter(array &$data) { - // Add the content translation entity link definition to Views data for entity - // types having translation enabled. - $entity_types = \Drupal::entityTypeManager()->getDefinitions(); - /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ - $manager = \Drupal::service('content_translation.manager'); - foreach ($entity_types as $entity_type_id => $entity_type) { - $base_table = $entity_type->getBaseTable(); - if (isset($data[$base_table]) && $entity_type->hasLinkTemplate('drupal:content-translation-overview') && $manager->isEnabled($entity_type_id)) { - $t_arguments = ['@entity_type_label' => $entity_type->getLabel()]; - $data[$base_table]['translation_link'] = [ - 'field' => [ - 'title' => t('Link to translate @entity_type_label', $t_arguments), - 'help' => t('Provide a translation link to the @entity_type_label.', $t_arguments), - 'id' => 'content_translation_link', - ], - ]; - } - } -} - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function content_translation_menu_links_discovered_alter(array &$links) { - // Clarify where translation settings are located. - $links['language.content_settings_page']['title'] = new TranslatableMarkup('Content language and translation'); - $links['language.content_settings_page']['description'] = new TranslatableMarkup('Configure language and translation support for content.'); -} - /** * Access callback for the translation overview page. * @@ -380,167 +77,6 @@ function content_translation_translate_access(EntityInterface $entity) { return AccessResult::allowedIf($condition)->cachePerPermissions()->addCacheableDependency($entity); } -/** - * Implements hook_form_alter(). - */ -function content_translation_form_alter(array &$form, FormStateInterface $form_state) { - $form_object = $form_state->getFormObject(); - if (!($form_object instanceof ContentEntityFormInterface)) { - return; - } - $entity = $form_object->getEntity(); - $op = $form_object->getOperation(); - - // Let the content translation handler alter the content entity form. This can - // be the 'add' or 'edit' form. It also tries a 'default' form in case neither - // of the aforementioned forms are defined. - if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && count($entity->getTranslationLanguages()) > 1 && in_array($op, ['edit', 'add', 'default'], TRUE)) { - $controller = \Drupal::entityTypeManager()->getHandler($entity->getEntityTypeId(), 'translation'); - $controller->entityFormAlter($form, $form_state, $entity); - - // @todo Move the following lines to the code generating the property form - // elements once we have an official #multilingual FAPI key. - $translations = $entity->getTranslationLanguages(); - $form_langcode = $form_object->getFormLangcode($form_state); - - // Handle fields shared between translations when there is at least one - // translation available or a new one is being created. - if (!$entity->isNew() && (!isset($translations[$form_langcode]) || count($translations) > 1)) { - foreach ($entity->getFieldDefinitions() as $field_name => $definition) { - - // Allow the widget to define if it should be treated as multilingual - // by respecting an already set #multilingual key. - if (isset($form[$field_name]) && !isset($form[$field_name]['#multilingual'])) { - $form[$field_name]['#multilingual'] = $definition->isTranslatable(); - } - } - } - - // The footer region, if defined, may contain multilingual widgets so we - // need to always display it. - if (isset($form['footer'])) { - $form['footer']['#multilingual'] = TRUE; - } - } -} - -/** - * Implements hook_language_fallback_candidates_OPERATION_alter(). - * - * Performs language fallback for inaccessible translations. - */ -function content_translation_language_fallback_candidates_entity_view_alter(&$candidates, $context) { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - $entity = $context['data']; - $entity_type_id = $entity->getEntityTypeId(); - /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ - $manager = \Drupal::service('content_translation.manager'); - if ($manager->isEnabled($entity_type_id, $entity->bundle())) { - /** @var \Drupal\content_translation\ContentTranslationHandlerInterface $handler */ - $handler = \Drupal::entityTypeManager()->getHandler($entity->getEntityTypeId(), 'translation'); - foreach ($entity->getTranslationLanguages() as $langcode => $language) { - $metadata = $manager->getTranslationMetadata($entity->getTranslation($langcode)); - if (!$metadata->isPublished()) { - $access = $handler->getTranslationAccess($entity, 'update'); - $entity->addCacheableDependency($access); - if (!$access->isAllowed()) { - - // If the user has no translation update access, also check view - // access for that translation, to allow other modules to allow access - // to unpublished translations. - $access = $entity->getTranslation($langcode)->access('view', NULL, TRUE); - $entity->addCacheableDependency($access); - if (!$access->isAllowed()) { - unset($candidates[$langcode]); - } - } - } - } - } -} - -/** - * Implements hook_entity_extra_field_info(). - */ -function content_translation_entity_extra_field_info() { - $extra = []; - $bundle_info_service = \Drupal::service('entity_type.bundle.info'); - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type => $info) { - foreach ($bundle_info_service->getBundleInfo($entity_type) as $bundle => $bundle_info) { - if (\Drupal::service('content_translation.manager')->isEnabled($entity_type, $bundle)) { - $extra[$entity_type][$bundle]['form']['translation'] = [ - 'label' => t('Translation'), - 'description' => t('Translation settings'), - 'weight' => 10, - ]; - } - } - } - - return $extra; -} - -/** - * Implements hook_form_FORM_ID_alter() for 'field_config_edit_form'. - */ -function content_translation_form_field_config_edit_form_alter(array &$form, FormStateInterface $form_state) { - $field = $form_state->getFormObject()->getEntity(); - $bundle_is_translatable = \Drupal::service('content_translation.manager')->isEnabled($field->getTargetEntityTypeId(), $field->getTargetBundle()); - - $form['translatable'] = [ - '#type' => 'checkbox', - '#title' => t('Users may translate this field'), - '#default_value' => $field->isTranslatable(), - '#weight' => -1, - '#disabled' => !$bundle_is_translatable, - '#access' => $field->getFieldStorageDefinition()->isTranslatable(), - ]; - - // Provide helpful pointers for administrators. - if (\Drupal::currentUser()->hasPermission('administer content translation') && !$bundle_is_translatable) { - $toggle_url = Url::fromRoute('language.content_settings_page', [], [ - 'query' => \Drupal::destination()->getAsArray(), - ])->toString(); - $form['translatable']['#description'] = t('To configure translation for this field, <a href=":language-settings-url">enable language support</a> for this type.', [ - ':language-settings-url' => $toggle_url, - ]); - } - - if ($field->isTranslatable()) { - \Drupal::moduleHandler()->loadInclude('content_translation', 'inc', 'content_translation.admin'); - $element = content_translation_field_sync_widget($field); - if ($element) { - $form['third_party_settings']['content_translation']['translation_sync'] = $element; - $form['third_party_settings']['content_translation']['translation_sync']['#weight'] = -10; - } - } -} - -/** - * Implements hook_entity_presave(). - */ -function content_translation_entity_presave(EntityInterface $entity) { - if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && !$entity->isNew() && isset($entity->original)) { - /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ - $manager = \Drupal::service('content_translation.manager'); - if (!$manager->isEnabled($entity->getEntityTypeId(), $entity->bundle())) { - return; - } - $langcode = $entity->language()->getId(); - $source_langcode = !$entity->original->hasTranslation($langcode) ? $manager->getTranslationMetadata($entity)->getSource() : NULL; - \Drupal::service('content_translation.synchronizer')->synchronizeFields($entity, $langcode, $source_langcode); - } -} - -/** - * Implements hook_element_info_alter(). - */ -function content_translation_element_info_alter(&$type) { - if (isset($type['language_configuration'])) { - $type['language_configuration']['#process'][] = 'content_translation_language_configuration_element_process'; - } -} - /** * Returns a widget to enable content translation per entity bundle. * @@ -646,14 +182,6 @@ function content_translation_language_configuration_element_submit(array $form, } } -/** - * Implements hook_form_FORM_ID_alter() for language_content_settings_form(). - */ -function content_translation_form_language_content_settings_form_alter(array &$form, FormStateInterface $form_state) { - \Drupal::moduleHandler()->loadInclude('content_translation', 'inc', 'content_translation.admin'); - _content_translation_form_language_content_settings_form_alter($form, $form_state); -} - /** * Implements hook_preprocess_HOOK() for language-content-settings-table.html.twig. */ @@ -661,64 +189,3 @@ function content_translation_preprocess_language_content_settings_table(&$variab \Drupal::moduleHandler()->loadInclude('content_translation', 'inc', 'content_translation.admin'); _content_translation_preprocess_language_content_settings_table($variables); } - -/** - * Implements hook_page_attachments(). - */ -function content_translation_page_attachments(&$page) { - $cache = CacheableMetadata::createFromRenderArray($page); - $route_match = \Drupal::routeMatch(); - - // If the current route has no parameters, return. - if (!($route = $route_match->getRouteObject()) || !($parameters = $route->getOption('parameters'))) { - return; - } - $is_front = \Drupal::service('path.matcher')->isFrontPage(); - - // Determine if the current route represents an entity. - foreach ($parameters as $name => $options) { - if (!isset($options['type']) || !str_starts_with($options['type'], 'entity:')) { - continue; - } - - $entity = $route_match->getParameter($name); - if ($entity instanceof ContentEntityInterface && $entity->hasLinkTemplate('canonical')) { - // Current route represents a content entity. Build hreflang links. - foreach ($entity->getTranslationLanguages() as $language) { - // Skip any translation that cannot be viewed. - $translation = $entity->getTranslation($language->getId()); - $access = $translation->access('view', NULL, TRUE); - $cache->addCacheableDependency($access); - if (!$access->isAllowed()) { - continue; - } - if ($is_front) { - // If the current page is front page, do not create hreflang links - // from the entity route, just add the languages to root path. - $url = Url::fromRoute('<front>', [], [ - 'absolute' => TRUE, - 'language' => $language, - ])->toString(); - } - // Create links for the entity path. - else { - $url = $entity->toUrl('canonical') - ->setOption('language', $language) - ->setAbsolute() - ->toString(); - } - $page['#attached']['html_head_link'][] = [ - [ - 'rel' => 'alternate', - 'hreflang' => $language->getId(), - 'href' => $url, - ], - ]; - } - } - // Since entity was found, no need to iterate further. - break; - } - // Apply updated caching information. - $cache->applyTo($page); -} diff --git a/core/modules/content_translation/src/Hook/ContentTranslationHooks.php b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..df52f08057e1327f8415b5879f04a706afc7a1e5 --- /dev/null +++ b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php @@ -0,0 +1,550 @@ +<?php + +namespace Drupal\content_translation\Hook; + +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\ContentEntityFormInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\content_translation\ContentTranslationManager; +use Drupal\content_translation\BundleTranslationSettingsInterface; +use Drupal\language\ContentLanguageSettingsInterface; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_translation. + */ +class ContentTranslationHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.content_translation': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Content Translation module allows you to translate content, comments, content blocks, taxonomy terms, users and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>. Together with the modules <a href=":language">Language</a>, <a href=":config-trans">Configuration Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":translation-entity">online documentation for the Content Translation module</a>.', [ + ':locale' => \Drupal::moduleHandler()->moduleExists('locale') ? Url::fromRoute('help.page', [ + 'name' => 'locale', + ])->toString() : '#', + ':config-trans' => \Drupal::moduleHandler()->moduleExists('config_translation') ? Url::fromRoute('help.page', [ + 'name' => 'config_translation', + ])->toString() : '#', + ':language' => Url::fromRoute('help.page', [ + 'name' => 'language', + ])->toString(), + ':translation-entity' => 'https://www.drupal.org/docs/8/core/modules/content-translation', + ':field_help' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Enabling translation') . '</dt>'; + $output .= '<dd>' . t('In order to translate content, the website must have at least two <a href=":url">languages</a>. When that is the case, you can enable translation for the desired content entities on the <a href=":translation-entity">Content language</a> page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', [ + ':url' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ':translation-entity' => Url::fromRoute('language.content_settings_page')->toString(), + ':language-help' => Url::fromRoute('help.page', [ + 'name' => 'language', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Enabling field translation') . '</dt>'; + $output .= '<dd>' . t('You can define which fields of a content entity can be translated. For example, you might want to translate the title and body field while leaving the image field untranslated. If you exclude a field from being translated, it will still show up in the content editing form, but any changes made to that field will be applied to <em>all</em> translations of that content.') . '</dd>'; + $output .= '<dt>' . t('Translating content') . '</dt>'; + $output .= '<dd>' . t('If translation is enabled you can translate a content entity via the Translate tab (or Translate link). The Translations page of a content entity gives an overview of the translation status for the current content and lets you add, edit, and delete its translations. This process is similar for every translatable content entity on your site.') . '</dd>'; + $output .= '<dt>' . t('Changing the source language for a translation') . '</dt>'; + $output .= '<dd>' . t('When you add a new translation, the original text you are translating is displayed in the edit form as the <em>source</em>. If at least one translation of the original content already exists when you add a new translation, you can choose either the original content (default) or one of the other translations as the source, using the select list in the Source language section. After saving the translation, the chosen source language is then listed on the Translate tab of the content.') . '</dd>'; + $output .= '<dt>' . t('Setting status of translations') . '</dt>'; + $output .= '<dd>' . t('If you edit a translation in one language you may want to set the status of the other translations as <em>out-of-date</em>. You can set this status by selecting the <em>Flag other translations as outdated</em> checkbox in the Translation section of the content editing form. The status will be visible on the Translations page.') . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'language.content_settings_page': + $output = ''; + if (!\Drupal::languageManager()->isMultilingual()) { + $output .= '<p>' . t('Before you can translate content, there must be at least two languages added on the <a href=":url">languages administration</a> page.', [ + ':url' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</p>'; + } + return $output; + } + } + + /** + * Implements hook_language_types_info_alter(). + */ + #[Hook('language_types_info_alter')] + public function languageTypesInfoAlter(array &$language_types) { + // Make content language negotiation configurable by removing the 'locked' + // flag. + $language_types[LanguageInterface::TYPE_CONTENT]['locked'] = FALSE; + unset($language_types[LanguageInterface::TYPE_CONTENT]['fixed']); + } + + /** + * Implements hook_entity_type_alter(). + * + * The content translation UI relies on the entity info to provide its features. + * See the documentation of hook_entity_type_build() in the Entity API + * documentation for more details on all the entity info keys that may be + * defined. + * + * To make Content Translation automatically support an entity type some keys + * may need to be defined, but none of them is required unless the entity path + * is different from the usual /ENTITY_TYPE/{ENTITY_TYPE} pattern (for instance + * "/taxonomy/term/{taxonomy_term}"). Here are a list of those optional keys: + * - canonical: This key (in the 'links' entity info property) must be defined + * if the entity path is different from /ENTITY_TYPE/{ENTITY_TYPE} + * - translation: This key (in the 'handlers' entity annotation property) + * specifies the translation handler for the entity type. If an entity type is + * translatable and no translation handler is defined, + * \Drupal\content_translation\ContentTranslationHandler will be assumed. + * Every translation handler must implement + * \Drupal\content_translation\ContentTranslationHandlerInterface. + * - content_translation_ui_skip: By default, entity types that do not have a + * canonical link template cannot be enabled for translation. Setting this key + * to TRUE overrides that. When that key is set, the Content Translation + * module will not provide any UI for translating the entity type, and the + * entity type should implement its own UI. For instance, this is useful for + * entity types that are embedded into others for editing (which would not + * need a canonical link, but could still support translation). + * - content_translation_metadata: To implement its business logic the content + * translation UI relies on various metadata items describing the translation + * state. The default implementation is provided by + * \Drupal\content_translation\ContentTranslationMetadataWrapper, which is + * relying on one field for each metadata item (field definitions are provided + * by the translation handler). Entity types needing to customize this + * behavior can specify an alternative class through the + * 'content_translation_metadata' key in the entity type definition. Every + * content translation metadata wrapper needs to implement + * \Drupal\content_translation\ContentTranslationMetadataWrapperInterface. + * + * If the entity paths match the default pattern above and there is no need for + * an entity-specific translation handler, Content Translation will provide + * built-in support for the entity. However enabling translation for each + * translatable bundle will be required. + * + * @see \Drupal\Core\Entity\Annotation\EntityType + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Provide defaults for translation info. + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + foreach ($entity_types as $entity_type) { + if ($entity_type->isTranslatable()) { + if (!$entity_type->hasHandlerClass('translation')) { + $entity_type->setHandlerClass('translation', 'Drupal\content_translation\ContentTranslationHandler'); + } + if (!$entity_type->get('content_translation_metadata')) { + $entity_type->set('content_translation_metadata', 'Drupal\content_translation\ContentTranslationMetadataWrapper'); + } + if (!$entity_type->getFormClass('content_translation_deletion')) { + $entity_type->setFormClass('content_translation_deletion', '\Drupal\content_translation\Form\ContentTranslationDeleteForm'); + } + $translation = $entity_type->get('translation'); + if (!$translation || !isset($translation['content_translation'])) { + $translation['content_translation'] = []; + } + if ($entity_type->hasLinkTemplate('canonical')) { + // Provide default route names for the translation paths. + if (!$entity_type->hasLinkTemplate('drupal:content-translation-overview')) { + $translations_path = $entity_type->getLinkTemplate('canonical') . '/translations'; + $entity_type->setLinkTemplate('drupal:content-translation-overview', $translations_path); + $entity_type->setLinkTemplate('drupal:content-translation-add', $translations_path . '/add/{source}/{target}'); + $entity_type->setLinkTemplate('drupal:content-translation-edit', $translations_path . '/edit/{language}'); + $entity_type->setLinkTemplate('drupal:content-translation-delete', $translations_path . '/delete/{language}'); + } + // @todo Remove this as soon as menu access checks rely on the + // controller. See https://www.drupal.org/node/2155787. + $translation['content_translation'] += ['access_callback' => 'content_translation_translate_access']; + } + $entity_type->set('translation', $translation); + } + $entity_type->addConstraint('ContentTranslationSynchronizedFields'); + } + } + + /** + * Implements hook_ENTITY_TYPE_insert(). + * + * Installs Content Translation's field storage definitions for the target + * entity type, if required. + * + * Also clears the bundle information cache so that the bundle's translatability + * will be set properly. + * + * @see content_translation_entity_bundle_info_alter() + * @see \Drupal\content_translation\ContentTranslationManager::isEnabled() + */ + #[Hook('language_content_settings_insert')] + public function languageContentSettingsInsert(ContentLanguageSettingsInterface $settings) { + if ($settings->getThirdPartySetting('content_translation', 'enabled', FALSE)) { + _content_translation_install_field_storage_definitions($settings->getTargetEntityTypeId()); + } + \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); + } + + /** + * Implements hook_ENTITY_TYPE_update(). + * + * Installs Content Translation's field storage definitions for the target + * entity type, if required. + * + * Also clears the bundle information cache so that the bundle's translatability + * will be changed properly. + * + * @see content_translation_entity_bundle_info_alter() + * @see \Drupal\content_translation\ContentTranslationManager::isEnabled() + */ + #[Hook('language_content_settings_update')] + public function languageContentSettingsUpdate(ContentLanguageSettingsInterface $settings) { + $original_settings = $settings->original; + if ($settings->getThirdPartySetting('content_translation', 'enabled', FALSE) && !$original_settings->getThirdPartySetting('content_translation', 'enabled', FALSE)) { + _content_translation_install_field_storage_definitions($settings->getTargetEntityTypeId()); + } + \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); + } + + /** + * Implements hook_entity_bundle_info_alter(). + */ + #[Hook('entity_bundle_info_alter')] + public function entityBundleInfoAlter(&$bundles) { + /** @var \Drupal\content_translation\ContentTranslationManagerInterface $content_translation_manager */ + $content_translation_manager = \Drupal::service('content_translation.manager'); + foreach ($bundles as $entity_type_id => &$info) { + foreach ($info as $bundle => &$bundle_info) { + $bundle_info['translatable'] = $content_translation_manager->isEnabled($entity_type_id, $bundle); + if ($bundle_info['translatable'] && $content_translation_manager instanceof BundleTranslationSettingsInterface) { + $settings = $content_translation_manager->getBundleTranslationSettings($entity_type_id, $bundle); + // If pending revision support is enabled for this bundle, we need to + // hide untranslatable field widgets, otherwise changes in pending + // revisions might be overridden by changes in later default revisions. + $bundle_info['untranslatable_fields.default_translation_affected'] = !empty($settings['untranslatable_fields_hide']) || ContentTranslationManager::isPendingRevisionSupportEnabled($entity_type_id, $bundle); + } + } + } + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ + $manager = \Drupal::service('content_translation.manager'); + $entity_type_id = $entity_type->id(); + if ($manager->isSupported($entity_type_id)) { + $definitions = $manager->getTranslationHandler($entity_type_id)->getFieldDefinitions(); + $installed_storage_definitions = \Drupal::service('entity.last_installed_schema.repository')->getLastInstalledFieldStorageDefinitions($entity_type_id); + // We return metadata storage fields whenever content translation is enabled + // or it was enabled before, so that we keep translation metadata around + // when translation is disabled. + // @todo Re-evaluate this approach and consider removing field storage + // definitions and the related field data if the entity type has no bundle + // enabled for translation. + // @see https://www.drupal.org/node/2907777 + if ($manager->isEnabled($entity_type_id) || array_intersect_key($definitions, $installed_storage_definitions)) { + return $definitions; + } + } + } + + /** + * Implements hook_field_info_alter(). + * + * Content translation extends the @FieldType annotation with following key: + * - column_groups: contains information about the field type properties + * which columns should be synchronized across different translations and + * which are translatable. This is useful for instance to translate the + * "alt" and "title" textual elements of an image field, while keeping the + * same image on every translation. Each group has the following keys: + * - title: Title of the column group. + * - translatable: (optional) If the column group should be translatable by + * default, defaults to FALSE. + * - columns: (optional) A list of columns of this group. Defaults to the + * name of the group as the single column. + * - require_all_groups_for_translation: (optional) Set to TRUE to enforce + * that making this column group translatable requires all others to be + * translatable too. + * + * @see Drupal\image\Plugin\Field\FieldType\ImageItem + */ + #[Hook('field_info_alter')] + public function fieldInfoAlter(&$info) { + foreach ($info as $key => $settings) { + // Supply the column_groups key if it's not there. + if (empty($settings['column_groups'])) { + $info[$key]['column_groups'] = []; + } + } + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + $operations = []; + if ($entity->hasLinkTemplate('drupal:content-translation-overview') && content_translation_translate_access($entity)->isAllowed()) { + $operations['translate'] = [ + 'title' => t('Translate'), + 'url' => $entity->toUrl('drupal:content-translation-overview'), + 'weight' => 50, + ]; + } + return $operations; + } + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(array &$data) { + // Add the content translation entity link definition to Views data for entity + // types having translation enabled. + $entity_types = \Drupal::entityTypeManager()->getDefinitions(); + /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ + $manager = \Drupal::service('content_translation.manager'); + foreach ($entity_types as $entity_type_id => $entity_type) { + $base_table = $entity_type->getBaseTable(); + if (isset($data[$base_table]) && $entity_type->hasLinkTemplate('drupal:content-translation-overview') && $manager->isEnabled($entity_type_id)) { + $t_arguments = ['@entity_type_label' => $entity_type->getLabel()]; + $data[$base_table]['translation_link'] = [ + 'field' => [ + 'title' => t('Link to translate @entity_type_label', $t_arguments), + 'help' => t('Provide a translation link to the @entity_type_label.', $t_arguments), + 'id' => 'content_translation_link', + ], + ]; + } + } + } + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(array &$links) { + // Clarify where translation settings are located. + $links['language.content_settings_page']['title'] = new TranslatableMarkup('Content language and translation'); + $links['language.content_settings_page']['description'] = new TranslatableMarkup('Configure language and translation support for content.'); + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(array &$form, FormStateInterface $form_state) : void { + $form_object = $form_state->getFormObject(); + if (!$form_object instanceof ContentEntityFormInterface) { + return; + } + $entity = $form_object->getEntity(); + $op = $form_object->getOperation(); + // Let the content translation handler alter the content entity form. This can + // be the 'add' or 'edit' form. It also tries a 'default' form in case neither + // of the aforementioned forms are defined. + if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && count($entity->getTranslationLanguages()) > 1 && in_array($op, ['edit', 'add', 'default'], TRUE)) { + $controller = \Drupal::entityTypeManager()->getHandler($entity->getEntityTypeId(), 'translation'); + $controller->entityFormAlter($form, $form_state, $entity); + // @todo Move the following lines to the code generating the property form + // elements once we have an official #multilingual FAPI key. + $translations = $entity->getTranslationLanguages(); + $form_langcode = $form_object->getFormLangcode($form_state); + // Handle fields shared between translations when there is at least one + // translation available or a new one is being created. + if (!$entity->isNew() && (!isset($translations[$form_langcode]) || count($translations) > 1)) { + foreach ($entity->getFieldDefinitions() as $field_name => $definition) { + // Allow the widget to define if it should be treated as multilingual + // by respecting an already set #multilingual key. + if (isset($form[$field_name]) && !isset($form[$field_name]['#multilingual'])) { + $form[$field_name]['#multilingual'] = $definition->isTranslatable(); + } + } + } + // The footer region, if defined, may contain multilingual widgets so we + // need to always display it. + if (isset($form['footer'])) { + $form['footer']['#multilingual'] = TRUE; + } + } + } + + /** + * Implements hook_language_fallback_candidates_OPERATION_alter(). + * + * Performs language fallback for inaccessible translations. + */ + #[Hook('language_fallback_candidates_entity_view_alter')] + public function languageFallbackCandidatesEntityViewAlter(&$candidates, $context) { + /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ + $entity = $context['data']; + $entity_type_id = $entity->getEntityTypeId(); + /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ + $manager = \Drupal::service('content_translation.manager'); + if ($manager->isEnabled($entity_type_id, $entity->bundle())) { + /** @var \Drupal\content_translation\ContentTranslationHandlerInterface $handler */ + $handler = \Drupal::entityTypeManager()->getHandler($entity->getEntityTypeId(), 'translation'); + foreach ($entity->getTranslationLanguages() as $langcode => $language) { + $metadata = $manager->getTranslationMetadata($entity->getTranslation($langcode)); + if (!$metadata->isPublished()) { + $access = $handler->getTranslationAccess($entity, 'update'); + $entity->addCacheableDependency($access); + if (!$access->isAllowed()) { + // If the user has no translation update access, also check view + // access for that translation, to allow other modules to allow access + // to unpublished translations. + $access = $entity->getTranslation($langcode)->access('view', NULL, TRUE); + $entity->addCacheableDependency($access); + if (!$access->isAllowed()) { + unset($candidates[$langcode]); + } + } + } + } + } + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $extra = []; + $bundle_info_service = \Drupal::service('entity_type.bundle.info'); + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type => $info) { + foreach ($bundle_info_service->getBundleInfo($entity_type) as $bundle => $bundle_info) { + if (\Drupal::service('content_translation.manager')->isEnabled($entity_type, $bundle)) { + $extra[$entity_type][$bundle]['form']['translation'] = [ + 'label' => t('Translation'), + 'description' => t('Translation settings'), + 'weight' => 10, + ]; + } + } + } + return $extra; + } + + /** + * Implements hook_form_FORM_ID_alter() for 'field_config_edit_form'. + */ + #[Hook('form_field_config_edit_form_alter')] + public function formFieldConfigEditFormAlter(array &$form, FormStateInterface $form_state) : void { + $field = $form_state->getFormObject()->getEntity(); + $bundle_is_translatable = \Drupal::service('content_translation.manager')->isEnabled($field->getTargetEntityTypeId(), $field->getTargetBundle()); + $form['translatable'] = [ + '#type' => 'checkbox', + '#title' => t('Users may translate this field'), + '#default_value' => $field->isTranslatable(), + '#weight' => -1, + '#disabled' => !$bundle_is_translatable, + '#access' => $field->getFieldStorageDefinition()->isTranslatable(), + ]; + // Provide helpful pointers for administrators. + if (\Drupal::currentUser()->hasPermission('administer content translation') && !$bundle_is_translatable) { + $toggle_url = Url::fromRoute('language.content_settings_page', [], ['query' => \Drupal::destination()->getAsArray()])->toString(); + $form['translatable']['#description'] = t('To configure translation for this field, <a href=":language-settings-url">enable language support</a> for this type.', [':language-settings-url' => $toggle_url]); + } + if ($field->isTranslatable()) { + \Drupal::moduleHandler()->loadInclude('content_translation', 'inc', 'content_translation.admin'); + $element = content_translation_field_sync_widget($field); + if ($element) { + $form['third_party_settings']['content_translation']['translation_sync'] = $element; + $form['third_party_settings']['content_translation']['translation_sync']['#weight'] = -10; + } + } + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && !$entity->isNew() && isset($entity->original)) { + /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ + $manager = \Drupal::service('content_translation.manager'); + if (!$manager->isEnabled($entity->getEntityTypeId(), $entity->bundle())) { + return; + } + $langcode = $entity->language()->getId(); + $source_langcode = !$entity->original->hasTranslation($langcode) ? $manager->getTranslationMetadata($entity)->getSource() : NULL; + \Drupal::service('content_translation.synchronizer')->synchronizeFields($entity, $langcode, $source_langcode); + } + } + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(&$type) { + if (isset($type['language_configuration'])) { + $type['language_configuration']['#process'][] = 'content_translation_language_configuration_element_process'; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for language_content_settings_form(). + */ + #[Hook('form_language_content_settings_form_alter')] + public function formLanguageContentSettingsFormAlter(array &$form, FormStateInterface $form_state) : void { + \Drupal::moduleHandler()->loadInclude('content_translation', 'inc', 'content_translation.admin'); + _content_translation_form_language_content_settings_form_alter($form, $form_state); + } + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(&$page) { + $cache = CacheableMetadata::createFromRenderArray($page); + $route_match = \Drupal::routeMatch(); + // If the current route has no parameters, return. + if (!($route = $route_match->getRouteObject()) || !($parameters = $route->getOption('parameters'))) { + return; + } + $is_front = \Drupal::service('path.matcher')->isFrontPage(); + // Determine if the current route represents an entity. + foreach ($parameters as $name => $options) { + if (!isset($options['type']) || !str_starts_with($options['type'], 'entity:')) { + continue; + } + $entity = $route_match->getParameter($name); + if ($entity instanceof ContentEntityInterface && $entity->hasLinkTemplate('canonical')) { + // Current route represents a content entity. Build hreflang links. + foreach ($entity->getTranslationLanguages() as $language) { + // Skip any translation that cannot be viewed. + $translation = $entity->getTranslation($language->getId()); + $access = $translation->access('view', NULL, TRUE); + $cache->addCacheableDependency($access); + if (!$access->isAllowed()) { + continue; + } + if ($is_front) { + // If the current page is front page, do not create hreflang links + // from the entity route, just add the languages to root path. + $url = Url::fromRoute('<front>', [], ['absolute' => TRUE, 'language' => $language])->toString(); + } + else { + $url = $entity->toUrl('canonical')->setOption('language', $language)->setAbsolute()->toString(); + } + $page['#attached']['html_head_link'][] = [['rel' => 'alternate', 'hreflang' => $language->getId(), 'href' => $url]]; + } + } + // Since entity was found, no need to iterate further. + break; + } + // Apply updated caching information. + $cache->applyTo($page); + } + +} diff --git a/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module b/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module index d9858412f3425e8022e3eabe2f1874999217deb3..2e37fcf54a7163690768227332f1f176e6153db7 100644 --- a/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module +++ b/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module @@ -7,60 +7,7 @@ declare(strict_types=1); -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_bundle_info_alter(). - */ -function content_translation_test_entity_bundle_info_alter(&$bundles) { - // Store the initial status of the "translatable" property for the - // "entity_test_mul" bundle. - $translatable = !empty($bundles['entity_test_mul']['entity_test_mul']['translatable']); - \Drupal::state()->set('content_translation_test.translatable', $translatable); - // Make it translatable if Content Translation did not. This will make the - // entity object translatable even if it is disabled in Content Translation - // settings. - if (!$translatable) { - $bundles['entity_test_mul']['entity_test_mul']['translatable'] = TRUE; - } -} - -/** - * Implements hook_entity_access(). - */ -function content_translation_test_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - $access = \Drupal::state()->get('content_translation.entity_access.' . $entity->getEntityTypeId()); - if (!empty($access[$operation])) { - return AccessResult::allowed(); - } - else { - return AccessResult::neutral(); - } -} - -/** - * Implements hook_form_BASE_FORM_ID_alter(). - * - * Adds a textfield to node forms based on a request parameter. - */ -function content_translation_test_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $langcode = $form_state->getFormObject()->getFormLangcode($form_state); - if (in_array($langcode, ['en', 'fr']) && \Drupal::request()->get('test_field_only_en_fr')) { - $form['test_field_only_en_fr'] = [ - '#type' => 'textfield', - '#title' => 'Field only available on the english and french form', - ]; - - foreach (array_keys($form['actions']) as $action) { - if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { - $form['actions'][$action]['#submit'][] = 'content_translation_test_form_node_form_submit'; - } - } - } -} /** * Form submission handler for custom field added based on a request parameter. @@ -70,10 +17,3 @@ function content_translation_test_form_node_form_alter(&$form, FormStateInterfac function content_translation_test_form_node_form_submit($form, FormStateInterface $form_state) { \Drupal::state()->set('test_field_only_en_fr', $form_state->getValue('test_field_only_en_fr')); } - -/** - * Implements hook_entity_translation_delete(). - */ -function content_translation_test_entity_translation_delete(EntityInterface $translation) { - \Drupal::state()->set('content_translation_test.translation_deleted', TRUE); -} diff --git a/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableNoUISkip.php b/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableNoUISkip.php index 4a884284466f8366e37bd2ecbf0babf823fe5c82..4728be44c3a0bce79dfcf832355160ff627136e1 100644 --- a/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableNoUISkip.php +++ b/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableNoUISkip.php @@ -4,38 +4,39 @@ namespace Drupal\content_translation_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\entity_test\Entity\EntityTest; +use Drupal\entity_test\EntityTestForm; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_translatable_no_skip", - * label = @Translation("Test entity - Translatable check UI"), - * handlers = { - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mul", - * data_table = "entity_test_mul_property_data", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * translatable = TRUE, - * admin_permission = "administer entity_test content", - * links = { - * "edit-form" = "/entity_test_translatable_no_skip/{entity_test_translatable_no_skip}/edit", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_translatable_no_skip', + label: new TranslatableMarkup('Test entity - Translatable check UI'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'form' => ['default' => EntityTestForm::class], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'edit-form' => '/entity_test_translatable_no_skip/{entity_test_translatable_no_skip}/edit', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_mul', + data_table: 'entity_test_mul_property_data', + translatable: TRUE, +)] class EntityTestTranslatableNoUISkip extends EntityTest { } diff --git a/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableUISkip.php b/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableUISkip.php index aff265578bb1fd69b338ac38a97134fcce65137c..c95da3b4b82a721faa64676982efc327e3518f46 100644 --- a/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableUISkip.php +++ b/core/modules/content_translation/tests/modules/content_translation_test/src/Entity/EntityTestTranslatableUISkip.php @@ -4,27 +4,30 @@ namespace Drupal\content_translation_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\entity_test\Entity\EntityTest; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_translatable_UI_skip", - * label = @Translation("Test entity - Translatable skip UI check"), - * base_table = "entity_test_mul", - * data_table = "entity_test_mul_property_data", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * translatable = TRUE, - * content_translation_ui_skip = TRUE, - * ) */ +#[ContentEntityType( + id: 'entity_test_translatable_UI_skip', + label: new TranslatableMarkup('Test entity - Translatable skip UI check'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + base_table: 'entity_test_mul', + data_table: 'entity_test_mul_property_data', + translatable: TRUE, + additional: [ + 'content_translation_ui_skip' => TRUE, + ], +)] class EntityTestTranslatableUISkip extends EntityTest { } diff --git a/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php b/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d1e50f3fcd26dabf05c759fc886acafe200b4c --- /dev/null +++ b/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php @@ -0,0 +1,78 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\content_translation_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for content_translation_test. + */ +class ContentTranslationTestHooks { + + /** + * Implements hook_entity_bundle_info_alter(). + */ + #[Hook('entity_bundle_info_alter')] + public function entityBundleInfoAlter(&$bundles) { + // Store the initial status of the "translatable" property for the + // "entity_test_mul" bundle. + $translatable = !empty($bundles['entity_test_mul']['entity_test_mul']['translatable']); + \Drupal::state()->set('content_translation_test.translatable', $translatable); + // Make it translatable if Content Translation did not. This will make the + // entity object translatable even if it is disabled in Content Translation + // settings. + if (!$translatable) { + $bundles['entity_test_mul']['entity_test_mul']['translatable'] = TRUE; + } + } + + /** + * Implements hook_entity_access(). + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + $access = \Drupal::state()->get('content_translation.entity_access.' . $entity->getEntityTypeId()); + if (!empty($access[$operation])) { + return AccessResult::allowed(); + } + else { + return AccessResult::neutral(); + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter(). + * + * Adds a textfield to node forms based on a request parameter. + */ + #[Hook('form_node_form_alter')] + public function formNodeFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $langcode = $form_state->getFormObject()->getFormLangcode($form_state); + if (in_array($langcode, ['en', 'fr']) && \Drupal::request()->get('test_field_only_en_fr')) { + $form['test_field_only_en_fr'] = [ + '#type' => 'textfield', + '#title' => 'Field only available on the english and french form', + ]; + foreach (array_keys($form['actions']) as $action) { + if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { + $form['actions'][$action]['#submit'][] = 'content_translation_test_form_node_form_submit'; + } + } + } + } + + /** + * Implements hook_entity_translation_delete(). + */ + #[Hook('entity_translation_delete')] + public function entityTranslationDelete(EntityInterface $translation) { + \Drupal::state()->set('content_translation_test.translation_deleted', TRUE); + } + +} diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php index a1454538b8702a5f2ae00c9ab6d451910e522036..9a36503dfe5b1e199bf57b8be1350f01722af6cf 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php @@ -13,6 +13,9 @@ */ class ContentTranslationEntityBundleUITest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'content_translation', diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php index 29e91a49af2072f5b479304fceb77032cbd3778b..80fdd9a7188dd75ee597ab6d213af99415e4e048 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\content_translation\Functional; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; use Drupal\language\Entity\ConfigurableLanguage; @@ -70,7 +71,7 @@ protected function setUp(): void { * @return \Drupal\Core\Entity\EntityInterface * An entity with translations. */ - protected function createTranslatableEntity() { + protected function createTranslatableEntity(): EntityInterface { $entity = EntityTestMul::create(['label' => $this->randomString()]); // Create translations for non default languages. diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php index 6b3769d5f76a2f7d0955692236fd34970f6ac149..05e740dbfc03bac9ca8e87809f0d0729e4c9e4ff 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php @@ -38,7 +38,7 @@ class ContentTranslationMetadataFieldsTest extends ContentTranslationTestBase { /** * {@inheritdoc} */ - protected function setupBundle() { + protected function setupBundle(): void { parent::setupBundle(); $this->createContentType(['type' => $this->bundle]); } diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php index 3e123a5ca4feabf981c3ce4a5b64359d45076ed9..3fefa0e77978e7eab03695db9a020e6cd774ca23 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php @@ -50,7 +50,7 @@ public function testOverview(): void { * @param int $index * The test run index. */ - public function doTestOverview($index) { + public function doTestOverview($index): void { $this->drupalLogin($this->currentAccount); // Create a test node. diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php index e457f58f80b097587f90431b9f40c14bf5ec5754..bf3c73d50a525a4899679a99f97a8a84d9277602 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php @@ -64,7 +64,7 @@ protected function setUp(): void { /** * Creates the test image field. */ - protected function setupTestFields() { + protected function setupTestFields(): void { $this->fieldName = 'field_test_et_ui_image'; $this->cardinality = 3; @@ -262,7 +262,7 @@ public function testImageFieldSync(): void { * @return \Drupal\Core\Entity\EntityInterface * The saved entity. */ - protected function saveEntity(EntityInterface $entity) { + protected function saveEntity(EntityInterface $entity): EntityInterface { $entity->save(); $entity = \Drupal::entityTypeManager()->getStorage('entity_test_mul')->loadUnchanged($entity->id()); return $entity; diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php index 02945baf525a1610d1a61754271624b73ea8d51b..9cadbe9aa2bb6a76a4b1c6cc275a144b6de0c94b 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php @@ -50,7 +50,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function setupTestFields() { + protected function setupTestFields(): void { parent::setupTestFields(); $field_storage = FieldStorageConfig::create([ diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php index 089813cd973134bb82d665f80349f6f239439a05..63e67b7f351c4110e61c6c7df9b4862427e9300c 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php @@ -115,7 +115,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function setupUsers() { + protected function setupUsers(): void { $this->entityOwner = $this->drupalCreateUser($this->getEntityOwnerPermissions(), 'entity_owner'); $this->notEntityOwner = $this->drupalCreateUser(); $this->notEntityOwner->set('roles', $this->entityOwner->getRoles(TRUE)); @@ -155,7 +155,7 @@ protected function getEditorPermissions(): array { * @param \Drupal\User\UserInterface|null $user * (optional) The entity owner. */ - protected function setupEntity(?UserInterface $user = NULL) { + protected function setupEntity(?UserInterface $user = NULL): void { $default_langcode = $this->langcodes[0]; // Create a test entity. @@ -307,7 +307,7 @@ public function testWorkflows(): void { * The an associative array with the operation name as key and the expected * status as value. */ - protected function doTestWorkflows(UserInterface $user, $expected_status) { + protected function doTestWorkflows(UserInterface $user, $expected_status): void { $default_langcode = $this->langcodes[0]; $languages = $this->container->get('language_manager')->getLanguages(); $options = ['language' => $languages[$default_langcode], 'absolute' => TRUE]; diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php index 4d06bb0219ea37d22e8c90408cdf1e1cc0f04bcd..2e9ed9e26617c966ed67b1b660fee1b8916a57af 100644 --- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php @@ -469,7 +469,7 @@ public function testChangeDefaultLanguageNonTranslatableFieldsHidden(): void { * @param bool $display * Whether untranslatable field widgets should be displayed. */ - protected function setUntranslatableFieldWidgetsDisplay($display) { + protected function setUntranslatableFieldWidgetsDisplay($display): void { $entity_type_id = $this->storage->getEntityTypeId(); $settings = ['untranslatable_fields_hide' => !$display]; $this->contentTranslationManager->setBundleTranslationSettings($entity_type_id, $entity_type_id, $settings); @@ -551,7 +551,7 @@ protected function assertViolations(EntityConstraintViolationListInterface $viol /** * Asserts that the latest revision has the expected field values. * - * @param $entity_id + * @param string $entity_id * The entity ID. * @param array $expected_values * An array of expected values in the following order: diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php index 72d369824c313a67891ade88cba841c45ced6c21..1b64f6f13bd9393c18480b9acc45fc8148be4a04 100644 --- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php @@ -56,6 +56,9 @@ class ContentTranslationSyncUnitTest extends KernelTestBase { */ protected $unchangedFieldValues; + /** + * {@inheritdoc} + */ protected static $modules = ['language', 'content_translation']; /** diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index d57ca6c17818ec5fab82d6ab0d6fe7c5a9ffb659..4b2a3ff1696bb531bc751ae071f4325da7dcfb19 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -2,103 +2,10 @@ /** * @file - * Adds contextual links to perform actions related to elements on a page. */ -use Drupal\Core\Url; -use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_toolbar(). - */ -function contextual_toolbar() { - $items = []; - $items['contextual'] = [ - '#cache' => [ - 'contexts' => [ - 'user.permissions', - ], - ], - ]; - - if (!\Drupal::currentUser()->hasPermission('access contextual links')) { - return $items; - } - - $items['contextual'] += [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'html_tag', - '#tag' => 'button', - '#value' => t('Edit'), - '#attributes' => [ - 'class' => ['toolbar-icon', 'toolbar-icon-edit'], - 'aria-pressed' => 'false', - 'type' => 'button', - ], - ], - '#wrapper_attributes' => [ - 'class' => ['hidden', 'contextual-toolbar-tab'], - ], - '#attached' => [ - 'library' => [ - 'contextual/drupal.contextual-toolbar', - ], - ], - ]; - - return $items; -} - -/** - * Implements hook_page_attachments(). - * - * Adds the drupal.contextual-links library to the page for any user who has the - * 'access contextual links' permission. - * - * @see contextual_preprocess() - */ -function contextual_page_attachments(array &$page) { - if (!\Drupal::currentUser()->hasPermission('access contextual links')) { - return; - } - - $page['#attached']['library'][] = 'contextual/drupal.contextual-links'; -} - -/** - * Implements hook_help(). - */ -function contextual_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.contextual': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Contextual links module gives users with the <em>Use contextual links</em> permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the <a href=":contextual">online documentation for the Contextual Links module</a>.', [':contextual' => 'https://www.drupal.org/docs/8/core/modules/contextual']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Displaying contextual links') . '</dt>'; - $output .= '<dd>'; - $output .= t('Contextual links for an area on a page are displayed using a contextual links button. There are two ways to make the contextual links button visible:'); - $output .= '<ol>'; - $sample_picture = [ - '#theme' => 'image', - '#uri' => 'core/misc/icons/bebebe/pencil.svg', - '#alt' => t('contextual links button'), - ]; - $sample_picture = \Drupal::service('renderer')->render($sample_picture); - $output .= '<li>' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: @picture', ['@picture' => $sample_picture]) . '</li>'; - $output .= '<li>' . t('If you have the <a href=":toolbar">Toolbar module</a> installed, clicking the contextual links button in the toolbar (which looks like a pencil) will make all contextual links buttons on the page visible. Clicking this button again will toggle them to invisible.', [':toolbar' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? Url::fromRoute('help.page', ['name' => 'toolbar'])->toString() : '#']) . '</li>'; - $output .= '</ol>'; - $output .= t('Once the contextual links button for the area of interest is visible, click the button to display the links.'); - $output .= '</dd>'; - $output .= '</dl>'; - return $output; - } -} /** * Implements hook_preprocess(). @@ -139,18 +46,6 @@ function contextual_preprocess(&$variables, $hook, $info) { } } -/** - * Implements hook_contextual_links_view_alter(). - * - * @see \Drupal\contextual\Plugin\views\field\ContextualLinks::render() - */ -function contextual_contextual_links_view_alter(&$element, $items) { - if (isset($element['#contextual_links']['contextual'])) { - $encoded_links = $element['#contextual_links']['contextual']['metadata']['contextual-views-field-links']; - $element['#links'] = Json::decode(rawurldecode($encoded_links)); - } -} - /** * Serializes #contextual_links property value array to a string. * diff --git a/core/modules/contextual/contextual.post_update.php b/core/modules/contextual/contextual.post_update.php index 721291558546be50769ea20220257c33ad0c6c9c..1e4c53e8bb898289971bc26c78813c680ba6e7a4 100644 --- a/core/modules/contextual/contextual.post_update.php +++ b/core/modules/contextual/contextual.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function contextual_removed_post_updates() { +function contextual_removed_post_updates(): array { return [ 'contextual_post_update_fixed_endpoint_and_markup' => '9.0.0', ]; diff --git a/core/modules/contextual/contextual.views.inc b/core/modules/contextual/contextual.views.inc deleted file mode 100644 index bac5522f159a03249dedaa62b9f32ecf0888d7b6..0000000000000000000000000000000000000000 --- a/core/modules/contextual/contextual.views.inc +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provide views data for contextual.module. - */ - -/** - * Implements hook_views_data_alter(). - */ -function contextual_views_data_alter(&$data) { - $data['views']['contextual_links'] = [ - 'title' => t('Contextual Links'), - 'help' => t('Display fields in a contextual links menu.'), - 'field' => [ - 'id' => 'contextual_links', - ], - ]; -} diff --git a/core/modules/contextual/src/Hook/ContextualHooks.php b/core/modules/contextual/src/Hook/ContextualHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c99f6d0ffee3128a39753f7340a05699f4f6e8f1 --- /dev/null +++ b/core/modules/contextual/src/Hook/ContextualHooks.php @@ -0,0 +1,120 @@ +<?php + +namespace Drupal\contextual\Hook; + +use Drupal\Component\Serialization\Json; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contextual. + */ +class ContextualHooks { + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + $items = []; + $items['contextual'] = ['#cache' => ['contexts' => ['user.permissions']]]; + if (!\Drupal::currentUser()->hasPermission('access contextual links')) { + return $items; + } + $items['contextual'] += [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'html_tag', + '#tag' => 'button', + '#value' => t('Edit'), + '#attributes' => [ + 'class' => [ + 'toolbar-icon', + 'toolbar-icon-edit', + ], + 'aria-pressed' => 'false', + 'type' => 'button', + ], + ], + '#wrapper_attributes' => [ + 'class' => [ + 'hidden', + 'contextual-toolbar-tab', + ], + ], + '#attached' => [ + 'library' => [ + 'contextual/drupal.contextual-toolbar', + ], + ], + ]; + return $items; + } + + /** + * Implements hook_page_attachments(). + * + * Adds the drupal.contextual-links library to the page for any user who has the + * 'access contextual links' permission. + * + * @see contextual_preprocess() + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$page) { + if (!\Drupal::currentUser()->hasPermission('access contextual links')) { + return; + } + $page['#attached']['library'][] = 'contextual/drupal.contextual-links'; + } + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.contextual': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Contextual links module gives users with the <em>Use contextual links</em> permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the <a href=":contextual">online documentation for the Contextual Links module</a>.', [':contextual' => 'https://www.drupal.org/docs/8/core/modules/contextual']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Displaying contextual links') . '</dt>'; + $output .= '<dd>'; + $output .= t('Contextual links for an area on a page are displayed using a contextual links button. There are two ways to make the contextual links button visible:'); + $output .= '<ol>'; + $sample_picture = [ + '#theme' => 'image', + '#uri' => 'core/misc/icons/bebebe/pencil.svg', + '#alt' => t('contextual links button'), + ]; + $sample_picture = \Drupal::service('renderer')->render($sample_picture); + $output .= '<li>' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: @picture', ['@picture' => $sample_picture]) . '</li>'; + $output .= '<li>' . t('If you have the <a href=":toolbar">Toolbar module</a> installed, clicking the contextual links button in the toolbar (which looks like a pencil) will make all contextual links buttons on the page visible. Clicking this button again will toggle them to invisible.', [ + ':toolbar' => \Drupal::moduleHandler()->moduleExists('toolbar') ? Url::fromRoute('help.page', [ + 'name' => 'toolbar', + ])->toString() : '#', + ]) . '</li>'; + $output .= '</ol>'; + $output .= t('Once the contextual links button for the area of interest is visible, click the button to display the links.'); + $output .= '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_contextual_links_view_alter(). + * + * @see \Drupal\contextual\Plugin\views\field\ContextualLinks::render() + */ + #[Hook('contextual_links_view_alter')] + public function contextualLinksViewAlter(&$element, $items) { + if (isset($element['#contextual_links']['contextual'])) { + $encoded_links = $element['#contextual_links']['contextual']['metadata']['contextual-views-field-links']; + $element['#links'] = Json::decode(rawurldecode($encoded_links)); + } + } + +} diff --git a/core/modules/contextual/src/Hook/ContextualViewsHooks.php b/core/modules/contextual/src/Hook/ContextualViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..eb6d9bdf3982a0afd3ace5636d4bc99be768c9da --- /dev/null +++ b/core/modules/contextual/src/Hook/ContextualViewsHooks.php @@ -0,0 +1,30 @@ +<?php + +namespace Drupal\contextual\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contextual. + */ +class ContextualViewsHooks { + /** + * @file + * Provide views data for contextual.module. + */ + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $data['views']['contextual_links'] = [ + 'title' => t('Contextual Links'), + 'help' => t('Display fields in a contextual links menu.'), + 'field' => [ + 'id' => 'contextual_links', + ], + ]; + } + +} diff --git a/core/modules/contextual/tests/modules/contextual_test/contextual_test.module b/core/modules/contextual/tests/modules/contextual_test/contextual_test.module deleted file mode 100644 index b9c78d0d9c07ef44d4a8ef6191f2c052cccfd1bb..0000000000000000000000000000000000000000 --- a/core/modules/contextual/tests/modules/contextual_test/contextual_test.module +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @file - * Provides test contextual link on blocks. - */ - -declare(strict_types=1); - -use Drupal\Core\Block\BlockPluginInterface; - -/** - * Implements hook_block_view_alter(). - */ -function contextual_test_block_view_alter(array &$build, BlockPluginInterface $block) { - $build['#contextual_links']['contextual_test'] = [ - 'route_parameters' => [], - ]; -} - -/** - * Implements hook_contextual_links_view_alter(). - * - * @todo Apparently this too late to attach the library? - * It won't work without contextual_test_page_attachments_alter() - * Is that a problem? Should the contextual module itself do the attaching? - */ -function contextual_test_contextual_links_view_alter(&$element, $items) { - if (isset($element['#links']['contextual-test-ajax'])) { - $element['#attached']['library'][] = 'core/drupal.dialog.ajax'; - } -} - -/** - * Implements hook_page_attachments_alter(). - */ -function contextual_test_page_attachments_alter(array &$attachments) { - $attachments['#attached']['library'][] = 'core/drupal.dialog.ajax'; -} diff --git a/core/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php b/core/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f4e0ffcdcdb6cca743adf5d55390a76c56dc490e --- /dev/null +++ b/core/modules/contextual/tests/modules/contextual_test/src/Hook/ContextualTestHooks.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\contextual_test\Hook; + +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for contextual_test. + */ +class ContextualTestHooks { + + /** + * Implements hook_block_view_alter(). + */ + #[Hook('block_view_alter')] + public function blockViewAlter(array &$build, BlockPluginInterface $block) { + $build['#contextual_links']['contextual_test'] = ['route_parameters' => []]; + } + + /** + * Implements hook_contextual_links_view_alter(). + * + * @todo Apparently this too late to attach the library? + * It won't work without contextual_test_page_attachments_alter() + * Is that a problem? Should the contextual module itself do the attaching? + */ + #[Hook('contextual_links_view_alter')] + public function contextualLinksViewAlter(&$element, $items) { + if (isset($element['#links']['contextual-test-ajax'])) { + $element['#attached']['library'][] = 'core/drupal.dialog.ajax'; + } + } + + /** + * Implements hook_page_attachments_alter(). + */ + #[Hook('page_attachments_alter')] + public function pageAttachmentsAlter(array &$attachments) { + $attachments['#attached']['library'][] = 'core/drupal.dialog.ajax'; + } + +} diff --git a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php index 9e9ce7c0beb5bc7c9b6defc393cac485fa11e4da..25e99f5d18208304f528517187a2282b9fb6f571 100644 --- a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php +++ b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php @@ -10,6 +10,7 @@ use Drupal\Core\Url; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; +use Psr\Http\Message\ResponseInterface; /** * Tests contextual link display on the front page based on permissions. @@ -264,7 +265,7 @@ protected function assertNoContextualLinkPlaceHolder(string $id): void { * @return \Psr\Http\Message\ResponseInterface * The response object. */ - protected function renderContextualLinks($ids, $current_path) { + protected function renderContextualLinks($ids, $current_path): ResponseInterface { $tokens = array_map([$this, 'createContextualIdToken'], $ids); $http_client = $this->getHttpClient(); $url = Url::fromRoute('contextual.render', [], [ diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php index ce88a5dbd0ec516209a790235ec6a68e8cf88b3f..75e56b5f76b276e00b234386ab02ebe2d5815cdb 100644 --- a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php +++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php @@ -119,7 +119,7 @@ public function testEditModeEnableDisable(): void { /** * Presses the toolbar edit mode. */ - protected function pressToolbarEditButton() { + protected function pressToolbarEditButton(): void { $edit_button = $this->getSession()->getPage()->find('css', '#toolbar-bar div.contextual-toolbar-tab button'); $edit_button->press(); } @@ -159,7 +159,7 @@ protected function assertAnnounceLeaveEditMode(): void { * @return int * The number of tabbable elements. */ - protected function getTabbableElementsCount() { + protected function getTabbableElementsCount(): int { // Mark all tabbable elements. $this->getSession()->executeScript("jQuery(window.tabbable.tabbable(document.body)).attr('data-marked', '');"); // Count all marked elements. diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module deleted file mode 100644 index d4b194d35854f41676db004eab853329f0ebbc02..0000000000000000000000000000000000000000 --- a/core/modules/datetime/datetime.module +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @file - * Field hooks to implement a simple datetime field. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function datetime_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.datetime': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Datetime module provides a Date field that stores dates and times. It also provides the Form API elements <em>datetime</em> and <em>datelist</em> for use in programming modules. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI module help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":datetime_do">online documentation for the Datetime module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':datetime_do' => 'https://www.drupal.org/documentation/modules/datetime']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying date fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the Date field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Displaying dates') . '</dt>'; - $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', [':date_format_list' => Url::fromRoute('entity.date_format.collection')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} diff --git a/core/modules/datetime/datetime.views.inc b/core/modules/datetime/datetime.views.inc index 1512dcce4928e02d861c4f4d4ac35f7f2512a67a..a1586168f18d47acc9938c884ac5b5ae3747268b 100644 --- a/core/modules/datetime/datetime.views.inc +++ b/core/modules/datetime/datetime.views.inc @@ -2,18 +2,10 @@ /** * @file - * Provides views data for the datetime module. */ use Drupal\field\FieldStorageConfigInterface; -/** - * Implements hook_field_views_data(). - */ -function datetime_field_views_data(FieldStorageConfigInterface $field_storage) { - return datetime_type_field_views_data_helper($field_storage, [], $field_storage->getMainPropertyName()); -} - /** * Provides Views integration for any datetime-based fields. * diff --git a/core/modules/datetime/src/Hook/DatetimeHooks.php b/core/modules/datetime/src/Hook/DatetimeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2fe9e3eec71fba0d8a4edf9a3ad98edfa76bb62f --- /dev/null +++ b/core/modules/datetime/src/Hook/DatetimeHooks.php @@ -0,0 +1,49 @@ +<?php + +namespace Drupal\datetime\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for datetime. + */ +class DatetimeHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.datetime': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Datetime module provides a Date field that stores dates and times. It also provides the Form API elements <em>datetime</em> and <em>datelist</em> for use in programming modules. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI module help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":datetime_do">online documentation for the Datetime module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':datetime_do' => 'https://www.drupal.org/documentation/modules/datetime', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying date fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the Date field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Displaying dates') . '</dt>'; + $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', [ + ':date_format_list' => Url::fromRoute('entity.date_format.collection')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/datetime/src/Hook/DatetimeViewsHooks.php b/core/modules/datetime/src/Hook/DatetimeViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c41521ce99de8e1692bd376a1c8528d48c9038b0 --- /dev/null +++ b/core/modules/datetime/src/Hook/DatetimeViewsHooks.php @@ -0,0 +1,21 @@ +<?php + +namespace Drupal\datetime\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for datetime. + */ +class DatetimeViewsHooks { + + /** + * Implements hook_field_views_data(). + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + return datetime_type_field_views_data_helper($field_storage, [], $field_storage->getMainPropertyName()); + } + +} diff --git a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php index 73435402284b879ff11df2fe690b78fb4a3169ae..d261b4da406a11263d744f1c544a29539cc06fc9 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php +++ b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php @@ -37,7 +37,7 @@ abstract class DateTimeFormatterBase extends FormatterBase { * Constructs a new DateTimeDefaultFormatter. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php index 5f1a904791f0cb01a6d63c691146f55c3f2e40f4..7b867a356bf2c846902ffb9d5a8f0b571cdb66c7 100644 --- a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php +++ b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php @@ -83,7 +83,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { + public function submitForm(array &$form, FormStateInterface $form_state): void { $this->assertTrue(TRUE); $form_state->setRebuild(); } diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php index 2caaba3091fc4c74d0e9824cbaee8c03d4239ce5..55b97d8c854f8ebed2cc6bea14bbb5efad636e17 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php @@ -119,7 +119,7 @@ protected function setSiteTimezone($timezone) { * @return int * Unix timestamp. */ - protected function getUTCEquivalentOfUserNowAsTimestamp() { + protected function getUTCEquivalentOfUserNowAsTimestamp(): int { $user_now = new DateTimePlus('now', new \DateTimeZone(date_default_timezone_get())); $utc_equivalent = new DateTimePlus($user_now->format('Y-m-d H:i:s'), new \DateTimeZone(DateTimeItemInterface::STORAGE_TIMEZONE)); diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php index 4d4997b2b37a096e86ec20dca5ffcd081d445eb3..4ea41381862726f57585161b1ffbafa60afb0414 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php @@ -222,7 +222,7 @@ public function testDateIs(): void { * @param array $dates * An array of DATETIME_DATE_STORAGE_FORMAT date values. */ - protected function updateNodesDateFieldsValues(array $dates) { + protected function updateNodesDateFieldsValues(array $dates): void { foreach ($dates as $index => $date) { $this->nodes[$index]->{static::$fieldName}->value = $date; $this->nodes[$index]->save(); diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php index 5861acf8c7f2baabc07b3fca400eb92b2b61e611..677d216bab62c6ece4eb636c25b6909b08c0d53b 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php @@ -82,7 +82,7 @@ public function testDatetimeFilter(): void { /** * Tests offset operations. */ - protected function _testOffset() { + protected function _testOffset(): void { $view = Views::getView('test_filter_datetime'); $field = static::$fieldName . '_value'; @@ -117,7 +117,7 @@ protected function _testOffset() { /** * Tests between operations. */ - protected function _testBetween() { + protected function _testBetween(): void { $view = Views::getView('test_filter_datetime'); $field = static::$fieldName . '_value'; @@ -180,7 +180,7 @@ protected function _testBetween() { /** * Tests exact date matching. */ - protected function _testExact() { + protected function _testExact(): void { $view = Views::getView('test_filter_datetime'); $field = static::$fieldName . '_value'; diff --git a/core/modules/datetime_range/datetime_range.module b/core/modules/datetime_range/datetime_range.module deleted file mode 100644 index c0be2a2089d8c0aeffabc89aa8bad47918792dd6..0000000000000000000000000000000000000000 --- a/core/modules/datetime_range/datetime_range.module +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @file - * Field hooks to implement a datetime field that stores a start and end date. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function datetime_range_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.datetime_range': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Datetime Range module provides a Date field that stores start dates and times, as well as end dates and times. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI module help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":datetime_do">online documentation for the Datetime Range module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':datetime_do' => 'https://www.drupal.org/documentation/modules/datetime_range']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying date fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the Date field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Displaying dates') . '</dt>'; - $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', [':date_format_list' => Url::fromRoute('entity.date_format.collection')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} diff --git a/core/modules/datetime_range/datetime_range.post_update.php b/core/modules/datetime_range/datetime_range.post_update.php index 130449fba73080d42ba7b3b170a481c9b6c58cb5..c19f84323746a6b0b6557033fe4f1c5d66b7bb19 100644 --- a/core/modules/datetime_range/datetime_range.post_update.php +++ b/core/modules/datetime_range/datetime_range.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function datetime_range_removed_post_updates() { +function datetime_range_removed_post_updates(): array { return [ 'datetime_range_post_update_translatable_separator' => '9.0.0', 'datetime_range_post_update_views_string_plugin_id' => '9.0.0', diff --git a/core/modules/datetime_range/datetime_range.views.inc b/core/modules/datetime_range/datetime_range.views.inc deleted file mode 100644 index 6892ab244e16ea29ee4926e7cdb887902b4289cf..0000000000000000000000000000000000000000 --- a/core/modules/datetime_range/datetime_range.views.inc +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Provides views data for the datetime_range module. - */ - -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_field_views_data(). - */ -function datetime_range_field_views_data(FieldStorageConfigInterface $field_storage) { - - // Include datetime.views.inc file in order for helper function - // datetime_type_field_views_data_helper() to be available. - \Drupal::moduleHandler()->loadInclude('datetime', 'inc', 'datetime.views'); - - // Get datetime field data for value and end_value. - $data = datetime_type_field_views_data_helper($field_storage, [], 'value'); - $data = datetime_type_field_views_data_helper($field_storage, $data, 'end_value'); - - return $data; -} diff --git a/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php b/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ab7e5fbc0266c47de062a5ac862b317b4510090c --- /dev/null +++ b/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php @@ -0,0 +1,49 @@ +<?php + +namespace Drupal\datetime_range\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for datetime_range. + */ +class DatetimeRangeHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.datetime_range': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Datetime Range module provides a Date field that stores start dates and times, as well as end dates and times. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI module help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":datetime_do">online documentation for the Datetime Range module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':datetime_do' => 'https://www.drupal.org/documentation/modules/datetime_range', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying date fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the Date field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Displaying dates') . '</dt>'; + $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', [ + ':date_format_list' => Url::fromRoute('entity.date_format.collection')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/datetime_range/src/Hook/DatetimeRangeViewsHooks.php b/core/modules/datetime_range/src/Hook/DatetimeRangeViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..714f415aa2c628bd60f630e8005e1ac75465fc67 --- /dev/null +++ b/core/modules/datetime_range/src/Hook/DatetimeRangeViewsHooks.php @@ -0,0 +1,27 @@ +<?php + +namespace Drupal\datetime_range\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for datetime_range. + */ +class DatetimeRangeViewsHooks { + + /** + * Implements hook_field_views_data(). + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + // Include datetime.views.inc file in order for helper function + // datetime_type_field_views_data_helper() to be available. + \Drupal::moduleHandler()->loadInclude('datetime', 'inc', 'datetime.views'); + // Get datetime field data for value and end_value. + $data = datetime_type_field_views_data_helper($field_storage, [], 'value'); + $data = datetime_type_field_views_data_helper($field_storage, $data, 'end_value'); + return $data; + } + +} diff --git a/core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module b/core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module deleted file mode 100644 index 2564ead328603f278dd37b61614514a404ce2927..0000000000000000000000000000000000000000 --- a/core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Contains datetime_range_test.module. - */ - -declare(strict_types=1); - -/** - * Implements hook_entity_type_alter(). - */ -function datetime_range_test_entity_type_alter(array &$entity_types) { - // Inhibit views data for the 'taxonomy_term' entity type in order to cover - // the case when an entity type provides no views data. - // @see https://www.drupal.org/project/drupal/issues/2995578 - // @see \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest - $entity_types['taxonomy_term']->setHandlerClass('views_data', NULL); -} diff --git a/core/modules/datetime_range/tests/modules/datetime_range_test/src/Hook/DatetimeRangeTestHooks.php b/core/modules/datetime_range/tests/modules/datetime_range_test/src/Hook/DatetimeRangeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f40e50bb32204180787ddf6152eff2ea41d1e292 --- /dev/null +++ b/core/modules/datetime_range/tests/modules/datetime_range_test/src/Hook/DatetimeRangeTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\datetime_range_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for datetime_range_test. + */ +class DatetimeRangeTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Inhibit views data for the 'taxonomy_term' entity type in order to cover + // the case when an entity type provides no views data. + // @see https://www.drupal.org/project/drupal/issues/2995578 + // @see \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest + $entity_types['taxonomy_term']->setHandlerClass('views_data', NULL); + } + +} diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index 1af89a63ae30e272cc3230ae0349cc6839f57211..b5eae06ca8ddf9aeb2c58c96e19ce69d96fd3cc5 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Administrative page callbacks for the Database Logging module. */ use Drupal\Core\Logger\RfcLogLevel; diff --git a/core/modules/dblog/dblog.install b/core/modules/dblog/dblog.install index 7cabc6addfa55137068a71e57bb145b8b58aa840..796799c7b7f97f381c22fa80e0f5ab5eb756f96a 100644 --- a/core/modules/dblog/dblog.install +++ b/core/modules/dblog/dblog.install @@ -96,6 +96,6 @@ function dblog_schema() { /** * Implements hook_update_last_removed(). */ -function dblog_update_last_removed() { +function dblog_update_last_removed(): int { return 10101; } diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index ef11460c2c1be82ae0736dca7e10796ee28afe32..f2f0eed1772a390282861b974b987915220ca2c7 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -2,88 +2,7 @@ /** * @file - * System monitoring and logging for administrators. - * - * The Database Logging module monitors your site and keeps a list of recorded - * events containing usage and performance data, errors, warnings, and similar - * operational information. - */ - -use Drupal\Core\Url; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\StringTranslation\TranslatableMarkup; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_help(). - */ -function dblog_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.dblog': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Database Logging module logs system events in the Drupal database. For more information, see the <a href=":dblog">online documentation for the Database Logging module</a>.', [':dblog' => 'https://www.drupal.org/documentation/modules/dblog']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Monitoring your site') . '</dt>'; - $output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', [':dblog' => Url::fromRoute('dblog.overview')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Debugging site problems') . '</dt>'; - $output .= '<dd>' . t('In case of errors or problems with the site, the <a href=":dblog">Recent log messages</a> page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', [':dblog' => Url::fromRoute('dblog.overview')->toString()]) . '</dd>'; - $output .= '<dt>' . t('This log is not persistent') . '</dt>'; - $output .= '<dd>' . t('The Database Logging module logs may be cleared by administrators and automated cron tasks, so they should not be used for <a href=":audit_trail_wiki">forensic logging</a>. For forensic purposes, use the Syslog module.', [':audit_trail_wiki' => 'https://en.wikipedia.org/wiki/Audit_trail']) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'dblog.overview': - return '<p>' . t('The Database Logging module logs system events in the Drupal database. Monitor your site or debug site problems on this page.') . '</p>'; - } -} - -/** - * Implements hook_menu_links_discovered_alter(). */ -function dblog_menu_links_discovered_alter(&$links) { - if (\Drupal::moduleHandler()->moduleExists('search')) { - $links['dblog.search'] = [ - 'title' => new TranslatableMarkup('Top search phrases'), - 'route_name' => 'dblog.search', - 'description' => new TranslatableMarkup('View most popular search phrases.'), - 'parent' => 'system.admin_reports', - ]; - } - - return $links; -} - -/** - * Implements hook_cron(). - * - * Controls the size of the log table, paring it to 'dblog_row_limit' messages. - */ -function dblog_cron() { - // Cleanup the watchdog table. - $row_limit = \Drupal::config('dblog.settings')->get('row_limit'); - - // For row limit n, get the wid of the nth row in descending wid order. - // Counting the most recent n rows avoids issues with wid number sequences, - // e.g. auto_increment value > 1 or rows deleted directly from the table. - if ($row_limit > 0) { - $connection = \Drupal::database(); - $min_row = $connection->select('watchdog', 'w') - ->fields('w', ['wid']) - ->orderBy('wid', 'DESC') - ->range($row_limit - 1, 1) - ->execute()->fetchField(); - - // Delete all table entries older than the nth row, if nth row was found. - if ($min_row) { - $connection->delete('watchdog') - ->condition('wid', $min_row, '<') - ->execute(); - } - } -} /** * Gathers a list of uniquely defined database log message types. @@ -95,26 +14,3 @@ function _dblog_get_message_types() { return \Drupal::database()->query('SELECT DISTINCT([type]) FROM {watchdog} ORDER BY [type]') ->fetchAllKeyed(0, 0); } - -/** - * Implements hook_form_FORM_ID_alter() for system_logging_settings(). - */ -function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) { - $row_limits = [100, 1000, 10000, 100000, 1000000]; - $form['dblog_row_limit'] = [ - '#type' => 'select', - '#title' => t('Database log messages to keep'), - '#config_target' => 'dblog.settings:row_limit', - '#options' => [0 => t('All')] + array_combine($row_limits, $row_limits), - '#description' => t('The maximum number of messages to keep in the database log. Requires a <a href=":cron">cron maintenance task</a>.', [':cron' => Url::fromRoute('system.status')->toString()]), - ]; -} - -/** - * Implements hook_views_pre_render(). - */ -function dblog_views_pre_render(ViewExecutable $view) { - if (isset($view) && ($view->storage->get('base_table') == 'watchdog')) { - $view->element['#attached']['library'][] = 'dblog/drupal.dblog'; - } -} diff --git a/core/modules/dblog/dblog.post_update.php b/core/modules/dblog/dblog.post_update.php index 9fa7a0c2fe6afc673e6c9cfaff19fab92ada566b..226b1f468d0a5b157e2994bb4fd01602f02eae59 100644 --- a/core/modules/dblog/dblog.post_update.php +++ b/core/modules/dblog/dblog.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function dblog_removed_post_updates() { +function dblog_removed_post_updates(): array { return [ 'dblog_post_update_convert_recent_messages_to_view' => '9.0.0', ]; diff --git a/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc deleted file mode 100644 index 6ad9e68ce41761b139b4f4fb86e36427c87046bb..0000000000000000000000000000000000000000 --- a/core/modules/dblog/dblog.views.inc +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -/** - * @file - * Provide views data for dblog.module. - */ - -/** - * Implements hook_views_data(). - */ -function dblog_views_data() { - $data = []; - - $data['watchdog']['table']['group'] = t('Watchdog'); - $data['watchdog']['table']['wizard_id'] = 'watchdog'; - - $data['watchdog']['table']['base'] = [ - 'field' => 'wid', - 'title' => t('Log entries'), - 'help' => t('Contains a list of log entries.'), - ]; - - $data['watchdog']['wid'] = [ - 'title' => t('WID'), - 'help' => t('Unique watchdog event ID.'), - 'field' => [ - 'id' => 'standard', - ], - 'filter' => [ - 'id' => 'numeric', - ], - 'argument' => [ - 'id' => 'numeric', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['uid'] = [ - 'title' => t('UID'), - 'help' => t('The user ID of the user on which the log entry was written.'), - 'field' => [ - 'id' => 'standard', - ], - 'filter' => [ - 'id' => 'numeric', - ], - 'argument' => [ - 'id' => 'numeric', - ], - 'relationship' => [ - 'title' => t('User'), - 'help' => t('The user on which the log entry as written.'), - 'base' => 'users_field_data', - 'base field' => 'uid', - 'id' => 'standard', - ], - ]; - - $data['watchdog']['type'] = [ - 'title' => t('Type'), - 'help' => t('The type of the log entry, for example "user" or "page not found".'), - 'field' => [ - 'id' => 'standard', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'dblog_types', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['message'] = [ - 'title' => t('Message'), - 'help' => t('The actual message of the log entry.'), - 'field' => [ - 'id' => 'dblog_message', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['variables'] = [ - 'title' => t('Variables'), - 'help' => t('The variables of the log entry in a serialized format.'), - 'field' => [ - 'id' => 'serialized', - 'click sortable' => FALSE, - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['severity'] = [ - 'title' => t('Severity level'), - 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'), - 'field' => [ - 'id' => 'machine_name', - 'options callback' => 'Drupal\dblog\Controller\DbLogController::getLogLevelClassMap', - ], - 'filter' => [ - 'id' => 'in_operator', - 'options callback' => 'Drupal\Core\Logger\RfcLogLevel::getLevels', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['link'] = [ - 'title' => t('Operations'), - 'help' => t('Operation links for the event.'), - 'field' => [ - 'id' => 'dblog_operations', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['location'] = [ - 'title' => t('Location'), - 'help' => t('URL of the origin of the event.'), - 'field' => [ - 'id' => 'standard', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['referer'] = [ - 'title' => t('Referer'), - 'help' => t('URL of the previous page.'), - 'field' => [ - 'id' => 'standard', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['hostname'] = [ - 'title' => t('Hostname'), - 'help' => t('Hostname of the user who triggered the event.'), - 'field' => [ - 'id' => 'standard', - ], - 'argument' => [ - 'id' => 'string', - ], - 'filter' => [ - 'id' => 'string', - ], - 'sort' => [ - 'id' => 'standard', - ], - ]; - - $data['watchdog']['timestamp'] = [ - 'title' => t('Timestamp'), - 'help' => t('Date when the event occurred.'), - 'field' => [ - 'id' => 'date', - ], - 'argument' => [ - 'id' => 'date', - ], - 'filter' => [ - 'id' => 'date', - ], - 'sort' => [ - 'id' => 'date', - ], - ]; - - return $data; -} diff --git a/core/modules/dblog/src/Hook/DblogHooks.php b/core/modules/dblog/src/Hook/DblogHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..eb23fcd4dcebd10f035fa915fcdac058c76a383d --- /dev/null +++ b/core/modules/dblog/src/Hook/DblogHooks.php @@ -0,0 +1,110 @@ +<?php + +namespace Drupal\dblog\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for dblog. + */ +class DblogHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.dblog': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Database Logging module logs system events in the Drupal database. For more information, see the <a href=":dblog">online documentation for the Database Logging module</a>.', [':dblog' => 'https://www.drupal.org/documentation/modules/dblog']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Monitoring your site') . '</dt>'; + $output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', [':dblog' => Url::fromRoute('dblog.overview')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Debugging site problems') . '</dt>'; + $output .= '<dd>' . t('In case of errors or problems with the site, the <a href=":dblog">Recent log messages</a> page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', [':dblog' => Url::fromRoute('dblog.overview')->toString()]) . '</dd>'; + $output .= '<dt>' . t('This log is not persistent') . '</dt>'; + $output .= '<dd>' . t('The Database Logging module logs may be cleared by administrators and automated cron tasks, so they should not be used for <a href=":audit_trail_wiki">forensic logging</a>. For forensic purposes, use the Syslog module.', [':audit_trail_wiki' => 'https://en.wikipedia.org/wiki/Audit_trail']) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'dblog.overview': + return '<p>' . t('The Database Logging module logs system events in the Drupal database. Monitor your site or debug site problems on this page.') . '</p>'; + } + } + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(&$links) { + if (\Drupal::moduleHandler()->moduleExists('search')) { + $links['dblog.search'] = [ + 'title' => new TranslatableMarkup('Top search phrases'), + 'route_name' => 'dblog.search', + 'description' => new TranslatableMarkup('View most popular search phrases.'), + 'parent' => 'system.admin_reports', + ]; + } + return $links; + } + + /** + * Implements hook_cron(). + * + * Controls the size of the log table, paring it to 'dblog_row_limit' messages. + */ + #[Hook('cron')] + public function cron() { + // Cleanup the watchdog table. + $row_limit = \Drupal::config('dblog.settings')->get('row_limit'); + // For row limit n, get the wid of the nth row in descending wid order. + // Counting the most recent n rows avoids issues with wid number sequences, + // e.g. auto_increment value > 1 or rows deleted directly from the table. + if ($row_limit > 0) { + $connection = \Drupal::database(); + $min_row = $connection->select('watchdog', 'w')->fields('w', ['wid'])->orderBy('wid', 'DESC')->range($row_limit - 1, 1)->execute()->fetchField(); + // Delete all table entries older than the nth row, if nth row was found. + if ($min_row) { + $connection->delete('watchdog')->condition('wid', $min_row, '<')->execute(); + } + } + } + + /** + * Implements hook_form_FORM_ID_alter() for system_logging_settings(). + */ + #[Hook('form_system_logging_settings_alter')] + public function formSystemLoggingSettingsAlter(&$form, FormStateInterface $form_state) : void { + $row_limits = [100, 1000, 10000, 100000, 1000000]; + $form['dblog_row_limit'] = [ + '#type' => 'select', + '#title' => t('Database log messages to keep'), + '#config_target' => 'dblog.settings:row_limit', + '#options' => [ + 0 => t('All'), + ] + array_combine($row_limits, $row_limits), + '#description' => t('The maximum number of messages to keep in the database log. Requires a <a href=":cron">cron maintenance task</a>.', [ + ':cron' => Url::fromRoute('system.status')->toString(), + ]), + ]; + } + + /** + * Implements hook_views_pre_render(). + */ + #[Hook('views_pre_render')] + public function viewsPreRender(ViewExecutable $view) { + if (isset($view) && $view->storage->get('base_table') == 'watchdog') { + $view->element['#attached']['library'][] = 'dblog/drupal.dblog'; + } + } + +} diff --git a/core/modules/dblog/src/Hook/DblogViewsHooks.php b/core/modules/dblog/src/Hook/DblogViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e6ceafc1f772667b01d0a4cc29257dc75c246bb3 --- /dev/null +++ b/core/modules/dblog/src/Hook/DblogViewsHooks.php @@ -0,0 +1,212 @@ +<?php + +namespace Drupal\dblog\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for dblog. + */ +class DblogViewsHooks { + /** + * @file + * Provide views data for dblog.module. + */ + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + $data = []; + $data['watchdog']['table']['group'] = t('Watchdog'); + $data['watchdog']['table']['wizard_id'] = 'watchdog'; + $data['watchdog']['table']['base'] = [ + 'field' => 'wid', + 'title' => t('Log entries'), + 'help' => t('Contains a list of log entries.'), + ]; + $data['watchdog']['wid'] = [ + 'title' => t('WID'), + 'help' => t('Unique watchdog event ID.'), + 'field' => [ + 'id' => 'standard', + ], + 'filter' => [ + 'id' => 'numeric', + ], + 'argument' => [ + 'id' => 'numeric', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['uid'] = [ + 'title' => t('UID'), + 'help' => t('The user ID of the user on which the log entry was written.'), + 'field' => [ + 'id' => 'standard', + ], + 'filter' => [ + 'id' => 'numeric', + ], + 'argument' => [ + 'id' => 'numeric', + ], + 'relationship' => [ + 'title' => t('User'), + 'help' => t('The user on which the log entry as written.'), + 'base' => 'users_field_data', + 'base field' => 'uid', + 'id' => 'standard', + ], + ]; + $data['watchdog']['type'] = [ + 'title' => t('Type'), + 'help' => t('The type of the log entry, for example "user" or "page not found".'), + 'field' => [ + 'id' => 'standard', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'dblog_types', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['message'] = [ + 'title' => t('Message'), + 'help' => t('The actual message of the log entry.'), + 'field' => [ + 'id' => 'dblog_message', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['variables'] = [ + 'title' => t('Variables'), + 'help' => t('The variables of the log entry in a serialized format.'), + 'field' => [ + 'id' => 'serialized', + 'click sortable' => FALSE, + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['severity'] = [ + 'title' => t('Severity level'), + 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'), + 'field' => [ + 'id' => 'machine_name', + 'options callback' => 'Drupal\dblog\Controller\DbLogController::getLogLevelClassMap', + ], + 'filter' => [ + 'id' => 'in_operator', + 'options callback' => 'Drupal\Core\Logger\RfcLogLevel::getLevels', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['link'] = [ + 'title' => t('Operations'), + 'help' => t('Operation links for the event.'), + 'field' => [ + 'id' => 'dblog_operations', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['location'] = [ + 'title' => t('Location'), + 'help' => t('URL of the origin of the event.'), + 'field' => [ + 'id' => 'standard', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['referer'] = [ + 'title' => t('Referer'), + 'help' => t('URL of the previous page.'), + 'field' => [ + 'id' => 'standard', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['hostname'] = [ + 'title' => t('Hostname'), + 'help' => t('Hostname of the user who triggered the event.'), + 'field' => [ + 'id' => 'standard', + ], + 'argument' => [ + 'id' => 'string', + ], + 'filter' => [ + 'id' => 'string', + ], + 'sort' => [ + 'id' => 'standard', + ], + ]; + $data['watchdog']['timestamp'] = [ + 'title' => t('Timestamp'), + 'help' => t('Date when the event occurred.'), + 'field' => [ + 'id' => 'date', + ], + 'argument' => [ + 'id' => 'date', + ], + 'filter' => [ + 'id' => 'date', + ], + 'sort' => [ + 'id' => 'date', + ], + ]; + return $data; + } + +} diff --git a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php index b93c5e1b22a5ec671359f232c72b44d49bc01644..50ce42003f853e7e3d37e16b869aabc9bafa48ee 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php @@ -123,7 +123,7 @@ public function testWatchdog(): void { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['restful get dblog']); diff --git a/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php index 7265819cf37028faeb8e11d19c45a11d766a4f30..95c46392443323a036b0b8994d2526faee7ce260 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php @@ -305,7 +305,7 @@ protected function testMessageParsing(): void { * @param int $row_limit * The row limit. */ - private function verifyRowLimit($row_limit) { + private function verifyRowLimit($row_limit): void { // Change the database log row limit. $edit = []; $edit['dblog_row_limit'] = $row_limit; @@ -322,7 +322,7 @@ private function verifyRowLimit($row_limit) { /** * Clear the entry logs by clicking on 'Clear log messages' button. */ - protected function clearLogsEntries() { + protected function clearLogsEntries(): void { $this->drupalGet(Url::fromRoute('dblog.confirm')); } @@ -334,7 +334,7 @@ protected function clearLogsEntries() { * @param string $severity * (optional) The log entry severity. */ - protected function filterLogsEntries($type = NULL, $severity = NULL) { + protected function filterLogsEntries($type = NULL, $severity = NULL): void { $edit = []; if (isset($type)) { $edit['type[]'] = $type; @@ -351,7 +351,7 @@ protected function filterLogsEntries($type = NULL, $severity = NULL) { * @param int $response * (optional) HTTP response code. Defaults to 200. */ - private function verifyReports($response = 200) { + private function verifyReports($response = 200): void { // View the database log help page. $this->drupalGet('admin/help/dblog'); $this->assertSession()->statusCodeEquals($response); @@ -400,7 +400,7 @@ private function verifyReports($response = 200) { /** * Generates and then verifies breadcrumbs. */ - private function verifyBreadcrumbs() { + private function verifyBreadcrumbs(): void { // View the database log event page. $query = Database::getConnection()->select('watchdog'); $query->addExpression('MIN([wid])'); @@ -417,7 +417,7 @@ private function verifyBreadcrumbs() { /** * Generates and then verifies various types of events. */ - private function verifyEvents() { + private function verifyEvents(): void { // Invoke events. $this->doUser(); $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); @@ -438,7 +438,7 @@ private function verifyEvents() { * @param string $order * The order by which the table should be sorted. */ - protected function verifySort($sort = 'asc', $order = 'Date') { + public function verifySort($sort = 'asc', $order = 'Date'): void { $this->drupalGet('admin/reports/dblog', ['query' => ['sort' => $sort, 'order' => $order]]); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->pageTextContains('Recent log messages'); @@ -447,7 +447,7 @@ protected function verifySort($sort = 'asc', $order = 'Date') { /** * Tests link escaping in the operation row of a database log detail page. */ - private function verifyLinkEscaping() { + private function verifyLinkEscaping(): void { $link = Link::fromTextAndUrl('View', Url::fromRoute('entity.node.canonical', ['node' => 1]))->toString(); $message = 'Log entry added to do the verifyLinkEscaping test.'; $this->generateLogEntries(1, [ @@ -465,7 +465,7 @@ private function verifyLinkEscaping() { /** * Generates and then verifies some user events. */ - private function doUser() { + private function doUser(): void { // Set user variables. $name = $this->randomMachineName(); $pass = \Drupal::service('password_generator')->generate(); @@ -551,7 +551,7 @@ private function doUser() { * @param string $type * A node type (e.g., 'article' or 'page'). */ - private function doNode($type) { + private function doNode($type): void { // Create user. $perm = ['create ' . $type . ' content', 'edit own ' . $type . ' content', 'delete own ' . $type . ' content']; $user = $this->drupalCreateUser($perm); diff --git a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php index 284803fb2966d83cc07899db9f9a7f8374ed7a7d..7a0ef545c576a3dac9b0d9490bf14c39c7dab337 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php @@ -41,7 +41,7 @@ protected function getLogsEntriesTable() { /** * {@inheritdoc} */ - protected function filterLogsEntries($type = NULL, $severity = NULL) { + protected function filterLogsEntries($type = NULL, $severity = NULL): void { $query = []; if (isset($type)) { $query['type[]'] = $type; diff --git a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php index bb5251b730f8a48fa95bdfe437bcd2e013d96ca9..8ff735320fca06523fd854b8102d72062d50004a 100644 --- a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php +++ b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php @@ -68,7 +68,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { + public function submitForm(array &$form, FormStateInterface $form_state): void { $form_state->setRebuild(); } diff --git a/core/modules/dblog/tests/src/Kernel/DbLogTest.php b/core/modules/dblog/tests/src/Kernel/DbLogTest.php index 9bdc36cb98a9aa6363492f06fda3043778a96a53..6ff79f7aff465e4184ac78dd09e8629bca3556d1 100644 --- a/core/modules/dblog/tests/src/Kernel/DbLogTest.php +++ b/core/modules/dblog/tests/src/Kernel/DbLogTest.php @@ -83,7 +83,7 @@ public function testInvalidPlaceholders(): void { * @return int * Number of new watchdog entries. */ - private function runCron() { + private function runCron(): int { $connection = Database::getConnection(); // Get last ID to compare against; log entries get deleted, so we can't // reliably add the number of newly created log entries to the current count diff --git a/core/modules/dynamic_page_cache/dynamic_page_cache.module b/core/modules/dynamic_page_cache/dynamic_page_cache.module deleted file mode 100644 index 61d9b736989f5011650549d73dc6b069aa19d976..0000000000000000000000000000000000000000 --- a/core/modules/dynamic_page_cache/dynamic_page_cache.module +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/** - * @file - * Caches responses for all users, handling dynamic content correctly. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function dynamic_page_cache_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.dynamic_page_cache': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Internal Dynamic Page Cache module caches pages for all users in the database, handling dynamic content correctly. For more information, see the <a href=":dynamic_page_cache-documentation">online documentation for the Internal Dynamic Page Cache module</a>.', [':dynamic_page_cache-documentation' => 'https://www.drupal.org/documentation/modules/dynamic_page_cache']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Speeding up your site') . '</dt>'; - $output .= '<dd>' . t('Pages which are suitable for caching are cached the first time they are requested, then the cached version is served for all later requests. Dynamic content is handled automatically so that both cache correctness and hit ratio is maintained.') . '</dd>'; - $output .= '<dd>' . t('The module requires no configuration. Every part of the page contains metadata that allows Internal Dynamic Page Cache to figure this out on its own.') . '</dd>'; - $output .= '</dl>'; - - return $output; - } -} diff --git a/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php b/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6ecdc26904a3e83cc46824cc675280291eb4490c --- /dev/null +++ b/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php @@ -0,0 +1,34 @@ +<?php + +namespace Drupal\dynamic_page_cache\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for dynamic_page_cache. + */ +class DynamicPageCacheHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.dynamic_page_cache': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Internal Dynamic Page Cache module caches pages for all users in the database, handling dynamic content correctly. For more information, see the <a href=":dynamic_page_cache-documentation">online documentation for the Internal Dynamic Page Cache module</a>.', [ + ':dynamic_page_cache-documentation' => 'https://www.drupal.org/documentation/modules/dynamic_page_cache', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Speeding up your site') . '</dt>'; + $output .= '<dd>' . t('Pages which are suitable for caching are cached the first time they are requested, then the cached version is served for all later requests. Dynamic content is handled automatically so that both cache correctness and hit ratio is maintained.') . '</dd>'; + $output .= '<dd>' . t('The module requires no configuration. Every part of the page contains metadata that allows Internal Dynamic Page Cache to figure this out on its own.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/editor/editor.admin.inc b/core/modules/editor/editor.admin.inc index e557da6a4a86a69688dabab58019bdf5ff2d0789..47ee599d235def29cc0b85d7826951574d392e14 100644 --- a/core/modules/editor/editor.admin.inc +++ b/core/modules/editor/editor.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Administration functions for editor.module. */ use Drupal\Component\Utility\Environment; diff --git a/core/modules/editor/editor.install b/core/modules/editor/editor.install index 6e17486a8702551446712f5997600c95f575e2b6..ebc9167b24394a3cc735e127ef31b83270605cbf 100644 --- a/core/modules/editor/editor.install +++ b/core/modules/editor/editor.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function editor_update_last_removed() { +function editor_update_last_removed(): int { return 8001; } diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 3fdebe824b305a8dc02ce4e2d51033b90d1372be..46599d004fdfcad129ce68336c3f1dc83f46bf96 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -2,169 +2,19 @@ /** * @file - * Adds bindings for client-side "text editors" to text formats. */ -use Drupal\Core\Url; use Drupal\Component\Utility\Html; use Drupal\Core\Form\SubformState; use Drupal\editor\Entity\Editor; use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityInterface; use Drupal\filter\FilterFormatInterface; use Drupal\filter\Plugin\FilterInterface; use Drupal\text\Plugin\Field\FieldType\TextItemBase; -/** - * Implements hook_help(). - */ -function editor_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.editor': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Text Editor module provides a framework that other modules (such as <a href=":ckeditor5">CKEditor5 module</a>) can use to provide toolbars and other functionality that allow users to format text more easily than typing HTML tags directly. For more information, see the <a href=":documentation">online documentation for the Text Editor module</a>.', [':documentation' => 'https://www.drupal.org/documentation/modules/editor', ':ckeditor5' => (\Drupal::moduleHandler()->moduleExists('ckeditor5')) ? Url::fromRoute('help.page', ['name' => 'ckeditor5'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Installing text editors') . '</dt>'; - $output .= '<dd>' . t('The Text Editor module provides a framework for managing editors. To use it, you also need to install a text editor. This can either be the core <a href=":ckeditor5">CKEditor5 module</a>, which can be installed on the <a href=":extend">Extend page</a>, or a contributed module for any other text editor. When installing a contributed text editor module, be sure to check the installation instructions, because you will most likely need to download an external library as well as the Drupal module.', [':ckeditor5' => (\Drupal::moduleHandler()->moduleExists('ckeditor5')) ? Url::fromRoute('help.page', ['name' => 'ckeditor5'])->toString() : '#', ':extend' => Url::fromRoute('system.modules_list')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Enabling a text editor for a text format') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":formats">Text formats and editors page</a> you can see which text editor is associated with each text format. You can change this by clicking on the <em>Configure</em> link, and then choosing a text editor or <em>none</em> from the <em>Text editor</em> drop-down list. The text editor will then be displayed with any text field for which this text format is chosen.', [':formats' => Url::fromRoute('filter.admin_overview')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring a text editor') . '</dt>'; - $output .= '<dd>' . t('Once a text editor is associated with a text format, you can configure it by clicking on the <em>Configure</em> link for this format. Depending on the specific text editor, you can configure it for example by adding buttons to its toolbar. Typically these buttons provide formatting or editing tools, and they often insert HTML tags into the field source. For details, see the help page of the specific text editor.') . '</dd>'; - $output .= '<dt>' . t('Using different text editors and formats') . '</dt>'; - $output .= '<dd>' . t('If you change the text format on a text field, the text editor will change as well because the text editor configuration is associated with the individual text format. This allows the use of the same text editor with different options for different text formats. It also allows users to choose between text formats with different text editors if they are installed.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_menu_links_discovered_alter(). - * - * Rewrites the menu entries for filter module that relate to the configuration - * of text editors. - */ -function editor_menu_links_discovered_alter(array &$links) { - $links['filter.admin_overview']['title'] = new TranslatableMarkup('Text formats and editors'); - $links['filter.admin_overview']['description'] = new TranslatableMarkup('Select and configure text editors, and how content is filtered when displayed.'); -} - -/** - * Implements hook_element_info_alter(). - * - * Extends the functionality of text_format elements (provided by Filter - * module), so that selecting a text format notifies a client-side text editor - * when it should be enabled or disabled. - * - * @see \Drupal\filter\Element\TextFormat - */ -function editor_element_info_alter(&$types) { - $types['text_format']['#pre_render'][] = 'element.editor:preRenderTextFormat'; -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function editor_form_filter_admin_overview_alter(&$form, FormStateInterface $form_state) { - // @todo Cleanup column injection: https://www.drupal.org/node/1876718. - // Splice in the column for "Text editor" into the header. - $position = array_search('name', $form['formats']['#header']) + 1; - $start = array_splice($form['formats']['#header'], 0, $position, ['editor' => t('Text editor')]); - $form['formats']['#header'] = array_merge($start, $form['formats']['#header']); - - // Then splice in the name of each text editor for each text format. - $editors = \Drupal::service('plugin.manager.editor')->getDefinitions(); - foreach (Element::children($form['formats']) as $format_id) { - $editor = editor_load($format_id); - $editor_name = ($editor && isset($editors[$editor->getEditor()])) ? $editors[$editor->getEditor()]['label'] : '—'; - $editor_column['editor'] = ['#markup' => $editor_name]; - $position = array_search('name', array_keys($form['formats'][$format_id])) + 1; - $start = array_splice($form['formats'][$format_id], 0, $position, $editor_column); - $form['formats'][$format_id] = array_merge($start, $form['formats'][$format_id]); - } -} - -/** - * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\filter\FilterFormatEditForm. - */ -function editor_form_filter_format_form_alter(&$form, FormStateInterface $form_state) { - $editor = $form_state->get('editor'); - if ($editor === NULL) { - $format = $form_state->getFormObject()->getEntity(); - $format_id = $format->isNew() ? NULL : $format->id(); - $editor = editor_load($format_id); - $form_state->set('editor', $editor); - } - - // Associate a text editor with this text format. - $manager = \Drupal::service('plugin.manager.editor'); - $editor_options = $manager->listOptions(); - $form['editor'] = [ - // Position the editor selection before the filter settings (weight of 0), - // but after the filter label and name (weight of -20). - '#weight' => -9, - ]; - $form['editor']['editor'] = [ - '#type' => 'select', - '#title' => t('Text editor'), - '#options' => $editor_options, - '#empty_option' => t('None'), - '#default_value' => $editor ? $editor->getEditor() : '', - '#ajax' => [ - 'trigger_as' => ['name' => 'editor_configure'], - 'callback' => 'editor_form_filter_admin_form_ajax', - 'wrapper' => 'editor-settings-wrapper', - ], - '#weight' => -10, - ]; - $form['editor']['configure'] = [ - '#type' => 'submit', - '#name' => 'editor_configure', - '#value' => t('Configure'), - '#limit_validation_errors' => [['editor']], - '#submit' => ['editor_form_filter_admin_format_editor_configure'], - '#ajax' => [ - 'callback' => 'editor_form_filter_admin_form_ajax', - 'wrapper' => 'editor-settings-wrapper', - ], - '#weight' => -10, - '#attributes' => ['class' => ['js-hide']], - ]; - - // If there aren't any options (other than "None"), disable the select list. - if (empty($editor_options)) { - $form['editor']['editor']['#disabled'] = TRUE; - $form['editor']['editor']['#description'] = t('This option is disabled because no modules that provide a text editor are currently enabled.'); - } - - $form['editor']['settings'] = [ - '#tree' => TRUE, - '#weight' => -8, - '#type' => 'container', - '#id' => 'editor-settings-wrapper', - ]; - - // Add editor-specific validation and submit handlers. - if ($editor) { - /** @var \Drupal\editor\Plugin\EditorPluginInterface $plugin */ - $plugin = $manager->createInstance($editor->getEditor()); - $form_state->set('editor_plugin', $plugin); - $form['editor']['settings']['subform'] = []; - $subform_state = SubformState::createForSubform($form['editor']['settings']['subform'], $form, $form_state); - $form['editor']['settings']['subform'] = $plugin->buildConfigurationForm($form['editor']['settings']['subform'], $subform_state); - $form['editor']['settings']['subform']['#parents'] = ['editor', 'settings']; - } - - $form['#validate'][] = 'editor_form_filter_admin_format_validate'; - $form['actions']['submit']['#submit'][] = 'editor_form_filter_admin_format_submit'; -} - /** * Button submit handler for filter_format_form()'s 'editor_configure' button. */ @@ -356,92 +206,6 @@ function editor_filter_xss($html, ?FilterFormatInterface $format = NULL, ?Filter return call_user_func($editor_xss_filter_class . '::filterXss', $html, $format, $original_format); } -/** - * Implements hook_entity_insert(). - */ -function editor_entity_insert(EntityInterface $entity) { - // Only act on content entities. - if (!($entity instanceof FieldableEntityInterface)) { - return; - } - $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); - foreach ($referenced_files_by_field as $uuids) { - _editor_record_file_usage($uuids, $entity); - } -} - -/** - * Implements hook_entity_update(). - */ -function editor_entity_update(EntityInterface $entity) { - // Only act on content entities. - if (!($entity instanceof FieldableEntityInterface)) { - return; - } - - // On new revisions, all files are considered to be a new usage and no - // deletion of previous file usages are necessary. - if (!empty($entity->original) && $entity->getRevisionId() != $entity->original->getRevisionId()) { - $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); - foreach ($referenced_files_by_field as $uuids) { - _editor_record_file_usage($uuids, $entity); - } - } - // On modified revisions, detect which file references have been added (and - // record their usage) and which ones have been removed (delete their usage). - // File references that existed both in the previous version of the revision - // and in the new one don't need their usage to be updated. - else { - $original_uuids_by_field = empty($entity->original) ? [] : - _editor_get_file_uuids_by_field($entity->original); - - $uuids_by_field = _editor_get_file_uuids_by_field($entity); - - // Detect file usages that should be incremented. - foreach ($uuids_by_field as $field => $uuids) { - $original_uuids = $original_uuids_by_field[$field] ?? []; - - if ($added_files = array_diff($uuids_by_field[$field], $original_uuids)) { - _editor_record_file_usage($added_files, $entity); - } - } - - // Detect file usages that should be decremented. - foreach ($original_uuids_by_field as $field => $uuids) { - $removed_files = array_diff($original_uuids_by_field[$field], $uuids_by_field[$field]); - _editor_delete_file_usage($removed_files, $entity, 1); - } - } -} - -/** - * Implements hook_entity_delete(). - */ -function editor_entity_delete(EntityInterface $entity) { - // Only act on content entities. - if (!($entity instanceof FieldableEntityInterface)) { - return; - } - $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); - foreach ($referenced_files_by_field as $uuids) { - _editor_delete_file_usage($uuids, $entity, 0); - } -} - -/** - * Implements hook_entity_revision_delete(). - */ -function editor_entity_revision_delete(EntityInterface $entity) { - // Only act on content entities. - if (!($entity instanceof FieldableEntityInterface)) { - return; - } - $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); - foreach ($referenced_files_by_field as $uuids) { - _editor_delete_file_usage($uuids, $entity, 1); - } -} - /** * Records file usage of files referenced by formatted text fields. * @@ -486,67 +250,6 @@ function _editor_delete_file_usage(array $uuids, EntityInterface $entity, $count } } -/** - * Implements hook_file_download(). - * - * @see file_file_download() - * @see file_get_file_references() - */ -function editor_file_download($uri) { - // Get the file record based on the URI. If not in the database just return. - /** @var \Drupal\file\FileRepositoryInterface $file_repository */ - $file_repository = \Drupal::service('file.repository'); - $file = $file_repository->loadByUri($uri); - if (!$file) { - return; - } - - // Temporary files are handled by file_file_download(), so nothing to do here - // about them. - // @see file_file_download() - - // Find out if any editor-backed field contains the file. - $usage_list = \Drupal::service('file.usage')->listUsage($file); - - // Stop processing if there are no references in order to avoid returning - // headers for files controlled by other modules. Make an exception for - // temporary files where the host entity has not yet been saved (for example, - // an image preview on a node creation form) in which case, allow download by - // the file's owner. - if (empty($usage_list['editor']) && ($file->isPermanent() || $file->getOwnerId() != \Drupal::currentUser()->id())) { - return; - } - - // Editor.module MUST NOT call $file->access() here (like file_file_download() - // does) as checking the 'download' access to a file entity would end up in - // FileAccessControlHandler->checkAccess() and ->getFileReferences(), which - // calls file_get_file_references(). This latter one would allow downloading - // files only handled by the file.module, which is exactly not the case right - // here. So instead we must check if the current user is allowed to view any - // of the entities that reference the image using the 'editor' module. - if ($file->isPermanent()) { - $referencing_entity_is_accessible = FALSE; - $references = empty($usage_list['editor']) ? [] : $usage_list['editor']; - foreach ($references as $entity_type => $entity_ids_usage_count) { - $referencing_entities = \Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple(array_keys($entity_ids_usage_count)); - /** @var \Drupal\Core\Entity\EntityInterface $referencing_entity */ - foreach ($referencing_entities as $referencing_entity) { - if ($referencing_entity->access('view', NULL, TRUE)->isAllowed()) { - $referencing_entity_is_accessible = TRUE; - break 2; - } - } - } - if (!$referencing_entity_is_accessible) { - return -1; - } - } - - // Access is granted. - $headers = file_get_content_headers($file); - return $headers; -} - /** * Finds all files referenced (data-entity-uuid) by formatted text fields. * @@ -621,32 +324,3 @@ function _editor_parse_file_uuids($text) { } return $uuids; } - -/** - * Implements hook_ENTITY_TYPE_presave(). - * - * Synchronizes the editor status to its paired text format status. - * - * @todo remove in https://www.drupal.org/project/drupal/issues/3231354. - */ -function editor_filter_format_presave(FilterFormatInterface $format) { - // The text format being created cannot have a text editor yet. - if ($format->isNew()) { - return; - } - - /** @var \Drupal\filter\FilterFormatInterface $original */ - $original = \Drupal::entityTypeManager() - ->getStorage('filter_format') - ->loadUnchanged($format->getOriginalId()); - - // If the text format status is the same, return early. - if (($status = $format->status()) === $original->status()) { - return; - } - - /** @var \Drupal\editor\EditorInterface $editor */ - if ($editor = Editor::load($format->id())) { - $editor->setStatus($status)->save(); - } -} diff --git a/core/modules/editor/editor.post_update.php b/core/modules/editor/editor.post_update.php index 981db58ad5e77c0d4bd4682cb88b6a2ed2a89e99..b5669176f7d7427460b012c90ba01568949a16d8 100644 --- a/core/modules/editor/editor.post_update.php +++ b/core/modules/editor/editor.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function editor_removed_post_updates() { +function editor_removed_post_updates(): array { return [ 'editor_post_update_clear_cache_for_file_reference_filter' => '9.0.0', 'editor_post_update_image_lazy_load' => '11.0.0', diff --git a/core/modules/editor/src/Entity/Editor.php b/core/modules/editor/src/Entity/Editor.php index 54d32a8dcbf7137d190234d0dc2ad8d448a71a63..2b55b4c884e8f515ecebd4705c8f4a9dac6b9aa8 100644 --- a/core/modules/editor/src/Entity/Editor.php +++ b/core/modules/editor/src/Entity/Editor.php @@ -2,9 +2,12 @@ namespace Drupal\editor\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\StreamWrapper\StreamWrapperInterface; +use Drupal\editor\EditorAccessControlHandler; use Drupal\editor\EditorInterface; /** @@ -14,36 +17,35 @@ * saved after selecting an editor plugin (eg: CKEditor). The ID of the * Editor entity will be same as the ID of the filter format entity in which * the editor plugin was selected. - * - * @ConfigEntityType( - * id = "editor", - * label = @Translation("Text editor"), - * label_collection = @Translation("Text editors"), - * label_singular = @Translation("text editor"), - * label_plural = @Translation("text editors"), - * label_count = @PluralTranslation( - * singular = "@count text editor", - * plural = "@count text editors", - * ), - * handlers = { - * "access" = "Drupal\editor\EditorAccessControlHandler", - * }, - * entity_keys = { - * "id" = "format" - * }, - * config_export = { - * "format", - * "editor", - * "settings", - * "image_upload", - * }, - * constraints = { - * "RequiredConfigDependencies" = { - * "filter_format" - * } - * } - * ) */ +#[ConfigEntityType( + id: 'editor', + label: new TranslatableMarkup('Text editor'), + label_collection: new TranslatableMarkup('Text editors'), + label_singular: new TranslatableMarkup('text editor'), + label_plural: new TranslatableMarkup('text editors'), + entity_keys: [ + 'id' => 'format', + ], + handlers: [ + 'access' => EditorAccessControlHandler::class, + ], + label_count: [ + 'singular' => '@count text editor', + 'plural' => '@count text editors', + ], + constraints: [ + 'RequiredConfigDependencies' => [ + 'filter_format', + ], + ], + config_export: [ + 'format', + 'editor', + 'settings', + 'image_upload', + ], +)] class Editor extends ConfigEntityBase implements EditorInterface { /** diff --git a/core/modules/editor/src/Hook/EditorHooks.php b/core/modules/editor/src/Hook/EditorHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fc53da2e160f61bd6256c372db0c3a384965e361 --- /dev/null +++ b/core/modules/editor/src/Hook/EditorHooks.php @@ -0,0 +1,346 @@ +<?php + +namespace Drupal\editor\Hook; + +use Drupal\editor\Entity\Editor; +use Drupal\filter\FilterFormatInterface; +use Drupal\Core\Entity\FieldableEntityInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Form\SubformState; +use Drupal\Core\Render\Element; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for editor. + */ +class EditorHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.editor': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Text Editor module provides a framework that other modules (such as <a href=":ckeditor5">CKEditor5 module</a>) can use to provide toolbars and other functionality that allow users to format text more easily than typing HTML tags directly. For more information, see the <a href=":documentation">online documentation for the Text Editor module</a>.', [ + ':documentation' => 'https://www.drupal.org/documentation/modules/editor', + ':ckeditor5' => \Drupal::moduleHandler()->moduleExists('ckeditor5') ? Url::fromRoute('help.page', [ + 'name' => 'ckeditor5', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Installing text editors') . '</dt>'; + $output .= '<dd>' . t('The Text Editor module provides a framework for managing editors. To use it, you also need to install a text editor. This can either be the core <a href=":ckeditor5">CKEditor5 module</a>, which can be installed on the <a href=":extend">Extend page</a>, or a contributed module for any other text editor. When installing a contributed text editor module, be sure to check the installation instructions, because you will most likely need to download an external library as well as the Drupal module.', [ + ':ckeditor5' => \Drupal::moduleHandler()->moduleExists('ckeditor5') ? Url::fromRoute('help.page', [ + 'name' => 'ckeditor5', + ])->toString() : '#', + ':extend' => Url::fromRoute('system.modules_list')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Enabling a text editor for a text format') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":formats">Text formats and editors page</a> you can see which text editor is associated with each text format. You can change this by clicking on the <em>Configure</em> link, and then choosing a text editor or <em>none</em> from the <em>Text editor</em> drop-down list. The text editor will then be displayed with any text field for which this text format is chosen.', [':formats' => Url::fromRoute('filter.admin_overview')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Configuring a text editor') . '</dt>'; + $output .= '<dd>' . t('Once a text editor is associated with a text format, you can configure it by clicking on the <em>Configure</em> link for this format. Depending on the specific text editor, you can configure it for example by adding buttons to its toolbar. Typically these buttons provide formatting or editing tools, and they often insert HTML tags into the field source. For details, see the help page of the specific text editor.') . '</dd>'; + $output .= '<dt>' . t('Using different text editors and formats') . '</dt>'; + $output .= '<dd>' . t('If you change the text format on a text field, the text editor will change as well because the text editor configuration is associated with the individual text format. This allows the use of the same text editor with different options for different text formats. It also allows users to choose between text formats with different text editors if they are installed.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_menu_links_discovered_alter(). + * + * Rewrites the menu entries for filter module that relate to the configuration + * of text editors. + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(array &$links) { + $links['filter.admin_overview']['title'] = new TranslatableMarkup('Text formats and editors'); + $links['filter.admin_overview']['description'] = new TranslatableMarkup('Select and configure text editors, and how content is filtered when displayed.'); + } + + /** + * Implements hook_element_info_alter(). + * + * Extends the functionality of text_format elements (provided by Filter + * module), so that selecting a text format notifies a client-side text editor + * when it should be enabled or disabled. + * + * @see \Drupal\filter\Element\TextFormat + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(&$types) { + $types['text_format']['#pre_render'][] = 'element.editor:preRenderTextFormat'; + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_filter_admin_overview_alter')] + public function formFilterAdminOverviewAlter(&$form, FormStateInterface $form_state) : void { + // @todo Cleanup column injection: https://www.drupal.org/node/1876718. + // Splice in the column for "Text editor" into the header. + $position = array_search('name', $form['formats']['#header']) + 1; + $start = array_splice($form['formats']['#header'], 0, $position, ['editor' => t('Text editor')]); + $form['formats']['#header'] = array_merge($start, $form['formats']['#header']); + // Then splice in the name of each text editor for each text format. + $editors = \Drupal::service('plugin.manager.editor')->getDefinitions(); + foreach (Element::children($form['formats']) as $format_id) { + $editor = editor_load($format_id); + $editor_name = $editor && isset($editors[$editor->getEditor()]) ? $editors[$editor->getEditor()]['label'] : '—'; + $editor_column['editor'] = ['#markup' => $editor_name]; + $position = array_search('name', array_keys($form['formats'][$format_id])) + 1; + $start = array_splice($form['formats'][$format_id], 0, $position, $editor_column); + $form['formats'][$format_id] = array_merge($start, $form['formats'][$format_id]); + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\filter\FilterFormatEditForm. + */ + #[Hook('form_filter_format_form_alter')] + public function formFilterFormatFormAlter(&$form, FormStateInterface $form_state) : void { + $editor = $form_state->get('editor'); + if ($editor === NULL) { + $format = $form_state->getFormObject()->getEntity(); + $format_id = $format->isNew() ? NULL : $format->id(); + $editor = editor_load($format_id); + $form_state->set('editor', $editor); + } + // Associate a text editor with this text format. + $manager = \Drupal::service('plugin.manager.editor'); + $editor_options = $manager->listOptions(); + $form['editor'] = ['#weight' => -9]; + $form['editor']['editor'] = [ + '#type' => 'select', + '#title' => t('Text editor'), + '#options' => $editor_options, + '#empty_option' => t('None'), + '#default_value' => $editor ? $editor->getEditor() : '', + '#ajax' => [ + 'trigger_as' => [ + 'name' => 'editor_configure', + ], + 'callback' => 'editor_form_filter_admin_form_ajax', + 'wrapper' => 'editor-settings-wrapper', + ], + '#weight' => -10, + ]; + $form['editor']['configure'] = [ + '#type' => 'submit', + '#name' => 'editor_configure', + '#value' => t('Configure'), + '#limit_validation_errors' => [ + [ + 'editor', + ], + ], + '#submit' => [ + 'editor_form_filter_admin_format_editor_configure', + ], + '#ajax' => [ + 'callback' => 'editor_form_filter_admin_form_ajax', + 'wrapper' => 'editor-settings-wrapper', + ], + '#weight' => -10, + '#attributes' => [ + 'class' => [ + 'js-hide', + ], + ], + ]; + // If there aren't any options (other than "None"), disable the select list. + if (empty($editor_options)) { + $form['editor']['editor']['#disabled'] = TRUE; + $form['editor']['editor']['#description'] = t('This option is disabled because no modules that provide a text editor are currently enabled.'); + } + $form['editor']['settings'] = [ + '#tree' => TRUE, + '#weight' => -8, + '#type' => 'container', + '#id' => 'editor-settings-wrapper', + ]; + // Add editor-specific validation and submit handlers. + if ($editor) { + /** @var \Drupal\editor\Plugin\EditorPluginInterface $plugin */ + $plugin = $manager->createInstance($editor->getEditor()); + $form_state->set('editor_plugin', $plugin); + $form['editor']['settings']['subform'] = []; + $subform_state = SubformState::createForSubform($form['editor']['settings']['subform'], $form, $form_state); + $form['editor']['settings']['subform'] = $plugin->buildConfigurationForm($form['editor']['settings']['subform'], $subform_state); + $form['editor']['settings']['subform']['#parents'] = ['editor', 'settings']; + } + $form['#validate'][] = 'editor_form_filter_admin_format_validate'; + $form['actions']['submit']['#submit'][] = 'editor_form_filter_admin_format_submit'; + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + // Only act on content entities. + if (!$entity instanceof FieldableEntityInterface) { + return; + } + $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); + foreach ($referenced_files_by_field as $uuids) { + _editor_record_file_usage($uuids, $entity); + } + } + + /** + * Implements hook_entity_update(). + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + // Only act on content entities. + if (!$entity instanceof FieldableEntityInterface) { + return; + } + // On new revisions, all files are considered to be a new usage and no + // deletion of previous file usages are necessary. + if (!empty($entity->original) && $entity->getRevisionId() != $entity->original->getRevisionId()) { + $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); + foreach ($referenced_files_by_field as $uuids) { + _editor_record_file_usage($uuids, $entity); + } + } + else { + $original_uuids_by_field = empty($entity->original) ? [] : _editor_get_file_uuids_by_field($entity->original); + $uuids_by_field = _editor_get_file_uuids_by_field($entity); + // Detect file usages that should be incremented. + foreach ($uuids_by_field as $field => $uuids) { + $original_uuids = $original_uuids_by_field[$field] ?? []; + if ($added_files = array_diff($uuids_by_field[$field], $original_uuids)) { + _editor_record_file_usage($added_files, $entity); + } + } + // Detect file usages that should be decremented. + foreach ($original_uuids_by_field as $field => $uuids) { + $removed_files = array_diff($original_uuids_by_field[$field], $uuids_by_field[$field]); + _editor_delete_file_usage($removed_files, $entity, 1); + } + } + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + // Only act on content entities. + if (!$entity instanceof FieldableEntityInterface) { + return; + } + $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); + foreach ($referenced_files_by_field as $uuids) { + _editor_delete_file_usage($uuids, $entity, 0); + } + } + + /** + * Implements hook_entity_revision_delete(). + */ + #[Hook('entity_revision_delete')] + public function entityRevisionDelete(EntityInterface $entity) { + // Only act on content entities. + if (!$entity instanceof FieldableEntityInterface) { + return; + } + $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); + foreach ($referenced_files_by_field as $uuids) { + _editor_delete_file_usage($uuids, $entity, 1); + } + } + + /** + * Implements hook_file_download(). + * + * @see file_file_download() + * @see file_get_file_references() + */ + #[Hook('file_download')] + public function fileDownload($uri) { + // Get the file record based on the URI. If not in the database just return. + /** @var \Drupal\file\FileRepositoryInterface $file_repository */ + $file_repository = \Drupal::service('file.repository'); + $file = $file_repository->loadByUri($uri); + if (!$file) { + return; + } + // Temporary files are handled by file_file_download(), so nothing to do here + // about them. + // @see file_file_download() + // Find out if any editor-backed field contains the file. + $usage_list = \Drupal::service('file.usage')->listUsage($file); + // Stop processing if there are no references in order to avoid returning + // headers for files controlled by other modules. Make an exception for + // temporary files where the host entity has not yet been saved (for example, + // an image preview on a node creation form) in which case, allow download by + // the file's owner. + if (empty($usage_list['editor']) && ($file->isPermanent() || $file->getOwnerId() != \Drupal::currentUser()->id())) { + return; + } + // Editor.module MUST NOT call $file->access() here (like file_file_download() + // does) as checking the 'download' access to a file entity would end up in + // FileAccessControlHandler->checkAccess() and ->getFileReferences(), which + // calls file_get_file_references(). This latter one would allow downloading + // files only handled by the file.module, which is exactly not the case right + // here. So instead we must check if the current user is allowed to view any + // of the entities that reference the image using the 'editor' module. + if ($file->isPermanent()) { + $referencing_entity_is_accessible = FALSE; + $references = empty($usage_list['editor']) ? [] : $usage_list['editor']; + foreach ($references as $entity_type => $entity_ids_usage_count) { + $referencing_entities = \Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple(array_keys($entity_ids_usage_count)); + /** @var \Drupal\Core\Entity\EntityInterface $referencing_entity */ + foreach ($referencing_entities as $referencing_entity) { + if ($referencing_entity->access('view', NULL, TRUE)->isAllowed()) { + $referencing_entity_is_accessible = TRUE; + break 2; + } + } + } + if (!$referencing_entity_is_accessible) { + return -1; + } + } + // Access is granted. + $headers = file_get_content_headers($file); + return $headers; + } + + /** + * Implements hook_ENTITY_TYPE_presave(). + * + * Synchronizes the editor status to its paired text format status. + * + * @todo remove in https://www.drupal.org/project/drupal/issues/3231354. + */ + #[Hook('filter_format_presave')] + public function filterFormatPresave(FilterFormatInterface $format) { + // The text format being created cannot have a text editor yet. + if ($format->isNew()) { + return; + } + /** @var \Drupal\filter\FilterFormatInterface $original */ + $original = \Drupal::entityTypeManager()->getStorage('filter_format')->loadUnchanged($format->getOriginalId()); + // If the text format status is the same, return early. + if (($status = $format->status()) === $original->status()) { + return; + } + /** @var \Drupal\editor\EditorInterface $editor */ + if ($editor = Editor::load($format->id())) { + $editor->setStatus($status)->save(); + } + } + +} diff --git a/core/modules/editor/src/Plugin/Filter/EditorFileReference.php b/core/modules/editor/src/Plugin/Filter/EditorFileReference.php index 2e920d2ea694dcb72ec29576ce6d2c3d6fc00d27..9cb31f7c701e0835fe3e1088e17b97ef749abcb1 100644 --- a/core/modules/editor/src/Plugin/Filter/EditorFileReference.php +++ b/core/modules/editor/src/Plugin/Filter/EditorFileReference.php @@ -47,7 +47,7 @@ class EditorFileReference extends FilterBase implements ContainerFactoryPluginIn * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository diff --git a/core/modules/editor/tests/modules/editor_test/editor_test.module b/core/modules/editor/tests/modules/editor_test/editor_test.module deleted file mode 100644 index fb7dd839c71e27eff0ec7f149706b1bc85371559..0000000000000000000000000000000000000000 --- a/core/modules/editor/tests/modules/editor_test/editor_test.module +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/** - * @file - * Helper module for the Text Editor tests. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; -use Drupal\node\NodeInterface; -use Drupal\filter\FilterFormatInterface; -use Drupal\file\FileInterface; - -/** - * Implements hook_entity_update(). - * - * @see \Drupal\Tests\editor\Kernel\EntityUpdateTest - */ -function editor_test_entity_update(EntityInterface $entity) { - // Only act on nodes. - if (!$entity instanceof NodeInterface) { - return; - } - - // Avoid infinite loop by only going through our post save logic once. - if (!empty($entity->editor_test_updating)) { - return; - } - - // Set flag for whether or not the entity needs to be resaved. - $needs_update = FALSE; - - // Perform our post save logic. - if ($entity->title->value == 'test updated') { - // Change the node title. - $entity->title->value = 'test updated 2'; - $needs_update = TRUE; - } - - if ($needs_update) { - // Set flag on entity that our logic was already executed. - $entity->editor_test_updating = TRUE; - // And resave entity. - $entity->save(); - } -} - -/** - * Implements hook_editor_js_settings_alter(). - */ -function editor_test_editor_js_settings_alter(&$settings) { - // Allow tests to enable or disable this alter hook. - if (!\Drupal::state()->get('editor_test_js_settings_alter_enabled', FALSE)) { - return; - } - - if (isset($settings['editor']['formats']['full_html'])) { - $settings['editor']['formats']['full_html']['editorSettings']['ponyModeEnabled'] = FALSE; - } -} - -/** - * Implements hook_editor_xss_filter_alter(). - */ -function editor_test_editor_xss_filter_alter(&$editor_xss_filter_class, FilterFormatInterface $format, ?FilterFormatInterface $original_format = NULL) { - // Allow tests to enable or disable this alter hook. - if (!\Drupal::state()->get('editor_test_editor_xss_filter_alter_enabled', FALSE)) { - return; - } - - $filters = $format->filters()->getAll(); - if (isset($filters['filter_html']) && $filters['filter_html']->status) { - $editor_xss_filter_class = '\Drupal\editor_test\EditorXssFilter\Insecure'; - } -} - -/** - * Implements hook_editor_info_alter(). - */ -function editor_test_editor_info_alter(&$items) { - if (!\Drupal::state()->get('editor_test_give_me_a_trex_thanks', FALSE)) { - unset($items['trex']); - } -} - -/** - * Implements hook_ENTITY_TYPE_presave() for file entities. - */ -function editor_test_file_presave(FileInterface $file) { - // Use state to keep track of how many times a file is saved. - $file_save_count = \Drupal::state()->get('editor_test.file_save_count', []); - $file_save_count[$file->getFilename()] = isset($file_save_count[$file->getFilename()]) ? $file_save_count[$file->getFilename()] + 1 : 1; - \Drupal::state()->set('editor_test.file_save_count', $file_save_count); -} diff --git a/core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php b/core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..03bfed565848216af43bc17056ee6c39ccfb2f47 --- /dev/null +++ b/core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php @@ -0,0 +1,99 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\editor_test\Hook; + +use Drupal\file\FileInterface; +use Drupal\filter\FilterFormatInterface; +use Drupal\node\NodeInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for editor_test. + */ +class EditorTestHooks { + + /** + * Implements hook_entity_update(). + * + * @see \Drupal\Tests\editor\Kernel\EntityUpdateTest + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + // Only act on nodes. + if (!$entity instanceof NodeInterface) { + return; + } + // Avoid infinite loop by only going through our post save logic once. + if (!empty($entity->editor_test_updating)) { + return; + } + // Set flag for whether or not the entity needs to be resaved. + $needs_update = FALSE; + // Perform our post save logic. + if ($entity->title->value == 'test updated') { + // Change the node title. + $entity->title->value = 'test updated 2'; + $needs_update = TRUE; + } + if ($needs_update) { + // Set flag on entity that our logic was already executed. + $entity->editor_test_updating = TRUE; + // And resave entity. + $entity->save(); + } + } + + /** + * Implements hook_editor_js_settings_alter(). + */ + #[Hook('editor_js_settings_alter')] + public function editorJsSettingsAlter(&$settings) { + // Allow tests to enable or disable this alter hook. + if (!\Drupal::state()->get('editor_test_js_settings_alter_enabled', FALSE)) { + return; + } + if (isset($settings['editor']['formats']['full_html'])) { + $settings['editor']['formats']['full_html']['editorSettings']['ponyModeEnabled'] = FALSE; + } + } + + /** + * Implements hook_editor_xss_filter_alter(). + */ + #[Hook('editor_xss_filter_alter')] + public function editorXssFilterAlter(&$editor_xss_filter_class, FilterFormatInterface $format, ?FilterFormatInterface $original_format = NULL) { + // Allow tests to enable or disable this alter hook. + if (!\Drupal::state()->get('editor_test_editor_xss_filter_alter_enabled', FALSE)) { + return; + } + $filters = $format->filters()->getAll(); + if (isset($filters['filter_html']) && $filters['filter_html']->status) { + $editor_xss_filter_class = '\Drupal\editor_test\EditorXssFilter\Insecure'; + } + } + + /** + * Implements hook_editor_info_alter(). + */ + #[Hook('editor_info_alter')] + public function editorInfoAlter(&$items) { + if (!\Drupal::state()->get('editor_test_give_me_a_trex_thanks', FALSE)) { + unset($items['trex']); + } + } + + /** + * Implements hook_ENTITY_TYPE_presave() for file entities. + */ + #[Hook('file_presave')] + public function filePresave(FileInterface $file) { + // Use state to keep track of how many times a file is saved. + $file_save_count = \Drupal::state()->get('editor_test.file_save_count', []); + $file_save_count[$file->getFilename()] = isset($file_save_count[$file->getFilename()]) ? $file_save_count[$file->getFilename()] + 1 : 1; + \Drupal::state()->set('editor_test.file_save_count', $file_save_count); + } + +} diff --git a/core/modules/editor/tests/src/Functional/EditorAdminTest.php b/core/modules/editor/tests/src/Functional/EditorAdminTest.php index 319093856d7a028fd44d73815f7e226c38b3f95d..90c259516c6e0cb1c7cb6d197ac4140f1b89f024 100644 --- a/core/modules/editor/tests/src/Functional/EditorAdminTest.php +++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php @@ -181,7 +181,7 @@ public function testSwitchEditorToNone(): void { * @param string $format_name * The format name. */ - protected function addEditorToNewFormat($format_id, $format_name) { + protected function addEditorToNewFormat($format_id, $format_name): void { $this->enableUnicornEditor(); $this->drupalLogin($this->adminUser); $this->drupalGet('admin/config/content/formats/add'); @@ -197,7 +197,7 @@ protected function addEditorToNewFormat($format_id, $format_name) { /** * Enables the unicorn editor. */ - protected function enableUnicornEditor() { + protected function enableUnicornEditor(): void { if (!$this->container->get('module_handler')->moduleExists('editor_test')) { $this->container->get('module_installer')->install(['editor_test']); } @@ -239,7 +239,7 @@ protected function selectUnicornEditor(): array { * @param bool $ponies_too * The expected value of the ponies_too setting. */ - protected function verifyUnicornEditorConfiguration($format_id, $ponies_too = TRUE) { + protected function verifyUnicornEditorConfiguration($format_id, $ponies_too = TRUE): void { $editor = editor_load($format_id); $settings = $editor->getSettings(); $this->assertSame('unicorn', $editor->getEditor(), 'The text editor is configured correctly.'); diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php index f8d72a26dbac7e45ddbc0a9945b93c338c4c35b9..afa0d5a49bf3481921edbfba5a669336cd3097db 100644 --- a/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -1,5 +1,15 @@ <?php +/** + * @file + */ + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; +use Drupal\Core\Form\FormStateInterface; +use Drupal\field\Entity\FieldStorageConfig; +use Drupal\field\Entity\FieldConfig; + /** * @file * Field API documentation. @@ -124,14 +134,14 @@ function hook_field_ui_preconfigured_options_alter(array &$options, $field_type) * * @see entity_crud */ -function hook_field_storage_config_update_forbid(\Drupal\field\FieldStorageConfigInterface $field_storage, \Drupal\field\FieldStorageConfigInterface $prior_field_storage) { +function hook_field_storage_config_update_forbid(FieldStorageConfigInterface $field_storage, FieldStorageConfigInterface $prior_field_storage) { if ($field_storage->getTypeProvider() == 'options' && $field_storage->hasData()) { // Forbid any update that removes allowed values with actual data. $allowed_values = $field_storage->getSetting('allowed_values'); $prior_allowed_values = $prior_field_storage->getSetting('allowed_values'); $lost_keys = array_keys(array_diff_key($prior_allowed_values, $allowed_values)); if (_options_values_in_use($field_storage->getTargetEntityTypeId(), $field_storage->getName(), $lost_keys)) { - throw new \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException("A list field '{$field_storage->getName()}' with existing data cannot have its keys changed."); + throw new FieldStorageDefinitionUpdateForbiddenException("A list field '{$field_storage->getName()}' with existing data cannot have its keys changed."); } } } @@ -210,7 +220,7 @@ function hook_field_widget_info_alter(array &$info) { * @see hook_field_widget_complete_form_alter() * @see https://www.drupal.org/node/3180429 */ -function hook_field_widget_single_element_form_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) { +function hook_field_widget_single_element_form_alter(array &$element, FormStateInterface $form_state, array $context) { // Add a css class to widget form elements for all fields of type my_type. $field_definition = $context['items']->getFieldDefinition(); if ($field_definition->getType() == 'my_type') { @@ -247,7 +257,7 @@ function hook_field_widget_single_element_form_alter(array &$element, \Drupal\Co * @see hook_field_widget_single_element_form_alter() * @see hook_field_widget_complete_WIDGET_TYPE_form_alter() */ -function hook_field_widget_single_element_WIDGET_TYPE_form_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) { +function hook_field_widget_single_element_WIDGET_TYPE_form_alter(array &$element, FormStateInterface $form_state, array $context) { // Code here will only act on widgets of type WIDGET_TYPE. For example, // hook_field_widget_single_element_my_module_autocomplete_form_alter() will // only act on widgets of type 'my_module_autocomplete'. @@ -257,10 +267,10 @@ function hook_field_widget_single_element_WIDGET_TYPE_form_alter(array &$element /** * Alter the complete form for field widgets provided by other modules. * - * @param $field_widget_complete_form + * @param array $field_widget_complete_form * The field widget form element as constructed by * \Drupal\Core\Field\WidgetBaseInterface::form(). - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. * @param $context * An associative array containing the following key-value pairs: @@ -278,7 +288,7 @@ function hook_field_widget_single_element_WIDGET_TYPE_form_alter(array &$element * @see hook_field_widget_complete_WIDGET_TYPE_form_alter() * @see https://www.drupal.org/node/3180429 */ -function hook_field_widget_complete_form_alter(&$field_widget_complete_form, \Drupal\Core\Form\FormStateInterface $form_state, $context) { +function hook_field_widget_complete_form_alter(&$field_widget_complete_form, FormStateInterface $form_state, $context) { $field_widget_complete_form['#attributes']['class'][] = 'my-class'; } @@ -310,7 +320,7 @@ function hook_field_widget_complete_form_alter(&$field_widget_complete_form, \Dr * @see hook_field_widget_complete_form_alter() * @see https://www.drupal.org/node/3180429 */ -function hook_field_widget_complete_WIDGET_TYPE_form_alter(&$field_widget_complete_form, \Drupal\Core\Form\FormStateInterface $form_state, $context) { +function hook_field_widget_complete_WIDGET_TYPE_form_alter(&$field_widget_complete_form, FormStateInterface $form_state, $context) { $field_widget_complete_form['#attributes']['class'][] = 'my-class'; } @@ -407,7 +417,7 @@ function hook_field_info_max_weight($entity_type, $bundle, $context, $context_mo * @param $field_storage \Drupal\field\Entity\FieldStorageConfig * The field storage being purged. */ -function hook_field_purge_field_storage(\Drupal\field\Entity\FieldStorageConfig $field_storage) { +function hook_field_purge_field_storage(FieldStorageConfig $field_storage) { \Drupal::database()->delete('my_module_field_storage_info') ->condition('uuid', $field_storage->uuid()) ->execute(); @@ -424,7 +434,7 @@ function hook_field_purge_field_storage(\Drupal\field\Entity\FieldStorageConfig * @param $field * The field being purged. */ -function hook_field_purge_field(\Drupal\field\Entity\FieldConfig $field) { +function hook_field_purge_field(FieldConfig $field) { \Drupal::database()->delete('my_module_field_info') ->condition('id', $field->id()) ->execute(); diff --git a/core/modules/field/field.install b/core/modules/field/field.install index 6b175e6afb33af3f50b6b09a65228bb45d48d06c..a4ca7b420edae24abe5c6031b8061fc3922e56c4 100644 --- a/core/modules/field/field.install +++ b/core/modules/field/field.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function field_update_last_removed() { +function field_update_last_removed(): int { return 8500; } diff --git a/core/modules/field/field.module b/core/modules/field/field.module index b366eb8bc027154167fd8100d326f7fe430c4638..ec84559d6b9515e41b0a807945bc5c27ecb4e4f8 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -2,22 +2,11 @@ /** * @file - * Attach custom data fields to Drupal entities. */ -use Drupal\Core\Config\ConfigImporter; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface; -use Drupal\field\ConfigImporterFieldPurger; -use Drupal\field\Entity\FieldConfig; -use Drupal\field\Entity\FieldStorageConfig; -use Drupal\field\EntityDisplayRebuilder; use Drupal\field\FieldConfigInterface; use Drupal\field\FieldStorageConfigInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Link; -use Drupal\Core\Url; /* * Load all public Field API functions. Drupal currently has no @@ -26,238 +15,6 @@ */ require_once __DIR__ . '/field.purge.inc'; -/** - * @defgroup field Field API - * @{ - * Attaches custom data fields to Drupal entities. - * - * The Field API allows custom data fields to be attached to Drupal entities and - * takes care of storing, loading, editing, and rendering field data. Any entity - * type (node, user, etc.) can use the Field API to make itself "fieldable" and - * thus allow fields to be attached to it. Other modules can provide a user - * interface for managing custom fields via a web browser as well as a wide and - * flexible variety of data type, form element, and display format capabilities. - * - * The Field API defines two primary data structures, FieldStorage and Field, - * and the concept of a Bundle. A FieldStorage defines a particular type of data - * that can be attached to entities. A Field is attached to a single - * Bundle. A Bundle is a set of fields that are treated as a group by the Field - * Attach API and is related to a single fieldable entity type. - * - * For example, suppose a site administrator wants Article nodes to have a - * subtitle and photo. Using the Field API or Field UI module, the administrator - * creates a field named 'subtitle' of type 'text' and a field named 'photo' of - * type 'image'. The administrator (again, via a UI) creates two Field - * Instances, one attaching the field 'subtitle' to the 'node' bundle 'article' - * and one attaching the field 'photo' to the 'node' bundle 'article'. When the - * node storage loads an Article node, it loads the values of the - * 'subtitle' and 'photo' fields because they are both attached to the 'node' - * bundle 'article'. - * - * - @link field_types Field Types API @endlink: Defines field types, widget - * types, and display formatters. Field modules use this API to provide field - * types like Text and Node Reference along with the associated form elements - * and display formatters. - * - * - @link field_purge Field API bulk data deletion @endlink: Cleans up after - * bulk deletion operations such as deletion of field storage or field. - */ - -/** - * Implements hook_help(). - */ -function field_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.field': - $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', [':field-ui-help' => $field_ui_url, ':field' => 'https://www.drupal.org/documentation/modules/field']) . '</p>'; - $output .= '<h2>' . t('Terminology') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Entities and entity types') . '</dt>'; - $output .= '<dd>' . t("The website's content and configuration is managed using <em>entities</em>, which are grouped into <em>entity types</em>. <em>Content entity types</em> are the entity types for site content (such as the main site content, comments, content blocks, taxonomy terms, and user accounts). <em>Configuration entity types</em> are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types.") . '</dd>'; - $output .= '<dt>' . t('Entity sub-types') . '</dt>'; - $output .= '<dd>' . t('Some content entity types are further grouped into sub-types (for example, you could have article and page content types within the main site content entity type, and tag and category vocabularies within the taxonomy term entity type); other entity types, such as user accounts, do not have sub-types. Programmers use the term <em>bundle</em> for entity sub-types.') . '</dd>'; - $output .= '<dt>' . t('Fields and field types') . '</dt>'; - $output .= '<dd>' . t('Content entity types and sub-types store most of their text, file, and other information in <em>fields</em>. Fields are grouped by <em>field type</em>; field types define what type of data can be stored in that field, such as text, images, or taxonomy term references.') . '</dd>'; - $output .= '<dt>' . t('Formatters and view modes') . '</dd>'; - $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>view modes</em>, used for displaying the entity items. For instance, a content item could be viewed in full content mode on its own page, teaser mode in a list, or RSS mode in a feed. In each view mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>formatter</em> that is used to display the field. For instance, a long text field can be displayed trimmed or full-length, and taxonomy term reference fields can be displayed in plain text or linked to the taxonomy term page.') . '</dd>'; - $output .= '<dt>' . t('Widgets and form modes') . '</dd>'; - $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>form modes</em>, used for editing. For instance, a content item could be edited in a compact format with only some fields editable, or a full format that allows all fields to be edited. In each form mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>widget</em> that is used to edit the field. For instance, a taxonomy term reference field can be edited using a select list, radio buttons, or an autocomplete widget.') . '</dd>'; - $output .= '</dl>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Enabling field types, widgets, and formatters') . '</dt>'; - $output .= '<dd>' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be installed from the <a href=":modules">Extend administration page</a>. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the <a href=":contrib">contributed module section of Drupal.org</a>.', [':modules' => Url::fromRoute('system.modules_list')->toString(), ':contrib' => 'https://www.drupal.org/project/modules']) . '</dd>'; - - $output .= '<h2>' . t('Field, widget, and formatter information') . '</h2>'; - - // Make a list of all widget, formatter, and field modules currently - // enabled, ordered by displayed module name (module names are not - // translated). - $items = []; - $modules = \Drupal::moduleHandler()->getModuleList(); - $widgets = \Drupal::service('plugin.manager.field.widget')->getDefinitions(); - $field_types = \Drupal::service('plugin.manager.field.field_type')->getUiDefinitions(); - $formatters = \Drupal::service('plugin.manager.field.formatter')->getDefinitions(); - $providers = []; - foreach (array_merge($field_types, $widgets, $formatters) as $plugin) { - $providers[] = $plugin['provider']; - } - $providers = array_unique($providers); - sort($providers); - $module_extension_list = \Drupal::service('extension.list.module'); - foreach ($providers as $provider) { - // Skip plugins provided by core components as they do not implement - // hook_help(). - if (isset($modules[$provider])) { - $display = $module_extension_list->getName($provider); - if (\Drupal::moduleHandler()->hasImplementations('help', $provider)) { - $items[] = Link::fromTextAndUrl($display, Url::fromRoute('help.page', ['name' => $provider]))->toRenderable(); - } - else { - $items[] = $display; - } - } - } - if ($items) { - $output .= '<dt>' . t('Provided by modules') . '</dt>'; - $output .= '<dd>' . t('Here is a list of the currently installed field, formatter, and widget modules:'); - $item_list = [ - '#theme' => 'item_list', - '#items' => $items, - ]; - $output .= \Drupal::service('renderer')->renderInIsolation($item_list); - $output .= '</dd>'; - } - - $output .= '<dt>' . t('Provided by Drupal core') . '</dt>'; - $output .= '<dd>' . t('As mentioned previously, some field types, widgets, and formatters are provided by Drupal core. Here are some notes on how to use some of these:'); - $output .= '<ul>'; - $output .= '<li><p>' . t('<strong>Entity Reference</strong> fields allow you to create fields that contain links to other entities (such as content items, taxonomy terms, etc.) within the site. This allows you, for example, to include a link to a user within a content item. For more information, see <a href=":er_do">the online documentation for the Entity Reference module</a>.', [':er_do' => 'https://drupal.org/documentation/modules/entityreference']) . '</p>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying entity reference fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the entity reference field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => $field_ui_url]) . '</dd>'; - $output .= '<dt>' . t('Selecting reference type') . '</dt>'; - $output .= '<dd>' . t('In the field settings you can select which entity type you want to create a reference to.') . '</dd>'; - $output .= '<dt>' . t('Filtering and sorting reference fields') . '</dt>'; - $output .= '<dd>' . t('Depending on the chosen entity type, additional filtering and sorting options are available for the list of entities that can be referred to, in the field settings. For example, the list of users can be filtered by role and sorted by name or ID.') . '</dd>'; - $output .= '<dt>' . t('Displaying a reference') . '</dt>'; - $output .= '<dd>' . t('An entity reference can be displayed as a simple label with or without a link to the entity. Alternatively, the referenced entity can be displayed as a teaser (or any other available view mode) inside the referencing entity.') . '</dd>'; - $output .= '<dt>' . t('Configuring form displays') . '</dt>'; - $output .= '<dd>' . t('Reference fields have several widgets available on the <em>Manage form display</em> page:'); - $output .= '<ul>'; - $output .= '<li>' . t('The <em>Check boxes/radio buttons</em> widget displays the existing entities for the entity type as check boxes or radio buttons based on the <em>Allowed number of values</em> set for the field.') . '</li>'; - $output .= '<li>' . t('The <em>Select list</em> widget displays the existing entities in a drop-down list or scrolling list box based on the <em>Allowed number of values</em> setting for the field.') . '</li>'; - $output .= '<li>' . t('The <em>Autocomplete</em> widget displays text fields in which users can type entity labels based on the <em>Allowed number of values</em>. The widget can be configured to display all entities that contain the typed characters or restricted to those starting with those characters.') . '</li>'; - $output .= '<li>' . t('The <em>Autocomplete (Tags style)</em> widget displays a multi-text field in which users can type in a comma-separated list of entity labels.') . '</li>'; - $output .= '</ul></dd>'; - $output .= '</dl></li>'; - $output .= '<li>' . t('<strong>Number fields</strong>: When you add a number field you can choose from three types: <em>decimal</em>, <em>float</em>, and <em>integer</em>. The <em>decimal</em> number field type allows users to enter exact decimal values, with fixed numbers of decimal places. The <em>float</em> number field type allows users to enter approximate decimal values. The <em>integer</em> number field type allows users to enter whole numbers, such as years (for example, 2012) or values (for example, 1, 2, 5, 305). It does not allow decimals.') . '</li>'; - $output .= '</ul></dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_cron(). - */ -function field_cron() { - // Do a pass of purging on deleted Field API data, if any exists. - $limit = \Drupal::config('field.settings')->get('purge_batch_size'); - field_purge_batch($limit); -} - -/** - * Implements hook_entity_field_storage_info(). - */ -function field_entity_field_storage_info(EntityTypeInterface $entity_type) { - if (\Drupal::entityTypeManager()->getStorage($entity_type->id()) instanceof DynamicallyFieldableEntityStorageInterface) { - // Query by filtering on the ID as this is more efficient than filtering - // on the entity_type property directly. - $ids = \Drupal::entityQuery('field_storage_config') - ->condition('id', $entity_type->id() . '.', 'STARTS_WITH') - ->execute(); - // Fetch all fields and key them by field name. - $field_storages = FieldStorageConfig::loadMultiple($ids); - $result = []; - foreach ($field_storages as $field_storage) { - $result[$field_storage->getName()] = $field_storage; - } - - return $result; - } -} - -/** - * Implements hook_entity_bundle_field_info(). - */ -function field_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { - if (\Drupal::entityTypeManager()->getStorage($entity_type->id()) instanceof DynamicallyFieldableEntityStorageInterface) { - // Query by filtering on the ID as this is more efficient than filtering - // on the entity_type property directly. - $ids = \Drupal::entityQuery('field_config') - ->condition('id', $entity_type->id() . '.' . $bundle . '.', 'STARTS_WITH') - ->execute(); - // Fetch all fields and key them by field name. - $field_configs = FieldConfig::loadMultiple($ids); - $result = []; - foreach ($field_configs as $field_instance) { - $result[$field_instance->getName()] = $field_instance; - } - - return $result; - } -} - -/** - * Implements hook_entity_bundle_delete(). - */ -function field_entity_bundle_delete($entity_type_id, $bundle) { - $storage = \Drupal::entityTypeManager()->getStorage('field_config'); - // Get the fields on the bundle. - $fields = $storage->loadByProperties(['entity_type' => $entity_type_id, 'bundle' => $bundle]); - // This deletes the data for the field as well as the field themselves. This - // function actually just marks the data and fields as deleted, leaving the - // garbage collection for a separate process, because it is not always - // possible to delete this much data in a single page request (particularly - // since for some field types, the deletion is more than just a simple DELETE - // query). - foreach ($fields as $field) { - $field->delete(); - } - - // We are duplicating the work done by - // \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::onDependencyRemoval() - // because we need to take into account bundles that are not provided by a - // config entity type so they are not part of the config dependencies. - - // Gather a list of all entity reference fields. - $map = \Drupal::service('entity_field.manager')->getFieldMapByFieldType('entity_reference'); - $ids = []; - foreach ($map as $type => $info) { - foreach ($info as $name => $data) { - foreach ($data['bundles'] as $bundle_name) { - $ids[] = "$type.$bundle_name.$name"; - } - } - } - - // Update the 'target_bundles' handler setting if needed. - foreach (FieldConfig::loadMultiple($ids) as $field_config) { - if ($field_config->getSetting('target_type') == $entity_type_id) { - $handler_settings = $field_config->getSetting('handler_settings'); - if (isset($handler_settings['target_bundles'][$bundle])) { - unset($handler_settings['target_bundles'][$bundle]); - $field_config->setSetting('handler_settings', $handler_settings); - $field_config->save(); - } - } - } -} - /** * @} End of "defgroup field". */ @@ -289,170 +46,6 @@ function _field_create_entity_from_ids($ids) { ->create($id_properties); } -/** - * Implements hook_config_import_steps_alter(). - */ -function field_config_import_steps_alter(&$sync_steps, ConfigImporter $config_importer) { - $field_storages = ConfigImporterFieldPurger::getFieldStoragesToPurge( - $config_importer->getStorageComparer()->getSourceStorage()->read('core.extension'), - $config_importer->getStorageComparer()->getChangelist('delete') - ); - if ($field_storages) { - // Add a step to the beginning of the configuration synchronization process - // to purge field data where the module that provides the field is being - // uninstalled. - array_unshift($sync_steps, ['\Drupal\field\ConfigImporterFieldPurger', 'process']); - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - * - * Adds a warning if field data will be permanently removed by the configuration - * synchronization. - * - * @see \Drupal\field\ConfigImporterFieldPurger - */ -function field_form_config_admin_import_form_alter(&$form, FormStateInterface $form_state) { - // Only display the message when core.extension is available in the source - // storage and the form is not submitted. - $user_input = $form_state->getUserInput(); - $storage_comparer = $form_state->get('storage_comparer'); - if ($storage_comparer?->getSourceStorage()->exists('core.extension') && empty($user_input)) { - $field_storages = ConfigImporterFieldPurger::getFieldStoragesToPurge( - $storage_comparer->getSourceStorage()->read('core.extension'), - $storage_comparer->getChangelist('delete') - ); - if ($field_storages) { - foreach ($field_storages as $field) { - $field_labels[] = $field->label(); - } - \Drupal::messenger()->addWarning(\Drupal::translation()->formatPlural( - count($field_storages), - 'This synchronization will delete data from the field %fields.', - 'This synchronization will delete data from the fields: %fields.', - ['%fields' => implode(', ', $field_labels)] - )); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_insert() for 'field_config'. - */ -function field_field_config_insert(FieldConfigInterface $field) { - if ($field->isSyncing()) { - // Don't change anything during a configuration sync. - return; - } - - // Allow other view modes to update their configuration for the new field. - // Otherwise, configuration for view modes won't get updated until the mode - // is used for the first time, creating noise in config diffs. - \Drupal::classResolver(EntityDisplayRebuilder::class) - ->rebuildEntityTypeDisplays($field->getTargetEntityTypeId(), $field->getTargetBundle()); -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. - * - * Reset the field handler settings, when the storage target_type is changed on - * an entity reference field. - */ -function field_field_storage_config_update(FieldStorageConfigInterface $field_storage) { - if ($field_storage->isSyncing()) { - // Don't change anything during a configuration sync. - return; - } - - // Act on all sub-types of the entity_reference field type. - /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ - $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); - $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; - $class = $field_type_manager->getPluginClass($field_storage->getType()); - if ($class !== $item_class && !is_subclass_of($class, $item_class)) { - return; - } - - // If target_type changed, reset the handler in the fields using that storage. - if ($field_storage->getSetting('target_type') !== $field_storage->original->getSetting('target_type')) { - foreach ($field_storage->getBundles() as $bundle) { - $field = FieldConfig::loadByName($field_storage->getTargetEntityTypeId(), $bundle, $field_storage->getName()); - // Reset the handler settings. This triggers field_field_config_presave(), - // which will take care of reassigning the handler to the correct - // derivative for the new target_type. - $field->setSetting('handler_settings', []); - $field->save(); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_create() for 'field_config'. - * - * Determine the selection handler plugin ID for an entity reference field. - */ -function field_field_config_create(FieldConfigInterface $field) { - if ($field->isSyncing()) { - return; - } - // Act on all sub-types of the entity_reference field type. - /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ - $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); - $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; - $class = $field_type_manager->getPluginClass($field->getType()); - if ($class !== $item_class && !is_subclass_of($class, $item_class)) { - return; - } - - // If we don't know the target type yet, there's nothing else we can do. - $target_type = $field->getFieldStorageDefinition()->getSetting('target_type'); - if (empty($target_type)) { - return; - } - - // Make sure the selection handler plugin is the correct derivative for the - // target entity type. - $selection_manager = \Drupal::service('plugin.manager.entity_reference_selection'); - [$current_handler] = explode(':', $field->getSetting('handler'), 2); - $field->setSetting('handler', $selection_manager->getPluginId($target_type, $current_handler)); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for 'field_config'. - * - * Determine the selection handler plugin ID for an entity reference field. - */ -function field_field_config_presave(FieldConfigInterface $field) { - // Don't change anything during a configuration sync. - if ($field->isSyncing()) { - return; - } - field_field_config_create($field); - - // Act on all sub-types of the entity_reference field type. - /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ - $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); - $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; - $class = $field_type_manager->getPluginClass($field->getType()); - if ($class !== $item_class && !is_subclass_of($class, $item_class)) { - return; - } - - // In case we removed all the target bundles allowed by the field in - // EntityReferenceItem::onDependencyRemoval() or field_entity_bundle_delete() - // we have to log a critical message because the field will not function - // correctly anymore. - $handler_settings = $field->getSetting('handler_settings'); - if (isset($handler_settings['target_bundles']) && $handler_settings['target_bundles'] === []) { - \Drupal::logger('entity_reference')->critical('The %field_name entity reference field (entity_type: %entity_type, bundle: %bundle) no longer has any valid bundle it can reference. The field is not working correctly anymore and has to be adjusted.', [ - '%field_name' => $field->getName(), - '%entity_type' => $field->getTargetEntityTypeId(), - '%bundle' => $field->getTargetBundle(), - ]); - } -} - /** * Entity form builder for field config edit form. * @@ -487,7 +80,7 @@ function field_form_field_config_edit_form_entity_builder($entity_type_id, $enti // @see field_field_storage_config_update(). $entity->setSetting('handler_settings', []); // @see field_field_config_presave(). - field_field_config_create($entity); + \Drupal::moduleHandler()->invoke('field', 'field_config_create', [$entity]); // Store updated settings in form state so that the form state can be copied // directly to the entity. diff --git a/core/modules/field/field.post_update.php b/core/modules/field/field.post_update.php index 1535c477e2566b064d1d912f563abd506bbc13e2..3af41a483b1c715c33f20eaf86736cd4507a0f9b 100644 --- a/core/modules/field/field.post_update.php +++ b/core/modules/field/field.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function field_removed_post_updates() { +function field_removed_post_updates(): array { return [ 'field_post_update_save_custom_storage_property' => '9.0.0', 'field_post_update_entity_reference_handler_setting' => '9.0.0', diff --git a/core/modules/field/field.purge.inc b/core/modules/field/field.purge.inc index 8398f434c889258498d195e1f99cf5b613cd8903..449724ed8ee1da458a6f311caf33314465e29300 100644 --- a/core/modules/field/field.purge.inc +++ b/core/modules/field/field.purge.inc @@ -2,7 +2,6 @@ /** * @file - * Provides support for field data purge after mass deletion. */ use Drupal\Core\Field\FieldDefinitionInterface; diff --git a/core/modules/field/src/Entity/FieldConfig.php b/core/modules/field/src/Entity/FieldConfig.php index 09db516b174a78da8bd1812714b133923f2119fb..40417dea44050c6e77de456ef2f33cf38379f624 100644 --- a/core/modules/field/src/Entity/FieldConfig.php +++ b/core/modules/field/src/Entity/FieldConfig.php @@ -2,57 +2,64 @@ namespace Drupal\field\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\FieldableEntityStorageInterface; use Drupal\Core\Field\FieldConfigBase; use Drupal\Core\Field\FieldException; +use Drupal\field\FieldConfigAccessControlHandler; +use Drupal\field\FieldConfigStorage; use Drupal\field\FieldStorageConfigInterface; use Drupal\field\FieldConfigInterface; /** * Defines the Field entity. - * - * @ConfigEntityType( - * id = "field_config", - * label = @Translation("Field"), - * label_collection = @Translation("Fields"), - * label_singular = @Translation("field"), - * label_plural = @Translation("fields"), - * label_count = @PluralTranslation( - * singular = "@count field", - * plural = "@count fields", - * ), - * handlers = { - * "access" = "Drupal\field\FieldConfigAccessControlHandler", - * "storage" = "Drupal\field\FieldConfigStorage" - * }, - * config_prefix = "field", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "field_name", - * "entity_type", - * "bundle", - * "label", - * "description", - * "required", - * "translatable", - * "default_value", - * "default_value_callback", - * "settings", - * "field_type", - * }, - * constraints = { - * "RequiredConfigDependencies" = { - * "field_storage_config" - * }, - * "ImmutableProperties" = {"id", "entity_type", "field_name", "bundle", "field_type"}, - * } - * ) */ +#[ConfigEntityType( + id: 'field_config', + label: new TranslatableMarkup('Field'), + label_collection: new TranslatableMarkup('Fields'), + label_singular: new TranslatableMarkup('field'), + label_plural: new TranslatableMarkup('fields'), + config_prefix: 'field', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => FieldConfigAccessControlHandler::class, + 'storage' => FieldConfigStorage::class, + ], + label_count: [ + 'singular' => '@count field', + 'plural' => '@count fields', + ], + constraints: [ + 'RequiredConfigDependencies' => ['field_storage_config'], + 'ImmutableProperties' => [ + 'id', + 'entity_type', + 'field_name', + 'bundle', + 'field_type', + ], + ], + config_export: [ + 'id', + 'field_name', + 'entity_type', + 'bundle', + 'label', + 'description', + 'required', + 'translatable', + 'default_value', + 'default_value_callback', + 'settings', + 'field_type', + ], +)] class FieldConfig extends FieldConfigBase implements FieldConfigInterface { /** diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php index c399cd5392ae5fb316c340e2abff940d2d8658d1..9c3086dd51f95fd3799d868736b72f12ccf55eac 100644 --- a/core/modules/field/src/Entity/FieldStorageConfig.php +++ b/core/modules/field/src/Entity/FieldStorageConfig.php @@ -2,6 +2,8 @@ namespace Drupal\field\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\FieldableEntityInterface; @@ -11,49 +13,55 @@ use Drupal\Core\Field\FieldException; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\OptionsProviderInterface; +use Drupal\field\FieldStorageConfigAccessControlHandler; use Drupal\field\FieldStorageConfigInterface; +use Drupal\field\FieldStorageConfigStorage; /** * Defines the Field storage configuration entity. - * - * @ConfigEntityType( - * id = "field_storage_config", - * label = @Translation("Field storage"), - * label_collection = @Translation("Field storages"), - * label_singular = @Translation("field storage"), - * label_plural = @Translation("field storages"), - * label_count = @PluralTranslation( - * singular = "@count field storage", - * plural = "@count field storages", - * ), - * handlers = { - * "access" = "Drupal\field\FieldStorageConfigAccessControlHandler", - * "storage" = "Drupal\field\FieldStorageConfigStorage" - * }, - * config_prefix = "storage", - * entity_keys = { - * "id" = "id", - * "label" = "id" - * }, - * config_export = { - * "id", - * "field_name", - * "entity_type", - * "type", - * "settings", - * "module", - * "locked", - * "cardinality", - * "translatable", - * "indexes", - * "persist_with_no_fields", - * "custom_storage", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "entity_type", "field_name", "type"}, - * } - * ) */ +#[ConfigEntityType( + id: 'field_storage_config', + label: new TranslatableMarkup('Field storage'), + label_collection: new TranslatableMarkup('Field storages'), + label_singular: new TranslatableMarkup('field storage'), + label_plural: new TranslatableMarkup('field storages'), + config_prefix: 'storage', + entity_keys: [ + 'id' => 'id', + 'label' => 'id', + ], + handlers: [ + 'access' => FieldStorageConfigAccessControlHandler::class, + 'storage' => FieldStorageConfigStorage::class, + ], + label_count: [ + 'singular' => '@count field storage', + 'plural' => '@count field storages', + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'entity_type', + 'field_name', + 'type', + ], + ], + config_export: [ + 'id', + 'field_name', + 'entity_type', + 'type', + 'settings', + 'module', + 'locked', + 'cardinality', + 'translatable', + 'indexes', + 'persist_with_no_fields', + 'custom_storage', + ], +)] class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigInterface { /** diff --git a/core/modules/field/src/Hook/FieldHooks.php b/core/modules/field/src/Hook/FieldHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f378d289f8439b8b73b057e68bb465e14693a650 --- /dev/null +++ b/core/modules/field/src/Hook/FieldHooks.php @@ -0,0 +1,403 @@ +<?php + +namespace Drupal\field\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\field\EntityDisplayRebuilder; +use Drupal\field\FieldConfigInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\field\ConfigImporterFieldPurger; +use Drupal\Core\Config\ConfigImporter; +use Drupal\field\Entity\FieldConfig; +use Drupal\field\Entity\FieldStorageConfig; +use Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Link; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field. + */ +class FieldHooks { + /** + * @defgroup field Field API + * @{ + * Attaches custom data fields to Drupal entities. + * + * The Field API allows custom data fields to be attached to Drupal entities and + * takes care of storing, loading, editing, and rendering field data. Any entity + * type (node, user, etc.) can use the Field API to make itself "fieldable" and + * thus allow fields to be attached to it. Other modules can provide a user + * interface for managing custom fields via a web browser as well as a wide and + * flexible variety of data type, form element, and display format capabilities. + * + * The Field API defines two primary data structures, FieldStorage and Field, + * and the concept of a Bundle. A FieldStorage defines a particular type of data + * that can be attached to entities. A Field is attached to a single + * Bundle. A Bundle is a set of fields that are treated as a group by the Field + * Attach API and is related to a single fieldable entity type. + * + * For example, suppose a site administrator wants Article nodes to have a + * subtitle and photo. Using the Field API or Field UI module, the administrator + * creates a field named 'subtitle' of type 'text' and a field named 'photo' of + * type 'image'. The administrator (again, via a UI) creates two Field + * Instances, one attaching the field 'subtitle' to the 'node' bundle 'article' + * and one attaching the field 'photo' to the 'node' bundle 'article'. When the + * node storage loads an Article node, it loads the values of the + * 'subtitle' and 'photo' fields because they are both attached to the 'node' + * bundle 'article'. + * + * - @link field_types Field Types API @endlink: Defines field types, widget + * types, and display formatters. Field modules use this API to provide field + * types like Text and Node Reference along with the associated form elements + * and display formatters. + * + * - @link field_purge Field API bulk data deletion @endlink: Cleans up after + * bulk deletion operations such as deletion of field storage or field. + */ + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.field': + $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', [ + ':field-ui-help' => $field_ui_url, + ':field' => 'https://www.drupal.org/documentation/modules/field', + ]) . '</p>'; + $output .= '<h2>' . t('Terminology') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Entities and entity types') . '</dt>'; + $output .= '<dd>' . t("The website's content and configuration is managed using <em>entities</em>, which are grouped into <em>entity types</em>. <em>Content entity types</em> are the entity types for site content (such as the main site content, comments, content blocks, taxonomy terms, and user accounts). <em>Configuration entity types</em> are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types.") . '</dd>'; + $output .= '<dt>' . t('Entity sub-types') . '</dt>'; + $output .= '<dd>' . t('Some content entity types are further grouped into sub-types (for example, you could have article and page content types within the main site content entity type, and tag and category vocabularies within the taxonomy term entity type); other entity types, such as user accounts, do not have sub-types. Programmers use the term <em>bundle</em> for entity sub-types.') . '</dd>'; + $output .= '<dt>' . t('Fields and field types') . '</dt>'; + $output .= '<dd>' . t('Content entity types and sub-types store most of their text, file, and other information in <em>fields</em>. Fields are grouped by <em>field type</em>; field types define what type of data can be stored in that field, such as text, images, or taxonomy term references.') . '</dd>'; + $output .= '<dt>' . t('Formatters and view modes') . '</dd>'; + $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>view modes</em>, used for displaying the entity items. For instance, a content item could be viewed in full content mode on its own page, teaser mode in a list, or RSS mode in a feed. In each view mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>formatter</em> that is used to display the field. For instance, a long text field can be displayed trimmed or full-length, and taxonomy term reference fields can be displayed in plain text or linked to the taxonomy term page.') . '</dd>'; + $output .= '<dt>' . t('Widgets and form modes') . '</dd>'; + $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>form modes</em>, used for editing. For instance, a content item could be edited in a compact format with only some fields editable, or a full format that allows all fields to be edited. In each form mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>widget</em> that is used to edit the field. For instance, a taxonomy term reference field can be edited using a select list, radio buttons, or an autocomplete widget.') . '</dd>'; + $output .= '</dl>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Enabling field types, widgets, and formatters') . '</dt>'; + $output .= '<dd>' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be installed from the <a href=":modules">Extend administration page</a>. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the <a href=":contrib">contributed module section of Drupal.org</a>.', [ + ':modules' => Url::fromRoute('system.modules_list')->toString(), + ':contrib' => 'https://www.drupal.org/project/modules', + ]) . '</dd>'; + $output .= '<h2>' . t('Field, widget, and formatter information') . '</h2>'; + // Make a list of all widget, formatter, and field modules currently + // enabled, ordered by displayed module name (module names are not + // translated). + $items = []; + $modules = \Drupal::moduleHandler()->getModuleList(); + $widgets = \Drupal::service('plugin.manager.field.widget')->getDefinitions(); + $field_types = \Drupal::service('plugin.manager.field.field_type')->getUiDefinitions(); + $formatters = \Drupal::service('plugin.manager.field.formatter')->getDefinitions(); + $providers = []; + foreach (array_merge($field_types, $widgets, $formatters) as $plugin) { + $providers[] = $plugin['provider']; + } + $providers = array_unique($providers); + sort($providers); + $module_extension_list = \Drupal::service('extension.list.module'); + foreach ($providers as $provider) { + // Skip plugins provided by core components as they do not implement + // hook_help(). + if (isset($modules[$provider])) { + $display = $module_extension_list->getName($provider); + if (\Drupal::moduleHandler()->hasImplementations('help', $provider)) { + $items[] = Link::fromTextAndUrl($display, Url::fromRoute('help.page', ['name' => $provider]))->toRenderable(); + } + else { + $items[] = $display; + } + } + } + if ($items) { + $output .= '<dt>' . t('Provided by modules') . '</dt>'; + $output .= '<dd>' . t('Here is a list of the currently installed field, formatter, and widget modules:'); + $item_list = ['#theme' => 'item_list', '#items' => $items]; + $output .= \Drupal::service('renderer')->renderInIsolation($item_list); + $output .= '</dd>'; + } + $output .= '<dt>' . t('Provided by Drupal core') . '</dt>'; + $output .= '<dd>' . t('As mentioned previously, some field types, widgets, and formatters are provided by Drupal core. Here are some notes on how to use some of these:'); + $output .= '<ul>'; + $output .= '<li><p>' . t('<strong>Entity Reference</strong> fields allow you to create fields that contain links to other entities (such as content items, taxonomy terms, etc.) within the site. This allows you, for example, to include a link to a user within a content item. For more information, see <a href=":er_do">the online documentation for the Entity Reference module</a>.', [':er_do' => 'https://drupal.org/documentation/modules/entityreference']) . '</p>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying entity reference fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the entity reference field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => $field_ui_url]) . '</dd>'; + $output .= '<dt>' . t('Selecting reference type') . '</dt>'; + $output .= '<dd>' . t('In the field settings you can select which entity type you want to create a reference to.') . '</dd>'; + $output .= '<dt>' . t('Filtering and sorting reference fields') . '</dt>'; + $output .= '<dd>' . t('Depending on the chosen entity type, additional filtering and sorting options are available for the list of entities that can be referred to, in the field settings. For example, the list of users can be filtered by role and sorted by name or ID.') . '</dd>'; + $output .= '<dt>' . t('Displaying a reference') . '</dt>'; + $output .= '<dd>' . t('An entity reference can be displayed as a simple label with or without a link to the entity. Alternatively, the referenced entity can be displayed as a teaser (or any other available view mode) inside the referencing entity.') . '</dd>'; + $output .= '<dt>' . t('Configuring form displays') . '</dt>'; + $output .= '<dd>' . t('Reference fields have several widgets available on the <em>Manage form display</em> page:'); + $output .= '<ul>'; + $output .= '<li>' . t('The <em>Check boxes/radio buttons</em> widget displays the existing entities for the entity type as check boxes or radio buttons based on the <em>Allowed number of values</em> set for the field.') . '</li>'; + $output .= '<li>' . t('The <em>Select list</em> widget displays the existing entities in a drop-down list or scrolling list box based on the <em>Allowed number of values</em> setting for the field.') . '</li>'; + $output .= '<li>' . t('The <em>Autocomplete</em> widget displays text fields in which users can type entity labels based on the <em>Allowed number of values</em>. The widget can be configured to display all entities that contain the typed characters or restricted to those starting with those characters.') . '</li>'; + $output .= '<li>' . t('The <em>Autocomplete (Tags style)</em> widget displays a multi-text field in which users can type in a comma-separated list of entity labels.') . '</li>'; + $output .= '</ul></dd>'; + $output .= '</dl></li>'; + $output .= '<li>' . t('<strong>Number fields</strong>: When you add a number field you can choose from three types: <em>decimal</em>, <em>float</em>, and <em>integer</em>. The <em>decimal</em> number field type allows users to enter exact decimal values, with fixed numbers of decimal places. The <em>float</em> number field type allows users to enter approximate decimal values. The <em>integer</em> number field type allows users to enter whole numbers, such as years (for example, 2012) or values (for example, 1, 2, 5, 305). It does not allow decimals.') . '</li>'; + $output .= '</ul></dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + // Do a pass of purging on deleted Field API data, if any exists. + $limit = \Drupal::config('field.settings')->get('purge_batch_size'); + field_purge_batch($limit); + } + + /** + * Implements hook_entity_field_storage_info(). + */ + #[Hook('entity_field_storage_info')] + public function entityFieldStorageInfo(EntityTypeInterface $entity_type) { + if (\Drupal::entityTypeManager()->getStorage($entity_type->id()) instanceof DynamicallyFieldableEntityStorageInterface) { + // Query by filtering on the ID as this is more efficient than filtering + // on the entity_type property directly. + $ids = \Drupal::entityQuery('field_storage_config')->condition('id', $entity_type->id() . '.', 'STARTS_WITH')->execute(); + // Fetch all fields and key them by field name. + $field_storages = FieldStorageConfig::loadMultiple($ids); + $result = []; + foreach ($field_storages as $field_storage) { + $result[$field_storage->getName()] = $field_storage; + } + return $result; + } + } + + /** + * Implements hook_entity_bundle_field_info(). + */ + #[Hook('entity_bundle_field_info')] + public function entityBundleFieldInfo(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { + if (\Drupal::entityTypeManager()->getStorage($entity_type->id()) instanceof DynamicallyFieldableEntityStorageInterface) { + // Query by filtering on the ID as this is more efficient than filtering + // on the entity_type property directly. + $ids = \Drupal::entityQuery('field_config')->condition('id', $entity_type->id() . '.' . $bundle . '.', 'STARTS_WITH')->execute(); + // Fetch all fields and key them by field name. + $field_configs = FieldConfig::loadMultiple($ids); + $result = []; + foreach ($field_configs as $field_instance) { + $result[$field_instance->getName()] = $field_instance; + } + return $result; + } + } + + /** + * Implements hook_entity_bundle_delete(). + */ + #[Hook('entity_bundle_delete')] + public function entityBundleDelete($entity_type_id, $bundle) { + $storage = \Drupal::entityTypeManager()->getStorage('field_config'); + // Get the fields on the bundle. + $fields = $storage->loadByProperties(['entity_type' => $entity_type_id, 'bundle' => $bundle]); + // This deletes the data for the field as well as the field themselves. This + // function actually just marks the data and fields as deleted, leaving the + // garbage collection for a separate process, because it is not always + // possible to delete this much data in a single page request (particularly + // since for some field types, the deletion is more than just a simple DELETE + // query). + foreach ($fields as $field) { + $field->delete(); + } + // We are duplicating the work done by + // \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::onDependencyRemoval() + // because we need to take into account bundles that are not provided by a + // config entity type so they are not part of the config dependencies. + // Gather a list of all entity reference fields. + $map = \Drupal::service('entity_field.manager')->getFieldMapByFieldType('entity_reference'); + $ids = []; + foreach ($map as $type => $info) { + foreach ($info as $name => $data) { + foreach ($data['bundles'] as $bundle_name) { + $ids[] = "{$type}.{$bundle_name}.{$name}"; + } + } + } + // Update the 'target_bundles' handler setting if needed. + foreach (FieldConfig::loadMultiple($ids) as $field_config) { + if ($field_config->getSetting('target_type') == $entity_type_id) { + $handler_settings = $field_config->getSetting('handler_settings'); + if (isset($handler_settings['target_bundles'][$bundle])) { + unset($handler_settings['target_bundles'][$bundle]); + $field_config->setSetting('handler_settings', $handler_settings); + $field_config->save(); + } + } + } + } + + /** + * Implements hook_config_import_steps_alter(). + */ + #[Hook('config_import_steps_alter')] + public function configImportStepsAlter(&$sync_steps, ConfigImporter $config_importer) { + $field_storages = ConfigImporterFieldPurger::getFieldStoragesToPurge($config_importer->getStorageComparer()->getSourceStorage()->read('core.extension'), $config_importer->getStorageComparer()->getChangelist('delete')); + if ($field_storages) { + // Add a step to the beginning of the configuration synchronization process + // to purge field data where the module that provides the field is being + // uninstalled. + array_unshift($sync_steps, ['\Drupal\field\ConfigImporterFieldPurger', 'process']); + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + * + * Adds a warning if field data will be permanently removed by the configuration + * synchronization. + * + * @see \Drupal\field\ConfigImporterFieldPurger + */ + #[Hook('form_config_admin_import_form_alter')] + public function formConfigAdminImportFormAlter(&$form, FormStateInterface $form_state) : void { + // Only display the message when core.extension is available in the source + // storage and the form is not submitted. + $user_input = $form_state->getUserInput(); + $storage_comparer = $form_state->get('storage_comparer'); + if ($storage_comparer?->getSourceStorage()->exists('core.extension') && empty($user_input)) { + $field_storages = ConfigImporterFieldPurger::getFieldStoragesToPurge($storage_comparer->getSourceStorage()->read('core.extension'), $storage_comparer->getChangelist('delete')); + if ($field_storages) { + foreach ($field_storages as $field) { + $field_labels[] = $field->label(); + } + \Drupal::messenger()->addWarning(\Drupal::translation()->formatPlural(count($field_storages), 'This synchronization will delete data from the field %fields.', 'This synchronization will delete data from the fields: %fields.', ['%fields' => implode(', ', $field_labels)])); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'field_config'. + */ + #[Hook('field_config_insert')] + public function fieldConfigInsert(FieldConfigInterface $field) { + if ($field->isSyncing()) { + // Don't change anything during a configuration sync. + return; + } + // Allow other view modes to update their configuration for the new field. + // Otherwise, configuration for view modes won't get updated until the mode + // is used for the first time, creating noise in config diffs. + \Drupal::classResolver(EntityDisplayRebuilder::class)->rebuildEntityTypeDisplays($field->getTargetEntityTypeId(), $field->getTargetBundle()); + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. + * + * Reset the field handler settings, when the storage target_type is changed on + * an entity reference field. + */ + #[Hook('field_storage_config_update')] + public function fieldStorageConfigUpdate(FieldStorageConfigInterface $field_storage) { + if ($field_storage->isSyncing()) { + // Don't change anything during a configuration sync. + return; + } + // Act on all sub-types of the entity_reference field type. + /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ + $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); + $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; + $class = $field_type_manager->getPluginClass($field_storage->getType()); + if ($class !== $item_class && !is_subclass_of($class, $item_class)) { + return; + } + // If target_type changed, reset the handler in the fields using that storage. + if ($field_storage->getSetting('target_type') !== $field_storage->original->getSetting('target_type')) { + foreach ($field_storage->getBundles() as $bundle) { + $field = FieldConfig::loadByName($field_storage->getTargetEntityTypeId(), $bundle, $field_storage->getName()); + // Reset the handler settings. This triggers field_field_config_presave(), + // which will take care of reassigning the handler to the correct + // derivative for the new target_type. + $field->setSetting('handler_settings', []); + $field->save(); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_create() for 'field_config'. + * + * Determine the selection handler plugin ID for an entity reference field. + */ + #[Hook('field_config_create')] + public function fieldConfigCreate(FieldConfigInterface $field) { + if ($field->isSyncing()) { + return; + } + // Act on all sub-types of the entity_reference field type. + /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ + $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); + $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; + $class = $field_type_manager->getPluginClass($field->getType()); + if ($class !== $item_class && !is_subclass_of($class, $item_class)) { + return; + } + // If we don't know the target type yet, there's nothing else we can do. + $target_type = $field->getFieldStorageDefinition()->getSetting('target_type'); + if (empty($target_type)) { + return; + } + // Make sure the selection handler plugin is the correct derivative for the + // target entity type. + $selection_manager = \Drupal::service('plugin.manager.entity_reference_selection'); + [$current_handler] = explode(':', $field->getSetting('handler'), 2); + $field->setSetting('handler', $selection_manager->getPluginId($target_type, $current_handler)); + } + + /** + * Implements hook_ENTITY_TYPE_presave() for 'field_config'. + * + * Determine the selection handler plugin ID for an entity reference field. + */ + #[Hook('field_config_presave')] + public function fieldConfigPresave(FieldConfigInterface $field) { + // Don't change anything during a configuration sync. + if ($field->isSyncing()) { + return; + } + $this->fieldConfigCreate($field); + // Act on all sub-types of the entity_reference field type. + /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ + $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); + $item_class = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem'; + $class = $field_type_manager->getPluginClass($field->getType()); + if ($class !== $item_class && !is_subclass_of($class, $item_class)) { + return; + } + // In case we removed all the target bundles allowed by the field in + // EntityReferenceItem::onDependencyRemoval() or field_entity_bundle_delete() + // we have to log a critical message because the field will not function + // correctly anymore. + $handler_settings = $field->getSetting('handler_settings'); + if (isset($handler_settings['target_bundles']) && $handler_settings['target_bundles'] === []) { + \Drupal::logger('entity_reference')->critical('The %field_name entity reference field (entity_type: %entity_type, bundle: %bundle) no longer has any valid bundle it can reference. The field is not working correctly anymore and has to be adjusted.', [ + '%field_name' => $field->getName(), + '%entity_type' => $field->getTargetEntityTypeId(), + '%bundle' => $field->getTargetBundle(), + ]); + } + } + +} diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php index 6342c027de09f03cad039d6949b55d78f329595c..9ddca549026558f18605f811b4ae86903d2a4b71 100644 --- a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php @@ -2,6 +2,7 @@ namespace Drupal\field\Plugin\migrate\process\d6; +use Drupal\Component\Utility\FilterArray; use Drupal\migrate\Attribute\MigrateProcess; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\ProcessPluginBase; @@ -27,7 +28,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable if (isset($global_settings['allowed_values'])) { $list = explode("\n", $global_settings['allowed_values']); $list = array_map('trim', $list); - $list = array_filter($list, 'strlen'); + $list = FilterArray::removeEmptyStrings($list); switch ($field_type) { case 'boolean'; $option = preg_replace('/^option_/', '', $row->getSourceProperty('property')); diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php index 6c6cf100fa9307c5232540d46aa99d6db46fca92..94842bda74e03f546437b5957a8437da2dd516b4 100644 --- a/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php @@ -2,6 +2,7 @@ namespace Drupal\field\Plugin\migrate\process\d6; +use Drupal\Component\Utility\FilterArray; use Drupal\migrate\Attribute\MigrateProcess; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\ProcessPluginBase; @@ -29,7 +30,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable if (isset($global_settings['allowed_values'])) { $list = explode("\n", $global_settings['allowed_values']); $list = array_map('trim', $list); - $list = array_filter($list, 'strlen'); + $list = FilterArray::removeEmptyStrings($list); switch ($field_type) { case 'list_string': case 'list_integer': diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php index ce247d025d993036cc99833f6a3815b6333bf4cc..ffdb2e6fcb57039a17b013934f70777ca7e9b2b7 100644 --- a/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php @@ -2,6 +2,7 @@ namespace Drupal\field\Plugin\migrate\process\d6; +use Drupal\Component\Utility\FilterArray; use Drupal\migrate\Attribute\MigrateProcess; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\ProcessPluginBase; @@ -50,7 +51,7 @@ public function getSettings($field_type, $global_settings, $original_field_type if (isset($global_settings['allowed_values'])) { $list = explode("\n", $global_settings['allowed_values']); $list = array_map('trim', $list); - $list = array_filter($list, 'strlen'); + $list = FilterArray::removeEmptyStrings($list); switch ($field_type) { case 'list_string': case 'list_integer': diff --git a/core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php b/core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php index 5b5d3f6d0f37e20af2ac295a4ea75e08cac42bb2..0be145cf1da61ebc9b0e78ec57ddf46a534206ed 100644 --- a/core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php +++ b/core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php @@ -46,7 +46,6 @@ public function query() { // The i18n_string module adds a status column to locale_target. It was // originally 'status' in a later revision it was named 'i18n_status'. - /** @var \Drupal\Core\Database\Schema $db */ if ($this->getDatabase()->schema()->fieldExists('locales_target', 'status')) { $query->addField('lt', 'status', 'i18n_status'); } diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc index a2bb81cdfed5fafee8ad962855cfd903403bf201..24e79ea74dacc31644d04aeb1aac45a660f2ee72 100644 --- a/core/modules/field/tests/modules/field_test/field_test.entity.inc +++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc @@ -7,16 +7,6 @@ declare(strict_types=1); -/** - * Implements hook_entity_type_alter(). - */ -function field_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - foreach (field_test_entity_info_translatable() as $entity_type => $translatable) { - $entity_types[$entity_type]->set('translatable', $translatable); - } -} - /** * Helper function to enable entity translations. */ diff --git a/core/modules/field/tests/modules/field_test/field_test.field.inc b/core/modules/field/tests/modules/field_test/field_test.field.inc index 9c564632974e33dda11f97243f38c1ae99f1d630..70099c92697215faffef28de40186e50d35685d9 100644 --- a/core/modules/field/tests/modules/field_test/field_test.field.inc +++ b/core/modules/field/tests/modules/field_test/field_test.field.inc @@ -8,36 +8,7 @@ declare(strict_types=1); use Drupal\Core\Entity\FieldableEntityInterface; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_field_widget_info_alter(). - */ -function field_test_field_widget_info_alter(&$info) { - $info['test_field_widget_multiple']['field_types'][] = 'test_field'; - $info['test_field_widget_multiple']['field_types'][] = 'test_field_with_preconfigured_options'; - // Add extra widget when needed for tests. - // @see \Drupal\field\Tests\FormTest::widgetAlterTest(). - if ($alter_info = \Drupal::state()->get("field_test.widget_alter_test")) { - if ($alter_info['widget'] === 'test_field_widget_multiple_single_value') { - $info['test_field_widget_multiple_single_value']['field_types'][] = 'test_field'; - } - } -} - -/** - * Implements hook_field_storage_config_update_forbid(). - */ -function field_test_field_storage_config_update_forbid(FieldStorageConfigInterface $field_storage, FieldStorageConfigInterface $prior_field_storage) { - if ($field_storage->getType() == 'test_field' && $field_storage->getSetting('unchangeable') != $prior_field_storage->getSetting('unchangeable')) { - throw new FieldStorageDefinitionUpdateForbiddenException("field_test 'unchangeable' setting cannot be changed'"); - } -} /** * Sample 'default value' callback. @@ -45,20 +16,3 @@ function field_test_field_storage_config_update_forbid(FieldStorageConfigInterfa function field_test_default_value(FieldableEntityInterface $entity, FieldDefinitionInterface $definition) { return [['value' => 99]]; } - -/** - * Implements hook_entity_field_access(). - */ -function field_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - if ($field_definition->getName() == "field_no_{$operation}_access") { - return AccessResult::forbidden(); - } - - // Only grant view access to test_view_field fields when the user has - // 'view test_view_field content' permission. - if ($field_definition->getName() == 'test_view_field' && $operation == 'view') { - return AccessResult::forbiddenIf(!$account->hasPermission('view test_view_field content'))->cachePerPermissions(); - } - - return AccessResult::allowed(); -} diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module index 9f46de3a3ae199d290bdb25ba2d6e3f7b1093378..449cc5033a3941eab0276e738379a2f30b9de871 100644 --- a/core/modules/field/tests/modules/field_test/field_test.module +++ b/core/modules/field/tests/modules/field_test/field_test.module @@ -14,11 +14,8 @@ declare(strict_types=1); -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Entity\Query\QueryInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; -use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\field\FieldStorageConfigInterface; require_once __DIR__ . '/field_test.entity.inc'; @@ -87,53 +84,6 @@ function field_test_field_storage_config_create(FieldStorageConfigInterface $fie field_test_memorize(__FUNCTION__, $args); } -/** - * Implements hook_entity_display_build_alter(). - */ -function field_test_entity_display_build_alter(&$output, $context) { - $display_options = $context['display']->getComponent('test_field'); - if (isset($display_options['settings']['alter'])) { - $output['test_field'][] = ['#markup' => 'field_test_entity_display_build_alter']; - } - - if (isset($output['test_field'])) { - $output['test_field'][] = ['#markup' => 'entity language is ' . $context['entity']->language()->getId()]; - } -} - -/** - * Implements hook_field_widget_single_element_form_alter(). - */ -function field_test_field_widget_single_element_form_alter(&$element, FormStateInterface $form_state, $context) { - // Set a message if this is for the form displayed to set default value for - // the field. - if ($context['default']) { - \Drupal::messenger() - ->addStatus('From hook_field_widget_single_element_form_alter(): Default form is true.'); - } -} - -/** - * Implements hook_field_widget_complete_form_alter(). - */ -function field_test_field_widget_complete_form_alter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { - _field_test_alter_widget("hook_field_widget_complete_form_alter", $field_widget_complete_form, $form_state, $context); -} - -/** - * Implements hook_field_widget_complete_WIDGET_TYPE_form_alter(). - */ -function field_test_field_widget_complete_test_field_widget_multiple_form_alter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { - _field_test_alter_widget("hook_field_widget_complete_WIDGET_TYPE_form_alter", $field_widget_complete_form, $form_state, $context); -} - -/** - * Implements hook_field_widget_complete_WIDGET_TYPE_form_alter(). - */ -function field_test_field_widget_complete_test_field_widget_multiple_single_value_form_alter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { - _field_test_alter_widget("hook_field_widget_complete_WIDGET_TYPE_form_alter", $field_widget_complete_form, $form_state, $context); -} - /** * Sets up alterations for widget alter tests. * @@ -156,124 +106,8 @@ function _field_test_alter_widget($hook, array &$field_widget_complete_form, For } } -/** - * Implements hook_query_TAG_alter() for tag 'efq_table_prefixing_test'. - * - * @see \Drupal\system\Tests\Entity\EntityFieldQueryTest::testTablePrefixing() - */ -function field_test_query_efq_table_prefixing_test_alter(&$query) { - // Add an additional join onto the entity base table. This will cause an - // exception if the EFQ does not properly prefix the base table. - $query->join('entity_test', 'et2', '[%alias].[id] = [entity_test].[id]'); -} - -/** - * Implements hook_query_TAG_alter() for tag 'efq_metadata_test'. - * - * @see \Drupal\system\Tests\Entity\EntityQueryTest::testMetaData() - */ -function field_test_query_efq_metadata_test_alter(&$query) { - field_test_memorize(__FUNCTION__, $query->getMetadata('foo')); -} - -/** - * Implements hook_entity_extra_field_info_alter(). - */ -function field_test_entity_extra_field_info_alter(&$info) { - // Remove all extra fields from the 'no_fields' content type; - unset($info['node']['no_fields']); -} - -/** - * Implements hook_entity_bundle_field_info_alter(). - */ -function field_test_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) { - if (($field_name = \Drupal::state()->get('field_test_constraint', FALSE)) && $entity_type->id() == 'entity_test' && $bundle == 'entity_test' && !empty($fields[$field_name])) { - // Set a property constraint using - // \Drupal\Core\Field\FieldConfigInterface::setPropertyConstraints(). - $fields[$field_name]->setPropertyConstraints('value', [ - 'TestField' => [ - 'value' => -2, - 'message' => t('%name does not accept the value @value.', ['%name' => $field_name, '@value' => -2]), - ], - ]); - - // Add a property constraint using - // \Drupal\Core\Field\FieldConfigInterface::addPropertyConstraints(). - $fields[$field_name]->addPropertyConstraints('value', [ - 'Range' => [ - 'min' => 0, - 'max' => 32, - ], - ]); - } -} - -/** - * Implements hook_field_ui_preconfigured_options_alter(). - */ -function field_test_field_ui_preconfigured_options_alter(array &$options, $field_type) { - if ($field_type === 'test_field_with_preconfigured_options') { - $options['custom_options']['entity_view_display']['settings'] = [ - 'test_formatter_setting_multiple' => 'altered dummy test string', - ]; - } -} - -/** - * Implements hook_field_info_entity_type_ui_definitions_alter(). - */ -function field_test_field_info_entity_type_ui_definitions_alter(array &$ui_definitions, string $entity_type_id) { - if ($entity_type_id === 'node') { - $ui_definitions['boolean']['label'] = new TranslatableMarkup('Boolean (overridden by alter)'); - } -} - function field_test_entity_reference_selection_alter(array &$definitions): void { if (\Drupal::state()->get('field_test_disable_broken_entity_reference_handler')) { unset($definitions['broken']); } } - -/** - * Implements hook_entity_query_alter(). - * - * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook - */ -function field_test_entity_query_alter(QueryInterface $query): void { - if ($query->hasTag('entity_query_alter_hook_test')) { - $query->condition('id', '5', '<>'); - } -} - -/** - * Implements hook_entity_query_ENTITY_TYPE_alter() for 'entity_test_mulrev'. - * - * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook - */ -function field_test_entity_query_entity_test_mulrev_alter(QueryInterface $query): void { - if ($query->hasTag('entity_query_entity_test_mulrev_alter_hook_test')) { - $query->condition('id', '7', '<>'); - } -} - -/** - * Implements hook_entity_query_tag__TAG_alter() for 'entity_query_alter_tag_test'. - * - * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook - */ -function field_test_entity_query_tag__entity_query_alter_tag_test_alter(QueryInterface $query): void { - $query->condition('id', '13', '<>'); -} - -/** - * Implements hook_entity_query_tag__ENTITY_TYPE__TAG_alter(). - * - * Entity type is 'entity_test_mulrev' and tag is - * 'entity_query_entity_test_mulrev_alter_tag_test'. - * - * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook - */ -function field_test_entity_query_tag__entity_test_mulrev__entity_query_entity_test_mulrev_alter_tag_test_alter(QueryInterface $query): void { - $query->condition('id', '15', '<>'); -} diff --git a/core/modules/field/tests/modules/field_test/src/Hook/FieldTestEntityHooks.php b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestEntityHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1f0bb302500f1e438dfd9eadbc0faaf0ed932e63 --- /dev/null +++ b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestEntityHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_test. + */ +class FieldTestEntityHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + foreach (field_test_entity_info_translatable() as $entity_type => $translatable) { + $entity_types[$entity_type]->set('translatable', $translatable); + } + } + +} diff --git a/core/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2cfb6ddc19642ebfce4ab8c2d37b183dd56831e9 --- /dev/null +++ b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_test. + */ +class FieldTestFieldHooks { + + /** + * Implements hook_field_widget_info_alter(). + */ + #[Hook('field_widget_info_alter')] + public function fieldWidgetInfoAlter(&$info) { + $info['test_field_widget_multiple']['field_types'][] = 'test_field'; + $info['test_field_widget_multiple']['field_types'][] = 'test_field_with_preconfigured_options'; + // Add extra widget when needed for tests. + // @see \Drupal\field\Tests\FormTest::widgetAlterTest(). + if ($alter_info = \Drupal::state()->get("field_test.widget_alter_test")) { + if ($alter_info['widget'] === 'test_field_widget_multiple_single_value') { + $info['test_field_widget_multiple_single_value']['field_types'][] = 'test_field'; + } + } + } + + /** + * Implements hook_field_storage_config_update_forbid(). + */ + #[Hook('field_storage_config_update_forbid')] + public function fieldStorageConfigUpdateForbid(FieldStorageConfigInterface $field_storage, FieldStorageConfigInterface $prior_field_storage) { + if ($field_storage->getType() == 'test_field' && $field_storage->getSetting('unchangeable') != $prior_field_storage->getSetting('unchangeable')) { + throw new FieldStorageDefinitionUpdateForbiddenException("field_test 'unchangeable' setting cannot be changed'"); + } + } + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + if ($field_definition->getName() == "field_no_{$operation}_access") { + return AccessResult::forbidden(); + } + // Only grant view access to test_view_field fields when the user has + // 'view test_view_field content' permission. + if ($field_definition->getName() == 'test_view_field' && $operation == 'view') { + return AccessResult::forbiddenIf(!$account->hasPermission('view test_view_field content'))->cachePerPermissions(); + } + return AccessResult::allowed(); + } + +} diff --git a/core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..bafde444918cb1b5dacfbb3c3cd27cccd128bcc1 --- /dev/null +++ b/core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php @@ -0,0 +1,189 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_test\Hook; + +use Drupal\Core\Entity\Query\QueryInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_test. + */ +class FieldTestHooks { + + /** + * Implements hook_entity_display_build_alter(). + */ + #[Hook('entity_display_build_alter')] + public function entityDisplayBuildAlter(&$output, $context) { + $display_options = $context['display']->getComponent('test_field'); + if (isset($display_options['settings']['alter'])) { + $output['test_field'][] = ['#markup' => 'field_test_entity_display_build_alter']; + } + if (isset($output['test_field'])) { + $output['test_field'][] = ['#markup' => 'entity language is ' . $context['entity']->language()->getId()]; + } + } + + /** + * Implements hook_field_widget_single_element_form_alter(). + */ + #[Hook('field_widget_single_element_form_alter')] + public function fieldWidgetSingleElementFormAlter(&$element, FormStateInterface $form_state, $context) { + // Set a message if this is for the form displayed to set default value for + // the field. + if ($context['default']) { + \Drupal::messenger()->addStatus('From hook_field_widget_single_element_form_alter(): Default form is true.'); + } + } + + /** + * Implements hook_field_widget_complete_form_alter(). + */ + #[Hook('field_widget_complete_form_alter')] + public function fieldWidgetCompleteFormAlter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { + _field_test_alter_widget("hook_field_widget_complete_form_alter", $field_widget_complete_form, $form_state, $context); + } + + /** + * Implements hook_field_widget_complete_WIDGET_TYPE_form_alter(). + */ + #[Hook('field_widget_complete_test_field_widget_multiple_form_alter')] + public function fieldWidgetCompleteTestFieldWidgetMultipleFormAlter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { + _field_test_alter_widget("hook_field_widget_complete_WIDGET_TYPE_form_alter", $field_widget_complete_form, $form_state, $context); + } + + /** + * Implements hook_field_widget_complete_WIDGET_TYPE_form_alter(). + */ + #[Hook('field_widget_complete_test_field_widget_multiple_single_value_form_alter')] + public function fieldWidgetCompleteTestFieldWidgetMultipleSingleValueFormAlter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { + _field_test_alter_widget("hook_field_widget_complete_WIDGET_TYPE_form_alter", $field_widget_complete_form, $form_state, $context); + } + + /** + * Implements hook_query_TAG_alter() for tag 'efq_table_prefixing_test'. + * + * @see \Drupal\system\Tests\Entity\EntityFieldQueryTest::testTablePrefixing() + */ + #[Hook('query_efq_table_prefixing_test_alter')] + public function queryEfqTablePrefixingTestAlter(&$query) { + // Add an additional join onto the entity base table. This will cause an + // exception if the EFQ does not properly prefix the base table. + $query->join('entity_test', 'et2', '[%alias].[id] = [entity_test].[id]'); + } + + /** + * Implements hook_query_TAG_alter() for tag 'efq_metadata_test'. + * + * @see \Drupal\system\Tests\Entity\EntityQueryTest::testMetaData() + */ + #[Hook('query_efq_metadata_test_alter')] + public function queryEfqMetadataTestAlter(&$query) { + field_test_memorize('field_test_query_efq_metadata_test_alter', $query->getMetadata('foo')); + } + + /** + * Implements hook_entity_extra_field_info_alter(). + */ + #[Hook('entity_extra_field_info_alter')] + public function entityExtraFieldInfoAlter(&$info) { + // Remove all extra fields from the 'no_fields' content type; + unset($info['node']['no_fields']); + } + + /** + * Implements hook_entity_bundle_field_info_alter(). + */ + #[Hook('entity_bundle_field_info_alter')] + public function entityBundleFieldInfoAlter(&$fields, EntityTypeInterface $entity_type, $bundle) { + if (($field_name = \Drupal::state()->get('field_test_constraint', FALSE)) && $entity_type->id() == 'entity_test' && $bundle == 'entity_test' && !empty($fields[$field_name])) { + // Set a property constraint using + // \Drupal\Core\Field\FieldConfigInterface::setPropertyConstraints(). + $fields[$field_name]->setPropertyConstraints('value', [ + 'TestField' => [ + 'value' => -2, + 'message' => t('%name does not accept the value @value.', [ + '%name' => $field_name, + '@value' => -2, + ]), + ], + ]); + // Add a property constraint using + // \Drupal\Core\Field\FieldConfigInterface::addPropertyConstraints(). + $fields[$field_name]->addPropertyConstraints('value', ['Range' => ['min' => 0, 'max' => 32]]); + } + } + + /** + * Implements hook_field_ui_preconfigured_options_alter(). + */ + #[Hook('field_ui_preconfigured_options_alter')] + public function fieldUiPreconfiguredOptionsAlter(array &$options, $field_type) { + if ($field_type === 'test_field_with_preconfigured_options') { + $options['custom_options']['entity_view_display']['settings'] = ['test_formatter_setting_multiple' => 'altered dummy test string']; + } + } + + /** + * Implements hook_field_info_entity_type_ui_definitions_alter(). + */ + #[Hook('field_info_entity_type_ui_definitions_alter')] + public function fieldInfoEntityTypeUiDefinitionsAlter(array &$ui_definitions, string $entity_type_id) { + if ($entity_type_id === 'node') { + $ui_definitions['boolean']['label'] = new TranslatableMarkup('Boolean (overridden by alter)'); + } + } + + /** + * Implements hook_entity_query_alter(). + * + * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook + */ + #[Hook('entity_query_alter')] + public function entityQueryAlter(QueryInterface $query) : void { + if ($query->hasTag('entity_query_alter_hook_test')) { + $query->condition('id', '5', '<>'); + } + } + + /** + * Implements hook_entity_query_ENTITY_TYPE_alter() for 'entity_test_mulrev'. + * + * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook + */ + #[Hook('entity_query_entity_test_mulrev_alter')] + public function entityQueryEntityTestMulrevAlter(QueryInterface $query) : void { + if ($query->hasTag('entity_query_entity_test_mulrev_alter_hook_test')) { + $query->condition('id', '7', '<>'); + } + } + + /** + * Implements hook_entity_query_tag__TAG_alter() for 'entity_query_alter_tag_test'. + * + * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook + */ + #[Hook('entity_query_tag__entity_query_alter_tag_test_alter')] + public function entityQueryTagEntityQueryAlterTagTestAlter(QueryInterface $query) : void { + $query->condition('id', '13', '<>'); + } + + /** + * Implements hook_entity_query_tag__ENTITY_TYPE__TAG_alter(). + * + * Entity type is 'entity_test_mulrev' and tag is + * 'entity_query_entity_test_mulrev_alter_tag_test'. + * + * @see Drupal\KernelTests\Core\Entity\EntityQueryTest::testAlterHook + */ + #[Hook('entity_query_tag__entity_test_mulrev__entity_query_entity_test_mulrev_alter_tag_test_alter')] + public function entityQueryTagEntityTestMulrevEntityQueryEntityTestMulrevAlterTagTestAlter(QueryInterface $query) : void { + $query->condition('id', '15', '<>'); + } + +} diff --git a/core/modules/field/tests/modules/field_test_boolean_access_denied/field_test_boolean_access_denied.module b/core/modules/field/tests/modules/field_test_boolean_access_denied/field_test_boolean_access_denied.module deleted file mode 100644 index 1c840572e6117f3e33fdee32a6feb4ce64aa0181..0000000000000000000000000000000000000000 --- a/core/modules/field/tests/modules/field_test_boolean_access_denied/field_test_boolean_access_denied.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Module for testing denying access to boolean fields. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_field_access(). - */ -function field_test_boolean_access_denied_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - return AccessResult::forbiddenIf($field_definition->getName() === \Drupal::state()->get('field.test_boolean_field_access_field')); -} diff --git a/core/modules/field/tests/modules/field_test_boolean_access_denied/src/Hook/FieldTestBooleanAccessDeniedHooks.php b/core/modules/field/tests/modules/field_test_boolean_access_denied/src/Hook/FieldTestBooleanAccessDeniedHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..438fa19bfaa32936adada32cd4f14716782b5fd6 --- /dev/null +++ b/core/modules/field/tests/modules/field_test_boolean_access_denied/src/Hook/FieldTestBooleanAccessDeniedHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_test_boolean_access_denied\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_test_boolean_access_denied. + */ +class FieldTestBooleanAccessDeniedHooks { + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + return AccessResult::forbiddenIf($field_definition->getName() === \Drupal::state()->get('field.test_boolean_field_access_field')); + } + +} diff --git a/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module b/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module deleted file mode 100644 index 300859cd274701c01c79f867a8e5956bc4aba10d..0000000000000000000000000000000000000000 --- a/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FormatterInterface; -use Drupal\Core\Field\WidgetInterface; -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_field_widget_third_party_settings_form(). - */ -function field_third_party_test_field_widget_third_party_settings_form(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, $form, FormStateInterface $form_state) { - $element['field_test_widget_third_party_settings_form'] = [ - '#type' => 'textfield', - '#title' => t('3rd party widget settings form'), - '#default_value' => $plugin->getThirdPartySetting('field_third_party_test', 'field_test_widget_third_party_settings_form'), - ]; - return $element; -} - -/** - * Implements hook_field_widget_settings_summary_alter(). - */ -function field_third_party_test_field_widget_settings_summary_alter(&$summary, $context) { - $summary[] = 'field_test_field_widget_settings_summary_alter'; - return $summary; -} - -/** - * Implements hook_field_formatter_third_party_settings_form(). - */ -function field_third_party_test_field_formatter_third_party_settings_form(FormatterInterface $plugin, FieldDefinitionInterface $field_definition, $view_mode, $form, FormStateInterface $form_state) { - $element['field_test_field_formatter_third_party_settings_form'] = [ - '#type' => 'textfield', - '#title' => t('3rd party formatter settings form'), - '#default_value' => $plugin->getThirdPartySetting('field_third_party_test', 'field_test_field_formatter_third_party_settings_form'), - ]; - return $element; -} - -/** - * Implements hook_field_formatter_settings_summary_alter(). - */ -function field_third_party_test_field_formatter_settings_summary_alter(&$summary, $context) { - $summary[] = 'field_test_field_formatter_settings_summary_alter'; - return $summary; -} diff --git a/core/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php b/core/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e2e749237ef2a0bccdbdf29333bd77621cfd81af --- /dev/null +++ b/core/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_third_party_test\Hook; + +use Drupal\Core\Field\FormatterInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Field\WidgetInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_third_party_test. + */ +class FieldThirdPartyTestHooks { + + /** + * Implements hook_field_widget_third_party_settings_form(). + */ + #[Hook('field_widget_third_party_settings_form')] + public function fieldWidgetThirdPartySettingsForm(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, $form, FormStateInterface $form_state) { + $element['field_test_widget_third_party_settings_form'] = [ + '#type' => 'textfield', + '#title' => t('3rd party widget settings form'), + '#default_value' => $plugin->getThirdPartySetting('field_third_party_test', 'field_test_widget_third_party_settings_form'), + ]; + return $element; + } + + /** + * Implements hook_field_widget_settings_summary_alter(). + */ + #[Hook('field_widget_settings_summary_alter')] + public function fieldWidgetSettingsSummaryAlter(&$summary, $context) { + $summary[] = 'field_test_field_widget_settings_summary_alter'; + return $summary; + } + + /** + * Implements hook_field_formatter_third_party_settings_form(). + */ + #[Hook('field_formatter_third_party_settings_form')] + public function fieldFormatterThirdPartySettingsForm(FormatterInterface $plugin, FieldDefinitionInterface $field_definition, $view_mode, $form, FormStateInterface $form_state) { + $element['field_test_field_formatter_third_party_settings_form'] = [ + '#type' => 'textfield', + '#title' => t('3rd party formatter settings form'), + '#default_value' => $plugin->getThirdPartySetting('field_third_party_test', 'field_test_field_formatter_third_party_settings_form'), + ]; + return $element; + } + + /** + * Implements hook_field_formatter_settings_summary_alter(). + */ + #[Hook('field_formatter_settings_summary_alter')] + public function fieldFormatterSettingsSummaryAlter(&$summary, $context) { + $summary[] = 'field_test_field_formatter_settings_summary_alter'; + return $summary; + } + +} diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php index 5de1e0a9b8bc94eaa42406ec164762ee60b41b71..7a982ed1bf43aa48add9cdbe02aa996cab0fa816 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php @@ -21,6 +21,9 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase { use EntityReferenceFieldCreationTrait; + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'taxonomy', 'entity_test']; /** @@ -185,7 +188,6 @@ public function testMultipleTargetBundles(): void { 'auto_create_bundle' => $vocabularies[1]->id(), ]; $this->createEntityReferenceField('node', $this->referencingType, $field_name, $this->randomString(), 'taxonomy_term', 'default', $handler_settings); - /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $fd */ \Drupal::service('entity_display.repository') ->getFormDisplay('node', $this->referencingType) ->setComponent($field_name, ['type' => 'entity_reference_autocomplete']) diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php index 7f0feca6adae852254f592b8c0adf7417aa40ac2..49b347c6a65195cbfe2533328c7ff258b10cd0ec 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php @@ -217,14 +217,14 @@ protected function assertEntityReferenceFormDisplay(): void { /** * Adds additional languages. */ - protected function setUpLanguages() { + protected function setUpLanguages(): void { static::createLanguageFromLangcode($this->translateToLangcode); } /** * Creates a test subject contents, with translation. */ - protected function createContent() { + protected function createContent(): void { $this->referencedEntityWithTranslation = $this->createReferencedEntityWithTranslation(); $this->referencedEntityWithoutTranslation = $this->createNotTranslatedReferencedEntity(); } @@ -232,7 +232,7 @@ protected function createContent() { /** * Enables translations where it needed. */ - protected function enableTranslation() { + protected function enableTranslation(): void { // Enable translation for the entity types. $this->enableContentTranslation($this->testEntityTypeName, $this->referrerType->id()); $this->enableContentTranslation($this->testEntityTypeName, $this->referencedType->id()); @@ -241,7 +241,7 @@ protected function enableTranslation() { /** * Adds term reference field for the article content type. */ - protected function setUpEntityReferenceField() { + protected function setUpEntityReferenceField(): void { FieldStorageConfig::create([ 'field_name' => $this->referenceFieldName, 'entity_type' => $this->testEntityTypeName, @@ -282,7 +282,7 @@ protected function setUpEntityReferenceField() { /** * Create content types. */ - protected function setUpContentTypes() { + protected function setUpContentTypes(): void { $this->referrerType = $this->drupalCreateContentType([ 'type' => 'referrer', 'name' => 'Referrer', diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php index d18cfb1cafc9bb5565b2209bf251cbc68b111e86..b024d8efea825e61bc1dc4e66e90cf91d71f27a5 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php @@ -19,6 +19,9 @@ class EntityReferenceFileUploadTest extends BrowserTestBase { use TestFileCreationTrait; + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'file']; /** diff --git a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php index 280674914b653368fc1f39410c0a0d4c4b798fc2..e61cb2d54a0bf54fe61f968a07b95b7bcb541d8a 100644 --- a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php +++ b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php @@ -56,7 +56,6 @@ protected function setUp(): void { public function testDefaultValueCallbackForm(): void { // Create a field and storage for checking. - /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/field/tests/src/Functional/FieldTestBase.php b/core/modules/field/tests/src/Functional/FieldTestBase.php index c419578a73bfa0586c7ef044b6cab88f6cee2195..112cbb827a1c4ca19dc5c3212b588b5c4e2883d8 100644 --- a/core/modules/field/tests/src/Functional/FieldTestBase.php +++ b/core/modules/field/tests/src/Functional/FieldTestBase.php @@ -16,7 +16,7 @@ abstract class FieldTestBase extends BrowserTestBase { /** * Generate random values for a field_test field. * - * @param $cardinality + * @param int $cardinality * Number of values to generate. * * @return array @@ -38,14 +38,14 @@ public function _generateTestFieldValues($cardinality) { * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to test. - * @param $field_name + * @param string $field_name * The name of the field to test - * @param $expected_values + * @param array $expected_values * The array of expected values. - * @param $langcode + * @param string $langcode * (Optional) The language code for the values. Defaults to * \Drupal\Core\Language\LanguageInterface::LANGCODE_DEFAULT. - * @param $column + * @param string $column * (Optional) The name of the column to check. Defaults to 'value'. */ public function assertFieldValues(EntityInterface $entity, $field_name, $expected_values, $langcode = LanguageInterface::LANGCODE_DEFAULT, $column = 'value') { diff --git a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php index 3566bf9457501edc93c5644b1f98610613ac19bc..de14164bd807a53ac167152ed2f2c6a21b8f1e39 100644 --- a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php +++ b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php @@ -61,7 +61,7 @@ public function testTextfieldWidgets(): void { /** * Helper function for testTextfieldWidgets(). */ - public function _testTextfieldWidgets($field_type, $widget_type) { + public function _testTextfieldWidgets($field_type, $widget_type): void { // Create a field. $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ diff --git a/core/modules/field/tests/src/Functional/TranslationWebTest.php b/core/modules/field/tests/src/Functional/TranslationWebTest.php index 886ac85be7339efa99b492afb1cf640919ef6a4b..7733054d8283186dd51a8bab4aaa9a4a80b89473 100644 --- a/core/modules/field/tests/src/Functional/TranslationWebTest.php +++ b/core/modules/field/tests/src/Functional/TranslationWebTest.php @@ -136,7 +136,7 @@ public function testFieldFormTranslationRevisions(): void { * Check if the field translation attached to the entity revision identified * by the passed arguments were correctly stored. */ - private function checkTranslationRevisions($id, $revision_id, $available_langcodes) { + private function checkTranslationRevisions($id, $revision_id, $available_langcodes): void { $field_name = $this->fieldStorage->getName(); /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */ $storage = $this->container->get('entity_type.manager') diff --git a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php index 2653dc4a2e5d09db6fcecb80bf3dcaea4b631202..c31906ee26662437ae2384b5745375a8f6b68aa4 100644 --- a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php +++ b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php @@ -54,14 +54,14 @@ class BulkDeleteTest extends FieldKernelTestBase { /** * Tests that the expected hooks have been invoked on the expected entities. * - * @param $expected_hooks + * @param string[] $expected_hooks * An array keyed by hook name, with one entry per expected invocation. * Each entry is the value of the "$entity" parameter the hook is expected * to have been passed. - * @param $actual_hooks + * @param array $actual_hooks * The array of actual hook invocations recorded by field_test_memorize(). */ - public function checkHooksInvocations($expected_hooks, $actual_hooks) { + public function checkHooksInvocations($expected_hooks, $actual_hooks): void { foreach ($expected_hooks as $hook => $invocations) { $actual_invocations = $actual_hooks[$hook]; diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php index 9f554f110288929dd94e4ecf7cc1cec6d6a39b36..c2e0d85f156cc9521fb1d4931d62e62939747bc5 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter; +use Drupal\entity_test\Entity\EntityTest; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\filter\Entity\FilterFormat; @@ -349,6 +350,13 @@ public function testLabelFormatter(): void { $renderer = $this->container->get('renderer'); $formatter = 'entity_reference_label'; + // We need to create an anonymous user for access checks in the formatter. + $this->createUser(values: [ + 'uid' => 0, + 'status' => 0, + 'name' => '', + ]); + // The 'link' settings is TRUE by default. $build = $this->buildRenderArray([$this->referencedEntity, $this->unsavedReferencedEntity], $formatter); @@ -405,6 +413,15 @@ public function testLabelFormatter(): void { $build = $this->buildRenderArray([$referenced_entity_with_no_link_template], $formatter, ['link' => TRUE]); $this->assertEquals($referenced_entity_with_no_link_template->label(), $build[0]['#plain_text'], sprintf('The markup returned by the %s formatter is correct for an entity type with no valid link template.', $formatter)); + + // Test link visibility if the URL is not accessible. + $entity_with_user = EntityTest::create([ + 'name' => $this->randomMachineName(), + 'user_id' => $this->createUser(), + ]); + $entity_with_user->save(); + $build = $entity_with_user->get('user_id')->view(['type' => $formatter, 'settings' => ['link' => TRUE]]); + $this->assertEquals($build[0]['#plain_text'], $entity_with_user->get('user_id')->entity->label(), 'For inaccessible links, the label should be displayed in plain text.'); } /** diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php index b52bb98957d25d4895ef3e25c5b7e710fe2983e1..c169811a71bfc5c8879ced3360155d72da0ed7b8 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php @@ -184,7 +184,7 @@ public function testCustomTargetBundleDeletion(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container ->register($this->testLogServiceName, BufferingLogger::class) diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php index c22812ceb6b81f3faf0299143f1a3977cb64776b..6ad21b723f215ba34e08592e1fedf83aaaaa0ce3 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -168,7 +168,7 @@ public function testFieldPropertyConstraints(): void { * * @see field_test_entity_bundle_field_info_alter() */ - protected function doFieldPropertyConstraintsTests() { + protected function doFieldPropertyConstraintsTests(): void { $field_name = $this->fieldStorage->getName(); // Check that a valid value (not -2 and between 0 and 32) doesn't trigger diff --git a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php index 1273fc2cbc43b310973c3aa444359d1ba842b63d..51bdefd1a4f10f6d77831bc85dfeedd6b2df9f51 100644 --- a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php +++ b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php @@ -143,7 +143,7 @@ public function testFieldPluginDefinitionAvailability(): void { * @param string $display_context * Defines which display options should be loaded. */ - protected function checkDisplayOption($entity_type_id, $field_id, BaseFieldDefinition $field_definition, DiscoveryInterface $plugin_manager, $display_context) { + protected function checkDisplayOption($entity_type_id, $field_id, BaseFieldDefinition $field_definition, DiscoveryInterface $plugin_manager, $display_context): void { $display_options = $field_definition->getDisplayOptions($display_context); if (!empty($display_options['type'])) { $plugin = $plugin_manager->getDefinition($display_options['type'], FALSE); diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php index b0b3fe82c01448b7debb47968b8b6e73bcbfce3f..5e2b060e7b4a29e50ce6c36ca3be5618dbe21748 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -139,7 +139,7 @@ protected function createFieldWithStorage($suffix = '', $entity_type = 'entity_t * @return \Drupal\Core\Entity\EntityInterface * The entity, freshly reloaded from storage. */ - protected function entitySaveReload(EntityInterface $entity) { + protected function entitySaveReload(EntityInterface $entity): EntityInterface { $entity->save(); $controller = $this->container->get('entity_type.manager')->getStorage($entity->getEntityTypeId()); $controller->resetCache(); @@ -165,7 +165,7 @@ protected function entityValidateAndSave(EntityInterface $entity) { /** * Generate random values for a field_test field. * - * @param $cardinality + * @param int $cardinality * Number of values to generate. * * @return array @@ -187,14 +187,14 @@ protected function _generateTestFieldValues($cardinality) { * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to test. - * @param $field_name + * @param string $field_name * The name of the field to test - * @param $expected_values + * @param array $expected_values * The array of expected values. - * @param $langcode + * @param string $langcode * (Optional) The language code for the values. Defaults to * \Drupal\Core\Language\LanguageInterface::LANGCODE_NOT_SPECIFIED. - * @param $column + * @param string $column * (Optional) The name of the column to check. Defaults to 'value'. */ protected function assertFieldValues(EntityInterface $entity, $field_name, $expected_values, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED, $column = 'value') { diff --git a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php index fec0c06148d890a72d77b2f5bf450ba7b34db03b..f4fb821a4109b389eabb6473c53b2ea9ff2a85e1 100644 --- a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php +++ b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php @@ -127,7 +127,7 @@ public function testUiDefinitionsPerEntityType(): void { /** * Enable all core modules. */ - protected function enableAllCoreModules() { + protected function enableAllCoreModules(): void { $listing = new ExtensionDiscovery($this->root); $module_list = $listing->scan('module', FALSE); /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php index 62114c591f7671f665717d896406e008669230ab..ca81ab17602bf19216e2d5da542cab2260ef7439 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php @@ -45,7 +45,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public static function migrateDumpAlter(KernelTestBase $test) { + public static function migrateDumpAlter(KernelTestBase $test): void { $db = Database::getConnection('default', 'migrate'); // Alter the database to test the migration is successful when a translated // field is deleted but the translation data for that field remains in both diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php index ad426e82865ebe01d2fa341ac2aeff2328033f7e..f76d56d93528ab8e09622395f77ed8e6ced4a420 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php @@ -15,6 +15,9 @@ */ class MigrateFieldFormatterSettingsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'comment', 'datetime', diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php index 191ee44a86974cc96be339e17387912c25f201d6..5088655528775f7e697116842d903c51306253d3 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php @@ -64,7 +64,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public static function migrateDumpAlter(KernelTestBase $test) { + public static function migrateDumpAlter(KernelTestBase $test): void { $db = Database::getConnection('default', 'migrate'); // Alter the database to test the migration is successful when a translated // field is deleted but the translation data for that field remains in both diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php index 08ff4c30ff2ab0bcb16158893bb26cca774f76e1..ef226e192e7c7e1ed8a0622af8f7ded78a3ed958 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php @@ -15,6 +15,9 @@ */ class MigrateViewModesTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['comment', 'node', 'taxonomy', 'text']; /** diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php index 650db8a294552c93eeb1cf802ac46ff22754f5d6..3234e8c435857273a01d6062e1c191aec1cb6f6d 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php @@ -69,7 +69,7 @@ public function testFieldInstances(): void { * @param string|\Drupal\migrate\Plugin\MigrationInterface $migration * The migration to rollback, or its ID. */ - protected function executeRollback($migration) { + protected function executeRollback($migration): void { if (is_string($migration)) { $this->migration = $this->getMigration($migration); } diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php index 3e0d22d966d132cda15c47c09a790c30e0ad9ab1..c1f4a788d65c1b9c6ef27b6e01a059f94c66f581 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php @@ -66,7 +66,7 @@ public function testFields(): void { * @param string|\Drupal\migrate\Plugin\MigrationInterface $migration * The migration to rollback, or its ID. */ - protected function executeRollback($migration) { + protected function executeRollback($migration): void { if (is_string($migration)) { $this->migration = $this->getMigration($migration); } diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php index 7099294a78e98e487f7f61797bbf93d3dea99750..0f20144b8461acc5a1850f7cb82db76e16b5376c 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php @@ -46,7 +46,7 @@ public function testMigration(): void { * @param string|\Drupal\migrate\Plugin\MigrationInterface $migration * The migration to rollback, or its ID. */ - protected function executeRollback($migration) { + protected function executeRollback($migration): void { if (is_string($migration)) { $this->migration = $this->getMigration($migration); } diff --git a/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php b/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php index def2a913fcdca0c8094a53eb0818f6437a4adc1b..3b91b5cc9162728cd1bc9682be0597612ca60785 100644 --- a/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php +++ b/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php @@ -109,7 +109,7 @@ public function testFieldRender(): void { /** * Tests simple field rendering. */ - public function doTestSimpleFieldRender() { + public function doTestSimpleFieldRender(): void { $view = Views::getView('test_view_fieldapi'); $this->prepareView($view); $view->preview(); @@ -128,7 +128,7 @@ public function doTestSimpleFieldRender() { /** * Tests inaccessible field rendering. */ - public function doTestInaccessibleFieldRender() { + public function doTestInaccessibleFieldRender(): void { $view = Views::getView('test_view_fieldapi'); $this->prepareView($view); $view->preview(); @@ -150,7 +150,7 @@ public function doTestInaccessibleFieldRender() { /** * Tests that fields with formatters runs as expected. */ - public function doTestFormatterSimpleFieldRender() { + public function doTestFormatterSimpleFieldRender(): void { $view = Views::getView('test_view_fieldapi'); $this->prepareView($view); $view->displayHandlers->get('default')->options['fields'][$this->fieldStorages[5]->getName()]['type'] = 'text_trimmed'; @@ -172,7 +172,7 @@ public function doTestFormatterSimpleFieldRender() { /** * Tests multi-value field rendering. */ - public function doTestMultipleFieldRender() { + public function doTestMultipleFieldRender(): void { $view = Views::getView('test_view_fieldapi'); $field_name = $this->fieldStorages[3]->getName(); @@ -313,7 +313,7 @@ public function doTestMultipleFieldRender() { * @param \Drupal\views\ViewExecutable $view * The view to add field data to. */ - protected function prepareView(ViewExecutable $view) { + protected function prepareView(ViewExecutable $view): void { $view->storage->invalidateCaches(); $view->initDisplay(); foreach ($this->fieldStorages as $field_storage) { @@ -327,7 +327,7 @@ protected function prepareView(ViewExecutable $view) { /** * Creates the testing fields. */ - protected function createFields() { + protected function createFields(): void { $fields_data = [ [ 'field_name' => 'field_name_0', diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php index c22194ad520aadb63ae01e844f4673d81e7e0914..92a210f1d3e387cfb27110a5750889ff19e7a6e9 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php @@ -5,7 +5,6 @@ namespace Drupal\Tests\field\Unit\Plugin\migrate\process\d6; use Drupal\field\Plugin\migrate\process\d6\FieldInstanceSettings; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Row; use Drupal\Tests\UnitTestCase; @@ -25,7 +24,6 @@ class FieldInstanceSettingsTest extends UnitTestCase { */ public function testGetSettings($field_type, $instance_settings, $expected): void { $instance_settings = unserialize($instance_settings); - $migration = $this->createMock(MigrationInterface::class); $plugin = new FieldInstanceSettings([], 'd6_field_field_settings', []); $executable = $this->createMock(MigrateExecutableInterface::class); diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php index 978bb9ea78a01c98b407c19cc83099e4f88c46d9..4f8eb7681155baa41fd5d75909fd93c4e376e569 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php @@ -5,7 +5,6 @@ namespace Drupal\Tests\field\Unit\Plugin\migrate\process\d6; use Drupal\field\Plugin\migrate\process\d6\FieldSettings; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Row; use Drupal\Tests\UnitTestCase; @@ -22,7 +21,6 @@ class FieldSettingsTest extends UnitTestCase { * @dataProvider getSettingsProvider */ public function testGetSettings($field_type, $field_settings, $allowed_values): void { - $migration = $this->createMock(MigrationInterface::class); $plugin = new FieldSettings([], 'd6_field_settings', []); $executable = $this->createMock(MigrateExecutableInterface::class); diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php index 616735ed767ed04efa38cfdccbe66eefbbe791f7..0eb0f551a945f245b59fb924b700c541ac2f7d73 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php @@ -5,7 +5,6 @@ namespace Drupal\Tests\field\Unit\Plugin\migrate\process\d7; use Drupal\field\Plugin\migrate\process\d7\FieldInstanceSettings; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Row; use Drupal\Tests\migrate\Unit\MigrateTestCase; @@ -22,7 +21,6 @@ class FieldInstanceSettingsTest extends MigrateTestCase { * @covers ::transform */ public function testTransformImageSettings(): void { - $migration = $this->createMock(MigrationInterface::class); $plugin = new FieldInstanceSettings([], 'd7_field_instance_settings', []); $executable = $this->createMock(MigrateExecutableInterface::class); diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php index 86ab851cc8ae8353e2f43968cd8b9bf7526a6bb7..58e403c98e7749e6abcf934892b697ea45db5bde 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php @@ -5,7 +5,6 @@ namespace Drupal\Tests\field\Unit\Plugin\migrate\process\d7; use Drupal\field\Plugin\migrate\process\d7\FieldSettings; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Row; use Drupal\Tests\migrate\Unit\MigrateTestCase; @@ -22,7 +21,6 @@ class FieldSettingsTest extends MigrateTestCase { * @covers ::transform */ public function testTransformImageSettings(): void { - $migration = $this->createMock(MigrationInterface::class); $plugin = new FieldSettings([], 'd7_field_settings', []); $executable = $this->createMock(MigrateExecutableInterface::class); diff --git a/core/modules/field_layout/field_layout.install b/core/modules/field_layout/field_layout.install index 88882d39289dfd17cf266ac155f9b8fa2e5e4fcf..15c47ef968e03d3757dd4b75c7d492f8e13c14ad 100644 --- a/core/modules/field_layout/field_layout.install +++ b/core/modules/field_layout/field_layout.install @@ -14,7 +14,7 @@ /** * Implements hook_install(). */ -function field_layout_install() { +function field_layout_install(): void { // Ensure each entity display has a layout. $entity_save = function (EntityDisplayInterface $entity) { if ($entity instanceof EntityDisplayWithLayoutInterface) { @@ -31,7 +31,7 @@ function field_layout_install() { /** * Implements hook_uninstall(). */ -function field_layout_uninstall() { +function field_layout_uninstall(): void { // Reset each entity display to use the one-column layout to best approximate // the absence of layouts. $entity_save = function (EntityDisplayInterface $entity) { diff --git a/core/modules/field_layout/field_layout.module b/core/modules/field_layout/field_layout.module deleted file mode 100644 index 7e06292480a5474f7a13dab4ac808cbc4f1dbc87..0000000000000000000000000000000000000000 --- a/core/modules/field_layout/field_layout.module +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/** - * @file - * Provides hook implementations for Field Layout. - */ - -use Drupal\Core\Entity\ContentEntityFormInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\field_layout\Display\EntityDisplayWithLayoutInterface; -use Drupal\field_layout\Entity\FieldLayoutEntityFormDisplay; -use Drupal\field_layout\Entity\FieldLayoutEntityViewDisplay; -use Drupal\field_layout\FieldLayoutBuilder; -use Drupal\field_layout\Form\FieldLayoutEntityFormDisplayEditForm; -use Drupal\field_layout\Form\FieldLayoutEntityViewDisplayEditForm; - -/** - * Implements hook_help(). - */ -function field_layout_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.field_layout': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Field Layout module allows you to arrange fields into regions on forms and displays of entities such as nodes and users.') . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":field-layout-documentation">online documentation for the Field Layout module</a>.', [':field-layout-documentation' => 'https://www.drupal.org/documentation/modules/field_layout']) . '</p>'; - return $output; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function field_layout_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['entity_view_display']->setClass(FieldLayoutEntityViewDisplay::class); - $entity_types['entity_form_display']->setClass(FieldLayoutEntityFormDisplay::class); - - // The form classes are only needed when Field UI is installed. - if (\Drupal::moduleHandler()->moduleExists('field_ui')) { - $entity_types['entity_view_display']->setFormClass('edit', FieldLayoutEntityViewDisplayEditForm::class); - $entity_types['entity_form_display']->setFormClass('edit', FieldLayoutEntityFormDisplayEditForm::class); - } -} - -/** - * Implements hook_entity_view_alter(). - */ -function field_layout_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { - if ($display instanceof EntityDisplayWithLayoutInterface) { - \Drupal::classResolver(FieldLayoutBuilder::class)->buildView($build, $display); - } -} - -/** - * Implements hook_form_alter(). - */ -function field_layout_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $form_object = $form_state->getFormObject(); - if ($form_object instanceof ContentEntityFormInterface && $display = $form_object->getFormDisplay($form_state)) { - if ($display instanceof EntityDisplayWithLayoutInterface) { - \Drupal::classResolver(FieldLayoutBuilder::class)->buildForm($form, $display); - } - } -} diff --git a/core/modules/field_layout/src/Hook/FieldLayoutHooks.php b/core/modules/field_layout/src/Hook/FieldLayoutHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..79ed8b87fc870f5d3a4ccb9f5233ab8741842237 --- /dev/null +++ b/core/modules/field_layout/src/Hook/FieldLayoutHooks.php @@ -0,0 +1,77 @@ +<?php + +namespace Drupal\field_layout\Hook; + +use Drupal\Core\Entity\ContentEntityFormInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\field_layout\FieldLayoutBuilder; +use Drupal\field_layout\Display\EntityDisplayWithLayoutInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\field_layout\Form\FieldLayoutEntityFormDisplayEditForm; +use Drupal\field_layout\Form\FieldLayoutEntityViewDisplayEditForm; +use Drupal\field_layout\Entity\FieldLayoutEntityFormDisplay; +use Drupal\field_layout\Entity\FieldLayoutEntityViewDisplay; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_layout. + */ +class FieldLayoutHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.field_layout': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Field Layout module allows you to arrange fields into regions on forms and displays of entities such as nodes and users.') . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":field-layout-documentation">online documentation for the Field Layout module</a>.', [ + ':field-layout-documentation' => 'https://www.drupal.org/documentation/modules/field_layout', + ]) . '</p>'; + return $output; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['entity_view_display']->setClass(FieldLayoutEntityViewDisplay::class); + $entity_types['entity_form_display']->setClass(FieldLayoutEntityFormDisplay::class); + // The form classes are only needed when Field UI is installed. + if (\Drupal::moduleHandler()->moduleExists('field_ui')) { + $entity_types['entity_view_display']->setFormClass('edit', FieldLayoutEntityViewDisplayEditForm::class); + $entity_types['entity_form_display']->setFormClass('edit', FieldLayoutEntityFormDisplayEditForm::class); + } + } + + /** + * Implements hook_entity_view_alter(). + */ + #[Hook('entity_view_alter')] + public function entityViewAlter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { + if ($display instanceof EntityDisplayWithLayoutInterface) { + \Drupal::classResolver(FieldLayoutBuilder::class)->buildView($build, $display); + } + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $form_object = $form_state->getFormObject(); + if ($form_object instanceof ContentEntityFormInterface && ($display = $form_object->getFormDisplay($form_state))) { + if ($display instanceof EntityDisplayWithLayoutInterface) { + \Drupal::classResolver(FieldLayoutBuilder::class)->buildForm($form, $display); + } + } + } + +} diff --git a/core/modules/field_layout/tests/modules/field_layout_test/field_layout_test.module b/core/modules/field_layout/tests/modules/field_layout_test/field_layout_test.module deleted file mode 100644 index ba45d420bfb0ba55bb8a077a63d95a97eb6d0723..0000000000000000000000000000000000000000 --- a/core/modules/field_layout/tests/modules/field_layout_test/field_layout_test.module +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for field_layout_test. - */ - -declare(strict_types=1); - -/** - * Implements hook_layout_alter(). - */ -function field_layout_test_layout_alter(&$definitions) { - /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */ - if (\Drupal::state()->get('field_layout_test.alter_regions') && isset($definitions['layout_onecol'])) { - $definitions['layout_onecol']->setRegions(['foo' => ['label' => 'Foo']]); - } -} diff --git a/core/modules/field_layout/tests/modules/field_layout_test/src/Hook/FieldLayoutTestHooks.php b/core/modules/field_layout/tests/modules/field_layout_test/src/Hook/FieldLayoutTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7ed4af9aadd4c4d9aacac8537220f4334d232711 --- /dev/null +++ b/core/modules/field_layout/tests/modules/field_layout_test/src/Hook/FieldLayoutTestHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_layout_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_layout_test. + */ +class FieldLayoutTestHooks { + + /** + * Implements hook_layout_alter(). + */ + #[Hook('layout_alter')] + public function layoutAlter(&$definitions) { + /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */ + if (\Drupal::state()->get('field_layout_test.alter_regions') && isset($definitions['layout_onecol'])) { + $definitions['layout_onecol']->setRegions(['foo' => ['label' => 'Foo']]); + } + } + +} diff --git a/core/modules/field_ui/field_ui.api.php b/core/modules/field_ui/field_ui.api.php index 87f55ae6e1a5daba83f587268a2ad789cbb14e1a..23606315eaf04a3e02ad1bdd01fb7536cf9ce23e 100644 --- a/core/modules/field_ui/field_ui.api.php +++ b/core/modules/field_ui/field_ui.api.php @@ -1,5 +1,14 @@ <?php +/** + * @file + */ + +use Drupal\Core\Field\FormatterInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Field\WidgetInterface; + /** * @file * Hooks provided by the Field UI module. @@ -29,7 +38,7 @@ * * @see \Drupal\field_ui\Form\EntityViewDisplayEditForm::thirdPartySettingsForm() */ -function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, array $form, \Drupal\Core\Form\FormStateInterface $form_state) { +function hook_field_formatter_third_party_settings_form(FormatterInterface $plugin, FieldDefinitionInterface $field_definition, $view_mode, array $form, FormStateInterface $form_state) { $element = []; // Add a 'my_setting' checkbox to the settings form for 'foo_formatter' field // formatters. @@ -62,7 +71,7 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma * * @see \Drupal\field_ui\Form\EntityFormDisplayEditForm::thirdPartySettingsForm() */ -function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, array $form, \Drupal\Core\Form\FormStateInterface $form_state) { +function hook_field_widget_third_party_settings_form(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, array $form, FormStateInterface $form_state) { $element = []; // Add a 'my_setting' checkbox to the settings form for 'foo_widget' field // widgets. diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 3e5d38c1e524d2db97fbf313159d2c4c85fd1633..526468502516e7cbace7aa669e449b24b476e212 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -2,198 +2,10 @@ /** * @file - * Allows administrators to attach custom fields to fieldable types. */ -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Entity\EntityViewModeInterface; -use Drupal\Core\Entity\EntityFormModeInterface; -use Drupal\Core\Url; use Drupal\field_ui\FieldUI; -use Drupal\field_ui\Form\FieldConfigEditForm; -use Drupal\field_ui\Form\FieldStorageConfigEditForm; -use Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask; - -/** - * Implements hook_help(). - */ -function field_ui_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.field_ui': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules installed on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the <a href=":field">Field module help page</a>. For more information about the Field UI, see the <a href=":field_ui_docs">online documentation for the Field UI module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui_docs' => 'https://www.drupal.org/docs/8/core/modules/field-ui']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating a field') . '</dt>'; - $output .= '<dd>' . t('On the <em>Manage fields</em> page for your entity type or sub-type, you can add, configure, and delete fields for that entity type or sub-type. Each field has a <em>machine name</em>, which is used internally to identify the field and must be unique across an entity type; once a field is created, you cannot change the machine name. Most fields have two types of settings. The field-level settings depend on the field type, and affect how the data in the field is stored. Once they are set, they can no longer be changed; examples include how many data values are allowed for the field and where files are stored. The sub-type-level settings are specific to each entity sub-type the field is used on, and they can be changed later; examples include the field label, help text, default value, and whether the field is required or not. You can return to these settings by choosing the <em>Edit</em> link for the field from the <em>Manage fields</em> page.'); - $output .= '<dt>' . t('Re-using fields') . '</dt>'; - $output .= '<dd>' . t('Once you have created a field, you can use it again in other sub-types of the same entity type. For instance, if you create a field for the article content type, you can also use it for the page content type, but you cannot use it for content blocks or taxonomy terms. If there are fields available for re-use, after clicking <em>Add field</em> from the <em>Manage fields</em> page, you will see a list of available fields for re-use. After selecting a field for re-use, you can configure the sub-type-level settings.') . '</dd>'; - $output .= '<dt>' . t('Configuring field editing') . '</dt>'; - $output .= '<dd>' . t('On the <em>Manage form display</em> page of your entity type or sub-type, you can configure how the field data is edited by default and in each form mode. If your entity type has multiple form modes (on most sites, most entities do not), you can toggle between the form modes at the top of the page, and you can toggle whether each form mode uses the default settings or custom settings in the <em>Custom display settings</em> section. For each field in each form mode, you can select the widget to use for editing; some widgets have additional configuration options, such as the size for a text field, and these can be edited using the Edit button (which looks like a wheel). You can also change the order of the fields on the form. You can exclude a field from a form by choosing <em>Hidden</em> from the widget drop-down list, or by dragging it into the <em>Disabled</em> section.') . '</dd>'; - $output .= '<dt>' . t('Configuring field display') . '</dt>'; - $output .= '<dd>' . t('On the <em>Manage display</em> page of your entity type or sub-type, you can configure how each field is displayed by default and in each view mode. If your entity type has multiple view modes, you can toggle between the view modes at the top of the page, and you can toggle whether each view mode uses the default settings or custom settings in the <em>Custom display settings</em> section. For each field in each view mode, you can choose whether and how to display the label of the field from the <em>Label</em> drop-down list. You can also select the formatter to use for display; some formatters have configuration options, which you can edit using the Edit button (which looks like a wheel). You can also change the display order of fields. You can exclude a field from a specific view mode by choosing <em>Hidden</em> from the formatter drop-down list, or by dragging it into the <em>Disabled</em> section.') . '</dd>'; - $output .= '<dt>' . t('Configuring view and form modes') . '</dt>'; - $output .= '<dd>' . t('You can add, edit, and delete view modes for entities on the <a href=":view_modes">View modes page</a>, and you can add, edit, and delete form modes for entities on the <a href=":form_modes">Form modes page</a>. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', [':view_modes' => Url::fromRoute('entity.entity_view_mode.collection')->toString(), ':form_modes' => Url::fromRoute('entity.entity_form_mode.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Listing fields') . '</dt>'; - $output .= '<dd>' . t('There are two reports available that list the fields defined on your site. The <a href=":entity-list" title="Entities field list report">Entities</a> report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the <a href=":views">Views</a> and <a href=":views-ui">Views UI</a> modules are installed, the <a href=":views-list" title="Used in views field list report">Used in views</a> report lists each field that is used in a view, with a link to edit that view.', [':entity-list' => Url::fromRoute('entity.field_storage_config.collection')->toString(), ':views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? Url::fromRoute('views_ui.reports_fields')->toString() : '#', ':views' => (\Drupal::moduleHandler()->moduleExists('views')) ? Url::fromRoute('help.page', ['name' => 'views'])->toString() : '#', ':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? Url::fromRoute('help.page', ['name' => 'views_ui'])->toString() : '#']) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.field_storage_config.collection': - return '<p>' . t('This list shows all fields currently in use for easy reference.') . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function field_ui_theme() { - return [ - 'field_ui_table' => [ - 'variables' => [ - 'header' => NULL, - 'rows' => NULL, - 'footer' => NULL, - 'attributes' => [], - 'caption' => NULL, - 'colgroups' => [], - 'sticky' => FALSE, - 'responsive' => TRUE, - 'empty' => '', - ], - ], - // Provide a dedicated template for new storage options as their styling - // is quite different from a typical form element, so it works best to not - // include default form element classes. - 'form_element__new_storage_type' => [ - 'base hook' => 'form_element', - 'render element' => 'element', - ], - ]; -} - -/** - * Implements hook_entity_type_build(). - */ -function field_ui_entity_type_build(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['field_config']->setFormClass('edit', 'Drupal\field_ui\Form\FieldConfigEditForm'); - $entity_types['field_config']->setFormClass('default', FieldConfigEditForm::class); - $entity_types['field_config']->setFormClass('delete', 'Drupal\field_ui\Form\FieldConfigDeleteForm'); - $entity_types['field_config']->setListBuilderClass('Drupal\field_ui\FieldConfigListBuilder'); - - $entity_types['field_storage_config']->setFormClass('edit', 'Drupal\field_ui\Form\FieldStorageConfigEditForm'); - $entity_types['field_storage_config']->setFormClass('default', FieldStorageConfigEditForm::class); - $entity_types['field_storage_config']->setListBuilderClass('Drupal\field_ui\FieldStorageConfigListBuilder'); - $entity_types['field_storage_config']->setLinkTemplate('collection', '/admin/reports/fields'); - - $entity_types['entity_form_display']->setFormClass('edit', 'Drupal\field_ui\Form\EntityFormDisplayEditForm'); - $entity_types['entity_view_display']->setFormClass('edit', 'Drupal\field_ui\Form\EntityViewDisplayEditForm'); - - $form_mode = $entity_types['entity_form_mode']; - $form_mode->setListBuilderClass('Drupal\field_ui\EntityFormModeListBuilder'); - $form_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityFormModeAddForm'); - $form_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm'); - $form_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm'); - $form_mode->set('admin_permission', 'administer display modes'); - $form_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}/delete'); - $form_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}'); - $form_mode->setLinkTemplate('add-form', '/admin/structure/display-modes/form/add/{entity_type_id}'); - $form_mode->setLinkTemplate('collection', '/admin/structure/display-modes/form'); - - $view_mode = $entity_types['entity_view_mode']; - $view_mode->setListBuilderClass('Drupal\field_ui\EntityDisplayModeListBuilder'); - $view_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityDisplayModeAddForm'); - $view_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm'); - $view_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm'); - $view_mode->set('admin_permission', 'administer display modes'); - $view_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}/delete'); - $view_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}'); - $view_mode->setLinkTemplate('add-form', '/admin/structure/display-modes/view/add/{entity_type_id}'); - $view_mode->setLinkTemplate('collection', '/admin/structure/display-modes/view'); -} - -/** - * Implements hook_entity_bundle_create(). - */ -function field_ui_entity_bundle_create($entity_type, $bundle) { - // When a new bundle is created, the menu needs to be rebuilt to add our - // menu item tabs. - \Drupal::service('router.builder')->setRebuildNeeded(); -} - -/** - * Implements hook_entity_operation(). - */ -function field_ui_entity_operation(EntityInterface $entity) { - $operations = []; - $info = $entity->getEntityType(); - // Add manage fields and display links if this entity type is the bundle - // of another and that type has field UI enabled. - if (($bundle_of = $info->getBundleOf()) && \Drupal::entityTypeManager()->getDefinition($bundle_of)->get('field_ui_base_route')) { - $account = \Drupal::currentUser(); - if ($account->hasPermission('administer ' . $bundle_of . ' fields')) { - $operations['manage-fields'] = [ - 'title' => t('Manage fields'), - 'weight' => 15, - 'url' => Url::fromRoute("entity.{$bundle_of}.field_ui_fields", [ - $entity->getEntityTypeId() => $entity->id(), - ]), - ]; - } - if ($account->hasPermission('administer ' . $bundle_of . ' form display')) { - $operations['manage-form-display'] = [ - 'title' => t('Manage form display'), - 'weight' => 20, - 'url' => Url::fromRoute("entity.entity_form_display.{$bundle_of}.default", [ - $entity->getEntityTypeId() => $entity->id(), - ]), - ]; - } - if ($account->hasPermission('administer ' . $bundle_of . ' display')) { - $operations['manage-display'] = [ - 'title' => t('Manage display'), - 'weight' => 25, - 'url' => Url::fromRoute("entity.entity_view_display.$bundle_of.default", [ - $entity->getEntityTypeId() => $entity->id(), - ]), - ]; - } - } - - return $operations; -} - -/** - * Implements hook_entity_view_mode_presave(). - */ -function field_ui_entity_view_mode_presave(EntityViewModeInterface $view_mode) { - \Drupal::service('router.builder')->setRebuildNeeded(); -} - -/** - * Implements hook_entity_form_mode_presave(). - */ -function field_ui_entity_form_mode_presave(EntityFormModeInterface $form_mode) { - \Drupal::service('router.builder')->setRebuildNeeded(); -} - -/** - * Implements hook_entity_view_mode_delete(). - */ -function field_ui_entity_view_mode_delete(EntityViewModeInterface $view_mode) { - \Drupal::service('router.builder')->setRebuildNeeded(); -} - -/** - * Implements hook_entity_form_mode_delete(). - */ -function field_ui_entity_form_mode_delete(EntityFormModeInterface $form_mode) { - \Drupal::service('router.builder')->setRebuildNeeded(); -} /** * Prepares variables for field UI overview table templates. @@ -209,26 +21,6 @@ function template_preprocess_field_ui_table(&$variables) { template_preprocess_table($variables); } -/** - * Implements hook_local_tasks_alter(). - */ -function field_ui_local_tasks_alter(&$local_tasks) { - $container = \Drupal::getContainer(); - $local_task = FieldUiLocalTask::create($container, 'field_ui.fields'); - $local_task->alterLocalTasks($local_tasks); -} - -/** - * Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'. - */ -function field_ui_form_field_ui_field_storage_add_form_alter(array &$form) { - $optgroup = (string) t('Reference'); - // Move the "Entity reference" option to the end of the list and rename it to - // "Other". - unset($form['add']['new_storage_type']['#options'][$optgroup]['entity_reference']); - $form['add']['new_storage_type']['#options'][$optgroup]['entity_reference'] = t('Other…'); -} - /** * Implements hook_preprocess_HOOK(). */ @@ -238,37 +30,6 @@ function field_ui_preprocess_form_element__new_storage_type(&$variables) { $variables['variant'] = $variables['element']['#variant'] ?? NULL; } -/** - * Implements hook_form_alter(). - * - * Adds a button 'Save and manage fields' to forms. - * - * @see \Drupal\node\NodeTypeForm - * @see \Drupal\comment\CommentTypeForm - * @see \Drupal\media\MediaTypeForm - * @see \Drupal\block_content\BlockContentTypeForm - * @see field_ui_form_manage_field_form_submit() - */ -function field_ui_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $forms = [ - 'node_type_add_form', - 'comment_type_add_form', - 'media_type_add_form', - 'block_content_type_add_form', - ]; - - if (!in_array($form_id, $forms)) { - return; - } - if ($form_state->getFormObject()->getEntity()->isNew()) { - $form['actions']['save_continue'] = $form['actions']['submit']; - unset($form['actions']['submit']['#button_type']); - $form['actions']['save_continue']['#value'] = t('Save and manage fields'); - $form['actions']['save_continue']['#weight'] = $form['actions']['save_continue']['#weight'] - 5; - $form['actions']['save_continue']['#submit'][] = 'field_ui_form_manage_field_form_submit'; - } -} - /** * Form submission handler for the 'Save and manage fields' button. * diff --git a/core/modules/field_ui/src/Hook/FieldUiHooks.php b/core/modules/field_ui/src/Hook/FieldUiHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e0d88fa48443cf6066d04acc3b6d8d1926d1200a --- /dev/null +++ b/core/modules/field_ui/src/Hook/FieldUiHooks.php @@ -0,0 +1,274 @@ +<?php + +namespace Drupal\field_ui\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask; +use Drupal\Core\Entity\EntityFormModeInterface; +use Drupal\Core\Entity\EntityViewModeInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\field_ui\Form\FieldStorageConfigEditForm; +use Drupal\field_ui\Form\FieldConfigEditForm; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_ui. + */ +class FieldUiHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.field_ui': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules installed on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the <a href=":field">Field module help page</a>. For more information about the Field UI, see the <a href=":field_ui_docs">online documentation for the Field UI module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui_docs' => 'https://www.drupal.org/docs/8/core/modules/field-ui', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating a field') . '</dt>'; + $output .= '<dd>' . t('On the <em>Manage fields</em> page for your entity type or sub-type, you can add, configure, and delete fields for that entity type or sub-type. Each field has a <em>machine name</em>, which is used internally to identify the field and must be unique across an entity type; once a field is created, you cannot change the machine name. Most fields have two types of settings. The field-level settings depend on the field type, and affect how the data in the field is stored. Once they are set, they can no longer be changed; examples include how many data values are allowed for the field and where files are stored. The sub-type-level settings are specific to each entity sub-type the field is used on, and they can be changed later; examples include the field label, help text, default value, and whether the field is required or not. You can return to these settings by choosing the <em>Edit</em> link for the field from the <em>Manage fields</em> page.'); + $output .= '<dt>' . t('Re-using fields') . '</dt>'; + $output .= '<dd>' . t('Once you have created a field, you can use it again in other sub-types of the same entity type. For instance, if you create a field for the article content type, you can also use it for the page content type, but you cannot use it for content blocks or taxonomy terms. If there are fields available for re-use, after clicking <em>Add field</em> from the <em>Manage fields</em> page, you will see a list of available fields for re-use. After selecting a field for re-use, you can configure the sub-type-level settings.') . '</dd>'; + $output .= '<dt>' . t('Configuring field editing') . '</dt>'; + $output .= '<dd>' . t('On the <em>Manage form display</em> page of your entity type or sub-type, you can configure how the field data is edited by default and in each form mode. If your entity type has multiple form modes (on most sites, most entities do not), you can toggle between the form modes at the top of the page, and you can toggle whether each form mode uses the default settings or custom settings in the <em>Custom display settings</em> section. For each field in each form mode, you can select the widget to use for editing; some widgets have additional configuration options, such as the size for a text field, and these can be edited using the Edit button (which looks like a wheel). You can also change the order of the fields on the form. You can exclude a field from a form by choosing <em>Hidden</em> from the widget drop-down list, or by dragging it into the <em>Disabled</em> section.') . '</dd>'; + $output .= '<dt>' . t('Configuring field display') . '</dt>'; + $output .= '<dd>' . t('On the <em>Manage display</em> page of your entity type or sub-type, you can configure how each field is displayed by default and in each view mode. If your entity type has multiple view modes, you can toggle between the view modes at the top of the page, and you can toggle whether each view mode uses the default settings or custom settings in the <em>Custom display settings</em> section. For each field in each view mode, you can choose whether and how to display the label of the field from the <em>Label</em> drop-down list. You can also select the formatter to use for display; some formatters have configuration options, which you can edit using the Edit button (which looks like a wheel). You can also change the display order of fields. You can exclude a field from a specific view mode by choosing <em>Hidden</em> from the formatter drop-down list, or by dragging it into the <em>Disabled</em> section.') . '</dd>'; + $output .= '<dt>' . t('Configuring view and form modes') . '</dt>'; + $output .= '<dd>' . t('You can add, edit, and delete view modes for entities on the <a href=":view_modes">View modes page</a>, and you can add, edit, and delete form modes for entities on the <a href=":form_modes">Form modes page</a>. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', [ + ':view_modes' => Url::fromRoute('entity.entity_view_mode.collection')->toString(), + ':form_modes' => Url::fromRoute('entity.entity_form_mode.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Listing fields') . '</dt>'; + $output .= '<dd>' . t('There are two reports available that list the fields defined on your site. The <a href=":entity-list" title="Entities field list report">Entities</a> report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the <a href=":views">Views</a> and <a href=":views-ui">Views UI</a> modules are installed, the <a href=":views-list" title="Used in views field list report">Used in views</a> report lists each field that is used in a view, with a link to edit that view.', [ + ':entity-list' => Url::fromRoute('entity.field_storage_config.collection')->toString(), + ':views-list' => \Drupal::moduleHandler()->moduleExists('views_ui') ? Url::fromRoute('views_ui.reports_fields')->toString() : '#', + ':views' => \Drupal::moduleHandler()->moduleExists('views') ? Url::fromRoute('help.page', [ + 'name' => 'views', + ])->toString() : '#', + ':views-ui' => \Drupal::moduleHandler()->moduleExists('views_ui') ? Url::fromRoute('help.page', [ + 'name' => 'views_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.field_storage_config.collection': + return '<p>' . t('This list shows all fields currently in use for easy reference.') . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'field_ui_table' => [ + 'variables' => [ + 'header' => NULL, + 'rows' => NULL, + 'footer' => NULL, + 'attributes' => [], + 'caption' => NULL, + 'colgroups' => [], + 'sticky' => FALSE, + 'responsive' => TRUE, + 'empty' => '', + ], + ], + // Provide a dedicated template for new storage options as their styling + // is quite different from a typical form element, so it works best to not + // include default form element classes. + 'form_element__new_storage_type' => [ + 'base hook' => 'form_element', + 'render element' => 'element', + ], + ]; + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['field_config']->setFormClass('edit', 'Drupal\field_ui\Form\FieldConfigEditForm'); + $entity_types['field_config']->setFormClass('default', FieldConfigEditForm::class); + $entity_types['field_config']->setFormClass('delete', 'Drupal\field_ui\Form\FieldConfigDeleteForm'); + $entity_types['field_config']->setListBuilderClass('Drupal\field_ui\FieldConfigListBuilder'); + $entity_types['field_storage_config']->setFormClass('edit', 'Drupal\field_ui\Form\FieldStorageConfigEditForm'); + $entity_types['field_storage_config']->setFormClass('default', FieldStorageConfigEditForm::class); + $entity_types['field_storage_config']->setListBuilderClass('Drupal\field_ui\FieldStorageConfigListBuilder'); + $entity_types['field_storage_config']->setLinkTemplate('collection', '/admin/reports/fields'); + $entity_types['entity_form_display']->setFormClass('edit', 'Drupal\field_ui\Form\EntityFormDisplayEditForm'); + $entity_types['entity_view_display']->setFormClass('edit', 'Drupal\field_ui\Form\EntityViewDisplayEditForm'); + $form_mode = $entity_types['entity_form_mode']; + $form_mode->setListBuilderClass('Drupal\field_ui\EntityFormModeListBuilder'); + $form_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityFormModeAddForm'); + $form_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm'); + $form_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm'); + $form_mode->set('admin_permission', 'administer display modes'); + $form_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}/delete'); + $form_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}'); + $form_mode->setLinkTemplate('add-form', '/admin/structure/display-modes/form/add/{entity_type_id}'); + $form_mode->setLinkTemplate('collection', '/admin/structure/display-modes/form'); + $view_mode = $entity_types['entity_view_mode']; + $view_mode->setListBuilderClass('Drupal\field_ui\EntityDisplayModeListBuilder'); + $view_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityDisplayModeAddForm'); + $view_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm'); + $view_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm'); + $view_mode->set('admin_permission', 'administer display modes'); + $view_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}/delete'); + $view_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}'); + $view_mode->setLinkTemplate('add-form', '/admin/structure/display-modes/view/add/{entity_type_id}'); + $view_mode->setLinkTemplate('collection', '/admin/structure/display-modes/view'); + } + + /** + * Implements hook_entity_bundle_create(). + */ + #[Hook('entity_bundle_create')] + public function entityBundleCreate($entity_type, $bundle) { + // When a new bundle is created, the menu needs to be rebuilt to add our + // menu item tabs. + \Drupal::service('router.builder')->setRebuildNeeded(); + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + $operations = []; + $info = $entity->getEntityType(); + // Add manage fields and display links if this entity type is the bundle + // of another and that type has field UI enabled. + if (($bundle_of = $info->getBundleOf()) && \Drupal::entityTypeManager()->getDefinition($bundle_of)->get('field_ui_base_route')) { + $account = \Drupal::currentUser(); + if ($account->hasPermission('administer ' . $bundle_of . ' fields')) { + $operations['manage-fields'] = [ + 'title' => t('Manage fields'), + 'weight' => 15, + 'url' => Url::fromRoute("entity.{$bundle_of}.field_ui_fields", [ + $entity->getEntityTypeId() => $entity->id(), + ]), + ]; + } + if ($account->hasPermission('administer ' . $bundle_of . ' form display')) { + $operations['manage-form-display'] = [ + 'title' => t('Manage form display'), + 'weight' => 20, + 'url' => Url::fromRoute("entity.entity_form_display.{$bundle_of}.default", [ + $entity->getEntityTypeId() => $entity->id(), + ]), + ]; + } + if ($account->hasPermission('administer ' . $bundle_of . ' display')) { + $operations['manage-display'] = [ + 'title' => t('Manage display'), + 'weight' => 25, + 'url' => Url::fromRoute("entity.entity_view_display.{$bundle_of}.default", [ + $entity->getEntityTypeId() => $entity->id(), + ]), + ]; + } + } + return $operations; + } + + /** + * Implements hook_entity_view_mode_presave(). + */ + #[Hook('entity_view_mode_presave')] + public function entityViewModePresave(EntityViewModeInterface $view_mode) { + \Drupal::service('router.builder')->setRebuildNeeded(); + } + + /** + * Implements hook_entity_form_mode_presave(). + */ + #[Hook('entity_form_mode_presave')] + public function entityFormModePresave(EntityFormModeInterface $form_mode) { + \Drupal::service('router.builder')->setRebuildNeeded(); + } + + /** + * Implements hook_entity_view_mode_delete(). + */ + #[Hook('entity_view_mode_delete')] + public function entityViewModeDelete(EntityViewModeInterface $view_mode) { + \Drupal::service('router.builder')->setRebuildNeeded(); + } + + /** + * Implements hook_entity_form_mode_delete(). + */ + #[Hook('entity_form_mode_delete')] + public function entityFormModeDelete(EntityFormModeInterface $form_mode) { + \Drupal::service('router.builder')->setRebuildNeeded(); + } + + /** + * Implements hook_local_tasks_alter(). + */ + #[Hook('local_tasks_alter')] + public function localTasksAlter(&$local_tasks) { + $container = \Drupal::getContainer(); + $local_task = FieldUiLocalTask::create($container, 'field_ui.fields'); + $local_task->alterLocalTasks($local_tasks); + } + + /** + * Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'. + */ + #[Hook('form_field_ui_field_storage_add_form_alter')] + public function formFieldUiFieldStorageAddFormAlter(array &$form) : void { + $optgroup = (string) t('Reference'); + // Move the "Entity reference" option to the end of the list and rename it to + // "Other". + unset($form['add']['new_storage_type']['#options'][$optgroup]['entity_reference']); + $form['add']['new_storage_type']['#options'][$optgroup]['entity_reference'] = t('Other…'); + } + + /** + * Implements hook_form_alter(). + * + * Adds a button 'Save and manage fields' to forms. + * + * @see \Drupal\node\NodeTypeForm + * @see \Drupal\comment\CommentTypeForm + * @see \Drupal\media\MediaTypeForm + * @see \Drupal\block_content\BlockContentTypeForm + * @see field_ui_form_manage_field_form_submit() + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $forms = [ + 'node_type_add_form', + 'comment_type_add_form', + 'media_type_add_form', + 'block_content_type_add_form', + ]; + if (!in_array($form_id, $forms)) { + return; + } + if ($form_state->getFormObject()->getEntity()->isNew()) { + $form['actions']['save_continue'] = $form['actions']['submit']; + unset($form['actions']['submit']['#button_type']); + $form['actions']['save_continue']['#value'] = t('Save and manage fields'); + $form['actions']['save_continue']['#weight'] = $form['actions']['save_continue']['#weight'] - 5; + $form['actions']['save_continue']['#submit'][] = 'field_ui_form_manage_field_form_submit'; + } + } + +} diff --git a/core/modules/field_ui/tests/modules/field_ui_test/field_ui_test.module b/core/modules/field_ui/tests/modules/field_ui_test/field_ui_test.module index fe39a1f08b2417a2a9898ff3d91ef19a3d78c1fe..5da81c7ab5f72432b9d388fd47981aa3a0e8c7fe 100644 --- a/core/modules/field_ui/tests/modules/field_ui_test/field_ui_test.module +++ b/core/modules/field_ui/tests/modules/field_ui_test/field_ui_test.module @@ -7,64 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Render\Element; -use Drupal\Core\Field\FieldConfigInterface; - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function field_ui_test_field_config_access(FieldConfigInterface $field) { - return AccessResult::forbiddenIf($field->getName() == 'highlander'); -} - -/** - * Implements hook_form_FORM_BASE_ID_alter(). - */ -function field_ui_test_form_entity_view_display_edit_form_alter(&$form, FormStateInterface $form_state) { - $table = &$form['fields']; - - foreach (Element::children($table) as $name) { - $table[$name]['parent_wrapper']['parent']['#options'] = ['indent' => 'Indent']; - $table[$name]['parent_wrapper']['parent']['#default_value'] = 'indent'; - } - - $table['indent'] = [ - '#attributes' => ['class' => ['draggable', 'field-group'], 'id' => 'indent-id'], - '#row_type' => 'group', - '#region_callback' => 'field_ui_test_region_callback', - '#js_settings' => ['rowHandler' => 'group'], - 'human_name' => [ - '#markup' => 'Indent', - '#prefix' => '<span class="group-label">', - '#suffix' => '</span>', - ], - 'weight' => [ - '#type' => 'textfield', - '#default_value' => 0, - '#size' => 3, - '#attributes' => ['class' => ['field-weight']], - ], - 'parent_wrapper' => [ - 'parent' => [ - '#type' => 'select', - '#options' => ['indent' => 'Indent'], - '#empty_value' => '', - '#default_value' => '', - '#attributes' => ['class' => ['field-parent']], - '#parents' => ['fields', 'indent', 'parent'], - ], - 'hidden_name' => [ - '#type' => 'hidden', - '#default_value' => 'indent', - '#attributes' => ['class' => ['field-name']], - ], - ], - ]; - -} - function field_ui_test_region_callback($row) { return 'content'; } diff --git a/core/modules/field_ui/tests/modules/field_ui_test/src/Hook/FieldUiTestHooks.php b/core/modules/field_ui/tests/modules/field_ui_test/src/Hook/FieldUiTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9aa01810a0872bee1c2ffcfcac5ef90c0d6fed87 --- /dev/null +++ b/core/modules/field_ui/tests/modules/field_ui_test/src/Hook/FieldUiTestHooks.php @@ -0,0 +1,96 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_ui_test\Hook; + +use Drupal\Core\Render\Element; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_ui_test. + */ +class FieldUiTestHooks { + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('field_config_access')] + public function fieldConfigAccess(FieldConfigInterface $field) { + return AccessResult::forbiddenIf($field->getName() == 'highlander'); + } + + /** + * Implements hook_form_FORM_BASE_ID_alter(). + */ + #[Hook('form_entity_view_display_edit_form_alter')] + public function formEntityViewDisplayEditFormAlter(&$form, FormStateInterface $form_state) : void { + $table =& $form['fields']; + foreach (Element::children($table) as $name) { + $table[$name]['parent_wrapper']['parent']['#options'] = ['indent' => 'Indent']; + $table[$name]['parent_wrapper']['parent']['#default_value'] = 'indent'; + } + $table['indent'] = [ + '#attributes' => [ + 'class' => [ + 'draggable', + 'field-group', + ], + 'id' => 'indent-id', + ], + '#row_type' => 'group', + '#region_callback' => 'field_ui_test_region_callback', + '#js_settings' => [ + 'rowHandler' => 'group', + ], + 'human_name' => [ + '#markup' => 'Indent', + '#prefix' => '<span class="group-label">', + '#suffix' => '</span>', + ], + 'weight' => [ + '#type' => 'textfield', + '#default_value' => 0, + '#size' => 3, + '#attributes' => [ + 'class' => [ + 'field-weight', + ], + ], + ], + 'parent_wrapper' => [ + 'parent' => [ + '#type' => 'select', + '#options' => [ + 'indent' => 'Indent', + ], + '#empty_value' => '', + '#default_value' => '', + '#attributes' => [ + 'class' => [ + 'field-parent', + ], + ], + '#parents' => [ + 'fields', + 'indent', + 'parent', + ], + ], + 'hidden_name' => [ + '#type' => 'hidden', + '#default_value' => 'indent', + '#attributes' => [ + 'class' => [ + 'field-name', + ], + ], + ], + ], + ]; + } + +} diff --git a/core/modules/field_ui/tests/modules/field_ui_test_deprecated/field_ui_test_deprecated.module b/core/modules/field_ui/tests/modules/field_ui_test_deprecated/field_ui_test_deprecated.module deleted file mode 100644 index 15d5a55bc51de6da121120b63d27611291666c24..0000000000000000000000000000000000000000 --- a/core/modules/field_ui/tests/modules/field_ui_test_deprecated/field_ui_test_deprecated.module +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @file - * Field UI test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Form\FormStateInterface; -use Drupal\field\FieldStorageConfigInterface; -use Drupal\field_ui\Form\FieldStorageConfigEditForm; - -/** - * Implements hook_form_FORM_ID_alter() for field_storage_config_edit_form. - */ -function field_ui_test_deprecated_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) { - if (!($form_state->getFormObject() instanceof FieldStorageConfigEditForm)) { - throw new \LogicException('field_storage_config_edit_form() expects to get access to the field storage config entity edit form.'); - } - if (!($form_state->getFormObject()->getEntity() instanceof FieldStorageConfigInterface)) { - throw new \LogicException('field_storage_config_edit_form() expects to get access to the field storage config entity.'); - } - if (!isset($form['cardinality_container']['cardinality'])) { - throw new \LogicException('field_storage_config_edit_form() expects to that the cardinality container with the cardinality form element exists.'); - } - - $form['cardinality_container']['hello'] = [ - '#markup' => 'Greetings from the field_storage_config_edit_form() alter.', - ]; -} diff --git a/core/modules/field_ui/tests/modules/field_ui_test_deprecated/src/Hook/FieldUiTestDeprecatedHooks.php b/core/modules/field_ui/tests/modules/field_ui_test_deprecated/src/Hook/FieldUiTestDeprecatedHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b346894693a3ec5028ad7e70e8a9a21a8f115134 --- /dev/null +++ b/core/modules/field_ui/tests/modules/field_ui_test_deprecated/src/Hook/FieldUiTestDeprecatedHooks.php @@ -0,0 +1,34 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\field_ui_test_deprecated\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\field_ui\Form\FieldStorageConfigEditForm; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for field_ui_test_deprecated. + */ +class FieldUiTestDeprecatedHooks { + + /** + * Implements hook_form_FORM_ID_alter() for field_storage_config_edit_form. + */ + #[Hook('form_field_storage_config_edit_form_alter')] + public function formFieldStorageConfigEditFormAlter(&$form, FormStateInterface $form_state) : void { + if (!$form_state->getFormObject() instanceof FieldStorageConfigEditForm) { + throw new \LogicException('field_storage_config_edit_form() expects to get access to the field storage config entity edit form.'); + } + if (!$form_state->getFormObject()->getEntity() instanceof FieldStorageConfigInterface) { + throw new \LogicException('field_storage_config_edit_form() expects to get access to the field storage config entity.'); + } + if (!isset($form['cardinality_container']['cardinality'])) { + throw new \LogicException('field_storage_config_edit_form() expects to that the cardinality container with the cardinality form element exists.'); + } + $form['cardinality_container']['hello'] = ['#markup' => 'Greetings from the field_storage_config_edit_form() alter.']; + } + +} diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php index 58ba84240b8807b07fed026e5e9cab11d0389fca..97f3784c3800ed467ce8ffda47238cad2a71c5b6 100644 --- a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php +++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php @@ -38,7 +38,7 @@ public function testCRUDFields(): void { * @param string $type * (optional) The name of a content type. */ - protected function manageFieldsPage($type = '') { + protected function manageFieldsPage($type = ''): void { $type = empty($type) ? $this->contentType : $type; $this->drupalGet('admin/structure/types/manage/' . $type . '/fields'); // Check all table columns. @@ -80,7 +80,7 @@ protected function manageFieldsPage($type = '') { * @todo Assert properties can be set in the form and read back in * $field_storage and $fields. */ - protected function createField() { + protected function createField(): void { // Create a test field. $this->fieldUIAddNewField('admin/structure/types/manage/' . $this->contentType, $this->fieldNameInput, $this->fieldLabel); } @@ -88,7 +88,7 @@ protected function createField() { /** * Tests editing an existing field. */ - protected function updateField() { + protected function updateField(): void { $field_id = 'node.' . $this->contentType . '.' . $this->fieldName; // Go to the field edit page. $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id); @@ -113,7 +113,7 @@ protected function updateField() { /** * Tests adding an existing field in another content type. */ - protected function addExistingField() { + protected function addExistingField(): void { // Check "Re-use existing field" appears. $this->drupalGet('admin/structure/types/manage/page/fields'); $this->assertSession()->pageTextContains('Re-use an existing field'); @@ -134,7 +134,7 @@ protected function addExistingField() { * We do not test if the number can be submitted with anything else than a * numeric value. That is tested already in FormTest::testNumber(). */ - protected function cardinalitySettings() { + protected function cardinalitySettings(): void { $field_edit_path = 'admin/structure/types/manage/article/fields/node.article.body'; // Assert the cardinality other field cannot be empty when cardinality is @@ -264,7 +264,7 @@ protected function cardinalitySettings() { /** * Tests deleting a field from the field edit form. */ - protected function deleteField() { + protected function deleteField(): void { // Delete the field. $field_id = 'node.' . $this->contentType . '.' . $this->fieldName; $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id); @@ -275,7 +275,7 @@ protected function deleteField() { /** * Tests that persistent field storage appears in the field UI. */ - protected function addPersistentFieldStorage() { + protected function addPersistentFieldStorage(): void { $field_storage = FieldStorageConfig::loadByName('node', $this->fieldName); // Persist the field storage even if there are no fields. $field_storage->set('persist_with_no_fields', TRUE)->save(); @@ -323,7 +323,7 @@ protected function assertFieldSettings(string $bundle, string $field_name, strin /** * Tests that the field list administration page operates correctly. */ - protected function fieldListAdminPage() { + protected function fieldListAdminPage(): void { $this->drupalGet('admin/reports/fields'); $this->assertSession()->pageTextContains($this->fieldName); $this->assertSession()->linkByHrefExists('admin/structure/types/manage/' . $this->contentType . '/fields'); diff --git a/core/modules/file/file.api.php b/core/modules/file/file.api.php index 25d682a0e82e894c3f8a0643d1f2b766852c1783..fe7aa535ab620613d5b594c194caf59fbf36d8ad 100644 --- a/core/modules/file/file.api.php +++ b/core/modules/file/file.api.php @@ -1,5 +1,11 @@ <?php +/** + * @file + */ + +use Drupal\file\FileInterface; + /** * @file * Hooks for file module. @@ -69,7 +75,7 @@ * * @see \Drupal\file\FileRepositoryInterface::copy() */ -function hook_file_copy(\Drupal\file\FileInterface $file, \Drupal\file\FileInterface $source) { +function hook_file_copy(FileInterface $file, FileInterface $source) { // Make sure that the file name starts with the owner's user name. if (!str_starts_with($file->getFilename(), $file->getOwner()->name)) { $file->setFilename($file->getOwner()->name . '_' . $file->getFilename()); @@ -89,7 +95,7 @@ function hook_file_copy(\Drupal\file\FileInterface $file, \Drupal\file\FileInter * * @see \Drupal\file\FileRepositoryInterface::move() */ -function hook_file_move(\Drupal\file\FileInterface $file, \Drupal\file\FileInterface $source) { +function hook_file_move(FileInterface $file, FileInterface $source) { // Make sure that the file name starts with the owner's user name. if (!str_starts_with($file->getFilename(), $file->getOwner()->name)) { $file->setFilename($file->getOwner()->name . '_' . $file->getFilename()); diff --git a/core/modules/file/file.install b/core/modules/file/file.install index 7745a54041fcf9573fa658c566bd621412b34b35..cc816f6ec00cd946f4acb862a0ed73dcdcc83a92 100644 --- a/core/modules/file/file.install +++ b/core/modules/file/file.install @@ -108,6 +108,6 @@ function file_requirements($phase) { /** * Implements hook_update_last_removed(). */ -function file_update_last_removed() { +function file_update_last_removed(): int { return 8700; } diff --git a/core/modules/file/file.module b/core/modules/file/file.module index c666a97ce93fa4077a78cc0a4133d805a26d063b..9ade447d83eb4fe9bbb3815f16b294eb1e38553b 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -2,11 +2,9 @@ /** * @file - * Defines a "managed_file" Form API field and a "file" field for Field module. */ use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldFilteredMarkup; @@ -20,55 +18,13 @@ use Drupal\Core\Link; use Drupal\Core\Lock\LockAcquiringException; use Drupal\Core\Messenger\MessengerInterface; -use Drupal\Core\Render\BubbleableMetadata; use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\StringTranslation\ByteSizeMarkup; use Drupal\Core\Template\Attribute; -use Drupal\Core\Url; -use Drupal\file\Entity\File; use Drupal\file\FileInterface; use Drupal\file\IconMimeTypes; use Drupal\file\Upload\FormUploadedFile; -// cspell:ignore widthx - -/** - * Implements hook_help(). - */ -function file_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.file': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The File module allows you to create fields that contain files. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":file_documentation">online documentation for the File module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':file_documentation' => 'https://www.drupal.org/documentation/modules/file']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying file fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the file field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Allowing file extensions') . '</dt>'; - $output .= '<dd>' . t('In the field settings, you can define the allowed file extensions (for example <em>pdf docx psd</em>) for the files that will be uploaded with the file field.') . '</dd>'; - $output .= '<dt>' . t('Storing files') . '</dt>'; - $output .= '<dd>' . t('Uploaded files can either be stored as <em>public</em> or <em>private</em>, depending on the <a href=":file-system">File system settings</a>. For more information, see the <a href=":system-help">System module help page</a>.', [':file-system' => Url::fromRoute('system.file_system_settings')->toString(), ':system-help' => Url::fromRoute('help.page', ['name' => 'system'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Restricting the maximum file size') . '</dt>'; - $output .= '<dd>' . t('The maximum file size that users can upload is limited by PHP settings of the server, but you can restrict by entering the desired value as the <em>Maximum upload size</em> setting. The maximum file size is automatically displayed to users in the help text of the file field.') . '</dd>'; - $output .= '<dt>' . t('Displaying files and descriptions') . '<dt>'; - $output .= '<dd>' . t('In the field settings, you can allow users to toggle whether individual files are displayed. In the display settings, you can then choose one of the following formats: <ul><li><em>Generic file</em> displays links to the files and adds icons that symbolize the file extensions. If <em>descriptions</em> are enabled and have been submitted, then the description is displayed instead of the file name.</li><li><em>URL to file</em> displays the full path to the file as plain text.</li><li><em>Table of files</em> lists links to the files and the file sizes in a table.</li><li><em>RSS enclosure</em> only displays the first file, and only in a RSS feed, formatted according to the RSS 2.0 syntax for enclosures.</li></ul> A file can still be linked to directly by its URI even if it is not displayed.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_field_widget_info_alter(). - */ -function file_field_widget_info_alter(array &$info) { - // Allows using the 'uri' widget for the 'file_uri' field type, which uses it - // as the default widget. - // @see \Drupal\file\Plugin\Field\FieldType\FileUriItem - $info['uri']['field_types'][] = 'file_uri'; -} - /** * Examines a file entity and returns appropriate content headers for download. * @@ -87,122 +43,6 @@ function file_get_content_headers(FileInterface $file) { ]; } -/** - * Implements hook_theme(). - */ -function file_theme() { - return [ - // From file.module. - 'file_link' => [ - 'variables' => ['file' => NULL, 'description' => NULL, 'attributes' => []], - ], - 'file_managed_file' => [ - 'render element' => 'element', - ], - 'file_audio' => [ - 'variables' => ['files' => [], 'attributes' => NULL], - ], - 'file_video' => [ - 'variables' => ['files' => [], 'attributes' => NULL], - ], - 'file_widget_multiple' => [ - 'render element' => 'element', - ], - 'file_upload_help' => [ - 'variables' => ['description' => NULL, 'upload_validators' => NULL, 'cardinality' => NULL], - ], - ]; -} - -/** - * Implements hook_file_download(). - */ -function file_file_download($uri) { - // Get the file record based on the URI. If not in the database just return. - /** @var \Drupal\file\FileRepositoryInterface $file_repository */ - $file_repository = \Drupal::service('file.repository'); - $file = $file_repository->loadByUri($uri); - if (!$file) { - return; - } - - // Find out if a temporary file is still used in the system. - if ($file->isTemporary()) { - $usage = \Drupal::service('file.usage')->listUsage($file); - if (empty($usage) && $file->getOwnerId() != \Drupal::currentUser()->id()) { - // Deny access to temporary files without usage that are not owned by the - // same user. This prevents the security issue that a private file that - // was protected by field permissions becomes available after its usage - // was removed and before it is actually deleted from the file system. - // Modules that depend on this behavior should make the file permanent - // instead. - return -1; - } - } - - // Find out which (if any) fields of this type contain the file. - $references = file_get_file_references($file, NULL, EntityStorageInterface::FIELD_LOAD_CURRENT, NULL); - - // Stop processing if there are no references in order to avoid returning - // headers for files controlled by other modules. Make an exception for - // temporary files where the host entity has not yet been saved (for example, - // an image preview on a node/add form) in which case, allow download by the - // file's owner. - if (empty($references) && ($file->isPermanent() || $file->getOwnerId() != \Drupal::currentUser()->id())) { - return; - } - - if (!$file->access('download')) { - return -1; - } - - // Access is granted. - $headers = file_get_content_headers($file); - return $headers; -} - -/** - * Implements hook_cron(). - */ -function file_cron() { - $age = \Drupal::config('system.file')->get('temporary_maximum_age'); - $file_storage = \Drupal::entityTypeManager()->getStorage('file'); - - /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */ - $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager'); - - // Only delete temporary files if older than $age. Note that automatic cleanup - // is disabled if $age set to 0. - if ($age) { - $fids = Drupal::entityQuery('file') - ->accessCheck(FALSE) - ->condition('status', FileInterface::STATUS_PERMANENT, '<>') - ->condition('changed', \Drupal::time()->getRequestTime() - $age, '<') - ->range(0, 100) - ->execute(); - $files = $file_storage->loadMultiple($fids); - foreach ($files as $file) { - $references = \Drupal::service('file.usage')->listUsage($file); - if (empty($references)) { - if (!file_exists($file->getFileUri())) { - if (!$stream_wrapper_manager->isValidUri($file->getFileUri())) { - \Drupal::logger('file system')->warning('Temporary file "%path" that was deleted during garbage collection did not exist on the filesystem. This could be caused by a missing stream wrapper.', ['%path' => $file->getFileUri()]); - } - else { - \Drupal::logger('file system')->warning('Temporary file "%path" that was deleted during garbage collection did not exist on the filesystem.', ['%path' => $file->getFileUri()]); - } - } - // Delete the file entity. If the file does not exist, this will - // generate a second notice in the watchdog. - $file->delete(); - } - else { - \Drupal::logger('file system')->info('Did not delete temporary file "%path" during garbage collection because it is in use by the following modules: %modules.', ['%path' => $file->getFileUri(), '%modules' => implode(', ', array_keys($references))]); - } - } - } -} - /** * Saves form file uploads. * @@ -438,164 +278,6 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL return isset($delta) ? $files[$delta] : $files; } -/** - * Implements hook_ENTITY_TYPE_predelete() for file entities. - */ -function file_file_predelete(File $file) { - // @todo Remove references to a file that is in-use. -} - -/** - * Implements hook_tokens(). - */ -function file_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $token_service = \Drupal::token(); - - $url_options = ['absolute' => TRUE]; - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = NULL; - } - - $replacements = []; - - if ($type == 'file' && !empty($data['file'])) { - /** @var \Drupal\file\FileInterface $file */ - $file = $data['file']; - - foreach ($tokens as $name => $original) { - switch ($name) { - // Basic keys and values. - case 'fid': - $replacements[$original] = $file->id(); - break; - - // Essential file data - case 'name': - $replacements[$original] = $file->getFilename(); - break; - - case 'path': - $replacements[$original] = $file->getFileUri(); - break; - - case 'mime': - $replacements[$original] = $file->getMimeType(); - break; - - case 'size': - $replacements[$original] = ByteSizeMarkup::create($file->getSize()); - break; - - case 'url': - // Ideally, this would use return a relative URL, but because tokens - // are also often used in emails, it's better to keep absolute file - // URLs. The 'url.site' cache context is associated to ensure the - // correct absolute URL is used in case of a multisite setup. - $replacements[$original] = $file->createFileUrl(FALSE); - $bubbleable_metadata->addCacheContexts(['url.site']); - break; - - // These tokens are default variations on the chained tokens handled below. - case 'created': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($file->getCreatedTime(), 'medium', '', NULL, $langcode); - break; - - case 'changed': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata = $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($file->getChangedTime(), 'medium', '', NULL, $langcode); - break; - - case 'owner': - $owner = $file->getOwner(); - $bubbleable_metadata->addCacheableDependency($owner); - $name = $owner->label(); - $replacements[$original] = $name; - break; - } - } - - if ($date_tokens = $token_service->findWithPrefix($tokens, 'created')) { - $replacements += $token_service->generate('date', $date_tokens, ['date' => $file->getCreatedTime()], $options, $bubbleable_metadata); - } - - if ($date_tokens = $token_service->findWithPrefix($tokens, 'changed')) { - $replacements += $token_service->generate('date', $date_tokens, ['date' => $file->getChangedTime()], $options, $bubbleable_metadata); - } - - if (($owner_tokens = $token_service->findWithPrefix($tokens, 'owner')) && $file->getOwner()) { - $replacements += $token_service->generate('user', $owner_tokens, ['user' => $file->getOwner()], $options, $bubbleable_metadata); - } - } - - return $replacements; -} - -/** - * Implements hook_token_info(). - */ -function file_token_info() { - $types['file'] = [ - 'name' => t("Files"), - 'description' => t("Tokens related to uploaded files."), - 'needs-data' => 'file', - ]; - - // File related tokens. - $file['fid'] = [ - 'name' => t("File ID"), - 'description' => t("The unique ID of the uploaded file."), - ]; - $file['name'] = [ - 'name' => t("File name"), - 'description' => t("The name of the file on disk."), - ]; - $file['path'] = [ - 'name' => t("Path"), - 'description' => t("The location of the file relative to Drupal root."), - ]; - $file['mime'] = [ - 'name' => t("MIME type"), - 'description' => t("The MIME type of the file."), - ]; - $file['size'] = [ - 'name' => t("File size"), - 'description' => t("The size of the file."), - ]; - $file['url'] = [ - 'name' => t("URL"), - 'description' => t("The web-accessible URL for the file."), - ]; - $file['created'] = [ - 'name' => t("Created"), - 'description' => t("The date the file created."), - 'type' => 'date', - ]; - $file['changed'] = [ - 'name' => t("Changed"), - 'description' => t("The date the file was most recently changed."), - 'type' => 'date', - ]; - $file['owner'] = [ - 'name' => t("Owner"), - 'description' => t("The user who originally uploaded the file."), - 'type' => 'user', - ]; - - return [ - 'types' => $types, - 'tokens' => [ - 'file' => $file, - ], - ]; -} - /** * Form submission handler for upload / remove buttons of managed_file elements. * @@ -1074,74 +756,6 @@ function file_field_find_file_reference_column(FieldDefinitionInterface $field) return FALSE; } -/** - * Implements hook_form_FORM_ID_alter(). - * - * Injects the file sanitization options into /admin/config/media/file-system. - * - * These settings are enforced during upload by the FileEventSubscriber that - * listens to the FileUploadSanitizeNameEvent event. - * - * @see \Drupal\system\Form\FileSystemForm - * @see \Drupal\Core\File\Event\FileUploadSanitizeNameEvent - * @see \Drupal\file\EventSubscriber\FileEventSubscriber - */ -function file_form_system_file_system_settings_alter(array &$form, FormStateInterface $form_state) { - $config = \Drupal::config('file.settings'); - $form['filename_sanitization'] = [ - '#type' => 'details', - '#title' => t('Sanitize filenames'), - '#description' => t('These settings only apply to new files as they are uploaded. Changes here do not affect existing file names.'), - '#open' => TRUE, - '#tree' => TRUE, - ]; - - $form['filename_sanitization']['replacement_character'] = [ - '#type' => 'select', - '#title' => t('Replacement character'), - '#default_value' => $config->get('filename_sanitization.replacement_character'), - '#options' => [ - '-' => t('Dash (-)'), - '_' => t('Underscore (_)'), - ], - '#description' => t('Used when replacing whitespace, replacing non-alphanumeric characters or transliterating unknown characters.'), - ]; - - $form['filename_sanitization']['transliterate'] = [ - '#type' => 'checkbox', - '#title' => t('Transliterate'), - '#default_value' => $config->get('filename_sanitization.transliterate'), - '#description' => t('Transliteration replaces any characters that are not alphanumeric, underscores, periods or hyphens with the replacement character. It ensures filenames only contain ASCII characters. It is recommended to keep transliteration enabled.'), - ]; - - $form['filename_sanitization']['replace_whitespace'] = [ - '#type' => 'checkbox', - '#title' => t('Replace whitespace with the replacement character'), - '#default_value' => $config->get('filename_sanitization.replace_whitespace'), - ]; - - $form['filename_sanitization']['replace_non_alphanumeric'] = [ - '#type' => 'checkbox', - '#title' => t('Replace non-alphanumeric characters with the replacement character'), - '#default_value' => $config->get('filename_sanitization.replace_non_alphanumeric'), - '#description' => t('Alphanumeric characters, dots <span aria-hidden="true">(.)</span>, underscores <span aria-hidden="true">(_)</span> and dashes <span aria-hidden="true">(-)</span> are preserved.'), - ]; - - $form['filename_sanitization']['deduplicate_separators'] = [ - '#type' => 'checkbox', - '#title' => t('Replace sequences of dots, underscores and/or dashes with the replacement character'), - '#default_value' => $config->get('filename_sanitization.deduplicate_separators'), - ]; - - $form['filename_sanitization']['lowercase'] = [ - '#type' => 'checkbox', - '#title' => t('Convert to lowercase'), - '#default_value' => $config->get('filename_sanitization.lowercase'), - ]; - - $form['#submit'][] = 'file_system_settings_submit'; -} - /** * Form submission handler for file system settings form. */ diff --git a/core/modules/file/file.post_update.php b/core/modules/file/file.post_update.php index 3d693cff1513eb1c87fd2d45f805e7ed8479610d..1c40f237edd1b7f69d9e2f3cc69318c0281d9f2b 100644 --- a/core/modules/file/file.post_update.php +++ b/core/modules/file/file.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function file_removed_post_updates() { +function file_removed_post_updates(): array { return [ 'file_post_update_add_txt_if_allows_insecure_extensions' => '10.0.0', 'file_post_update_add_permissions_to_roles' => '11.0.0', diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc deleted file mode 100644 index 666c7da49d83a9cd69b3c383e6cb4c1e1fd2b66c..0000000000000000000000000000000000000000 --- a/core/modules/file/file.views.inc +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/** - * @file - * Provide views data for file.module. - */ - -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_field_views_data(). - * - * Views integration for file fields. Adds a file relationship to the default - * field data. - * - * @see views_field_default_views_data() - */ -function file_field_views_data(FieldStorageConfigInterface $field_storage) { - $data = views_field_default_views_data($field_storage); - foreach ($data as $table_name => $table_data) { - // Add the relationship only on the fid field. - $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = [ - 'id' => 'standard', - 'base' => 'file_managed', - 'entity type' => 'file', - 'base field' => 'fid', - 'label' => t('file from @field_name', ['@field_name' => $field_storage->getName()]), - ]; - } - - return $data; -} - -/** - * Implements hook_field_views_data_views_data_alter(). - * - * Views integration to provide reverse relationships on file fields. - */ -function file_field_views_data_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) { - $entity_type_id = $field_storage->getTargetEntityTypeId(); - $entity_type_manager = \Drupal::entityTypeManager(); - $entity_type = $entity_type_manager->getDefinition($entity_type_id); - $field_name = $field_storage->getName(); - $pseudo_field_name = 'reverse_' . $field_name . '_' . $entity_type_id; - /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ - $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); - - [$label] = views_entity_field_label($entity_type_id, $field_name); - - $data['file_managed'][$pseudo_field_name]['relationship'] = [ - 'title' => t('@entity using @field', ['@entity' => $entity_type->getLabel(), '@field' => $label]), - 'label' => t('@field_name', ['@field_name' => $field_name]), - 'group' => $entity_type->getLabel(), - 'help' => t('Relate each @entity with a @field set to the file.', ['@entity' => $entity_type->getLabel(), '@field' => $label]), - 'id' => 'entity_reverse', - 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), - 'entity_type' => $entity_type_id, - 'base field' => $entity_type->getKey('id'), - 'field_name' => $field_name, - 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), - 'field field' => $field_name . '_target_id', - 'join_extra' => [ - 0 => [ - 'field' => 'deleted', - 'value' => 0, - 'numeric' => TRUE, - ], - ], - ]; -} diff --git a/core/modules/file/src/Entity/File.php b/core/modules/file/src/Entity/File.php index c7885e81f369ba92768ae7c3ccbe22efaeb4fc94..0022fec6add1d1137c844ae4391483a74b0626e1 100644 --- a/core/modules/file/src/Entity/File.php +++ b/core/modules/file/src/Entity/File.php @@ -2,6 +2,10 @@ namespace Drupal\file\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\ContentEntityDeleteForm; +use Drupal\Core\Entity\EntityListBuilder; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; @@ -9,50 +13,49 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\File\Exception\FileException; +use Drupal\file\FileAccessControlHandler; use Drupal\file\FileInterface; +use Drupal\file\FileStorage; +use Drupal\file\FileStorageSchema; +use Drupal\file\FileViewsData; use Drupal\user\EntityOwnerTrait; /** * Defines the file entity class. * * @ingroup file - * - * @ContentEntityType( - * id = "file", - * label = @Translation("File"), - * label_collection = @Translation("Files"), - * label_singular = @Translation("file"), - * label_plural = @Translation("files"), - * label_count = @PluralTranslation( - * singular = "@count file", - * plural = "@count files", - * ), - * handlers = { - * "storage" = "Drupal\file\FileStorage", - * "storage_schema" = "Drupal\file\FileStorageSchema", - * "access" = "Drupal\file\FileAccessControlHandler", - * "views_data" = "Drupal\file\FileViewsData", - * "list_builder" = "Drupal\Core\Entity\EntityListBuilder", - * "form" = { - * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm", - * }, - * "route_provider" = { - * "html" = "Drupal\file\Entity\FileRouteProvider", - * }, - * }, - * base_table = "file_managed", - * entity_keys = { - * "id" = "fid", - * "label" = "filename", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "owner" = "uid", - * }, - * links = { - * "delete-form" = "/file/{file}/delete", - * } - * ) */ +#[ContentEntityType( + id: 'file', + label: new TranslatableMarkup('File'), + label_collection: new TranslatableMarkup('Files'), + label_singular: new TranslatableMarkup('file'), + label_plural: new TranslatableMarkup('files'), + entity_keys: [ + 'id' => 'fid', + 'label' => 'filename', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'owner' => 'uid', + ], + handlers: [ + 'storage' => FileStorage::class, + 'storage_schema' => FileStorageSchema::class, + 'access' => FileAccessControlHandler::class, + 'views_data' => FileViewsData::class, + 'list_builder' => EntityListBuilder::class, + 'form' => ['delete' => ContentEntityDeleteForm::class], + 'route_provider' => ['html' => FileRouteProvider::class], + ], + links: [ + 'delete-form' => '/file/{file}/delete', + ], + base_table: 'file_managed', + label_count: [ + 'singular' => '@count file', + 'plural' => '@count files', + ], +)] class File extends ContentEntityBase implements FileInterface { use EntityChangedTrait; diff --git a/core/modules/file/src/Hook/FileHooks.php b/core/modules/file/src/Hook/FileHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ab503a227c1bf0a88a84ffe73d9ffd743b72a5db --- /dev/null +++ b/core/modules/file/src/Hook/FileHooks.php @@ -0,0 +1,402 @@ +<?php + +namespace Drupal\file\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\Core\StringTranslation\ByteSizeMarkup; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\file\Entity\File; +use Drupal\file\FileInterface; +use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for file. + */ +class FileHooks { + // cspell:ignore widthx + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.file': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The File module allows you to create fields that contain files. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":file_documentation">online documentation for the File module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':file_documentation' => 'https://www.drupal.org/documentation/modules/file', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying file fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the file field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Allowing file extensions') . '</dt>'; + $output .= '<dd>' . t('In the field settings, you can define the allowed file extensions (for example <em>pdf docx psd</em>) for the files that will be uploaded with the file field.') . '</dd>'; + $output .= '<dt>' . t('Storing files') . '</dt>'; + $output .= '<dd>' . t('Uploaded files can either be stored as <em>public</em> or <em>private</em>, depending on the <a href=":file-system">File system settings</a>. For more information, see the <a href=":system-help">System module help page</a>.', [ + ':file-system' => Url::fromRoute('system.file_system_settings')->toString(), + ':system-help' => Url::fromRoute('help.page', [ + 'name' => 'system', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Restricting the maximum file size') . '</dt>'; + $output .= '<dd>' . t('The maximum file size that users can upload is limited by PHP settings of the server, but you can restrict by entering the desired value as the <em>Maximum upload size</em> setting. The maximum file size is automatically displayed to users in the help text of the file field.') . '</dd>'; + $output .= '<dt>' . t('Displaying files and descriptions') . '<dt>'; + $output .= '<dd>' . t('In the field settings, you can allow users to toggle whether individual files are displayed. In the display settings, you can then choose one of the following formats: <ul><li><em>Generic file</em> displays links to the files and adds icons that symbolize the file extensions. If <em>descriptions</em> are enabled and have been submitted, then the description is displayed instead of the file name.</li><li><em>URL to file</em> displays the full path to the file as plain text.</li><li><em>Table of files</em> lists links to the files and the file sizes in a table.</li><li><em>RSS enclosure</em> only displays the first file, and only in a RSS feed, formatted according to the RSS 2.0 syntax for enclosures.</li></ul> A file can still be linked to directly by its URI even if it is not displayed.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_field_widget_info_alter(). + */ + #[Hook('field_widget_info_alter')] + public function fieldWidgetInfoAlter(array &$info) { + // Allows using the 'uri' widget for the 'file_uri' field type, which uses it + // as the default widget. + // @see \Drupal\file\Plugin\Field\FieldType\FileUriItem + $info['uri']['field_types'][] = 'file_uri'; + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + // From file.module. + 'file_link' => [ + 'variables' => [ + 'file' => NULL, + 'description' => NULL, + 'attributes' => [], + ], + ], + 'file_managed_file' => [ + 'render element' => 'element', + ], + 'file_audio' => [ + 'variables' => [ + 'files' => [], + 'attributes' => NULL, + ], + ], + 'file_video' => [ + 'variables' => [ + 'files' => [], + 'attributes' => NULL, + ], + ], + 'file_widget_multiple' => [ + 'render element' => 'element', + ], + 'file_upload_help' => [ + 'variables' => [ + 'description' => NULL, + 'upload_validators' => NULL, + 'cardinality' => NULL, + ], + ], + ]; + } + + /** + * Implements hook_file_download(). + */ + #[Hook('file_download')] + public function fileDownload($uri) { + // Get the file record based on the URI. If not in the database just return. + /** @var \Drupal\file\FileRepositoryInterface $file_repository */ + $file_repository = \Drupal::service('file.repository'); + $file = $file_repository->loadByUri($uri); + if (!$file) { + return; + } + // Find out if a temporary file is still used in the system. + if ($file->isTemporary()) { + $usage = \Drupal::service('file.usage')->listUsage($file); + if (empty($usage) && $file->getOwnerId() != \Drupal::currentUser()->id()) { + // Deny access to temporary files without usage that are not owned by the + // same user. This prevents the security issue that a private file that + // was protected by field permissions becomes available after its usage + // was removed and before it is actually deleted from the file system. + // Modules that depend on this behavior should make the file permanent + // instead. + return -1; + } + } + // Find out which (if any) fields of this type contain the file. + $references = file_get_file_references($file, NULL, EntityStorageInterface::FIELD_LOAD_CURRENT, NULL); + // Stop processing if there are no references in order to avoid returning + // headers for files controlled by other modules. Make an exception for + // temporary files where the host entity has not yet been saved (for example, + // an image preview on a node/add form) in which case, allow download by the + // file's owner. + if (empty($references) && ($file->isPermanent() || $file->getOwnerId() != \Drupal::currentUser()->id())) { + return; + } + if (!$file->access('download')) { + return -1; + } + // Access is granted. + $headers = file_get_content_headers($file); + return $headers; + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + $age = \Drupal::config('system.file')->get('temporary_maximum_age'); + $file_storage = \Drupal::entityTypeManager()->getStorage('file'); + /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */ + $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager'); + // Only delete temporary files if older than $age. Note that automatic cleanup + // is disabled if $age set to 0. + if ($age) { + $fids = \Drupal::entityQuery('file')->accessCheck(FALSE)->condition('status', FileInterface::STATUS_PERMANENT, '<>')->condition('changed', \Drupal::time()->getRequestTime() - $age, '<')->range(0, 100)->execute(); + $files = $file_storage->loadMultiple($fids); + foreach ($files as $file) { + $references = \Drupal::service('file.usage')->listUsage($file); + if (empty($references)) { + if (!file_exists($file->getFileUri())) { + if (!$stream_wrapper_manager->isValidUri($file->getFileUri())) { + \Drupal::logger('file system')->warning('Temporary file "%path" that was deleted during garbage collection did not exist on the filesystem. This could be caused by a missing stream wrapper.', ['%path' => $file->getFileUri()]); + } + else { + \Drupal::logger('file system')->warning('Temporary file "%path" that was deleted during garbage collection did not exist on the filesystem.', ['%path' => $file->getFileUri()]); + } + } + // Delete the file entity. If the file does not exist, this will + // generate a second notice in the watchdog. + $file->delete(); + } + else { + \Drupal::logger('file system')->info('Did not delete temporary file "%path" during garbage collection because it is in use by the following modules: %modules.', [ + '%path' => $file->getFileUri(), + '%modules' => implode(', ', array_keys($references)), + ]); + } + } + } + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for file entities. + */ + #[Hook('file_predelete')] + public function filePredelete(File $file) { + // @todo Remove references to a file that is in-use. + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + $url_options = ['absolute' => TRUE]; + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = NULL; + } + $replacements = []; + if ($type == 'file' && !empty($data['file'])) { + /** @var \Drupal\file\FileInterface $file */ + $file = $data['file']; + foreach ($tokens as $name => $original) { + switch ($name) { + // Basic keys and values. + case 'fid': + $replacements[$original] = $file->id(); + break; + + case 'uuid': + $replacements[$original] = $file->uuid(); + break; + + // Essential file data + case 'name': + $replacements[$original] = $file->getFilename(); + break; + + case 'path': + $replacements[$original] = $file->getFileUri(); + break; + + case 'mime': + $replacements[$original] = $file->getMimeType(); + break; + + case 'size': + $replacements[$original] = ByteSizeMarkup::create($file->getSize()); + break; + + case 'url': + // Ideally, this would use return a relative URL, but because tokens + // are also often used in emails, it's better to keep absolute file + // URLs. The 'url.site' cache context is associated to ensure the + // correct absolute URL is used in case of a multisite setup. + $replacements[$original] = $file->createFileUrl(FALSE); + $bubbleable_metadata->addCacheContexts(['url.site']); + break; + + // These tokens are default variations on the chained tokens handled below. + case 'created': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($file->getCreatedTime(), 'medium', '', NULL, $langcode); + break; + + case 'changed': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata = $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($file->getChangedTime(), 'medium', '', NULL, $langcode); + break; + + case 'owner': + $owner = $file->getOwner(); + $bubbleable_metadata->addCacheableDependency($owner); + $name = $owner->label(); + $replacements[$original] = $name; + break; + } + } + if ($date_tokens = $token_service->findWithPrefix($tokens, 'created')) { + $replacements += $token_service->generate('date', $date_tokens, ['date' => $file->getCreatedTime()], $options, $bubbleable_metadata); + } + if ($date_tokens = $token_service->findWithPrefix($tokens, 'changed')) { + $replacements += $token_service->generate('date', $date_tokens, ['date' => $file->getChangedTime()], $options, $bubbleable_metadata); + } + if (($owner_tokens = $token_service->findWithPrefix($tokens, 'owner')) && $file->getOwner()) { + $replacements += $token_service->generate('user', $owner_tokens, ['user' => $file->getOwner()], $options, $bubbleable_metadata); + } + } + return $replacements; + } + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $types['file'] = [ + 'name' => t("Files"), + 'description' => t("Tokens related to uploaded files."), + 'needs-data' => 'file', + ]; + // File related tokens. + $file['fid'] = [ + 'name' => t("File ID"), + 'description' => t("The unique ID of the uploaded file."), + ]; + $file['uuid'] = ['name' => t('UUID'), 'description' => t('The UUID of the uploaded file.')]; + $file['name'] = ['name' => t("File name"), 'description' => t("The name of the file on disk.")]; + $file['path'] = [ + 'name' => t("Path"), + 'description' => t("The location of the file relative to Drupal root."), + ]; + $file['mime'] = ['name' => t("MIME type"), 'description' => t("The MIME type of the file.")]; + $file['size'] = ['name' => t("File size"), 'description' => t("The size of the file.")]; + $file['url'] = ['name' => t("URL"), 'description' => t("The web-accessible URL for the file.")]; + $file['created'] = [ + 'name' => t("Created"), + 'description' => t("The date the file created."), + 'type' => 'date', + ]; + $file['changed'] = [ + 'name' => t("Changed"), + 'description' => t("The date the file was most recently changed."), + 'type' => 'date', + ]; + $file['owner'] = [ + 'name' => t("Owner"), + 'description' => t("The user who originally uploaded the file."), + 'type' => 'user', + ]; + return ['types' => $types, 'tokens' => ['file' => $file]]; + } + + /** + * Implements hook_form_FORM_ID_alter(). + * + * Injects the file sanitization options into /admin/config/media/file-system. + * + * These settings are enforced during upload by the FileEventSubscriber that + * listens to the FileUploadSanitizeNameEvent event. + * + * @see \Drupal\system\Form\FileSystemForm + * @see \Drupal\Core\File\Event\FileUploadSanitizeNameEvent + * @see \Drupal\file\EventSubscriber\FileEventSubscriber + */ + #[Hook('form_system_file_system_settings_alter')] + public function formSystemFileSystemSettingsAlter(array &$form, FormStateInterface $form_state) : void { + $config = \Drupal::config('file.settings'); + $form['filename_sanitization'] = [ + '#type' => 'details', + '#title' => t('Sanitize filenames'), + '#description' => t('These settings only apply to new files as they are uploaded. Changes here do not affect existing file names.'), + '#open' => TRUE, + '#tree' => TRUE, + ]; + $form['filename_sanitization']['replacement_character'] = [ + '#type' => 'select', + '#title' => t('Replacement character'), + '#default_value' => $config->get('filename_sanitization.replacement_character'), + '#options' => [ + '-' => t('Dash (-)'), + '_' => t('Underscore (_)'), + ], + '#description' => t('Used when replacing whitespace, replacing non-alphanumeric characters or transliterating unknown characters.'), + ]; + $form['filename_sanitization']['transliterate'] = [ + '#type' => 'checkbox', + '#title' => t('Transliterate'), + '#default_value' => $config->get('filename_sanitization.transliterate'), + '#description' => t('Transliteration replaces any characters that are not alphanumeric, underscores, periods or hyphens with the replacement character. It ensures filenames only contain ASCII characters. It is recommended to keep transliteration enabled.'), + ]; + $form['filename_sanitization']['replace_whitespace'] = [ + '#type' => 'checkbox', + '#title' => t('Replace whitespace with the replacement character'), + '#default_value' => $config->get('filename_sanitization.replace_whitespace'), + ]; + $form['filename_sanitization']['replace_non_alphanumeric'] = [ + '#type' => 'checkbox', + '#title' => t('Replace non-alphanumeric characters with the replacement character'), + '#default_value' => $config->get('filename_sanitization.replace_non_alphanumeric'), + '#description' => t('Alphanumeric characters, dots <span aria-hidden="true">(.)</span>, underscores <span aria-hidden="true">(_)</span> and dashes <span aria-hidden="true">(-)</span> are preserved.'), + ]; + $form['filename_sanitization']['deduplicate_separators'] = [ + '#type' => 'checkbox', + '#title' => t('Replace sequences of dots, underscores and/or dashes with the replacement character'), + '#default_value' => $config->get('filename_sanitization.deduplicate_separators'), + ]; + $form['filename_sanitization']['lowercase'] = [ + '#type' => 'checkbox', + '#title' => t('Convert to lowercase'), + '#default_value' => $config->get('filename_sanitization.lowercase'), + ]; + $form['#submit'][] = 'file_system_settings_submit'; + } + +} diff --git a/core/modules/file/src/Hook/FileViewsHooks.php b/core/modules/file/src/Hook/FileViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b2582a1086d8e93d2ceb9c1f3b057b76786c13f8 --- /dev/null +++ b/core/modules/file/src/Hook/FileViewsHooks.php @@ -0,0 +1,84 @@ +<?php + +namespace Drupal\file\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for file. + */ +class FileViewsHooks { + + /** + * Implements hook_field_views_data(). + * + * Views integration for file fields. Adds a file relationship to the default + * field data. + * + * @see views_field_default_views_data() + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + $data = views_field_default_views_data($field_storage); + foreach ($data as $table_name => $table_data) { + // Add the relationship only on the fid field. + $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = [ + 'id' => 'standard', + 'base' => 'file_managed', + 'entity type' => 'file', + 'base field' => 'fid', + 'label' => t('file from @field_name', [ + '@field_name' => $field_storage->getName(), + ]), + ]; + } + return $data; + } + + /** + * Implements hook_field_views_data_views_data_alter(). + * + * Views integration to provide reverse relationships on file fields. + */ + #[Hook('field_views_data_views_data_alter')] + public function fieldViewsDataViewsDataAlter(array &$data, FieldStorageConfigInterface $field_storage) { + $entity_type_id = $field_storage->getTargetEntityTypeId(); + $entity_type_manager = \Drupal::entityTypeManager(); + $entity_type = $entity_type_manager->getDefinition($entity_type_id); + $field_name = $field_storage->getName(); + $pseudo_field_name = 'reverse_' . $field_name . '_' . $entity_type_id; + /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ + $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); + [$label] = views_entity_field_label($entity_type_id, $field_name); + $data['file_managed'][$pseudo_field_name]['relationship'] = [ + 'title' => t('@entity using @field', [ + '@entity' => $entity_type->getLabel(), + '@field' => $label, + ]), + 'label' => t('@field_name', [ + '@field_name' => $field_name, + ]), + 'group' => $entity_type->getLabel(), + 'help' => t('Relate each @entity with a @field set to the file.', [ + '@entity' => $entity_type->getLabel(), + '@field' => $label, + ]), + 'id' => 'entity_reverse', + 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), + 'entity_type' => $entity_type_id, + 'base field' => $entity_type->getKey('id'), + 'field_name' => $field_name, + 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), + 'field field' => $field_name . '_target_id', + 'join_extra' => [ + 0 => [ + 'field' => 'deleted', + 'value' => 0, + 'numeric' => TRUE, + ], + ], + ]; + } + +} diff --git a/core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php b/core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php index e373dfbf2013c34c3e836f2fba4d4af30875b973..311b85ca7fa4f3bb516861a065734e05721a9a70 100644 --- a/core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php +++ b/core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php @@ -26,7 +26,7 @@ abstract class BaseFieldFileFormatterBase extends FormatterBase { * Constructs a BaseFieldFileFormatterBase object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/file/src/Plugin/views/field/File.php b/core/modules/file/src/Plugin/views/field/File.php index 12e01ce1d04d71aa8e8ed2cddfb6fc8096ebb253..4d135d20c91e84d540d38b79499389ff62943651 100644 --- a/core/modules/file/src/Plugin/views/field/File.php +++ b/core/modules/file/src/Plugin/views/field/File.php @@ -32,7 +32,7 @@ class File extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module index e4dc10a2fdfe7bd1851b38d1cf3181f7a2615799..4aa4116762c35322ff1bcca5600b40b124a2d9f1 100644 --- a/core/modules/file/tests/file_test/file_test.module +++ b/core/modules/file/tests/file_test/file_test.module @@ -12,6 +12,8 @@ use Drupal\file\Entity\File; +// cspell:ignore garply tarz + const FILE_URL_TEST_CDN_1 = 'http://cdn1.example.com'; const FILE_URL_TEST_CDN_2 = 'http://cdn2.example.com'; @@ -129,178 +131,6 @@ function file_test_set_return($op, $value) { \Drupal::state()->set('file_test.return', $return); } -/** - * Implements hook_ENTITY_TYPE_load() for file entities. - */ -function file_test_file_load($files) { - foreach ($files as $file) { - _file_test_log_call('load', [$file->id()]); - // Assign a value on the object so that we can test that the $file is passed - // by reference. - $file->file_test['loaded'] = TRUE; - } -} - -/** - * Implements hook_file_download(). - */ -function file_test_file_download($uri) { - if (\Drupal::state()->get('file_test.allow_all', FALSE)) { - $files = \Drupal::entityTypeManager()->getStorage('file')->loadByProperties(['uri' => $uri]); - $file = reset($files); - return file_get_content_headers($file); - } - _file_test_log_call('download', [$uri]); - return _file_test_get_return('download'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for file entities. - */ -function file_test_file_insert(File $file) { - _file_test_log_call('insert', [$file->id()]); -} - -/** - * Implements hook_ENTITY_TYPE_update() for file entities. - */ -function file_test_file_update(File $file) { - _file_test_log_call('update', [$file->id()]); -} - -/** - * Implements hook_file_copy(). - */ -function file_test_file_copy(File $file, $source) { - _file_test_log_call('copy', [$file->id(), $source->id()]); -} - -/** - * Implements hook_file_move(). - */ -function file_test_file_move(File $file, File $source) { - _file_test_log_call('move', [$file->id(), $source->id()]); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for file entities. - */ -function file_test_file_predelete(File $file) { - _file_test_log_call('delete', [$file->id()]); -} - -/** - * Implements hook_file_url_alter(). - */ -function file_test_file_url_alter(&$uri) { - /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */ - $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager'); - - // Only run this hook when this variable is set. Otherwise, we'd have to add - // another hidden test module just for this hook. - $alter_mode = \Drupal::state()->get('file_test.hook_file_url_alter'); - if (!$alter_mode) { - return; - } - // Test alteration of file URLs to use a CDN. - elseif ($alter_mode == 'cdn') { - $cdn_extensions = ['css', 'js', 'gif', 'jpg', 'jpeg', 'png']; - - // Most CDNs don't support private file transfers without a lot of hassle, - // so don't support this in the common case. - $schemes = ['public']; - - $scheme = $stream_wrapper_manager::getScheme($uri); - - // Only serve shipped files and public created files from the CDN. - if (!$scheme || in_array($scheme, $schemes)) { - // Shipped files. - if (!$scheme) { - $path = $uri; - } - // Public created files. - else { - $wrapper = $stream_wrapper_manager->getViaScheme($scheme); - $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); - } - - // Clean up Windows paths. - $path = str_replace('\\', '/', $path); - - // Serve files with one of the CDN extensions from CDN 1, all others from - // CDN 2. - $pathinfo = pathinfo($path); - if (array_key_exists('extension', $pathinfo) && in_array($pathinfo['extension'], $cdn_extensions)) { - $uri = FILE_URL_TEST_CDN_1 . '/' . $path; - } - else { - $uri = FILE_URL_TEST_CDN_2 . '/' . $path; - } - } - } - // Test alteration of file URLs to use root-relative URLs. - elseif ($alter_mode == 'root-relative') { - // Only serve shipped files and public created files with root-relative - // URLs. - $scheme = $stream_wrapper_manager::getScheme($uri); - if (!$scheme || $scheme == 'public') { - // Shipped files. - if (!$scheme) { - $path = $uri; - } - // Public created files. - else { - $wrapper = $stream_wrapper_manager->getViaScheme($scheme); - $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); - } - - // Clean up Windows paths. - $path = str_replace('\\', '/', $path); - - // Generate a root-relative URL. - $uri = base_path() . '/' . $path; - } - } - // Test alteration of file URLs to use protocol-relative URLs. - elseif ($alter_mode == 'protocol-relative') { - // Only serve shipped files and public created files with protocol-relative - // URLs. - $scheme = $stream_wrapper_manager::getScheme($uri); - if (!$scheme || $scheme == 'public') { - // Shipped files. - if (!$scheme) { - $path = $uri; - } - // Public created files. - else { - $wrapper = $stream_wrapper_manager->getViaScheme($scheme); - $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); - } - - // Clean up Windows paths. - $path = str_replace('\\', '/', $path); - - // Generate a protocol-relative URL. - $uri = '/' . base_path() . '/' . $path; - } - } -} - -/** - * Implements hook_file_mimetype_mapping_alter(). - */ -function file_test_file_mimetype_mapping_alter(&$mapping) { - // Add new mappings. - $mapping['mimetypes']['file_test_mimetype_1'] = 'made_up/file_test_1'; - $mapping['mimetypes']['file_test_mimetype_2'] = 'made_up/file_test_2'; - $mapping['mimetypes']['file_test_mimetype_3'] = 'made_up/doc'; - $mapping['extensions']['file_test_1'] = 'file_test_mimetype_1'; - $mapping['extensions']['file_test_2'] = 'file_test_mimetype_2'; - $mapping['extensions']['file_test_3'] = 'file_test_mimetype_2'; - // Override existing mapping. - $mapping['extensions']['doc'] = 'file_test_mimetype_3'; -} - /** * Helper validator that returns the $errors parameter. */ @@ -343,14 +173,3 @@ function file_test_file_scan_callback($filepath = NULL, $reset = FALSE) { function file_test_file_scan_callback_reset() { file_test_file_scan_callback(NULL, TRUE); } - -/** - * Implements hook_entity_info_alter(). - */ -function file_test_entity_type_alter(&$entity_types) { - if (\Drupal::state()->get('file_test_alternate_access_handler', FALSE)) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['file'] - ->setAccessClass('Drupal\file_test\FileTestAccessControlHandler'); - } -} diff --git a/core/modules/file/tests/file_test/src/Hook/FileTestHooks.php b/core/modules/file/tests/file_test/src/Hook/FileTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f329e39052ce2e86318c34c40078b314dc5f73ef --- /dev/null +++ b/core/modules/file/tests/file_test/src/Hook/FileTestHooks.php @@ -0,0 +1,200 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\file_test\Hook; + +use Drupal\file\Entity\File; +use Drupal\Core\Hook\Attribute\Hook; + +// cspell:ignore tarz +// cspell:ignore garply + +/** + * Hook implementations for file_test. + */ +class FileTestHooks { + + /** + * Implements hook_ENTITY_TYPE_load() for file entities. + */ + #[Hook('file_load')] + public function fileLoad($files) { + foreach ($files as $file) { + _file_test_log_call('load', [$file->id()]); + // Assign a value on the object so that we can test that the $file is passed + // by reference. + $file->file_test['loaded'] = TRUE; + } + } + + /** + * Implements hook_file_download(). + */ + #[Hook('file_download')] + public function fileDownload($uri) { + if (\Drupal::state()->get('file_test.allow_all', FALSE)) { + $files = \Drupal::entityTypeManager()->getStorage('file')->loadByProperties(['uri' => $uri]); + $file = reset($files); + return file_get_content_headers($file); + } + _file_test_log_call('download', [$uri]); + return _file_test_get_return('download'); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for file entities. + */ + #[Hook('file_insert')] + public function fileInsert(File $file) { + _file_test_log_call('insert', [$file->id()]); + } + + /** + * Implements hook_ENTITY_TYPE_update() for file entities. + */ + #[Hook('file_update')] + public function fileUpdate(File $file) { + _file_test_log_call('update', [$file->id()]); + } + + /** + * Implements hook_file_copy(). + */ + #[Hook('file_copy')] + public function fileCopy(File $file, $source) { + _file_test_log_call('copy', [$file->id(), $source->id()]); + } + + /** + * Implements hook_file_move(). + */ + #[Hook('file_move')] + public function fileMove(File $file, File $source) { + _file_test_log_call('move', [$file->id(), $source->id()]); + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for file entities. + */ + #[Hook('file_predelete')] + public function filePredelete(File $file) { + _file_test_log_call('delete', [$file->id()]); + } + + /** + * Implements hook_file_url_alter(). + */ + #[Hook('file_url_alter')] + public function fileUrlAlter(&$uri) { + /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */ + $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager'); + // Only run this hook when this variable is set. Otherwise, we'd have to add + // another hidden test module just for this hook. + $alter_mode = \Drupal::state()->get('file_test.hook_file_url_alter'); + if (!$alter_mode) { + return; + } + elseif ($alter_mode == 'cdn') { + $cdn_extensions = ['css', 'js', 'gif', 'jpg', 'jpeg', 'png']; + // Most CDNs don't support private file transfers without a lot of hassle, + // so don't support this in the common case. + $schemes = ['public']; + $scheme = $stream_wrapper_manager::getScheme($uri); + // Only serve shipped files and public created files from the CDN. + if (!$scheme || in_array($scheme, $schemes)) { + // Shipped files. + if (!$scheme) { + $path = $uri; + } + else { + $wrapper = $stream_wrapper_manager->getViaScheme($scheme); + $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); + } + // Clean up Windows paths. + $path = str_replace('\\', '/', $path); + // Serve files with one of the CDN extensions from CDN 1, all others from + // CDN 2. + $pathinfo = pathinfo($path); + if (array_key_exists('extension', $pathinfo) && in_array($pathinfo['extension'], $cdn_extensions)) { + $uri = FILE_URL_TEST_CDN_1 . '/' . $path; + } + else { + $uri = FILE_URL_TEST_CDN_2 . '/' . $path; + } + } + } + elseif ($alter_mode == 'root-relative') { + // Only serve shipped files and public created files with root-relative + // URLs. + $scheme = $stream_wrapper_manager::getScheme($uri); + if (!$scheme || $scheme == 'public') { + // Shipped files. + if (!$scheme) { + $path = $uri; + } + else { + $wrapper = $stream_wrapper_manager->getViaScheme($scheme); + $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); + } + // Clean up Windows paths. + $path = str_replace('\\', '/', $path); + // Generate a root-relative URL. + $uri = base_path() . '/' . $path; + } + } + elseif ($alter_mode == 'protocol-relative') { + // Only serve shipped files and public created files with protocol-relative + // URLs. + $scheme = $stream_wrapper_manager::getScheme($uri); + if (!$scheme || $scheme == 'public') { + // Shipped files. + if (!$scheme) { + $path = $uri; + } + else { + $wrapper = $stream_wrapper_manager->getViaScheme($scheme); + $path = $wrapper->getDirectoryPath() . '/' . $stream_wrapper_manager::getTarget($uri); + } + // Clean up Windows paths. + $path = str_replace('\\', '/', $path); + // Generate a protocol-relative URL. + $uri = '/' . base_path() . '/' . $path; + } + } + } + + /** + * Implements hook_file_mimetype_mapping_alter(). + */ + #[Hook('file_mimetype_mapping_alter')] + public function fileMimetypeMappingAlter(&$mapping) { + // Add new mappings. + $mapping['mimetypes']['file_test_mimetype_1'] = 'made_up/file_test_1'; + $mapping['mimetypes']['file_test_mimetype_2'] = 'made_up/file_test_2'; + $mapping['mimetypes']['file_test_mimetype_3'] = 'made_up/doc'; + $mapping['mimetypes']['application-x-compress'] = 'application/x-compress'; + $mapping['mimetypes']['application-x-tarz'] = 'application/x-tarz'; + $mapping['mimetypes']['application-x-garply-waldo'] = 'application/x-garply-waldo'; + $mapping['extensions']['file_test_1'] = 'file_test_mimetype_1'; + $mapping['extensions']['file_test_2'] = 'file_test_mimetype_2'; + $mapping['extensions']['file_test_3'] = 'file_test_mimetype_2'; + $mapping['extensions']['z'] = 'application-x-compress'; + $mapping['extensions']['tar.z'] = 'application-x-tarz'; + $mapping['extensions']['garply.waldo'] = 'application-x-garply-waldo'; + // Override existing mapping. + $mapping['extensions']['doc'] = 'file_test_mimetype_3'; + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(&$entity_types) : void { + if (\Drupal::state()->get('file_test_alternate_access_handler', FALSE)) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['file']->setAccessClass('Drupal\file_test\FileTestAccessControlHandler'); + } + } + +} diff --git a/core/modules/file/tests/src/Functional/DownloadTest.php b/core/modules/file/tests/src/Functional/DownloadTest.php index 1a86c184b74ac2052122a1de1dff47825dd8b7d2..8a34dc47178b50dba4b26a3e29848ba51f143f3d 100644 --- a/core/modules/file/tests/src/Functional/DownloadTest.php +++ b/core/modules/file/tests/src/Functional/DownloadTest.php @@ -79,7 +79,7 @@ public function testPrivateFileTransferWithoutPageCache(): void { /** * Tests the private file transfer system. */ - protected function doPrivateFileTransferTest() { + protected function doPrivateFileTransferTest(): void { // Set file downloads to private so handler functions get called. // Create a file. @@ -196,7 +196,7 @@ public function testFileCreateUrl(): void { * @param string $expected_url * The expected URL. */ - private function checkUrl($scheme, $directory, $filename, $expected_url) { + private function checkUrl($scheme, $directory, $filename, $expected_url): void { // Convert $filename to a valid filename, i.e. strip characters not // supported by the filesystem, and create the file in the specified // directory. diff --git a/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php b/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php index d1c2455d204da24c77db09176c195fabedd2f3c8..6abbd4541a1e6d4336e7e7f81a6081162a9c144b 100644 --- a/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php @@ -121,7 +121,7 @@ public function testAuthenticatedNodeWithFileWithoutTitle(): void { /** * Helper method to test file submissions with missing node titles. */ - protected function doTestNodeWithFileWithoutTitle() { + protected function doTestNodeWithFileWithoutTitle(): void { $type = 'Article'; $title = 'Test page'; $this->createFileField('field_image', 'node', 'article', [], ['file_extensions' => 'txt png']); diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php index 8d930fea9cab1478439615b4bb6673f2100cd911..d6e1b28a0198932892888047bcb7172c905e9a02 100644 --- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php +++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php @@ -104,7 +104,7 @@ public function updateFileField($name, $type_name, $field_settings = [], $widget * The File to be uploaded. * @param string $field_name * The name of the field on which the files should be saved. - * @param $nid_or_type + * @param int|string $nid_or_type * A numeric node id to upload files to an existing node, or a string * indicating the desired bundle for a new node. * @param bool $new_revision @@ -126,7 +126,7 @@ public function uploadNodeFile(FileInterface $file, $field_name, $nid_or_type, $ * The files to be uploaded. * @param string $field_name * The name of the field on which the files should be saved. - * @param $nid_or_type + * @param int|string $nid_or_type * A numeric node id to upload files to an existing node, or a string * indicating the desired bundle for a new node. * @param bool $new_revision diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php index 523f9fb1bdb57c18ef374bce871a9319658be4f5..4a637b80b794728147ff5189f6baa3189ff258dd 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -559,7 +559,7 @@ public function testFileExtensionsSetting(): void { * @param \Drupal\user\UserInterface $attacker_user * The attacker user. */ - protected function doTestTemporaryFileRemovalExploit(UserInterface $victim_user, UserInterface $attacker_user) { + protected function doTestTemporaryFileRemovalExploit(UserInterface $victim_user, UserInterface $attacker_user): void { $type_name = 'article'; $field_name = 'test_file_field'; $this->createFileField($field_name, 'node', $type_name); diff --git a/core/modules/file/tests/src/Functional/FileListingTest.php b/core/modules/file/tests/src/Functional/FileListingTest.php index acb919e1d75b00f15acc780602aec8d1e903ae01..08b5c7cc6ad5236172b63f6f91b1b4359b947128 100644 --- a/core/modules/file/tests/src/Functional/FileListingTest.php +++ b/core/modules/file/tests/src/Functional/FileListingTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\file\Functional; +use Drupal\Core\Entity\EntityInterface; use Drupal\node\Entity\Node; use Drupal\file\Entity\File; use Drupal\entity_test\Entity\EntityTestConstraints; @@ -62,7 +63,7 @@ protected function setUp(): void { * @return int * Total usage count. */ - protected function sumUsages($usage) { + protected function sumUsages($usage): int { $count = 0; foreach ($usage as $module) { foreach ($module as $entity_type) { @@ -259,7 +260,7 @@ public function testFileListingUsageNoLink(): void { * @return \Drupal\Core\Entity\EntityInterface * A file entity. */ - protected function createFile() { + protected function createFile(): EntityInterface { // Create a new file entity. $file = File::create([ 'uid' => 1, diff --git a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php index 4a68d73149028594e8d35333af35c53eb85689c4..39f15cd586ea1617e241212e0c6794312d3b0b88 100644 --- a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php +++ b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php @@ -53,6 +53,7 @@ public function testFileTokenReplacement(): void { // Generate and test sanitized tokens. $tests = []; $tests['[file:fid]'] = $file->id(); + $tests['[file:uuid]'] = $file->uuid(); $tests['[file:name]'] = Html::escape($file->getFilename()); $tests['[file:path]'] = Html::escape($file->getFileUri()); $tests['[file:mime]'] = Html::escape($file->getMimeType()); @@ -68,6 +69,7 @@ public function testFileTokenReplacement(): void { $base_bubbleable_metadata = BubbleableMetadata::createFromObject($file); $metadata_tests = []; $metadata_tests['[file:fid]'] = $base_bubbleable_metadata; + $metadata_tests['[file:uuid]'] = $base_bubbleable_metadata; $metadata_tests['[file:name]'] = $base_bubbleable_metadata; $metadata_tests['[file:path]'] = $base_bubbleable_metadata; $metadata_tests['[file:mime]'] = $base_bubbleable_metadata; diff --git a/core/modules/file/tests/src/Kernel/CopyTest.php b/core/modules/file/tests/src/Kernel/CopyTest.php index 2f043ad2bd697d893829d7c516b1404ade4df563..5cb4067831c20eed460cf6d024cff7ea374aded3 100644 --- a/core/modules/file/tests/src/Kernel/CopyTest.php +++ b/core/modules/file/tests/src/Kernel/CopyTest.php @@ -162,7 +162,7 @@ public function testExistingError(): void { // Clone the object so we don't have to worry about the function changing // our reference copy. try { - $result = $this->fileRepository->copy(clone $source, $target->getFileUri(), FileExists::Error); + $this->fileRepository->copy(clone $source, $target->getFileUri(), FileExists::Error); $this->fail('expected FileExistsException'); } // FileExistsException is a subclass of FileException. diff --git a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php index ea5adfe6b114a7ae04087ad2abec793977ec6ff6..f805bd1c4422f6af6743c7dee2fae228f7944289 100644 --- a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php +++ b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php @@ -149,7 +149,7 @@ public function testFormatterFileMime(): void { ]); $entity_display->setComponent('filemime', ['type' => 'file_filemime', 'settings' => ['filemime_image' => TRUE]]); - foreach (array_values($this->files) as $i => $file) { + foreach (array_values($this->files) as $file) { $build = $entity_display->build($file); $this->assertEquals('image__file_icon', $build['filemime'][0]['#theme']); $this->assertEquals(spl_object_hash($file), spl_object_hash($build['filemime'][0]['#file'])); diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php index e148eb5c63c33822806df206d337917372eb5bc9..59152d62d9a04efb53b79e16817ec237ef086f39 100644 --- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php +++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php @@ -45,7 +45,7 @@ protected function getFileMigrationInfo(): array { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('stream_wrapper.private', 'Drupal\Core\StreamWrapper\PrivateStream') ->addTag('stream_wrapper', ['scheme' => 'private']); diff --git a/core/modules/file/tests/src/Kernel/SpaceUsedTest.php b/core/modules/file/tests/src/Kernel/SpaceUsedTest.php index d8792a28147aa528e1732f139d5527d9c9b71af1..0f3dedf8fb43ef3ae59dfe4d03c57d681b2f9352 100644 --- a/core/modules/file/tests/src/Kernel/SpaceUsedTest.php +++ b/core/modules/file/tests/src/Kernel/SpaceUsedTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\file\Kernel; +use Drupal\Core\Entity\EntityInterface; use Drupal\file\Entity\File; use Drupal\file\FileInterface; @@ -46,7 +47,7 @@ protected function setUp(): void { * @return \Drupal\Core\Entity\EntityInterface * The file entity. */ - protected function createFileWithSize($uri, $size, $uid, $status = FileInterface::STATUS_PERMANENT) { + protected function createFileWithSize($uri, $size, $uid, $status = FileInterface::STATUS_PERMANENT): EntityInterface { file_put_contents($uri, $this->randomMachineName($size)); $file = File::create([ 'uri' => $uri, diff --git a/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php b/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php index 237e470768e675bd762d2e50fc960470bff00e4a..5c06a4055674f546dfb854f9070fb9d85b10585a 100644 --- a/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php +++ b/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php @@ -56,7 +56,7 @@ public function testParseFilenameExtended(): void { $this->expectException(BadRequestHttpException::class); $this->expectExceptionMessage('The extended "filename*" format is currently not supported in the "Content-Disposition" header.'); $request = $this->createRequest('filename*="UTF-8 \' \' example.txt"'); - $filename = ContentDispositionFilenameParser::parseFilename($request); + ContentDispositionFilenameParser::parseFilename($request); } /** diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 09367b65c1bf87194d09e35a622081a0961dcb62..54f959acfc77d862c94f328963cf06e0f6deafd2 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -2,85 +2,17 @@ /** * @file - * Framework for handling the filtering of content. */ -use Drupal\Core\Url; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Unicode; use Drupal\Core\Cache\Cache; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Template\Attribute; use Drupal\filter\FilterFormatInterface; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; -/** - * Implements hook_help(). - */ -function filter_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.filter': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Filter module allows administrators to configure text formats. Text formats change how HTML tags and other text will be <em>processed and displayed</em> in the site. They are used to transform text, and also help to defend your website against potentially damaging input from malicious users. Visual text editors can be associated with text formats by using the <a href=":editor_help">Text Editor module</a>. For more information, see the <a href=":filter_do">online documentation for the Filter module</a>.', [':filter_do' => 'https://www.drupal.org/documentation/modules/filter/', ':editor_help' => (\Drupal::moduleHandler()->moduleExists('editor')) ? Url::fromRoute('help.page', ['name' => 'editor'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing text formats') . '</dt>'; - $output .= '<dd>' . t('You can create and edit text formats on the <a href=":formats">Text formats page</a> (if the Text Editor module is installed, this page is named Text formats and editors). One text format is included by default: Plain text (which removes all HTML tags). Additional text formats may be created during installation. You can create a text format by clicking "<a href=":add_format">Add text format</a>".', [':formats' => Url::fromRoute('filter.admin_overview')->toString(), ':add_format' => Url::fromRoute('filter.format_add')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Assigning roles to text formats') . '</dt>'; - $output .= '<dd>' . t('You can define which users will be able to use each text format by selecting roles. To ensure security, anonymous and untrusted users should only have access to text formats that restrict them to either plain text or a safe set of HTML tags. This is because HTML tags can allow embedding malicious links or scripts in text. More trusted registered users may be granted permission to use less restrictive text formats in order to create rich text. <strong>Improper text format configuration is a security risk.</strong>') . '</dd>'; - $output .= '<dt>' . t('Selecting filters') . '</dt>'; - $output .= '<dd>' . t('Each text format uses filters that add, remove, or transform elements within user-entered text. For example, one filter removes unapproved HTML tags, while another transforms URLs into clickable links. Filters are applied in a specific order. They do not change the <em>stored</em> content: they define how it is processed and displayed.') . '</dd>'; - $output .= '<dd>' . t('Each filter can have additional configuration options. For example, for the "Limit allowed HTML tags" filter you need to define the list of HTML tags that the filter leaves in the text.') . '</dd>'; - $output .= '<dt>' . t('Using text fields with text formats') . '</dt>'; - $output .= '<dd>' . t('Text fields that allow text formats are those with "formatted" in the description. These are <em>Text (formatted, long, with summary)</em>, <em>Text (formatted)</em>, and <em>Text (formatted, long)</em>. You cannot change the type of field once a field has been created.') . '</dd>'; - $output .= '<dt>' . t('Choosing a text format') . '</dt>'; - $output .= '<dd>' . t('When creating or editing data in a field that has text formats enabled, users can select the format under the field from the Text format select list.') . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'filter.admin_overview': - $output = '<p>' . t('Text formats define how text is filtered for output and how HTML tags and other text is displayed, replaced, or removed. <strong>Improper text format configuration is a security risk.</strong> Learn more on the <a href=":filter_help">Filter module help page</a>.', [':filter_help' => Url::fromRoute('help.page', ['name' => 'filter'])->toString()]) . '</p>'; - $output .= '<p>' . t('Text formats are presented on content editing pages in the order defined on this page. The first format available to a user will be selected by default.') . '</p>'; - return $output; - - case 'entity.filter_format.edit_form': - $output = '<p>' . t('A text format contains filters that change the display of user input; for example, stripping out malicious HTML or making URLs clickable. Filters are executed from top to bottom and the order is important, since one filter may prevent another filter from doing its job. For example, when URLs are converted into links before disallowed HTML tags are removed, all links may be removed. When this happens, the order of filters may need to be rearranged.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function filter_theme() { - return [ - 'filter_tips' => [ - 'variables' => ['tips' => NULL, 'long' => FALSE], - ], - 'text_format_wrapper' => [ - 'variables' => [ - 'children' => NULL, - 'description' => NULL, - 'attributes' => [], - ], - ], - 'filter_guidelines' => [ - 'variables' => ['format' => NULL], - ], - 'filter_caption' => [ - 'variables' => [ - 'node' => NULL, - 'tag' => NULL, - 'caption' => NULL, - 'classes' => NULL, - ], - ], - ]; -} - /** * Retrieves a list of enabled text formats, ordered by weight. * @@ -837,27 +769,6 @@ function _filter_html_image_secure_process($text) { return $text; } -/** - * Implements hook_filter_secure_image_alter(). - * - * Formats an image DOM element that has an invalid source. - * - * @see _filter_html_image_secure_process() - */ -function filter_filter_secure_image_alter(&$image) { - // Turn an invalid image into an error indicator. - $image->setAttribute('src', base_path() . 'core/misc/icons/e32700/error.svg'); - $image->setAttribute('alt', t('Image removed.')); - $image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.')); - $image->setAttribute('height', '16'); - $image->setAttribute('width', '16'); - - // Add a CSS class to aid in styling. - $class = ($image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : ''); - $class .= 'filter-image-invalid'; - $image->setAttribute('class', $class); -} - /** * @} End of "defgroup standard_filters". */ diff --git a/core/modules/filter/filter.post_update.php b/core/modules/filter/filter.post_update.php index 5e980574c299c97a814592e0215f1d56a029da5c..8c4d91265e249ab6648cda1348c117f2287a370e 100644 --- a/core/modules/filter/filter.post_update.php +++ b/core/modules/filter/filter.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function filter_removed_post_updates() { +function filter_removed_post_updates(): array { return [ 'filter_post_update_sort_filters' => '11.0.0', 'filter_post_update_consolidate_filter_config' => '11.0.0', diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php index e8710b60288284fc31b5acf588952f1d2bdfcf6c..a11dc4386218b660b21a5b01027c18287c735d35 100644 --- a/core/modules/filter/src/Entity/FilterFormat.php +++ b/core/modules/filter/src/Entity/FilterFormat.php @@ -3,62 +3,67 @@ namespace Drupal\filter\Entity; use Drupal\Component\Plugin\PluginInspectionInterface; - use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Entity\EntityWithPluginCollectionInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\filter\FilterFormatAccessControlHandler; +use Drupal\filter\FilterFormatAddForm; +use Drupal\filter\FilterFormatEditForm; use Drupal\filter\FilterFormatInterface; +use Drupal\filter\FilterFormatListBuilder; use Drupal\filter\FilterPluginCollection; +use Drupal\filter\Form\FilterDisableForm; +use Drupal\filter\Form\FilterEnableForm; use Drupal\filter\Plugin\FilterInterface; use Drupal\user\Entity\Role; /** * Represents a text format. - * - * @ConfigEntityType( - * id = "filter_format", - * label = @Translation("Text format"), - * label_collection = @Translation("Text formats"), - * label_singular = @Translation("text format"), - * label_plural = @Translation("text formats"), - * label_count = @PluralTranslation( - * singular = "@count text format", - * plural = "@count text formats", - * ), - * handlers = { - * "form" = { - * "add" = "Drupal\filter\FilterFormatAddForm", - * "edit" = "Drupal\filter\FilterFormatEditForm", - * "disable" = "Drupal\filter\Form\FilterDisableForm", - * "enable" = "Drupal\filter\Form\FilterEnableForm", - * }, - * "list_builder" = "Drupal\filter\FilterFormatListBuilder", - * "access" = "Drupal\filter\FilterFormatAccessControlHandler", - * }, - * config_prefix = "format", - * admin_permission = "administer filters", - * entity_keys = { - * "id" = "format", - * "label" = "name", - * "weight" = "weight", - * "status" = "status" - * }, - * links = { - * "edit-form" = "/admin/config/content/formats/manage/{filter_format}", - * "disable" = "/admin/config/content/formats/manage/{filter_format}/disable", - * "enable" = "/admin/config/content/formats/manage/{filter_format}/enable", - * }, - * config_export = { - * "name", - * "format", - * "weight", - * "roles", - * "filters", - * } - * ) */ +#[ConfigEntityType( + id: 'filter_format', + label: new TranslatableMarkup('Text format'), + label_collection: new TranslatableMarkup('Text formats'), + label_singular: new TranslatableMarkup('text format'), + label_plural: new TranslatableMarkup('text formats'), + config_prefix: 'format', + entity_keys: [ + 'id' => 'format', + 'label' => 'name', + 'weight' => 'weight', + 'status' => 'status', + ], + handlers: [ + 'form' => [ + 'add' => FilterFormatAddForm::class, + 'edit' => FilterFormatEditForm::class, + 'disable' => FilterDisableForm::class, + 'enable' => FilterEnableForm::class, + ], + 'list_builder' => FilterFormatListBuilder::class, + 'access' => FilterFormatAccessControlHandler::class, + ], + links: [ + 'edit-form' => '/admin/config/content/formats/manage/{filter_format}', + 'disable' => '/admin/config/content/formats/manage/{filter_format}/disable', + 'enable' => '/admin/config/content/formats/manage/{filter_format}/enable', + ], + admin_permission: 'administer filters', + label_count: [ + 'singular' => '@count text format', + 'plural' => '@count text formats', + ], + config_export: [ + 'name', + 'format', + 'weight', + 'roles', + 'filters', + ], +)] class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/filter/src/Hook/FilterHooks.php b/core/modules/filter/src/Hook/FilterHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..144350049bb5a253701242fe577e1a2a78ca9fb8 --- /dev/null +++ b/core/modules/filter/src/Hook/FilterHooks.php @@ -0,0 +1,119 @@ +<?php + +namespace Drupal\filter\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for filter. + */ +class FilterHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.filter': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Filter module allows administrators to configure text formats. Text formats change how HTML tags and other text will be <em>processed and displayed</em> in the site. They are used to transform text, and also help to defend your website against potentially damaging input from malicious users. Visual text editors can be associated with text formats by using the <a href=":editor_help">Text Editor module</a>. For more information, see the <a href=":filter_do">online documentation for the Filter module</a>.', [ + ':filter_do' => 'https://www.drupal.org/documentation/modules/filter/', + ':editor_help' => \Drupal::moduleHandler()->moduleExists('editor') ? Url::fromRoute('help.page', [ + 'name' => 'editor', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing text formats') . '</dt>'; + $output .= '<dd>' . t('You can create and edit text formats on the <a href=":formats">Text formats page</a> (if the Text Editor module is installed, this page is named Text formats and editors). One text format is included by default: Plain text (which removes all HTML tags). Additional text formats may be created during installation. You can create a text format by clicking "<a href=":add_format">Add text format</a>".', [ + ':formats' => Url::fromRoute('filter.admin_overview')->toString(), + ':add_format' => Url::fromRoute('filter.format_add')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Assigning roles to text formats') . '</dt>'; + $output .= '<dd>' . t('You can define which users will be able to use each text format by selecting roles. To ensure security, anonymous and untrusted users should only have access to text formats that restrict them to either plain text or a safe set of HTML tags. This is because HTML tags can allow embedding malicious links or scripts in text. More trusted registered users may be granted permission to use less restrictive text formats in order to create rich text. <strong>Improper text format configuration is a security risk.</strong>') . '</dd>'; + $output .= '<dt>' . t('Selecting filters') . '</dt>'; + $output .= '<dd>' . t('Each text format uses filters that add, remove, or transform elements within user-entered text. For example, one filter removes unapproved HTML tags, while another transforms URLs into clickable links. Filters are applied in a specific order. They do not change the <em>stored</em> content: they define how it is processed and displayed.') . '</dd>'; + $output .= '<dd>' . t('Each filter can have additional configuration options. For example, for the "Limit allowed HTML tags" filter you need to define the list of HTML tags that the filter leaves in the text.') . '</dd>'; + $output .= '<dt>' . t('Using text fields with text formats') . '</dt>'; + $output .= '<dd>' . t('Text fields that allow text formats are those with "formatted" in the description. These are <em>Text (formatted, long, with summary)</em>, <em>Text (formatted)</em>, and <em>Text (formatted, long)</em>. You cannot change the type of field once a field has been created.') . '</dd>'; + $output .= '<dt>' . t('Choosing a text format') . '</dt>'; + $output .= '<dd>' . t('When creating or editing data in a field that has text formats enabled, users can select the format under the field from the Text format select list.') . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'filter.admin_overview': + $output = '<p>' . t('Text formats define how text is filtered for output and how HTML tags and other text is displayed, replaced, or removed. <strong>Improper text format configuration is a security risk.</strong> Learn more on the <a href=":filter_help">Filter module help page</a>.', [ + ':filter_help' => Url::fromRoute('help.page', [ + 'name' => 'filter', + ])->toString(), + ]) . '</p>'; + $output .= '<p>' . t('Text formats are presented on content editing pages in the order defined on this page. The first format available to a user will be selected by default.') . '</p>'; + return $output; + + case 'entity.filter_format.edit_form': + $output = '<p>' . t('A text format contains filters that change the display of user input; for example, stripping out malicious HTML or making URLs clickable. Filters are executed from top to bottom and the order is important, since one filter may prevent another filter from doing its job. For example, when URLs are converted into links before disallowed HTML tags are removed, all links may be removed. When this happens, the order of filters may need to be rearranged.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'filter_tips' => [ + 'variables' => [ + 'tips' => NULL, + 'long' => FALSE, + ], + ], + 'text_format_wrapper' => [ + 'variables' => [ + 'children' => NULL, + 'description' => NULL, + 'attributes' => [], + ], + ], + 'filter_guidelines' => [ + 'variables' => [ + 'format' => NULL, + ], + ], + 'filter_caption' => [ + 'variables' => [ + 'node' => NULL, + 'tag' => NULL, + 'caption' => NULL, + 'classes' => NULL, + ], + ], + ]; + } + + /** + * Implements hook_filter_secure_image_alter(). + * + * Formats an image DOM element that has an invalid source. + * + * @see _filter_html_image_secure_process() + */ + #[Hook('filter_secure_image_alter')] + public function filterSecureImageAlter(&$image) { + // Turn an invalid image into an error indicator. + $image->setAttribute('src', base_path() . 'core/misc/icons/e32700/error.svg'); + $image->setAttribute('alt', t('Image removed.')); + $image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.')); + $image->setAttribute('height', '16'); + $image->setAttribute('width', '16'); + // Add a CSS class to aid in styling. + $class = $image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : ''; + $class .= 'filter-image-invalid'; + $image->setAttribute('class', $class); + } + +} diff --git a/core/modules/filter/tests/filter_test/filter_test.module b/core/modules/filter/tests/filter_test/filter_test.module deleted file mode 100644 index fe25ff89549a95a922ed58d7512e27b28ef68ed5..0000000000000000000000000000000000000000 --- a/core/modules/filter/tests/filter_test/filter_test.module +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @file - * Test module for Filter module hooks and functions not used in core. - */ - -declare(strict_types=1); - -/** - * Implements hook_ENTITY_TYPE_insert(). - */ -function filter_test_filter_format_insert($format) { - \Drupal::messenger()->addStatus('hook_filter_format_insert invoked.'); -} - -/** - * Implements hook_ENTITY_TYPE_update(). - */ -function filter_test_filter_format_update($format) { - \Drupal::messenger()->addStatus('hook_filter_format_update invoked.'); -} - -/** - * Implements hook_filter_format_disable(). - */ -function filter_test_filter_format_disable($format) { - \Drupal::messenger()->addStatus('hook_filter_format_disable invoked.'); -} diff --git a/core/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php b/core/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2b3c90e2699f79e41bb27a58af97a588b7f2abb2 --- /dev/null +++ b/core/modules/filter/tests/filter_test/src/Hook/FilterTestHooks.php @@ -0,0 +1,38 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\filter_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for filter_test. + */ +class FilterTestHooks { + + /** + * Implements hook_ENTITY_TYPE_insert(). + */ + #[Hook('filter_format_insert')] + public function filterFormatInsert($format) { + \Drupal::messenger()->addStatus('hook_filter_format_insert invoked.'); + } + + /** + * Implements hook_ENTITY_TYPE_update(). + */ + #[Hook('filter_format_update')] + public function filterFormatUpdate($format) { + \Drupal::messenger()->addStatus('hook_filter_format_update invoked.'); + } + + /** + * Implements hook_filter_format_disable(). + */ + #[Hook('filter_format_disable')] + public function filterFormatDisable($format) { + \Drupal::messenger()->addStatus('hook_filter_format_disable invoked.'); + } + +} diff --git a/core/modules/filter/tests/src/Functional/FilterAdminTest.php b/core/modules/filter/tests/src/Functional/FilterAdminTest.php index d74ef672e7f62e8c7fa0167d4669ee20e1d6abb4..df007a2a456a7843883d5bfa6200c7913b96e9b8 100644 --- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php +++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php @@ -267,8 +267,8 @@ public function testFilterAdmin(): void { $this->assertSession()->checkboxChecked('roles[' . RoleInterface::AUTHENTICATED_ID . ']'); $this->assertSession()->checkboxChecked('filters[' . $second_filter . '][status]'); $this->assertSession()->checkboxChecked('filters[' . $first_filter . '][status]'); - /** @var \Drupal\user\Entity\Role $role */ \Drupal::entityTypeManager()->getStorage('user_role')->resetCache([RoleInterface::AUTHENTICATED_ID]); + /** @var \Drupal\user\Entity\Role $role */ $role = Role::load(RoleInterface::AUTHENTICATED_ID); $this->assertTrue($role->hasPermission($format->getPermissionName()), 'The authenticated role has permission to use the filter.'); diff --git a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php index c62e8179cda2d96e16e821a424dd47245fdffbe0..df21b88fef6cdd07fbc6be9df83e61fdce9d8cb3 100644 --- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php +++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php @@ -82,7 +82,7 @@ public function testDefaultTextFormats(): void { /** * Rebuilds text format and permission caches in the thread running the tests. */ - protected function resetFilterCaches() { + protected function resetFilterCaches(): void { filter_formats_reset(); } diff --git a/core/modules/filter/tests/src/Functional/FilterFormTest.php b/core/modules/filter/tests/src/Functional/FilterFormTest.php index 145cf64d15826057b51d9a1a448ae43995d08f4d..a846ff529e341ea5e8d1fad5ebc5571e30cee1b2 100644 --- a/core/modules/filter/tests/src/Functional/FilterFormTest.php +++ b/core/modules/filter/tests/src/Functional/FilterFormTest.php @@ -80,7 +80,7 @@ public function testFilterForm(): void { /** * Tests the behavior of the 'text_format' element as an administrator. */ - protected function doFilterFormTestAsAdmin() { + protected function doFilterFormTestAsAdmin(): void { $this->drupalLogin($this->adminUser); $this->drupalGet('filter-test/text-format'); @@ -128,7 +128,7 @@ protected function doFilterFormTestAsAdmin() { /** * Tests the behavior of the 'text_format' element as a normal user. */ - protected function doFilterFormTestAsNonAdmin() { + protected function doFilterFormTestAsNonAdmin(): void { $this->drupalLogin($this->webUser); $this->drupalGet('filter-test/text-format'); diff --git a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php index 1d13ec4bb1e373c35e740a8e841013d1ee3bd1f0..74bc26e30de38413fc2412c09b3de65d5471dd11 100644 --- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php +++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php @@ -335,7 +335,7 @@ public function testFormatWidgetPermissions(): void { /** * Rebuilds text format and permission caches in the thread running the tests. */ - protected function resetFilterCaches() { + protected function resetFilterCaches(): void { filter_formats_reset(); } diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php index 4d50562b08f1421211181135dc374645d40d6e87..a302d60df1a9478381ff4f17b85543dc222249aa 100644 --- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php +++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php @@ -21,6 +21,9 @@ */ class FilterAPITest extends EntityKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'filter', 'filter_test', 'user']; /** diff --git a/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php b/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php index 4bdce6be7620e49b32a3743b375d79c2904f64c6..236c39646d77da6a5b428b40adf8001db0a41169 100644 --- a/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php @@ -24,7 +24,7 @@ class FilterCaptionTwigDebugTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Enable Twig debugging. $parameters = $container->getParameter('twig.config'); diff --git a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php index 13cb97d02480e612d4d1a66ebcdcfa7daa6688d5..dfc05d5a35a0413c6d95b8a838de94b92ca7049b 100644 --- a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php @@ -88,7 +88,7 @@ public function testDisableFallbackFormat(): void { /** * Verifies that a text format is properly stored. */ - public function verifyTextFormat($format) { + public function verifyTextFormat($format): void { $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); // Verify the loaded filter has all properties. diff --git a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php index 6ef4a3307ef771406078c5b46fea1645fc8e4a6b..b249377e705c554fca0aa9979810a4be3fa219c3 100644 --- a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php @@ -15,6 +15,9 @@ */ class FilterDefaultConfigTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'user', 'filter', 'filter_test']; /** diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php index 40a17534982f2c117259eb97a708f303cee478ac..15e1a77339a8158f41be858d08f85b91f7b8f0e9 100644 --- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php +++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php @@ -35,7 +35,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public static function migrateDumpAlter(KernelTestBase $test) { + public static function migrateDumpAlter(KernelTestBase $test): void { $db = Database::getConnection('default', 'migrate'); $fields = [ 'format' => 'image_resize_filter', diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php index 3a7c17cf6140a2ae912d839331a730dcc460a0c7..58e1e18852c9cdf51de2c984e83e781ba50404fa 100644 --- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php +++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php @@ -13,6 +13,9 @@ */ class MigrateFilterSettingsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['filter']; /** diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php index cda81aa5335dd3a2f845744cc19c352a71a60738..75d2845c4774b8770f872010d4f38c6d90e73cd4 100644 --- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php +++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php @@ -6,7 +6,6 @@ use Drupal\filter\Plugin\migrate\process\FilterSettings; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\Tests\migrate\Unit\MigrateTestCase; @@ -25,7 +24,6 @@ class FilterSettingsTest extends MigrateTestCase { * @covers ::transform */ public function testTransform($value, $destination_id, $expected_value): void { - $migration = $this->createMock(MigrationInterface::class); $plugin = new FilterSettings([], 'filter_settings', []); $executable = $this->createMock(MigrateExecutableInterface::class); diff --git a/core/modules/help/help.api.php b/core/modules/help/help.api.php index 7d7c25a5dcfde3c534ac00fc7e6ec4cdb3353026..1dc6fb0d84e7646145916cd2e3d9bc72ee500ac2 100644 --- a/core/modules/help/help.api.php +++ b/core/modules/help/help.api.php @@ -5,6 +5,7 @@ * Hooks for the Help system. */ +use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** @@ -68,7 +69,7 @@ * A render array, localized string, or object that can be rendered into * a string, containing the help text. */ -function hook_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) { +function hook_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the block module. case 'help.page.block': diff --git a/core/modules/help/help.install b/core/modules/help/help.install index 6d646eb024a2a965c3d3ce9726036d1542b40c13..442aca8d277c070f7740cad45195c031abc4de2f 100644 --- a/core/modules/help/help.install +++ b/core/modules/help/help.install @@ -53,6 +53,6 @@ function help_schema() { /** * Implements hook_update_last_removed(). */ -function help_update_last_removed() { +function help_update_last_removed(): int { return 10200; } diff --git a/core/modules/help/help.module b/core/modules/help/help.module index 659ad8d94172291d44f905b7ec27ed9261680f43..91edfa9aabc957df2e9309f9ed014b1ffc919030 100644 --- a/core/modules/help/help.module +++ b/core/modules/help/help.module @@ -2,88 +2,8 @@ /** * @file - * Manages displaying online help. */ -use Drupal\Core\Url; -use Drupal\Core\Block\BlockPluginInterface; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function help_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.main': - $output = '<h2>' . t('Getting Started') . '</h2>'; - $output .= '<p>' . t('Follow these steps to set up and start using your website:') . '</p>'; - $output .= '<ol>'; - $output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href=":admin">Administration page</a>, where you may <a href=":config">customize and configure</a> all aspects of your website.', [':admin' => Url::fromRoute('system.admin')->toString(), ':config' => Url::fromRoute('system.admin_config')->toString()]) . '</li>'; - $output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href=":modules">Extend page</a> and install modules that suit your specific needs. You can find additional modules at the <a href=":download_modules">Drupal.org modules page</a>.', [':modules' => Url::fromRoute('system.modules_list')->toString(), ':download_modules' => 'https://www.drupal.org/project/modules']) . '</li>'; - $output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href=":themes">Appearance page</a>. You may choose from one of the included themes or download additional themes from the <a href=":download_themes">Drupal.org themes page</a>.', [':themes' => Url::fromRoute('system.themes_page')->toString(), ':download_themes' => 'https://www.drupal.org/project/themes']) . '</li>'; - // Display a link to the create content page if Node module is installed. - if (\Drupal::moduleHandler()->moduleExists('node')) { - $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you may <a href=":content">add new content</a> to your website.', [':content' => Url::fromRoute('node.add_page')->toString()]) . '</li>'; - } - $output .= '</ol>'; - $output .= '<p>' . t('For more information, refer to the help listed on this page or to the <a href=":docs">online documentation</a> and <a href=":support">support</a> pages at <a href=":drupal">drupal.org</a>.', [':docs' => 'https://www.drupal.org/documentation', ':support' => 'https://www.drupal.org/support', ':drupal' => 'https://www.drupal.org']) . '</p>'; - return ['#markup' => $output]; - - case 'help.page.help': - $help_home = Url::fromRoute('help.main')->toString(); - $module_handler = \Drupal::moduleHandler(); - $locale_help = ($module_handler->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#'; - $search_help = ($module_handler->moduleExists('search')) ? Url::fromRoute('help.page', ['name' => 'search'])->toString() : '#'; - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Help module generates <a href=":help-page">Help topics and reference pages</a> to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for <a href=":handbook">Drupal.org online documentation</a> pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the <a href=":help">online documentation for the Help module</a>.', [':help' => 'https://www.drupal.org/documentation/modules/help/', ':handbook' => 'https://www.drupal.org/documentation', ':help-page' => Url::fromRoute('help.main')->toString()]) . '</p>'; - $output .= '<p>' . t('Help topics provided by modules and themes are also part of the Help module. If the core Search module is installed, these topics are searchable. For more information, see the <a href=":online">online documentation, Help Topic Standards</a>.', [':online' => 'https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or-distribution-project/documenting-your-project/help-topic-standards']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Providing a help reference') . '</dt>'; - $output .= '<dd>' . t('The Help module displays explanations for using each module listed on the main <a href=":help">Help reference page</a>.', [':help' => Url::fromRoute('help.main')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Providing page-specific help') . '</dt>'; - $output .= '<dd>' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the <a href=":blocks">Block layout page</a>.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Viewing help topics') . '</dt>'; - $output .= '<dd>' . t('The top-level help topics are listed on the main <a href=":help_page">Help page</a>. Links to other topics, including non-top-level help topics, can be found under the "Related" heading when viewing a topic page.', [':help_page' => $help_home]) . '</dd>'; - $output .= '<dt>' . t('Providing help topics') . '</dt>'; - $output .= '<dd>' . t("Modules and themes can provide help topics as Twig-file-based plugins in a project sub-directory called <em>help_topics</em>; plugin meta-data is provided in YAML front matter within each Twig file. Plugin-based help topics provided by modules and themes will automatically be updated when a module or theme is updated. Use the plugins in <em>core/modules/help/help_topics</em> as a guide when writing and formatting a help topic plugin for your theme or module.") . '</dd>'; - $output .= '<dt>' . t('Translating help topics') . '</dt>'; - $output .= '<dd>' . t('The title and body text of help topics provided by contributed modules and themes are translatable using the <a href=":locale_help">Interface Translation module</a>. Topics provided by custom modules and themes are also translatable if they have been viewed at least once in a non-English language, which triggers putting their translatable text into the translation database.', [':locale_help' => $locale_help]) . '</dd>'; - $output .= '<dt>' . t('Configuring help search') . '</dt>'; - $output .= '<dd>' . t('To search help, you will need to install the core Search module, configure a search page, and add a search block to the Help page or another administrative page. (A search page is provided automatically, and if you use the core Claro administrative theme, a help search block is shown on the main Help page.) Then users with search permissions, and permission to view help, will be able to search help. See the <a href=":search_help">Search module help page</a> for more information.', [':search_help' => $search_help]) . '</dd>'; - $output .= '</dl>'; - return ['#markup' => $output]; - - case 'help.help_topic': - $help_home = Url::fromRoute('help.main')->toString(); - return '<p>' . t('See the <a href=":help_page">Help page</a> for more topics.', [ - ':help_page' => $help_home, - ]) . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function help_theme($existing, $type, $theme, $path) { - return [ - 'help_section' => [ - 'variables' => [ - 'title' => NULL, - 'description' => NULL, - 'links' => NULL, - 'empty' => NULL, - ], - ], - 'help_topic' => [ - 'variables' => [ - 'body' => [], - 'related' => [], - ], - ], - ]; -} - /** * Implements hook_preprocess_HOOK() for block templates. */ @@ -93,45 +13,6 @@ function help_preprocess_block(&$variables) { } } -/** - * Implements hook_block_view_BASE_BLOCK_ID_alter(). - */ -function help_block_view_help_block_alter(array &$build, BlockPluginInterface $block) { - // Assume that most users do not need or want to perform contextual actions on - // the help block, so don't needlessly draw attention to it. - unset($build['#contextual_links']); -} - -/** - * Implements hook_modules_uninstalled(). - */ -function help_modules_uninstalled(array $modules) { - _help_search_update($modules); -} - -/** - * Implements hook_themes_uninstalled(). - */ -function help_themes_uninstalled(array $themes) { - \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); - _help_search_update(); -} - -/** - * Implements hook_modules_installed(). - */ -function help_modules_installed(array $modules, $is_syncing) { - _help_search_update(); -} - -/** - * Implements hook_themes_installed(). - */ -function help_themes_installed(array $themes) { - \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); - _help_search_update(); -} - /** * Ensure that search is updated when extensions are installed or uninstalled. * diff --git a/core/modules/help/help.post_update.php b/core/modules/help/help.post_update.php index 80828aaa9433aca8c695ae9ade1e857f25b85dc6..3ba3b663a828ce568c461d23b6f04cbb7a419336 100644 --- a/core/modules/help/help.post_update.php +++ b/core/modules/help/help.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function help_removed_post_updates() { +function help_removed_post_updates(): array { return [ 'help_post_update_help_topics_search' => '11.0.0', 'help_post_update_help_topics_uninstall' => '11.0.0', diff --git a/core/modules/help/src/HelpTopicTwig.php b/core/modules/help/src/HelpTopicTwig.php index 67f6b1b2ab7772f6281d16d94a6aff879048696e..02f916dc4a5463ee29201edbd10995ca5c57d91d 100644 --- a/core/modules/help/src/HelpTopicTwig.php +++ b/core/modules/help/src/HelpTopicTwig.php @@ -25,7 +25,7 @@ class HelpTopicTwig extends HelpTopicPluginBase implements ContainerFactoryPlugi * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Template\TwigEnvironment $twig diff --git a/core/modules/help/src/Hook/HelpHooks.php b/core/modules/help/src/Hook/HelpHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4cb7c40963b9fbf28d112a32ff3361a52ac8041f --- /dev/null +++ b/core/modules/help/src/Hook/HelpHooks.php @@ -0,0 +1,155 @@ +<?php + +namespace Drupal\help\Hook; + +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for help. + */ +class HelpHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.main': + $output = '<h2>' . t('Getting Started') . '</h2>'; + $output .= '<p>' . t('Follow these steps to set up and start using your website:') . '</p>'; + $output .= '<ol>'; + $output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href=":admin">Administration page</a>, where you may <a href=":config">customize and configure</a> all aspects of your website.', [ + ':admin' => Url::fromRoute('system.admin')->toString(), + ':config' => Url::fromRoute('system.admin_config')->toString(), + ]) . '</li>'; + $output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href=":modules">Extend page</a> and install modules that suit your specific needs. You can find additional modules at the <a href=":download_modules">Drupal.org modules page</a>.', [ + ':modules' => Url::fromRoute('system.modules_list')->toString(), + ':download_modules' => 'https://www.drupal.org/project/modules', + ]) . '</li>'; + $output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href=":themes">Appearance page</a>. You may choose from one of the included themes or download additional themes from the <a href=":download_themes">Drupal.org themes page</a>.', [ + ':themes' => Url::fromRoute('system.themes_page')->toString(), + ':download_themes' => 'https://www.drupal.org/project/themes', + ]) . '</li>'; + // Display a link to the create content page if Node module is installed. + if (\Drupal::moduleHandler()->moduleExists('node')) { + $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you may <a href=":content">add new content</a> to your website.', [':content' => Url::fromRoute('node.add_page')->toString()]) . '</li>'; + } + $output .= '</ol>'; + $output .= '<p>' . t('For more information, refer to the help listed on this page or to the <a href=":docs">online documentation</a> and <a href=":support">support</a> pages at <a href=":drupal">drupal.org</a>.', [ + ':docs' => 'https://www.drupal.org/documentation', + ':support' => 'https://www.drupal.org/support', + ':drupal' => 'https://www.drupal.org', + ]) . '</p>'; + return ['#markup' => $output]; + + case 'help.page.help': + $help_home = Url::fromRoute('help.main')->toString(); + $module_handler = \Drupal::moduleHandler(); + $locale_help = $module_handler->moduleExists('locale') ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#'; + $search_help = $module_handler->moduleExists('search') ? Url::fromRoute('help.page', ['name' => 'search'])->toString() : '#'; + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Help module generates <a href=":help-page">Help topics and reference pages</a> to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for <a href=":handbook">Drupal.org online documentation</a> pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the <a href=":help">online documentation for the Help module</a>.', [ + ':help' => 'https://www.drupal.org/documentation/modules/help/', + ':handbook' => 'https://www.drupal.org/documentation', + ':help-page' => Url::fromRoute('help.main')->toString(), + ]) . '</p>'; + $output .= '<p>' . t('Help topics provided by modules and themes are also part of the Help module. If the core Search module is installed, these topics are searchable. For more information, see the <a href=":online">online documentation, Help Topic Standards</a>.', [ + ':online' => 'https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or-distribution-project/documenting-your-project/help-topic-standards', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Providing a help reference') . '</dt>'; + $output .= '<dd>' . t('The Help module displays explanations for using each module listed on the main <a href=":help">Help reference page</a>.', [':help' => Url::fromRoute('help.main')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Providing page-specific help') . '</dt>'; + $output .= '<dd>' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the <a href=":blocks">Block layout page</a>.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Viewing help topics') . '</dt>'; + $output .= '<dd>' . t('The top-level help topics are listed on the main <a href=":help_page">Help page</a>. Links to other topics, including non-top-level help topics, can be found under the "Related" heading when viewing a topic page.', [':help_page' => $help_home]) . '</dd>'; + $output .= '<dt>' . t('Providing help topics') . '</dt>'; + $output .= '<dd>' . t("Modules and themes can provide help topics as Twig-file-based plugins in a project sub-directory called <em>help_topics</em>; plugin meta-data is provided in YAML front matter within each Twig file. Plugin-based help topics provided by modules and themes will automatically be updated when a module or theme is updated. Use the plugins in <em>core/modules/help/help_topics</em> as a guide when writing and formatting a help topic plugin for your theme or module.") . '</dd>'; + $output .= '<dt>' . t('Translating help topics') . '</dt>'; + $output .= '<dd>' . t('The title and body text of help topics provided by contributed modules and themes are translatable using the <a href=":locale_help">Interface Translation module</a>. Topics provided by custom modules and themes are also translatable if they have been viewed at least once in a non-English language, which triggers putting their translatable text into the translation database.', [':locale_help' => $locale_help]) . '</dd>'; + $output .= '<dt>' . t('Configuring help search') . '</dt>'; + $output .= '<dd>' . t('To search help, you will need to install the core Search module, configure a search page, and add a search block to the Help page or another administrative page. (A search page is provided automatically, and if you use the core Claro administrative theme, a help search block is shown on the main Help page.) Then users with search permissions, and permission to view help, will be able to search help. See the <a href=":search_help">Search module help page</a> for more information.', [':search_help' => $search_help]) . '</dd>'; + $output .= '</dl>'; + return ['#markup' => $output]; + + case 'help.help_topic': + $help_home = Url::fromRoute('help.main')->toString(); + return '<p>' . t('See the <a href=":help_page">Help page</a> for more topics.', [':help_page' => $help_home]) . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + return [ + 'help_section' => [ + 'variables' => [ + 'title' => NULL, + 'description' => NULL, + 'links' => NULL, + 'empty' => NULL, + ], + ], + 'help_topic' => [ + 'variables' => [ + 'body' => [], + 'related' => [], + ], + ], + ]; + } + + /** + * Implements hook_block_view_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_view_help_block_alter')] + public function blockViewHelpBlockAlter(array &$build, BlockPluginInterface $block) { + // Assume that most users do not need or want to perform contextual actions on + // the help block, so don't needlessly draw attention to it. + unset($build['#contextual_links']); + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled(array $modules) { + _help_search_update($modules); + } + + /** + * Implements hook_themes_uninstalled(). + */ + #[Hook('themes_uninstalled')] + public function themesUninstalled(array $themes) { + \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); + _help_search_update(); + } + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled(array $modules, $is_syncing) { + _help_search_update(); + } + + /** + * Implements hook_themes_installed(). + */ + #[Hook('themes_installed')] + public function themesInstalled(array $themes) { + \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); + _help_search_update(); + } + +} diff --git a/core/modules/help/src/Plugin/Block/HelpBlock.php b/core/modules/help/src/Plugin/Block/HelpBlock.php index 8a593842a231e8073a1341d641f825bf4843aaf8..d6178cf0082d8407cd6083ee13e6080f0f3a2732 100644 --- a/core/modules/help/src/Plugin/Block/HelpBlock.php +++ b/core/modules/help/src/Plugin/Block/HelpBlock.php @@ -49,7 +49,7 @@ class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Symfony\Component\HttpFoundation\Request $request diff --git a/core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php b/core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php index e918621b711560535f579186f5626050805d0308..d93f2541bd347e4ffb149a045a92f75ced1f1eb0 100644 --- a/core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php +++ b/core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php @@ -51,7 +51,7 @@ class HelpTopicSection extends HelpSectionPluginBase implements ContainerFactory * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\help\HelpTopicPluginManagerInterface $pluginManager diff --git a/core/modules/help/src/Plugin/HelpSection/HookHelpSection.php b/core/modules/help/src/Plugin/HelpSection/HookHelpSection.php index 696cdd6943a3d8e9dde1119e718d192a98b00678..61eb259839ea939473481999175d4ebcaec11a2d 100644 --- a/core/modules/help/src/Plugin/HelpSection/HookHelpSection.php +++ b/core/modules/help/src/Plugin/HelpSection/HookHelpSection.php @@ -33,7 +33,7 @@ class HookHelpSection extends HelpSectionPluginBase implements ContainerFactoryP * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler diff --git a/core/modules/help/src/Plugin/Search/HelpSearch.php b/core/modules/help/src/Plugin/Search/HelpSearch.php index 89bd8bf955988f2bda1347722a01ed5cd03b93a1..c3122aa42a8e16fadce15673f4b1e7c72db38a40 100644 --- a/core/modules/help/src/Plugin/Search/HelpSearch.php +++ b/core/modules/help/src/Plugin/Search/HelpSearch.php @@ -123,7 +123,7 @@ public static function create(ContainerInterface $container, array $configuratio * @param array $configuration * Configuration for the plugin. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database diff --git a/core/modules/help/tests/modules/help_page_test/help_page_test.module b/core/modules/help/tests/modules/help_page_test/help_page_test.module deleted file mode 100644 index 2119c11547289093cb7c2a2b3ad21eee50e3f998..0000000000000000000000000000000000000000 --- a/core/modules/help/tests/modules/help_page_test/help_page_test.module +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/** - * @file - * Help Page Test module to test the help page. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function help_page_test_help($route_name, RouteMatchInterface $route_match) { - - switch ($route_name) { - case 'help.page.help_page_test': - // Make the help text conform to core standards. See - // \Drupal\system\Tests\Functional\GenericModuleTestBase::assertHookHelp(). - return t('Read the <a href=":url">online documentation for the Help Page Test module</a>.', [':url' => 'http://www.example.com']); - - case 'help_page_test.has_help': - return t('I have help!'); - - case 'help_page_test.test_array': - return ['#markup' => 'Help text from help_page_test_help module.']; - } - - // Ensure that hook_help() can return an empty string and not cause the block - // to display. - return ''; -} diff --git a/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php b/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9563a4458e51236f6d5f5ab2bd6b616148a412e1 --- /dev/null +++ b/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\help_page_test\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for help_page_test. + */ +class HelpPageTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.help_page_test': + // Make the help text conform to core standards. See + // \Drupal\system\Tests\Functional\GenericModuleTestBase::assertHookHelp(). + return t('Read the <a href=":url">online documentation for the Help Page Test module</a>.', [':url' => 'http://www.example.com']); + + case 'help_page_test.has_help': + return t('I have help!'); + + case 'help_page_test.test_array': + return ['#markup' => 'Help text from help_page_test_help module.']; + } + // Ensure that hook_help() can return an empty string and not cause the block + // to display. + return ''; + } + +} diff --git a/core/modules/help/tests/modules/help_test/help_test.module b/core/modules/help/tests/modules/help_test/help_test.module deleted file mode 100644 index a88dfe527633dc36bf25f53b3fd2ba7d2ef45aa9..0000000000000000000000000000000000000000 --- a/core/modules/help/tests/modules/help_test/help_test.module +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Test Help module. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function help_test_help($route_name, RouteMatchInterface $route_match) { - // Do not implement a module overview page to test an empty implementation. - // @see \Drupal\help\Tests\HelpTest -} diff --git a/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php b/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e716664ff48b55bf15523005f2111050dbfca1b2 --- /dev/null +++ b/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\help_test\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for help_test. + */ +class HelpTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + // Do not implement a module overview page to test an empty implementation. + // @see \Drupal\help\Tests\HelpTest + } + +} diff --git a/core/modules/help/tests/modules/help_topics_test/help_topics_test.module b/core/modules/help/tests/modules/help_topics_test/help_topics_test.module deleted file mode 100644 index 95f32931d4547d0cd25cf4bbb3477bd2d07fdde4..0000000000000000000000000000000000000000 --- a/core/modules/help/tests/modules/help_topics_test/help_topics_test.module +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/** - * @file - * Test module for help. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function help_topics_test_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.help_topics_test': - return 'Some kind of non-empty output for testing'; - } -} - -/** - * Implements hook_help_topics_info_alter(). - */ -function help_topics_test_help_topics_info_alter(array &$info) { - // To prevent false positive search results limit list to testing topis only. - $filter = fn(string $key) => str_starts_with($key, 'help_topics_test') || in_array($key, [ - 'help_topics_test_direct_yml', - 'help_topics_derivatives:test_derived_topic', - ], TRUE); - $info = array_filter($info, $filter, ARRAY_FILTER_USE_KEY); - $info['help_topics_test.test']['top_level'] = \Drupal::state()->get('help_topics_test.test:top_level', TRUE); -} diff --git a/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php b/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..05856c2ce938485b57b3e5abe51014fd63859127 --- /dev/null +++ b/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\help_topics_test\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for help_topics_test. + */ +class HelpTopicsTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.help_topics_test': + return 'Some kind of non-empty output for testing'; + } + } + + /** + * Implements hook_help_topics_info_alter(). + */ + #[Hook('help_topics_info_alter')] + public function helpTopicsInfoAlter(array &$info) { + // To prevent false positive search results limit list to testing topis only. + $filter = fn(string $key) => str_starts_with($key, 'help_topics_test') || in_array($key, ['help_topics_test_direct_yml', 'help_topics_derivatives:test_derived_topic'], TRUE); + $info = array_filter($info, $filter, ARRAY_FILTER_USE_KEY); + $info['help_topics_test.test']['top_level'] = \Drupal::state()->get('help_topics_test.test:top_level', TRUE); + } + +} diff --git a/core/modules/help/tests/modules/more_help_page_test/more_help_page_test.module b/core/modules/help/tests/modules/more_help_page_test/more_help_page_test.module deleted file mode 100644 index de4a8d3bc419ff8fd75b2ecf50ae1a5953d5deb4..0000000000000000000000000000000000000000 --- a/core/modules/help/tests/modules/more_help_page_test/more_help_page_test.module +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @file - * More Help Page Test module to test the help blocks. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function more_help_page_test_help($route_name, RouteMatchInterface $route_match) { - - switch ($route_name) { - // Return help for the same route as the help_page_test module. - case 'help_page_test.test_array': - return ['#markup' => 'Help text from more_help_page_test_help module.']; - } -} - -/** - * Implements hook_help_section_info_alter(). - */ -function more_help_page_test_help_section_info_alter(array &$info) { - $info['hook_help']['weight'] = 500; -} diff --git a/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php b/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..337344e786bbd22c8a890bae673caeeffc1b9df4 --- /dev/null +++ b/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\more_help_page_test\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for more_help_page_test. + */ +class MoreHelpPageTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Return help for the same route as the help_page_test module. + case 'help_page_test.test_array': + return ['#markup' => 'Help text from more_help_page_test_help module.']; + } + } + + /** + * Implements hook_help_section_info_alter(). + */ + #[Hook('help_section_info_alter')] + public function helpSectionInfoAlter(array &$info) { + $info['hook_help']['weight'] = 500; + } + +} diff --git a/core/modules/help/tests/src/Functional/HelpTest.php b/core/modules/help/tests/src/Functional/HelpTest.php index 7ba9a681dc5bf94272af1231047d681bf5dc2567..3a954ac0eadddbf2021bb6ccf4861cc5a81f04fe 100644 --- a/core/modules/help/tests/src/Functional/HelpTest.php +++ b/core/modules/help/tests/src/Functional/HelpTest.php @@ -130,7 +130,7 @@ public function testHelp(): void { * @param int $response * (optional) An HTTP response code. Defaults to 200. */ - protected function verifyHelp($response = 200) { + protected function verifyHelp($response = 200): void { $this->drupalGet('admin/index'); $this->assertSession()->statusCodeEquals($response); if ($response == 200) { diff --git a/core/modules/help/tests/src/Functional/HelpTopicTest.php b/core/modules/help/tests/src/Functional/HelpTopicTest.php index 9c666db61b0fa429be50e055e9957446b1f6dcf2..7675d765ce5ac084de6cfb46bd508f46b4c3a150 100644 --- a/core/modules/help/tests/src/Functional/HelpTopicTest.php +++ b/core/modules/help/tests/src/Functional/HelpTopicTest.php @@ -161,7 +161,7 @@ public function testHelp(): void { * the test verifies the user sees the help; if it's not, it verifies they * are denied access. */ - protected function verifyHelp($response = 200) { + protected function verifyHelp($response = 200): void { // Verify access to help topic pages. foreach ($this->getTopicList() as $topic => $info) { // View help topic page. @@ -272,7 +272,7 @@ protected function getTopicList() { /** * Tests breadcrumb on a help topic page. */ - public function verifyBreadCrumb() { + public function verifyBreadCrumb(): void { // Verify Help Topics administration breadcrumbs. $trail = [ '' => 'Home', diff --git a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php index 1ae1fab8c633d977850306c5f235f0d775f4c67b..f51550bd49e4084b4b1fe9a51a9f26562ec3ec78 100644 --- a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php +++ b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php @@ -98,7 +98,7 @@ public function testHelpTopics(): void { * @param int $response * Expected response from visiting the page for the topic. */ - protected function verifyTopic($id, $definitions, $response = 200) { + protected function verifyTopic($id, $definitions, $response = 200): void { $definition = $definitions[$id]; HelpTestTwigNodeVisitor::setStateValue('manner', 0); @@ -191,7 +191,7 @@ protected function verifyTopic($id, $definitions, $response = 200) { * @param string $id * ID of help topic (for error messages). */ - protected function validateHtml(string $body, string $id) { + protected function validateHtml(string $body, string $id): void { $doc = new \DOMDocument(); $doc->strictErrorChecking = TRUE; $doc->validateOnParse = FALSE; @@ -232,7 +232,7 @@ protected function validateHtml(string $body, string $id) { * @param array $definitions * Array of all topic definitions, keyed by ID. */ - protected function verifyBadTopic($id, $definitions) { + protected function verifyBadTopic($id, $definitions): void { $bad_topic_type = substr($id, 16); // Topics should fail verifyTopic() in specific ways. $found_error = FALSE; diff --git a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php index ea469b3f5749f6203fd7dfc46793786f7ea73bb4..21d95c2ccc205e4a853e885f5b4c5c8ccee20b5e 100644 --- a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php +++ b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php @@ -24,7 +24,7 @@ class HelpEmptyPageTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->set('url_generator', new SupernovaGenerator()); diff --git a/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php b/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php index a271daf605601be6f5fb429ff30f3308b9fc27d6..23c628615a6e413cf96605dcb53d3a4a8f8d3f92 100644 --- a/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php +++ b/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php @@ -88,7 +88,7 @@ public function testGetSourceContextException(): void { /** * Sets up the virtual file system. */ - protected function setUpVfs() { + protected function setUpVfs(): void { $content = <<<EOF --- label: Test diff --git a/core/modules/history/history.install b/core/modules/history/history.install index 7222299842c0f6eb380d4f575bd65163c20dd3ce..80ff36378d36f502f4f6479ed9aa947f5a9c8396 100644 --- a/core/modules/history/history.install +++ b/core/modules/history/history.install @@ -45,6 +45,6 @@ function history_schema() { /** * Implements hook_update_last_removed(). */ -function history_update_last_removed() { +function history_update_last_removed(): int { return 10100; } diff --git a/core/modules/history/history.module b/core/modules/history/history.module index ca271da5a765a57ad187641c745f95303f43f238..1d53c536054607004a55757ee3fdc92abec86704 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -2,17 +2,8 @@ /** * @file - * Records which users have read which content. - * - * @todo Generic helper for node_mark(). */ -use Drupal\Core\Url; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\user\UserInterface; - /** * Entities changed before this time are always shown as read. * @@ -23,18 +14,6 @@ */ define('HISTORY_READ_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); -/** - * Implements hook_help(). - */ -function history_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.history': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? Url::fromRoute('help.page', ['name' => 'views'])->toString() : '#', ':url' => 'https://www.drupal.org/documentation/modules/history']) . '</p>'; - return $output; - } -} - /** * Retrieves the timestamp for the current user's last view of a specified node. * @@ -123,64 +102,3 @@ function history_write($nid, $account = NULL) { $history[$nid] = $request_time; } } - -/** - * Implements hook_cron(). - */ -function history_cron() { - \Drupal::database()->delete('history') - ->condition('timestamp', HISTORY_READ_LIMIT, '<') - ->execute(); -} - -/** - * Implements hook_ENTITY_TYPE_view_alter() for node entities. - */ -function history_node_view_alter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) { - if ($node->isNew() || isset($node->in_preview)) { - return; - } - // Update the history table, stating that this user viewed this node. - if ($display->getOriginalMode() === 'full') { - $build['#cache']['contexts'][] = 'user.roles:authenticated'; - if (\Drupal::currentUser()->isAuthenticated()) { - // When the window's "load" event is triggered, mark the node as read. - // This still allows for Drupal behaviors (which are triggered on the - // "DOMContentReady" event) to add "new" and "updated" indicators. - $build['#attached']['library'][] = 'history/mark-as-read'; - $build['#attached']['drupalSettings']['history']['nodesToMarkAsRead'][$node->id()] = TRUE; - } - } - -} - -/** - * Implements hook_ENTITY_TYPE_delete() for node entities. - */ -function history_node_delete(EntityInterface $node) { - \Drupal::database()->delete('history') - ->condition('nid', $node->id()) - ->execute(); -} - -/** - * Implements hook_user_cancel(). - */ -function history_user_cancel($edit, UserInterface $account, $method) { - switch ($method) { - case 'user_cancel_reassign': - \Drupal::database()->delete('history') - ->condition('uid', $account->id()) - ->execute(); - break; - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for user entities. - */ -function history_user_delete($account) { - \Drupal::database()->delete('history') - ->condition('uid', $account->id()) - ->execute(); -} diff --git a/core/modules/history/history.views.inc b/core/modules/history/history.views.inc deleted file mode 100644 index 60c95cd868a34bf38d07029ea5c9924b2d80f910..0000000000000000000000000000000000000000 --- a/core/modules/history/history.views.inc +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * @file - * Provide views data for history.module. - */ - -/** - * Implements hook_views_data(). - */ -function history_views_data() { - // History table - - // We're actually defining a specific instance of the table, so let's - // alias it so that we can later add the real table for other purposes if we - // need it. - $data['history']['table']['group'] = t('Content'); - - // Explain how this table joins to others. - $data['history']['table']['join'] = [ - // Directly links to node table. - 'node_field_data' => [ - 'table' => 'history', - 'left_field' => 'nid', - 'field' => 'nid', - 'extra' => [ - ['field' => 'uid', 'value' => '***CURRENT_USER***', 'numeric' => TRUE], - ], - ], - ]; - - $data['history']['timestamp'] = [ - 'title' => t('Has new content'), - 'field' => [ - 'id' => 'history_user_timestamp', - 'help' => t('Show a marker if the content is new or updated.'), - ], - 'filter' => [ - 'help' => t('Show only content that is new or updated.'), - 'id' => 'history_user_timestamp', - ], - ]; - - return $data; -} diff --git a/core/modules/history/src/Hook/HistoryHooks.php b/core/modules/history/src/Hook/HistoryHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0857332b9193a80963d4fe501d978c26e3786fad --- /dev/null +++ b/core/modules/history/src/Hook/HistoryHooks.php @@ -0,0 +1,92 @@ +<?php + +namespace Drupal\history\Hook; + +use Drupal\user\UserInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for history. + */ +class HistoryHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.history': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [ + ':views-help' => \Drupal::moduleHandler()->moduleExists('views') ? Url::fromRoute('help.page', [ + 'name' => 'views', + ])->toString() : '#', + ':url' => 'https://www.drupal.org/documentation/modules/history', + ]) . '</p>'; + return $output; + } + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + \Drupal::database()->delete('history')->condition('timestamp', HISTORY_READ_LIMIT, '<')->execute(); + } + + /** + * Implements hook_ENTITY_TYPE_view_alter() for node entities. + */ + #[Hook('node_view_alter')] + public function nodeViewAlter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) { + if ($node->isNew() || isset($node->in_preview)) { + return; + } + // Update the history table, stating that this user viewed this node. + if ($display->getOriginalMode() === 'full') { + $build['#cache']['contexts'][] = 'user.roles:authenticated'; + if (\Drupal::currentUser()->isAuthenticated()) { + // When the window's "load" event is triggered, mark the node as read. + // This still allows for Drupal behaviors (which are triggered on the + // "DOMContentReady" event) to add "new" and "updated" indicators. + $build['#attached']['library'][] = 'history/mark-as-read'; + $build['#attached']['drupalSettings']['history']['nodesToMarkAsRead'][$node->id()] = TRUE; + } + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for node entities. + */ + #[Hook('node_delete')] + public function nodeDelete(EntityInterface $node) { + \Drupal::database()->delete('history')->condition('nid', $node->id())->execute(); + } + + /** + * Implements hook_user_cancel(). + */ + #[Hook('user_cancel')] + public function userCancel($edit, UserInterface $account, $method) { + switch ($method) { + case 'user_cancel_reassign': + \Drupal::database()->delete('history')->condition('uid', $account->id())->execute(); + break; + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for user entities. + */ + #[Hook('user_delete')] + public function userDelete($account) { + \Drupal::database()->delete('history')->condition('uid', $account->id())->execute(); + } + +} diff --git a/core/modules/history/src/Hook/HistoryViewsHooks.php b/core/modules/history/src/Hook/HistoryViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c36464200522dcf659259c5c7040816b98290947 --- /dev/null +++ b/core/modules/history/src/Hook/HistoryViewsHooks.php @@ -0,0 +1,56 @@ +<?php + +namespace Drupal\history\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for history. + */ +class HistoryViewsHooks { + /** + * @file + * Provide views data for history.module. + */ + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + // History table + // We're actually defining a specific instance of the table, so let's + // alias it so that we can later add the real table for other purposes if we + // need it. + $data['history']['table']['group'] = t('Content'); + // Explain how this table joins to others. + $data['history']['table']['join'] = [ + // Directly links to node table. + 'node_field_data' => [ + 'table' => 'history', + 'left_field' => 'nid', + 'field' => 'nid', + 'extra' => [ + [ + 'field' => 'uid', + 'value' => '***CURRENT_USER***', + 'numeric' => TRUE, + ], + ], + ], + ]; + $data['history']['timestamp'] = [ + 'title' => t('Has new content'), + 'field' => [ + 'id' => 'history_user_timestamp', + 'help' => t('Show a marker if the content is new or updated.'), + ], + 'filter' => [ + 'help' => t('Show only content that is new or updated.'), + 'id' => 'history_user_timestamp', + ], + ]; + return $data; + } + +} diff --git a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php index a29b0e3847517673437f62aae5315e40056d1cce..637d6a410e5b7fcf62d3a630c51c8a770e4b6a24 100644 --- a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php +++ b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php @@ -25,7 +25,7 @@ class HistoryUserTimestamp extends FilterPluginBase { /** * {@inheritdoc} */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $no_operator = TRUE; /** @@ -34,7 +34,7 @@ class HistoryUserTimestamp extends FilterPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Component\Datetime\TimeInterface $time diff --git a/core/modules/history/tests/src/Functional/HistoryTest.php b/core/modules/history/tests/src/Functional/HistoryTest.php index b2ef520f9fd7f4617de058ea16604ba9deb3bcc1..25dcfb42e31cf18ea900fe47a09b311381892b5d 100644 --- a/core/modules/history/tests/src/Functional/HistoryTest.php +++ b/core/modules/history/tests/src/Functional/HistoryTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait; +use Psr\Http\Message\ResponseInterface; /** * Tests the History endpoints. @@ -68,7 +69,7 @@ protected function setUp(): void { * @return \Psr\Http\Message\ResponseInterface * The response object. */ - protected function getNodeReadTimestamps(array $node_ids) { + protected function getNodeReadTimestamps(array $node_ids): ResponseInterface { // Perform HTTP request. $http_client = $this->getHttpClient(); $url = Url::fromRoute('history.get_last_node_view') @@ -91,7 +92,7 @@ protected function getNodeReadTimestamps(array $node_ids) { * @return \Psr\Http\Message\ResponseInterface * The response body. */ - protected function markNodeAsRead($node_id) { + protected function markNodeAsRead($node_id): ResponseInterface { $http_client = $this->getHttpClient(); $url = Url::fromRoute('history.read_node', ['node' => $node_id], ['absolute' => TRUE])->toString(); diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc index 73b7ffdf9e1008b38e5b57984df6cb99615dbc58..e515fd64cee572272d07084634313a76b1139c0a 100644 --- a/core/modules/image/image.admin.inc +++ b/core/modules/image/image.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Administration pages for image settings. */ use Drupal\Core\Render\Element; diff --git a/core/modules/image/image.field.inc b/core/modules/image/image.field.inc index 30942fc032b540401bf32dbf0938170bf6fbe1b1..9c1883d5044a1aade1d0c8a5da1d918da8d63c13 100644 --- a/core/modules/image/image.field.inc +++ b/core/modules/image/image.field.inc @@ -2,7 +2,6 @@ /** * @file - * Implement an image field, based on the file module's file field. */ use Drupal\Core\Render\Element; diff --git a/core/modules/image/image.install b/core/modules/image/image.install index a7e5d2fa58eeaca3df915516a5a5fb6891349481..e23421795441defcadd7eb6fcf131496f532053e 100644 --- a/core/modules/image/image.install +++ b/core/modules/image/image.install @@ -11,7 +11,7 @@ /** * Implements hook_install(). */ -function image_install() { +function image_install(): void { // Create the styles directory and ensure it's writable. $directory = \Drupal::config('system.file')->get('default_scheme') . '://styles'; \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS); @@ -20,7 +20,7 @@ function image_install() { /** * Implements hook_uninstall(). */ -function image_uninstall() { +function image_uninstall(): void { // Remove the styles directory and generated images. /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); @@ -73,6 +73,6 @@ function image_requirements($phase) { /** * Implements hook_update_last_removed(). */ -function image_update_last_removed() { +function image_update_last_removed(): int { return 8201; } diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 2fe43be364393cb320f21463e395b03a4c5c1e83..52d946250718ffbc16393cbed345f123fc1e0fbe 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -2,18 +2,8 @@ /** * @file - * Exposes global functionality for creating image styles. */ -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\File\FileSystemInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\StreamWrapper\StreamWrapperManager; -use Drupal\Core\Url; -use Drupal\field\FieldConfigInterface; -use Drupal\field\FieldStorageConfigInterface; -use Drupal\file\FileInterface; -use Drupal\image\Controller\ImageStyleDownloadController; use Drupal\image\Entity\ImageStyle; /** @@ -21,197 +11,6 @@ */ define('IMAGE_DERIVATIVE_TOKEN', 'itok'); -/** - * Implements hook_help(). - */ -function image_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.image': - $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; - - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Image module allows you to create fields that contain image files and to configure <a href=":image_styles">Image styles</a> that can be used to manipulate the display of images. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for terminology and general information on entities, fields, and how to create and manage fields. For more information, see the <a href=":image_documentation">online documentation for the Image module</a>.', [':image_styles' => Url::fromRoute('entity.image_style.collection')->toString(), ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => $field_ui_url, ':image_documentation' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/image-module/working-with-images']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dt>' . t('Defining image styles') . '</dt>'; - $output .= '<dd>' . t('The concept of image styles is that you can upload a single image but display it in several ways; each display variation, or <em>image style</em>, is the result of applying one or more <em>effects</em> to the original image. As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects). The Image module provides a way to do this efficiently: you configure an image style with the desired effects on the <a href=":image">Image styles page</a>, and the first time a particular image is requested in that style, the effects are applied. The resulting image is saved, and the next time that same style is requested, the saved image is retrieved without the need to recalculate the effects. Drupal core provides several effects that you can use to define styles; others may be provided by contributed modules.', [':image' => Url::fromRoute('entity.image_style.collection')->toString()]); - $output .= '<dt>' . t('Naming image styles') . '</dt>'; - $output .= '<dd>' . t('When you define an image style, you will need to choose a displayed name and a machine name. The displayed name is shown in administrative pages, and the machine name is used to generate the URL for accessing an image processed in that style. There are two common approaches to naming image styles: either based on the effects being applied (for example, <em>Square 85x85</em>), or based on where you plan to use it (for example, <em>Profile picture</em>).') . '</dd>'; - $output .= '<dt>' . t('Configuring image fields') . '</dt>'; - $output .= '<dd>' . t('A few of the settings for image fields are defined once when you create the field and cannot be changed later; these include the choice of public or private file storage and the number of images that can be stored in the field. The rest of the settings can be edited later; these settings include the field label, help text, allowed file extensions, image dimensions restrictions, and the subdirectory in the public or private file storage where the images will be stored. The editable settings can also have different values for different entity sub-types; for instance, if your image field is used on both Page and Article content types, you can store the files in a different subdirectory for the two content types.') . '</dd>'; - $output .= '<dd>' . t('For accessibility and search engine optimization, all images that convey meaning on websites should have alternate text. Drupal also allows entry of title text for images, but it can lead to confusion for screen reader users and its use is not recommended. Image fields can be configured so that alternate and title text fields are enabled or disabled; if enabled, the fields can be set to be required. The recommended setting is to enable and require alternate text and disable title text.') . '</dd>'; - $output .= '<dd>' . t('When you create an image field, you will need to choose whether the uploaded images will be stored in the public or private file directory defined in your settings.php file and shown on the <a href=":file-system">File system page</a>. This choice cannot be changed later. You can also configure your field to store files in a subdirectory of the public or private directory; this setting can be changed later and can be different for each entity sub-type using the field. For more information on file storage, see the <a href=":system-help">System module help page</a>.', [':file-system' => Url::fromRoute('system.file_system_settings')->toString(), ':system-help' => Url::fromRoute('help.page', ['name' => 'system'])->toString()]) . '</dd>'; - $output .= '<dd>' . t('The maximum file size that can be uploaded is limited by PHP settings of the server, but you can restrict it further by configuring a <em>Maximum upload size</em> in the field settings (this setting can be changed later). The maximum file size, either from PHP server settings or field configuration, is automatically displayed to users in the help text of the image field.') . '</dd>'; - $output .= '<dd>' . t('You can also configure a minimum and/or maximum dimensions for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href="http://wikipedia.org/wiki/Exchangeable_image_file_format">EXIF data</a> in the image will be lost.') . '</dd>'; - $output .= '<dd>' . t('You can also configure a default image that will be used if no image is uploaded in an image field. This default can be defined for all instances of the field in the field storage settings when you create a field, and the setting can be overridden for each entity sub-type that uses the field.') . '</dd>'; - $output .= '<dt>' . t('Configuring displays and form displays') . '</dt>'; - $output .= '<dd>' . t('On the <em>Manage display</em> page, you can choose the image formatter, which determines the image style used to display the image in each display mode and whether or not to display the image as a link. On the <em>Manage form display</em> page, you can configure the image upload widget, including setting the preview image style shown on the entity edit form.') . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.image_style.collection': - return '<p>' . t('Image styles commonly provide thumbnail sizes by scaling and cropping images, but can also add various effects before an image is displayed. When an image is displayed with a style, a new file is created and the original image is left unchanged.') . '</p>'; - - case 'image.effect_add_form': - $effect = \Drupal::service('plugin.manager.image.effect')->getDefinition($route_match->getParameter('image_effect')); - return isset($effect['description']) ? ('<p>' . $effect['description'] . '</p>') : NULL; - - case 'image.effect_edit_form': - $effect = $route_match->getParameter('image_style')->getEffect($route_match->getParameter('image_effect')); - $effect_definition = $effect->getPluginDefinition(); - return isset($effect_definition['description']) ? ('<p>' . $effect_definition['description'] . '</p>') : NULL; - } -} - -/** - * Implements hook_theme(). - */ -function image_theme() { - return [ - // Theme functions in image.module. - 'image_style' => [ - // HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft - // allows the alt attribute to be omitted in some cases. Therefore, - // default the alt attribute to an empty string, but allow code using - // '#theme' => 'image_style' to pass explicit NULL for it to be omitted. - // Usually, neither omission nor an empty string satisfies accessibility - // requirements, so it is strongly encouraged for code using '#theme' => - // 'image_style' to pass a meaningful value for the alt variable. - // - https://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8 - // - https://www.w3.org/TR/xhtml1/dtds.html - // - http://dev.w3.org/html5/spec/Overview.html#alt - // The title attribute is optional in all cases, so it is omitted by - // default. - 'variables' => [ - 'style_name' => NULL, - 'uri' => NULL, - 'width' => NULL, - 'height' => NULL, - 'alt' => '', - 'title' => NULL, - 'attributes' => [], - ], - ], - - // Theme functions in image.admin.inc. - 'image_style_preview' => [ - 'variables' => ['style' => NULL], - 'file' => 'image.admin.inc', - ], - 'image_anchor' => [ - 'render element' => 'element', - 'file' => 'image.admin.inc', - ], - 'image_resize_summary' => [ - 'variables' => ['data' => NULL, 'effect' => []], - ], - 'image_scale_summary' => [ - 'variables' => ['data' => NULL, 'effect' => []], - ], - 'image_crop_summary' => [ - 'variables' => ['data' => NULL, 'effect' => []], - ], - 'image_scale_and_crop_summary' => [ - 'variables' => ['data' => NULL, 'effect' => []], - ], - 'image_rotate_summary' => [ - 'variables' => ['data' => NULL, 'effect' => []], - ], - - // Theme functions in image.field.inc. - 'image_widget' => [ - 'render element' => 'element', - 'file' => 'image.field.inc', - ], - 'image_formatter' => [ - 'variables' => ['item' => NULL, 'item_attributes' => NULL, 'url' => NULL, 'image_style' => NULL], - 'file' => 'image.field.inc', - ], - ]; -} - -/** - * Implements hook_file_download(). - * - * Control the access to files underneath the styles directory. - */ -function image_file_download($uri) { - - $path = StreamWrapperManager::getTarget($uri); - - // Private file access for image style derivatives. - if (str_starts_with($path, 'styles/')) { - $args = explode('/', $path); - - // Discard "styles", style name, and scheme from the path - $args = array_slice($args, 3); - - // Then the remaining parts are the path to the image. - $original_uri = StreamWrapperManager::getScheme($uri) . '://' . implode('/', $args); - - // Check that the file exists and is an image. - $image = \Drupal::service('image.factory')->get($uri); - if ($image->isValid()) { - // If the image style converted the extension, it has been added to the - // original file, resulting in filenames like image.png.jpeg. So to find - // the actual source image, we remove the extension and check if that - // image exists. - if (!file_exists($original_uri)) { - $converted_original_uri = ImageStyleDownloadController::getUriWithoutConvertedExtension($original_uri); - if ($converted_original_uri !== $original_uri && file_exists($converted_original_uri)) { - // The converted file does exist, use it as the source. - $original_uri = $converted_original_uri; - } - } - - // Check the permissions of the original to grant access to this image. - $headers = \Drupal::moduleHandler()->invokeAll('file_download', [$original_uri]); - // Confirm there's at least one module granting access and none denying access. - if (!empty($headers) && !in_array(-1, $headers)) { - return [ - // Send headers describing the image's size, and MIME-type. - 'Content-Type' => $image->getMimeType(), - 'Content-Length' => $image->getFileSize(), - // By not explicitly setting them here, this uses normal Drupal - // Expires, Cache-Control and ETag headers to prevent proxy or - // browser caching of private images. - ]; - } - } - return -1; - } - - // If it is the sample image we need to grant access. - $samplePath = \Drupal::config('image.settings')->get('preview_image'); - if ($path === $samplePath) { - $image = \Drupal::service('image.factory')->get($samplePath); - return [ - // Send headers describing the image's size, and MIME-type. - 'Content-Type' => $image->getMimeType(), - 'Content-Length' => $image->getFileSize(), - // By not explicitly setting them here, this uses normal Drupal - // Expires, Cache-Control and ETag headers to prevent proxy or - // browser caching of private images. - ]; - } -} - -/** - * Implements hook_file_move(). - */ -function image_file_move(FileInterface $file, FileInterface $source) { - // Delete any image derivatives at the original image path. - image_path_flush($source->getFileUri()); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for file entities. - */ -function image_file_predelete(FileInterface $file) { - // Delete any image derivatives of this image. - image_path_flush($file->getFileUri()); -} - /** * Clears cached versions of a specific file in all styles. * @@ -336,8 +135,14 @@ function template_preprocess_image_style(&$variables) { * @return int|string * The offset from the anchor, in pixels, or the anchor itself, if its value * isn't one of the accepted values. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use + * \Drupal\Component\Utility\Image::getKeywordOffset() instead. + * + * @see https://www.drupal.org/node/3268441 */ function image_filter_keyword($anchor, $current_size, $new_size) { + @trigger_error('image_filter_keyword() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use \Drupal\Component\Utility\Image::getKeywordOffset() instead. See https://www.drupal.org/node/3268441', E_USER_DEPRECATED); switch ($anchor) { case 'top': case 'left': @@ -354,156 +159,3 @@ function image_filter_keyword($anchor, $current_size, $new_size) { return $anchor; } } - -/** - * Implements hook_entity_presave(). - * - * Transforms default image of image field from array into single value at save. - */ -function image_entity_presave(EntityInterface $entity) { - // Get the default image settings, return if not saving an image field storage - // or image field entity. - $default_image = []; - if (($entity instanceof FieldStorageConfigInterface || $entity instanceof FieldConfigInterface) && $entity->getType() == 'image') { - $default_image = $entity->getSetting('default_image'); - } - else { - return; - } - - if ($entity->isSyncing()) { - return; - } - - $uuid = $default_image['uuid']; - if ($uuid) { - $original_uuid = isset($entity->original) ? $entity->original->getSetting('default_image')['uuid'] : NULL; - if ($uuid != $original_uuid) { - $file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid); - if ($file) { - $image = \Drupal::service('image.factory')->get($file->getFileUri()); - $default_image['width'] = $image->getWidth(); - $default_image['height'] = $image->getHeight(); - } - else { - $default_image['uuid'] = NULL; - } - } - } - // Both FieldStorageConfigInterface and FieldConfigInterface have a - // setSetting() method. - $entity->setSetting('default_image', $default_image); -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. - */ -function image_field_storage_config_update(FieldStorageConfigInterface $field_storage) { - if ($field_storage->getType() != 'image') { - // Only act on image fields. - return; - } - - $prior_field_storage = $field_storage->original; - - // The value of a managed_file element can be an array if #extended == TRUE. - $uuid_new = $field_storage->getSetting('default_image')['uuid']; - $uuid_old = $prior_field_storage->getSetting('default_image')['uuid']; - - $file_new = $uuid_new ? \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_new) : FALSE; - - if ($uuid_new != $uuid_old) { - - // Is there a new file? - if ($file_new) { - $file_new->setPermanent(); - $file_new->save(); - \Drupal::service('file.usage')->add($file_new, 'image', 'default_image', $field_storage->uuid()); - } - - // Is there an old file? - if ($uuid_old && ($file_old = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_old))) { - \Drupal::service('file.usage')->delete($file_old, 'image', 'default_image', $field_storage->uuid()); - } - } - - // If the upload destination changed, then move the file. - if ($file_new && (StreamWrapperManager::getScheme($file_new->getFileUri()) != $field_storage->getSetting('uri_scheme'))) { - $directory = $field_storage->getSetting('uri_scheme') . '://default_images/'; - \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY); - \Drupal::service('file.repository')->move($file_new, $directory . $file_new->getFilename()); - } -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_config'. - */ -function image_field_config_update(FieldConfigInterface $field) { - $field_storage = $field->getFieldStorageDefinition(); - if ($field_storage->getType() != 'image') { - // Only act on image fields. - return; - } - - $prior_instance = $field->original; - - $uuid_new = $field->getSetting('default_image')['uuid']; - $uuid_old = $prior_instance->getSetting('default_image')['uuid']; - - // If the old and new files do not match, update the default accordingly. - $file_new = $uuid_new ? \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_new) : FALSE; - if ($uuid_new != $uuid_old) { - // Save the new file, if present. - if ($file_new) { - $file_new->setPermanent(); - $file_new->save(); - \Drupal::service('file.usage')->add($file_new, 'image', 'default_image', $field->uuid()); - } - // Delete the old file, if present. - if ($uuid_old && ($file_old = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_old))) { - \Drupal::service('file.usage')->delete($file_old, 'image', 'default_image', $field->uuid()); - } - } - - // If the upload destination changed, then move the file. - if ($file_new && (StreamWrapperManager::getScheme($file_new->getFileUri()) != $field_storage->getSetting('uri_scheme'))) { - $directory = $field_storage->getSetting('uri_scheme') . '://default_images/'; - \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY); - \Drupal::service('file.repository')->move($file_new, $directory . $file_new->getFilename()); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'field_storage_config'. - */ -function image_field_storage_config_delete(FieldStorageConfigInterface $field) { - if ($field->getType() != 'image') { - // Only act on image fields. - return; - } - - // The value of a managed_file element can be an array if #extended == TRUE. - $uuid = $field->getSetting('default_image')['uuid']; - if ($uuid && ($file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid))) { - \Drupal::service('file.usage')->delete($file, 'image', 'default_image', $field->uuid()); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'field_config'. - */ -function image_field_config_delete(FieldConfigInterface $field) { - $field_storage = $field->getFieldStorageDefinition(); - if ($field_storage->getType() != 'image') { - // Only act on image fields. - return; - } - - // The value of a managed_file element can be an array if #extended == TRUE. - $uuid = $field->getSetting('default_image')['uuid']; - - // Remove the default image when the instance is deleted. - if ($uuid && ($file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid))) { - \Drupal::service('file.usage')->delete($file, 'image', 'default_image', $field->uuid()); - } -} diff --git a/core/modules/image/image.post_update.php b/core/modules/image/image.post_update.php index 9046ce55a7fe994700e9d70cde2f7cc5d73a86e8..28182fec0d8f0ef76f2d8cbaff6bd136cc13a055 100644 --- a/core/modules/image/image.post_update.php +++ b/core/modules/image/image.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function image_removed_post_updates() { +function image_removed_post_updates(): array { return [ 'image_post_update_image_style_dependencies' => '9.0.0', 'image_post_update_scale_and_crop_effect_add_anchor' => '9.0.0', diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc deleted file mode 100644 index 553678ccd83537691150dcc0c9a5fce22c6b803c..0000000000000000000000000000000000000000 --- a/core/modules/image/image.views.inc +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/** - * @file - * Provide views data for image.module. - */ - -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_field_views_data(). - * - * Views integration for image fields. Adds an image relationship to the default - * field data. - * - * @see views_field_default_views_data() - */ -function image_field_views_data(FieldStorageConfigInterface $field_storage) { - $data = views_field_default_views_data($field_storage); - foreach ($data as $table_name => $table_data) { - // Add the relationship only on the target_id field. - $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = [ - 'id' => 'standard', - 'base' => 'file_managed', - 'entity type' => 'file', - 'base field' => 'fid', - 'label' => t('image from @field_name', ['@field_name' => $field_storage->getName()]), - ]; - } - - return $data; -} - -/** - * Implements hook_field_views_data_views_data_alter(). - * - * Views integration to provide reverse relationships on image fields. - */ -function image_field_views_data_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) { - $entity_type_id = $field_storage->getTargetEntityTypeId(); - $field_name = $field_storage->getName(); - $entity_type_manager = \Drupal::entityTypeManager(); - $entity_type = $entity_type_manager->getDefinition($entity_type_id); - $pseudo_field_name = 'reverse_' . $field_name . '_' . $entity_type_id; - /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ - $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); - - [$label] = views_entity_field_label($entity_type_id, $field_name); - - $data['file_managed'][$pseudo_field_name]['relationship'] = [ - 'title' => t('@entity using @field', ['@entity' => $entity_type->getLabel(), '@field' => $label]), - 'label' => t('@field_name', ['@field_name' => $field_name]), - 'help' => t('Relate each @entity with a @field set to the image.', ['@entity' => $entity_type->getLabel(), '@field' => $label]), - 'group' => $entity_type->getLabel(), - 'id' => 'entity_reverse', - 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), - 'entity_type' => $entity_type_id, - 'base field' => $entity_type->getKey('id'), - 'field_name' => $field_name, - 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), - 'field field' => $field_name . '_target_id', - 'join_extra' => [ - 0 => [ - 'field' => 'deleted', - 'value' => 0, - 'numeric' => TRUE, - ], - ], - ]; -} diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index f975dc10932c30f221464262830c2bb7c79c9e95..735921b000482a66b8dcbb782917a31731650356 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -2,6 +2,7 @@ namespace Drupal\image\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBase; @@ -15,57 +16,62 @@ use Drupal\Core\StreamWrapper\StreamWrapperManager; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; +use Drupal\image\Form\ImageStyleAddForm; +use Drupal\image\Form\ImageStyleDeleteForm; +use Drupal\image\Form\ImageStyleEditForm; +use Drupal\image\Form\ImageStyleFlushForm; use Drupal\image\ImageEffectPluginCollection; use Drupal\image\ImageEffectInterface; use Drupal\image\ImageStyleInterface; use Drupal\Component\Utility\Crypt; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\StreamWrapper\StreamWrapperInterface; +use Drupal\image\ImageStyleListBuilder; +use Drupal\image\ImageStyleStorage; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Drupal\Core\Entity\Entity\EntityViewDisplay; /** * Defines an image style configuration entity. - * - * @ConfigEntityType( - * id = "image_style", - * label = @Translation("Image style"), - * label_collection = @Translation("Image styles"), - * label_singular = @Translation("image style"), - * label_plural = @Translation("image styles"), - * label_count = @PluralTranslation( - * singular = "@count image style", - * plural = "@count image styles", - * ), - * handlers = { - * "form" = { - * "add" = "Drupal\image\Form\ImageStyleAddForm", - * "edit" = "Drupal\image\Form\ImageStyleEditForm", - * "delete" = "Drupal\image\Form\ImageStyleDeleteForm", - * "flush" = "Drupal\image\Form\ImageStyleFlushForm" - * }, - * "list_builder" = "Drupal\image\ImageStyleListBuilder", - * "storage" = "Drupal\image\ImageStyleStorage", - * }, - * admin_permission = "administer image styles", - * config_prefix = "style", - * entity_keys = { - * "id" = "name", - * "label" = "label" - * }, - * links = { - * "flush-form" = "/admin/config/media/image-styles/manage/{image_style}/flush", - * "edit-form" = "/admin/config/media/image-styles/manage/{image_style}", - * "delete-form" = "/admin/config/media/image-styles/manage/{image_style}/delete", - * "collection" = "/admin/config/media/image-styles", - * }, - * config_export = { - * "name", - * "label", - * "effects", - * } - * ) */ +#[ConfigEntityType( + id: 'image_style', + label: new TranslatableMarkup('Image style'), + label_collection: new TranslatableMarkup('Image styles'), + label_singular: new TranslatableMarkup('image style'), + label_plural: new TranslatableMarkup('image styles'), + config_prefix: 'style', + entity_keys: [ + 'id' => 'name', + 'label' => 'label', + ], + handlers: [ + 'form' => [ + 'add' => ImageStyleAddForm::class, + 'edit' => ImageStyleEditForm::class, + 'delete' => ImageStyleDeleteForm::class, + 'flush' => ImageStyleFlushForm::class, + ], + 'list_builder' => ImageStyleListBuilder::class, + 'storage' => ImageStyleStorage::class, + ], + links: [ + 'flush-form' => '/admin/config/media/image-styles/manage/{image_style}/flush', + 'edit-form' => '/admin/config/media/image-styles/manage/{image_style}', + 'delete-form' => '/admin/config/media/image-styles/manage/{image_style}/delete', + 'collection' => '/admin/config/media/image-styles', + ], + admin_permission: 'administer image styles', + label_count: [ + 'singular' => '@count image style', + 'plural' => '@count image styles', + ], + config_export: [ + 'name', + 'label', + 'effects', + ], +)] class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/image/src/Form/ImageEffectFormBase.php b/core/modules/image/src/Form/ImageEffectFormBase.php index 8541b5c449ad03b983a8454e14b07c6dd907a339..54367f22f13039034457ceb6b6bc092528251106 100644 --- a/core/modules/image/src/Form/ImageEffectFormBase.php +++ b/core/modules/image/src/Form/ImageEffectFormBase.php @@ -122,7 +122,10 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->imageEffect->submitConfigurationForm($form['data'], SubformState::createForSubform($form['data'], $form, $form_state)); $this->imageEffect->setWeight($form_state->getValue('weight')); - if (!$this->imageEffect->getUuid()) { + if ($uuid = $this->imageEffect->getUuid()) { + $this->imageStyle->getEffect($uuid)->setConfiguration($this->imageEffect->getConfiguration()); + } + else { $this->imageStyle->addImageEffect($this->imageEffect->getConfiguration()); } $this->imageStyle->save(); diff --git a/core/modules/image/src/Hook/ImageHooks.php b/core/modules/image/src/Hook/ImageHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..45fab8c3fa56456a2ac0616d820a595d02e2001f --- /dev/null +++ b/core/modules/image/src/Hook/ImageHooks.php @@ -0,0 +1,379 @@ +<?php + +namespace Drupal\image\Hook; + +use Drupal\Core\File\FileSystemInterface; +use Drupal\field\FieldConfigInterface; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\file\FileInterface; +use Drupal\image\Controller\ImageStyleDownloadController; +use Drupal\Core\StreamWrapper\StreamWrapperManager; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for image. + */ +class ImageHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.image': + $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Image module allows you to create fields that contain image files and to configure <a href=":image_styles">Image styles</a> that can be used to manipulate the display of images. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for terminology and general information on entities, fields, and how to create and manage fields. For more information, see the <a href=":image_documentation">online documentation for the Image module</a>.', [ + ':image_styles' => Url::fromRoute('entity.image_style.collection')->toString(), + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => $field_ui_url, + ':image_documentation' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/image-module/working-with-images', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dt>' . t('Defining image styles') . '</dt>'; + $output .= '<dd>' . t('The concept of image styles is that you can upload a single image but display it in several ways; each display variation, or <em>image style</em>, is the result of applying one or more <em>effects</em> to the original image. As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects). The Image module provides a way to do this efficiently: you configure an image style with the desired effects on the <a href=":image">Image styles page</a>, and the first time a particular image is requested in that style, the effects are applied. The resulting image is saved, and the next time that same style is requested, the saved image is retrieved without the need to recalculate the effects. Drupal core provides several effects that you can use to define styles; others may be provided by contributed modules.', [ + ':image' => Url::fromRoute('entity.image_style.collection')->toString(), + ]); + $output .= '<dt>' . t('Naming image styles') . '</dt>'; + $output .= '<dd>' . t('When you define an image style, you will need to choose a displayed name and a machine name. The displayed name is shown in administrative pages, and the machine name is used to generate the URL for accessing an image processed in that style. There are two common approaches to naming image styles: either based on the effects being applied (for example, <em>Square 85x85</em>), or based on where you plan to use it (for example, <em>Profile picture</em>).') . '</dd>'; + $output .= '<dt>' . t('Configuring image fields') . '</dt>'; + $output .= '<dd>' . t('A few of the settings for image fields are defined once when you create the field and cannot be changed later; these include the choice of public or private file storage and the number of images that can be stored in the field. The rest of the settings can be edited later; these settings include the field label, help text, allowed file extensions, image dimensions restrictions, and the subdirectory in the public or private file storage where the images will be stored. The editable settings can also have different values for different entity sub-types; for instance, if your image field is used on both Page and Article content types, you can store the files in a different subdirectory for the two content types.') . '</dd>'; + $output .= '<dd>' . t('For accessibility and search engine optimization, all images that convey meaning on websites should have alternate text. Drupal also allows entry of title text for images, but it can lead to confusion for screen reader users and its use is not recommended. Image fields can be configured so that alternate and title text fields are enabled or disabled; if enabled, the fields can be set to be required. The recommended setting is to enable and require alternate text and disable title text.') . '</dd>'; + $output .= '<dd>' . t('When you create an image field, you will need to choose whether the uploaded images will be stored in the public or private file directory defined in your settings.php file and shown on the <a href=":file-system">File system page</a>. This choice cannot be changed later. You can also configure your field to store files in a subdirectory of the public or private directory; this setting can be changed later and can be different for each entity sub-type using the field. For more information on file storage, see the <a href=":system-help">System module help page</a>.', [ + ':file-system' => Url::fromRoute('system.file_system_settings')->toString(), + ':system-help' => Url::fromRoute('help.page', [ + 'name' => 'system', + ])->toString(), + ]) . '</dd>'; + $output .= '<dd>' . t('The maximum file size that can be uploaded is limited by PHP settings of the server, but you can restrict it further by configuring a <em>Maximum upload size</em> in the field settings (this setting can be changed later). The maximum file size, either from PHP server settings or field configuration, is automatically displayed to users in the help text of the image field.') . '</dd>'; + $output .= '<dd>' . t('You can also configure a minimum and/or maximum dimensions for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href="http://wikipedia.org/wiki/Exchangeable_image_file_format">EXIF data</a> in the image will be lost.') . '</dd>'; + $output .= '<dd>' . t('You can also configure a default image that will be used if no image is uploaded in an image field. This default can be defined for all instances of the field in the field storage settings when you create a field, and the setting can be overridden for each entity sub-type that uses the field.') . '</dd>'; + $output .= '<dt>' . t('Configuring displays and form displays') . '</dt>'; + $output .= '<dd>' . t('On the <em>Manage display</em> page, you can choose the image formatter, which determines the image style used to display the image in each display mode and whether or not to display the image as a link. On the <em>Manage form display</em> page, you can configure the image upload widget, including setting the preview image style shown on the entity edit form.') . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.image_style.collection': + return '<p>' . t('Image styles commonly provide thumbnail sizes by scaling and cropping images, but can also add various effects before an image is displayed. When an image is displayed with a style, a new file is created and the original image is left unchanged.') . '</p>'; + + case 'image.effect_add_form': + $effect = \Drupal::service('plugin.manager.image.effect')->getDefinition($route_match->getParameter('image_effect')); + return isset($effect['description']) ? '<p>' . $effect['description'] . '</p>' : NULL; + + case 'image.effect_edit_form': + $effect = $route_match->getParameter('image_style')->getEffect($route_match->getParameter('image_effect')); + $effect_definition = $effect->getPluginDefinition(); + return isset($effect_definition['description']) ? '<p>' . $effect_definition['description'] . '</p>' : NULL; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + // Theme functions in image.module. + 'image_style' => [ + // HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft + // allows the alt attribute to be omitted in some cases. Therefore, + // default the alt attribute to an empty string, but allow code using + // '#theme' => 'image_style' to pass explicit NULL for it to be omitted. + // Usually, neither omission nor an empty string satisfies accessibility + // requirements, so it is strongly encouraged for code using '#theme' => + // 'image_style' to pass a meaningful value for the alt variable. + // - https://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8 + // - https://www.w3.org/TR/xhtml1/dtds.html + // - http://dev.w3.org/html5/spec/Overview.html#alt + // The title attribute is optional in all cases, so it is omitted by + // default. + 'variables' => [ + 'style_name' => NULL, + 'uri' => NULL, + 'width' => NULL, + 'height' => NULL, + 'alt' => '', + 'title' => NULL, + 'attributes' => [], + ], + ], + // Theme functions in image.admin.inc. + 'image_style_preview' => [ + 'variables' => [ + 'style' => NULL, + ], + 'file' => 'image.admin.inc', + ], + 'image_anchor' => [ + 'render element' => 'element', + 'file' => 'image.admin.inc', + ], + 'image_resize_summary' => [ + 'variables' => [ + 'data' => NULL, + 'effect' => [], + ], + ], + 'image_scale_summary' => [ + 'variables' => [ + 'data' => NULL, + 'effect' => [], + ], + ], + 'image_crop_summary' => [ + 'variables' => [ + 'data' => NULL, + 'effect' => [], + ], + ], + 'image_scale_and_crop_summary' => [ + 'variables' => [ + 'data' => NULL, + 'effect' => [], + ], + ], + 'image_rotate_summary' => [ + 'variables' => [ + 'data' => NULL, + 'effect' => [], + ], + ], + // Theme functions in image.field.inc. + 'image_widget' => [ + 'render element' => 'element', + 'file' => 'image.field.inc', + ], + 'image_formatter' => [ + 'variables' => [ + 'item' => NULL, + 'item_attributes' => NULL, + 'url' => NULL, + 'image_style' => NULL, + ], + 'file' => 'image.field.inc', + ], + ]; + } + + /** + * Implements hook_file_download(). + * + * Control the access to files underneath the styles directory. + */ + #[Hook('file_download')] + public function fileDownload($uri) { + $path = StreamWrapperManager::getTarget($uri); + // Private file access for image style derivatives. + if (str_starts_with($path, 'styles/')) { + $args = explode('/', $path); + // Discard "styles", style name, and scheme from the path + $args = array_slice($args, 3); + // Then the remaining parts are the path to the image. + $original_uri = StreamWrapperManager::getScheme($uri) . '://' . implode('/', $args); + // Check that the file exists and is an image. + $image = \Drupal::service('image.factory')->get($uri); + if ($image->isValid()) { + // If the image style converted the extension, it has been added to the + // original file, resulting in filenames like image.png.jpeg. So to find + // the actual source image, we remove the extension and check if that + // image exists. + if (!file_exists($original_uri)) { + $converted_original_uri = ImageStyleDownloadController::getUriWithoutConvertedExtension($original_uri); + if ($converted_original_uri !== $original_uri && file_exists($converted_original_uri)) { + // The converted file does exist, use it as the source. + $original_uri = $converted_original_uri; + } + } + // Check the permissions of the original to grant access to this image. + $headers = \Drupal::moduleHandler()->invokeAll('file_download', [$original_uri]); + // Confirm there's at least one module granting access and none denying access. + if (!empty($headers) && !in_array(-1, $headers)) { + return [ + // Send headers describing the image's size, and MIME-type. + 'Content-Type' => $image->getMimeType(), + 'Content-Length' => $image->getFileSize(), + ]; + } + } + return -1; + } + // If it is the sample image we need to grant access. + $samplePath = \Drupal::config('image.settings')->get('preview_image'); + if ($path === $samplePath) { + $image = \Drupal::service('image.factory')->get($samplePath); + return [ + // Send headers describing the image's size, and MIME-type. + 'Content-Type' => $image->getMimeType(), + 'Content-Length' => $image->getFileSize(), + ]; + } + } + + /** + * Implements hook_file_move(). + */ + #[Hook('file_move')] + public function fileMove(FileInterface $file, FileInterface $source) { + // Delete any image derivatives at the original image path. + image_path_flush($source->getFileUri()); + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for file entities. + */ + #[Hook('file_predelete')] + public function filePredelete(FileInterface $file) { + // Delete any image derivatives of this image. + image_path_flush($file->getFileUri()); + } + + /** + * Implements hook_entity_presave(). + * + * Transforms default image of image field from array into single value at save. + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + // Get the default image settings, return if not saving an image field storage + // or image field entity. + $default_image = []; + if (($entity instanceof FieldStorageConfigInterface || $entity instanceof FieldConfigInterface) && $entity->getType() == 'image') { + $default_image = $entity->getSetting('default_image'); + } + else { + return; + } + if ($entity->isSyncing()) { + return; + } + $uuid = $default_image['uuid']; + if ($uuid) { + $original_uuid = isset($entity->original) ? $entity->original->getSetting('default_image')['uuid'] : NULL; + if ($uuid != $original_uuid) { + $file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid); + if ($file) { + $image = \Drupal::service('image.factory')->get($file->getFileUri()); + $default_image['width'] = $image->getWidth(); + $default_image['height'] = $image->getHeight(); + } + else { + $default_image['uuid'] = NULL; + } + } + } + // Both FieldStorageConfigInterface and FieldConfigInterface have a + // setSetting() method. + $entity->setSetting('default_image', $default_image); + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. + */ + #[Hook('field_storage_config_update')] + public function fieldStorageConfigUpdate(FieldStorageConfigInterface $field_storage) { + if ($field_storage->getType() != 'image') { + // Only act on image fields. + return; + } + $prior_field_storage = $field_storage->original; + // The value of a managed_file element can be an array if #extended == TRUE. + $uuid_new = $field_storage->getSetting('default_image')['uuid']; + $uuid_old = $prior_field_storage->getSetting('default_image')['uuid']; + $file_new = $uuid_new ? \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_new) : FALSE; + if ($uuid_new != $uuid_old) { + // Is there a new file? + if ($file_new) { + $file_new->setPermanent(); + $file_new->save(); + \Drupal::service('file.usage')->add($file_new, 'image', 'default_image', $field_storage->uuid()); + } + // Is there an old file? + if ($uuid_old && ($file_old = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_old))) { + \Drupal::service('file.usage')->delete($file_old, 'image', 'default_image', $field_storage->uuid()); + } + } + // If the upload destination changed, then move the file. + if ($file_new && StreamWrapperManager::getScheme($file_new->getFileUri()) != $field_storage->getSetting('uri_scheme')) { + $directory = $field_storage->getSetting('uri_scheme') . '://default_images/'; + \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY); + \Drupal::service('file.repository')->move($file_new, $directory . $file_new->getFilename()); + } + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_config'. + */ + #[Hook('field_config_update')] + public function fieldConfigUpdate(FieldConfigInterface $field) { + $field_storage = $field->getFieldStorageDefinition(); + if ($field_storage->getType() != 'image') { + // Only act on image fields. + return; + } + $prior_instance = $field->original; + $uuid_new = $field->getSetting('default_image')['uuid']; + $uuid_old = $prior_instance->getSetting('default_image')['uuid']; + // If the old and new files do not match, update the default accordingly. + $file_new = $uuid_new ? \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_new) : FALSE; + if ($uuid_new != $uuid_old) { + // Save the new file, if present. + if ($file_new) { + $file_new->setPermanent(); + $file_new->save(); + \Drupal::service('file.usage')->add($file_new, 'image', 'default_image', $field->uuid()); + } + // Delete the old file, if present. + if ($uuid_old && ($file_old = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid_old))) { + \Drupal::service('file.usage')->delete($file_old, 'image', 'default_image', $field->uuid()); + } + } + // If the upload destination changed, then move the file. + if ($file_new && StreamWrapperManager::getScheme($file_new->getFileUri()) != $field_storage->getSetting('uri_scheme')) { + $directory = $field_storage->getSetting('uri_scheme') . '://default_images/'; + \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY); + \Drupal::service('file.repository')->move($file_new, $directory . $file_new->getFilename()); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'field_storage_config'. + */ + #[Hook('field_storage_config_delete')] + public function fieldStorageConfigDelete(FieldStorageConfigInterface $field) { + if ($field->getType() != 'image') { + // Only act on image fields. + return; + } + // The value of a managed_file element can be an array if #extended == TRUE. + $uuid = $field->getSetting('default_image')['uuid']; + if ($uuid && ($file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid))) { + \Drupal::service('file.usage')->delete($file, 'image', 'default_image', $field->uuid()); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'field_config'. + */ + #[Hook('field_config_delete')] + public function fieldConfigDelete(FieldConfigInterface $field) { + $field_storage = $field->getFieldStorageDefinition(); + if ($field_storage->getType() != 'image') { + // Only act on image fields. + return; + } + // The value of a managed_file element can be an array if #extended == TRUE. + $uuid = $field->getSetting('default_image')['uuid']; + // Remove the default image when the instance is deleted. + if ($uuid && ($file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid))) { + \Drupal::service('file.usage')->delete($file, 'image', 'default_image', $field->uuid()); + } + } + +} diff --git a/core/modules/image/src/Hook/ImageViewsHooks.php b/core/modules/image/src/Hook/ImageViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5334d130eb7d1130ec12c30b121aed6c8981d67a --- /dev/null +++ b/core/modules/image/src/Hook/ImageViewsHooks.php @@ -0,0 +1,84 @@ +<?php + +namespace Drupal\image\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for image. + */ +class ImageViewsHooks { + + /** + * Implements hook_field_views_data(). + * + * Views integration for image fields. Adds an image relationship to the default + * field data. + * + * @see views_field_default_views_data() + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + $data = views_field_default_views_data($field_storage); + foreach ($data as $table_name => $table_data) { + // Add the relationship only on the target_id field. + $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = [ + 'id' => 'standard', + 'base' => 'file_managed', + 'entity type' => 'file', + 'base field' => 'fid', + 'label' => t('image from @field_name', [ + '@field_name' => $field_storage->getName(), + ]), + ]; + } + return $data; + } + + /** + * Implements hook_field_views_data_views_data_alter(). + * + * Views integration to provide reverse relationships on image fields. + */ + #[Hook('field_views_data_views_data_alter')] + public function fieldViewsDataViewsDataAlter(array &$data, FieldStorageConfigInterface $field_storage) { + $entity_type_id = $field_storage->getTargetEntityTypeId(); + $field_name = $field_storage->getName(); + $entity_type_manager = \Drupal::entityTypeManager(); + $entity_type = $entity_type_manager->getDefinition($entity_type_id); + $pseudo_field_name = 'reverse_' . $field_name . '_' . $entity_type_id; + /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ + $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); + [$label] = views_entity_field_label($entity_type_id, $field_name); + $data['file_managed'][$pseudo_field_name]['relationship'] = [ + 'title' => t('@entity using @field', [ + '@entity' => $entity_type->getLabel(), + '@field' => $label, + ]), + 'label' => t('@field_name', [ + '@field_name' => $field_name, + ]), + 'help' => t('Relate each @entity with a @field set to the image.', [ + '@entity' => $entity_type->getLabel(), + '@field' => $label, + ]), + 'group' => $entity_type->getLabel(), + 'id' => 'entity_reverse', + 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), + 'entity_type' => $entity_type_id, + 'base field' => $entity_type->getKey('id'), + 'field_name' => $field_name, + 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), + 'field field' => $field_name . '_target_id', + 'join_extra' => [ + 0 => [ + 'field' => 'deleted', + 'value' => 0, + 'numeric' => TRUE, + ], + ], + ]; + } + +} diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php index 0131e479d87fbeb0df0b11c837854bd4c87957c9..980407b3ab0bad8ddc492985287c9fed4813c1a4 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php @@ -53,7 +53,7 @@ class ImageFormatter extends ImageFormatterBase { * Constructs an ImageFormatter object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php index 15613237df4e85f4fea9bb5779adc2965b21228e..a97a1afad0decfb665de67826efbdc4a4e0a6617 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php @@ -44,7 +44,7 @@ class ImageUrlFormatter extends ImageFormatterBase { * Constructs an ImageFormatter object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php index bae25d84ff241d2f898864937b1e3ac1d803aab2..80fc00fbbba654e330afd77fa7d866cd158fa68c 100644 --- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php +++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php @@ -34,7 +34,7 @@ class ImageWidget extends FileWidget { * Constructs an ImageWidget object. * * @param string $plugin_id - * The plugin_id for the widget. + * The plugin ID for the widget. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/image/src/Plugin/ImageEffect/CropImageEffect.php b/core/modules/image/src/Plugin/ImageEffect/CropImageEffect.php index accdfe17b88f021bdaf8f1507aeb827d64d19520..7e31430e9c9e260dcccebe8eb7ba0e7f315a10ed 100644 --- a/core/modules/image/src/Plugin/ImageEffect/CropImageEffect.php +++ b/core/modules/image/src/Plugin/ImageEffect/CropImageEffect.php @@ -2,6 +2,7 @@ namespace Drupal\image\Plugin\ImageEffect; +use Drupal\Component\Utility\Image; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Image\ImageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; @@ -22,8 +23,8 @@ class CropImageEffect extends ResizeImageEffect { */ public function applyEffect(ImageInterface $image) { [$x, $y] = explode('-', $this->configuration['anchor']); - $x = image_filter_keyword($x, $image->getWidth(), $this->configuration['width']); - $y = image_filter_keyword($y, $image->getHeight(), $this->configuration['height']); + $x = Image::getKeywordOffset($x, $image->getWidth(), (int) $this->configuration['width']); + $y = Image::getKeywordOffset($y, $image->getHeight(), (int) $this->configuration['height']); if (!$image->crop($x, $y, $this->configuration['width'], $this->configuration['height'])) { $this->logger->error('Image crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', ['%toolkit' => $image->getToolkitId(), '%path' => $image->getSource(), '%mimetype' => $image->getMimeType(), '%dimensions' => $image->getWidth() . 'x' . $image->getHeight()]); return FALSE; diff --git a/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php b/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php index 73489d7aceca870e8d9616dff3914e670156788d..7ce4a2038859f51150ce3e79b458cd7afdb74664 100644 --- a/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php +++ b/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php @@ -2,6 +2,7 @@ namespace Drupal\image\Plugin\ImageEffect; +use Drupal\Component\Utility\Image; use Drupal\Core\Image\ImageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\image\Attribute\ImageEffect; @@ -20,13 +21,13 @@ class ScaleAndCropImageEffect extends CropImageEffect { * {@inheritdoc} */ public function applyEffect(ImageInterface $image) { - $width = $this->configuration['width']; - $height = $this->configuration['height']; + $width = (int) $this->configuration['width']; + $height = (int) $this->configuration['height']; $scale = max($width / $image->getWidth(), $height / $image->getHeight()); [$x, $y] = explode('-', $this->configuration['anchor']); - $x = image_filter_keyword($x, $image->getWidth() * $scale, $width); - $y = image_filter_keyword($y, $image->getHeight() * $scale, $height); + $x = Image::getKeywordOffset($x, (int) round($image->getWidth() * $scale), $width); + $y = Image::getKeywordOffset($y, (int) round($image->getHeight() * $scale), $height); if (!$image->apply('scale_and_crop', ['x' => $x, 'y' => $y, 'width' => $width, 'height' => $height])) { $this->logger->error('Image scale and crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', ['%toolkit' => $image->getToolkitId(), '%path' => $image->getSource(), '%mimetype' => $image->getMimeType(), '%dimensions' => $image->getWidth() . 'x' . $image->getHeight()]); diff --git a/core/modules/image/tests/modules/image_access_test_hidden/image_access_test_hidden.module b/core/modules/image/tests/modules/image_access_test_hidden/image_access_test_hidden.module deleted file mode 100644 index ad22524c57400a2bc926fa21b0c719ab56cddbfb..0000000000000000000000000000000000000000 --- a/core/modules/image/tests/modules/image_access_test_hidden/image_access_test_hidden.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Image field access for hidden fields. - */ - -declare(strict_types=1); - -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Access\AccessResult; - -/** - * Implements hook_entity_field_access(). - */ -function image_access_test_hidden_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - if ($field_definition->getName() == 'field_image' && $operation == 'edit') { - return AccessResult::forbidden(); - } - return AccessResult::neutral(); -} diff --git a/core/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php b/core/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..13ea926a6c1efcb766e3763f5d8f91c3e4000cdf --- /dev/null +++ b/core/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\image_access_test_hidden\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for image_access_test_hidden. + */ +class ImageAccessTestHiddenHooks { + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + if ($field_definition->getName() == 'field_image' && $operation == 'edit') { + return AccessResult::forbidden(); + } + return AccessResult::neutral(); + } + +} diff --git a/core/modules/image/tests/modules/image_module_test/image_module_test.module b/core/modules/image/tests/modules/image_module_test/image_module_test.module index ab5196319e3cb7516932629c9cf6be827ff622ca..a557f5acfe506e0aff6ea20c7b7cb4cb368b8033 100644 --- a/core/modules/image/tests/modules/image_module_test/image_module_test.module +++ b/core/modules/image/tests/modules/image_module_test/image_module_test.module @@ -7,44 +7,9 @@ declare(strict_types=1); -use Drupal\image\ImageStyleInterface; - function image_module_test_file_download($uri) { $default_uri = \Drupal::state()->get('image.test_file_download', FALSE); if ($default_uri == $uri) { return ['X-Image-Owned-By' => 'image_module_test']; } } - -/** - * Implements hook_image_effect_info_alter(). - */ -function image_module_test_image_effect_info_alter(&$effects) { - $state = \Drupal::state(); - // The 'image_module_test.counter' state variable value is set and accessed - // from the ImageEffectsTest::testImageEffectsCaching() test and used to - // signal if the image effect plugin definitions were computed or were - // retrieved from the cache. - // @see \Drupal\Tests\image\Kernel\ImageEffectsTest::testImageEffectsCaching() - $counter = $state->get('image_module_test.counter'); - // Increase the test counter, signaling that image effects were processed, - // rather than being served from the cache. - $state->set('image_module_test.counter', ++$counter); -} - -/** - * Implements hook_image_style_presave(). - * - * Used to save test third party settings in the image style entity. - */ -function image_module_test_image_style_presave(ImageStyleInterface $style) { - $style->setThirdPartySetting('image_module_test', 'foo', 'bar'); -} - -/** - * Implements hook_image_style_flush(). - */ -function image_module_test_image_style_flush($style, $path = NULL) { - $state = \Drupal::state(); - $state->set('image_module_test_image_style_flush.called', $path); -} diff --git a/core/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php b/core/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1ae806ca92aac88b25dcda6d3002123269f3474c --- /dev/null +++ b/core/modules/image/tests/modules/image_module_test/src/Hook/ImageModuleTestHooks.php @@ -0,0 +1,51 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\image_module_test\Hook; + +use Drupal\image\ImageStyleInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for image_module_test. + */ +class ImageModuleTestHooks { + + /** + * Implements hook_image_effect_info_alter(). + */ + #[Hook('image_effect_info_alter')] + public function imageEffectInfoAlter(&$effects) { + $state = \Drupal::state(); + // The 'image_module_test.counter' state variable value is set and accessed + // from the ImageEffectsTest::testImageEffectsCaching() test and used to + // signal if the image effect plugin definitions were computed or were + // retrieved from the cache. + // @see \Drupal\Tests\image\Kernel\ImageEffectsTest::testImageEffectsCaching() + $counter = $state->get('image_module_test.counter'); + // Increase the test counter, signaling that image effects were processed, + // rather than being served from the cache. + $state->set('image_module_test.counter', ++$counter); + } + + /** + * Implements hook_image_style_presave(). + * + * Used to save test third party settings in the image style entity. + */ + #[Hook('image_style_presave')] + public function imageStylePresave(ImageStyleInterface $style) { + $style->setThirdPartySetting('image_module_test', 'foo', 'bar'); + } + + /** + * Implements hook_image_style_flush(). + */ + #[Hook('image_style_flush')] + public function imageStyleFlush($style, $path = NULL) { + $state = \Drupal::state(); + $state->set('image_module_test_image_style_flush.called', $path); + } + +} diff --git a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php index e9868df9cc1e12db8d124a4d88f66f752580ff06..d65c2c8fa91e602f266e79404b04ad0507b88473 100644 --- a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php +++ b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php @@ -31,6 +31,9 @@ class ImageDimensionsTest extends BrowserTestBase { */ protected $defaultTheme = 'stark'; + /** + * {@inheritdoc} + */ protected $profile = 'testing'; /** diff --git a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php index 350e37eecb9dcf2b0e0d1759ee45c4c1161e1bca..d65f793291315ea7ab81b6982b1c81dcfd5f4bee 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php @@ -55,7 +55,7 @@ public function testImageFieldFormattersPrivate(): void { /** * Tests image formatters on node display. */ - public function _testImageFieldFormatters($scheme) { + public function _testImageFieldFormatters($scheme): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php index afbf29003fe5c7f42d30add42ee688c6cfdfb0c9..f2b1f52fa6794e58bfb72cc1dee2d8979cd275c3 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php +++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php @@ -18,7 +18,6 @@ * - image.module: * image_style_options() * \Drupal\image\ImageStyleInterface::flush() - * image_filter_keyword() */ /** @@ -95,13 +94,13 @@ public function previewNodeImage($image, $field_name, $type) { /** * Upload an image to a node. * - * @param $image + * @param \stdClass $image * A file object representing the image to upload. - * @param $field_name + * @param string $field_name * Name of the image field the image should be attached to. - * @param $type + * @param string $type * The type of node to create. - * @param $alt + * @param string $alt * The alt text for the image. Use if the field settings require alt text. */ public function uploadNodeImage($image, $field_name, $type, $alt = '') { diff --git a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php index 25e753b9ed8b0020c4840b542af7f8935621b203..63b2a23a491804305ab5fe09f6c97058647cc927 100644 --- a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php +++ b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php @@ -149,7 +149,7 @@ public function testImageStyleUrlForMissingSourceImage(): void { /** * Tests building an image style URL. */ - public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash = FALSE, $langcode = FALSE) { + public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash = FALSE, $langcode = FALSE): void { $this->prepareRequestForGenerator($clean_url); // Make the default scheme neither "public" nor "private" to verify the diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php index faea9dd8d4b39c37d01976e65354304ce9f43739..2da7f3edd9b1211250208e104cfca4f7087c7f4a 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php @@ -57,6 +57,7 @@ public function testAjaxEnabledEffectForm(): void { foreach ($style->getEffects() as $uuid => $effect) { $effect_path = $admin_path . '/manage/' . $style_name . '/effects/' . $uuid; $this->drupalGet($effect_path); + $this->assertSession()->fieldValueEquals('data[test_parameter]', '100'); $page->findField('data[test_parameter]')->setValue(111); $ajax_value = $page->find('css', '#ajax-value')->getText(); $this->assertSame('Ajax value bar', $ajax_value); @@ -67,7 +68,32 @@ public function testAjaxEnabledEffectForm(): void { })); $page->pressButton('Update effect'); $assert->statusMessageContains('The image effect was successfully applied.', 'status'); + $this->drupalGet($effect_path); + $this->assertSession()->fieldValueEquals('data[test_parameter]', '111'); } + + // Edit the 1st effect, multiple AJAX calls before updating. + $style = ImageStyle::load($style_name); + $uuid = array_values($style->getEffects()->getInstanceIds())[0]; + $this->drupalGet($admin_path . '/manage/' . $style_name . '/effects/' . $uuid); + $this->assertSession()->fieldValueEquals('data[test_parameter]', '111'); + $field = $page->findField('data[test_parameter]'); + $field->setValue(200); + $page->pressButton('Ajax refresh'); + $this->assertSession()->assertExpectedAjaxRequest(1); + $field->setValue(300); + $page->pressButton('Ajax refresh'); + $this->assertSession()->assertExpectedAjaxRequest(2); + $field->setValue(400); + $page->pressButton('Ajax refresh'); + $this->assertSession()->assertExpectedAjaxRequest(3); + $page->pressButton('Update effect'); + $this->assertSession()->statusMessageContains('The image effect was successfully applied.', 'status'); + $style = ImageStyle::load($style_name); + $effectConfiguration = $style->getEffect($uuid)->getConfiguration(); + $this->assertSame(400, $effectConfiguration['data']['test_parameter']); + $this->drupalGet($admin_path . '/manage/' . $style_name . '/effects/' . $uuid); + $this->assertSession()->fieldValueEquals('data[test_parameter]', '400'); } } diff --git a/core/modules/image/tests/src/Kernel/ImageEffectsTest.php b/core/modules/image/tests/src/Kernel/ImageEffectsTest.php index 6b7662e33e43e4829614e22c967c948f4bb1da4c..1e5c7533922571a97de56c902af1ced6ac85da7b 100644 --- a/core/modules/image/tests/src/Kernel/ImageEffectsTest.php +++ b/core/modules/image/tests/src/Kernel/ImageEffectsTest.php @@ -87,7 +87,7 @@ public function testCropEffect(): void { // @todo Test also keyword offsets in #3040887. // @see https://www.drupal.org/project/drupal/issues/3040887 $this->assertImageEffect(['crop'], 'image_crop', [ - 'anchor' => 'top-1', + 'anchor' => 'top-left', 'width' => 3, 'height' => 4, ]); @@ -97,7 +97,7 @@ public function testCropEffect(): void { // X was passed correctly. $this->assertEquals(0, $calls['crop'][0][0]); // Y was passed correctly. - $this->assertEquals(1, $calls['crop'][0][1]); + $this->assertEquals(0, $calls['crop'][0][1]); // Width was passed correctly. $this->assertEquals(3, $calls['crop'][0][2]); // Height was passed correctly. @@ -131,7 +131,7 @@ public function testScaleAndCropEffect(): void { // Check the parameters. $calls = $this->imageTestGetAllCalls(); // X was computed and passed correctly. - $this->assertEquals(7.5, $calls['scale_and_crop'][0][0]); + $this->assertEquals(8, $calls['scale_and_crop'][0][0]); // Y was computed and passed correctly. $this->assertEquals(0, $calls['scale_and_crop'][0][1]); // Width was computed and passed correctly. @@ -145,7 +145,7 @@ public function testScaleAndCropEffect(): void { */ public function testScaleAndCropEffectWithAnchor(): void { $this->assertImageEffect(['scale_and_crop'], 'image_scale_and_crop', [ - 'anchor' => 'top-1', + 'anchor' => 'top-left', 'width' => 5, 'height' => 10, ]); @@ -155,7 +155,7 @@ public function testScaleAndCropEffectWithAnchor(): void { // X was computed and passed correctly. $this->assertEquals(0, $calls['scale_and_crop'][0][0]); // Y was computed and passed correctly. - $this->assertEquals(1, $calls['scale_and_crop'][0][1]); + $this->assertEquals(0, $calls['scale_and_crop'][0][1]); // Width was computed and passed correctly. $this->assertEquals(5, $calls['scale_and_crop'][0][2]); // Height was computed and passed correctly. diff --git a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php index 86fd64734b66672d85e6336dd148bf26cbf77b2b..3cd993c66aece14c43616e36b518b4bf0cfc393d 100644 --- a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php +++ b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php @@ -57,7 +57,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); foreach ($this->providerTestCustomStreamWrappers() as $stream_wrapper) { $scheme = $stream_wrapper[0]; diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php index e8ce5a8ddbe3ce35ebb4f2153551a2c86625a000..8bb22814ab3e4876e278ead46f7214da5ad234fb 100644 --- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php +++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php @@ -13,6 +13,9 @@ */ class MigrateImageSettingsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['image']; /** diff --git a/core/modules/image/tests/src/Unit/ImageDeprecationTest.php b/core/modules/image/tests/src/Unit/ImageDeprecationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..255f3428435118f518a65acd777f0bfd33c05bd2 --- /dev/null +++ b/core/modules/image/tests/src/Unit/ImageDeprecationTest.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\image\Unit; + +use Drupal\Tests\UnitTestCase; + +/** + * @group Image + * @group legacy + */ +class ImageDeprecationTest extends UnitTestCase { + + /** + * Tests deprecation of image_filter_keyword. + */ + public function testImageFilterKeywordDeprecation(): void { + include_once __DIR__ . '/../../../image.module'; + $this->expectDeprecation('image_filter_keyword() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use \Drupal\Component\Utility\Image::getKeywordOffset() instead. See https://www.drupal.org/node/3268441'); + $this->assertSame('miss', image_filter_keyword('miss', 0, 0)); + } + +} diff --git a/core/modules/inline_form_errors/inline_form_errors.module b/core/modules/inline_form_errors/inline_form_errors.module index 66541146da35af1aa6a8a97a4d0f935b159b9f67..4d2f12be9edefc50e1379f7bbe48dc4719ee9c49 100644 --- a/core/modules/inline_form_errors/inline_form_errors.module +++ b/core/modules/inline_form_errors/inline_form_errors.module @@ -2,31 +2,8 @@ /** * @file - * Enables inline form errors. */ -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\inline_form_errors\RenderElementHelper; - -/** - * Implements hook_help(). - */ -function inline_form_errors_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.inline_form_errors': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Inline Form Errors module makes it easier for users to identify which errors need to be resolved by providing a summary of all errors and by placing the individual error messages next to the form elements themselves. For more information, see the <a href=":inline_form_error">online documentation for the Inline Form Errors module</a>.', [':inline_form_error' => 'https://www.drupal.org/docs/8/core/modules/inline-form-errors']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Displaying error messages') . '</dt>'; - $output .= '<dd>' . t('When a form is not filled in correctly (for example, if a required field is left blank), a warning message is displayed at the top of the form. This message links to the affected form elements, and individual error messages are displayed next to each form element.') . '</dd>'; - $output .= '<dt>' . t('Displaying error messages in browsers with HTML5 form validation') . '</dt>'; - $output .= '<dd>' . t('In browsers that support HTML5 form validation, users will first see the error messages generated by their browser. In this case, the inline form error messages are only displayed after the HTML5 validation errors have been resolved.') . '</dd>'; - return $output; - } -} - /** * Implements hook_preprocess_HOOK() for form element templates. */ @@ -55,13 +32,6 @@ function inline_form_errors_preprocess_datetime_wrapper(&$variables) { _inline_form_errors_set_errors($variables); } -/** - * Implements hook_element_info_alter(). - */ -function inline_form_errors_element_info_alter(array &$info) { - \Drupal::classResolver(RenderElementHelper::class)->alterElementInfo($info); -} - /** * Populates form errors in the template. */ diff --git a/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php b/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..83b7739746ff4c889a535cb5f6394f14c3b98478 --- /dev/null +++ b/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php @@ -0,0 +1,44 @@ +<?php + +namespace Drupal\inline_form_errors\Hook; + +use Drupal\inline_form_errors\RenderElementHelper; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for inline_form_errors. + */ +class InlineFormErrorsHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.inline_form_errors': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Inline Form Errors module makes it easier for users to identify which errors need to be resolved by providing a summary of all errors and by placing the individual error messages next to the form elements themselves. For more information, see the <a href=":inline_form_error">online documentation for the Inline Form Errors module</a>.', [ + ':inline_form_error' => 'https://www.drupal.org/docs/8/core/modules/inline-form-errors', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Displaying error messages') . '</dt>'; + $output .= '<dd>' . t('When a form is not filled in correctly (for example, if a required field is left blank), a warning message is displayed at the top of the form. This message links to the affected form elements, and individual error messages are displayed next to each form element.') . '</dd>'; + $output .= '<dt>' . t('Displaying error messages in browsers with HTML5 form validation') . '</dt>'; + $output .= '<dd>' . t('In browsers that support HTML5 form validation, users will first see the error messages generated by their browser. In this case, the inline form error messages are only displayed after the HTML5 validation errors have been resolved.') . '</dd>'; + return $output; + } + } + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(array &$info) { + \Drupal::classResolver(RenderElementHelper::class)->alterElementInfo($info); + } + +} diff --git a/core/modules/jsonapi/jsonapi.api.php b/core/modules/jsonapi/jsonapi.api.php index 4c024f814bcce07d21dec7d2a5176cb115cf0f41..54033a137c4c753619f22de0999a4d9483b856d8 100644 --- a/core/modules/jsonapi/jsonapi.api.php +++ b/core/modules/jsonapi/jsonapi.api.php @@ -5,6 +5,9 @@ * Documentation related to JSON:API. */ +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Access\AccessResult; /** @@ -270,7 +273,7 @@ * * @see hook_jsonapi_ENTITY_TYPE_filter_access() */ -function hook_jsonapi_entity_filter_access(\Drupal\Core\Entity\EntityTypeInterface $entity_type, \Drupal\Core\Session\AccountInterface $account) { +function hook_jsonapi_entity_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { // For every entity type that has an admin permission, allow access to filter // by all entities of that type to users with that permission. if ($admin_permission = $entity_type->getAdminPermission()) { @@ -300,7 +303,7 @@ function hook_jsonapi_entity_filter_access(\Drupal\Core\Entity\EntityTypeInterfa * * @see hook_jsonapi_entity_filter_access() */ -function hook_jsonapi_ENTITY_TYPE_filter_access(\Drupal\Core\Entity\EntityTypeInterface $entity_type, \Drupal\Core\Session\AccountInterface $account) { +function hook_jsonapi_ENTITY_TYPE_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { return ([ JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer llamas'), JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'view all published llamas'), @@ -338,7 +341,7 @@ function hook_jsonapi_ENTITY_TYPE_filter_access(\Drupal\Core\Entity\EntityTypeIn * @return \Drupal\Core\Access\AccessResultInterface * The access result. */ -function hook_jsonapi_entity_field_filter_access(\Drupal\Core\Field\FieldDefinitionInterface $field_definition, \Drupal\Core\Session\AccountInterface $account) { +function hook_jsonapi_entity_field_filter_access(FieldDefinitionInterface $field_definition, AccountInterface $account) { if ($field_definition->getTargetEntityTypeId() === 'node' && $field_definition->getName() === 'field_sensitive_data') { $has_sufficient_access = FALSE; foreach (['administer nodes', 'view all sensitive field data'] as $permission) { diff --git a/core/modules/jsonapi/jsonapi.install b/core/modules/jsonapi/jsonapi.install index 48c0ed89aeaa67bb4580ad2e9de30eb9de93df49..8db31414e1e4051c6e0444532b9caef726f5d052 100644 --- a/core/modules/jsonapi/jsonapi.install +++ b/core/modules/jsonapi/jsonapi.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function jsonapi_install() { +function jsonapi_install(): void { $module_handler = \Drupal::moduleHandler(); $potential_conflicts = [ 'content_translation', @@ -79,6 +79,6 @@ function jsonapi_requirements($phase) { /** * Implements hook_update_last_removed(). */ -function jsonapi_update_last_removed() { +function jsonapi_update_last_removed(): int { return 9401; } diff --git a/core/modules/jsonapi/jsonapi.module b/core/modules/jsonapi/jsonapi.module index 6f0cf21dc73b2ebdb4a6352a2dc427c69c2a8d2e..69414af650b9c7843d5240b4867fe698f214e83b 100644 --- a/core/modules/jsonapi/jsonapi.module +++ b/core/modules/jsonapi/jsonapi.module @@ -2,16 +2,8 @@ /** * @file - * Module implementation file. */ -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\jsonapi\Routing\Routes as JsonApiRoutes; - /** * Array key for denoting type-based filtering access. * @@ -76,244 +68,3 @@ * @see hook_jsonapi_ENTITY_TYPE_filter_access() */ const JSONAPI_FILTER_AMONG_OWN = 'filter_among_own'; - -/** - * Implements hook_help(). - */ -function jsonapi_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.jsonapi': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The JSON:API module is a fully compliant implementation of the <a href=":spec">JSON:API Specification</a>. By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on what matters: your application. Clients built around JSON:API are able to take advantage of features like efficient response caching, which can sometimes eliminate network requests entirely. For more information, see the <a href=":docs">online documentation for the JSON:API module</a>.', [ - ':spec' => 'https://jsonapi.org', - ':docs' => 'https://www.drupal.org/docs/8/modules/json-api', - ]) . '</p>'; - $output .= '<dl>'; - $output .= '<dt>' . t('General') . '</dt>'; - $output .= '<dd>' . t('JSON:API is a particular implementation of REST that provides conventions for resource relationships, collections, filters, pagination, and sorting. These conventions help developers build clients faster and encourages reuse of code.') . '</dd>'; - $output .= '<dd>' . t('The <a href=":jsonapi-docs">JSON:API</a> and <a href=":rest-docs">RESTful Web Services</a> modules serve similar purposes. <a href=":comparison">Read the comparison of the RESTFul Web Services and JSON:API modules</a> to determine the best choice for your site.', [ - ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/json-api', - ':rest-docs' => 'https://www.drupal.org/docs/8/core/modules/rest', - ':comparison' => 'https://www.drupal.org/docs/8/modules/jsonapi/jsonapi-vs-cores-rest-module', - ]) . '</dd>'; - $output .= '<dd>' . t('Some multilingual features currently do not work well with JSON:API. See the <a href=":jsonapi-docs">JSON:API multilingual support documentation</a> for more information on the current status of multilingual support.', [ - ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations', - ]) . '</dd>'; - $output .= '<dd>' . t('Revision support is currently read-only and only for the "Content" and "Media" entity types in JSON:API. See the <a href=":jsonapi-docs">JSON:API revision support documentation</a> for more information on the current status of revision support.', [ - ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/revisions', - ]) . '</dd>'; - $output .= '</dl>'; - - return $output; - } - return NULL; -} - -/** - * Implements hook_modules_installed(). - */ -function jsonapi_modules_installed($modules) { - $potential_conflicts = [ - 'content_translation', - 'config_translation', - 'language', - ]; - if (!empty(array_intersect($modules, $potential_conflicts))) { - \Drupal::messenger()->addWarning(t('Some multilingual features currently do not work well with JSON:API. See the <a href=":jsonapi-docs">JSON:API multilingual support documentation</a> for more information on the current status of multilingual support.', [ - ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations', - ])); - } -} - -/** - * Implements hook_entity_bundle_create(). - */ -function jsonapi_entity_bundle_create() { - JsonApiRoutes::rebuild(); -} - -/** - * Implements hook_entity_bundle_delete(). - */ -function jsonapi_entity_bundle_delete() { - JsonApiRoutes::rebuild(); -} - -/** - * Implements hook_entity_create(). - */ -function jsonapi_entity_create(EntityInterface $entity) { - if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { - // @todo Only do this when relationship fields are updated, not just any field. - JsonApiRoutes::rebuild(); - } -} - -/** - * Implements hook_entity_delete(). - */ -function jsonapi_entity_delete(EntityInterface $entity) { - if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { - // @todo Only do this when relationship fields are updated, not just any field. - JsonApiRoutes::rebuild(); - } -} - -/** - * Implements hook_jsonapi_entity_filter_access(). - */ -function jsonapi_jsonapi_entity_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // All core entity types and most or all contrib entity types allow users - // with the entity type's administrative permission to view all of the - // entities, so enable similarly permissive filtering to those users as well. - // A contrib module may override this decision by returning - // AccessResult::forbidden() from its implementation of this hook. - if ($admin_permission = $entity_type->getAdminPermission()) { - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, $admin_permission), - ]); - } -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'block_content'. - */ -function jsonapi_jsonapi_block_content_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\block_content\BlockContentAccessControlHandler::checkAccess() - // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for - // (isReusable()), so this does not have to. - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access block library'), - JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed(), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'comment'. - */ -function jsonapi_jsonapi_comment_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\comment\CommentAccessControlHandler::checkAccess() - // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for - // (access to the commented entity), so this does not have to. - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer comments'), - JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'access comments'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'entity_test'. - */ -function jsonapi_jsonapi_entity_test_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess() - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'view test entity'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'file'. - */ -function jsonapi_jsonapi_file_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\file\FileAccessControlHandler::checkAccess() - // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for - // (public OR owner), so this does not have to. - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access content'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'media'. - */ -function jsonapi_jsonapi_media_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\media\MediaAccessControlHandler::checkAccess() - return ([ - JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'view media'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'node'. - */ -function jsonapi_jsonapi_node_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\node\NodeAccessControlHandler::access() - if ($account->hasPermission('bypass node access')) { - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowed()->cachePerPermissions(), - ]); - } - if (!$account->hasPermission('access content')) { - $forbidden = AccessResult::forbidden("The 'access content' permission is required.")->cachePerPermissions(); - return ([ - JSONAPI_FILTER_AMONG_ALL => $forbidden, - JSONAPI_FILTER_AMONG_OWN => $forbidden, - JSONAPI_FILTER_AMONG_PUBLISHED => $forbidden, - // For legacy reasons, the Node entity type has a "status" key, so forbid - // this subset as well, even though it has no semantic meaning. - JSONAPI_FILTER_AMONG_ENABLED => $forbidden, - ]); - } - - return ([ - // @see \Drupal\node\NodeAccessControlHandler::checkAccess() - JSONAPI_FILTER_AMONG_OWN => AccessResult::allowedIfHasPermission($account, 'view own unpublished content'), - - // @see \Drupal\node\NodeGrantDatabaseStorage::access() - // Note that: - // - This is just for the default grant. Other node access conditions are - // added via the 'node_access' query tag. - // - Permissions were checked earlier in this function, so we must vary the - // cache by them. - JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed()->cachePerPermissions(), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'shortcut'. - */ -function jsonapi_jsonapi_shortcut_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\shortcut\ShortcutAccessControlHandler::checkAccess() - // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for - // (shortcut_set = $shortcut_set_storage->getDisplayedToUser($current_user)), - // so this does not have to. - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer shortcuts') - ->orIf(AccessResult::allowedIfHasPermissions($account, ['access shortcuts', 'customize shortcut links'])), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'taxonomy_term'. - */ -function jsonapi_jsonapi_taxonomy_term_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\taxonomy\TermAccessControlHandler::checkAccess() - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer taxonomy'), - JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'access content'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'user'. - */ -function jsonapi_jsonapi_user_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\user\UserAccessControlHandler::checkAccess() - // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for - // (!isAnonymous()), so this does not have to. - return ([ - JSONAPI_FILTER_AMONG_OWN => AccessResult::allowed(), - JSONAPI_FILTER_AMONG_ENABLED => AccessResult::allowedIfHasPermission($account, 'access user profiles'), - ]); -} - -/** - * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'workspace'. - */ -function jsonapi_jsonapi_workspace_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) { - // @see \Drupal\workspaces\WorkspaceAccessControlHandler::checkAccess() - return ([ - JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'view any workspace'), - JSONAPI_FILTER_AMONG_OWN => AccessResult::allowedIfHasPermission($account, 'view own workspace'), - ]); -} diff --git a/core/modules/jsonapi/src/Hook/JsonapiHooks.php b/core/modules/jsonapi/src/Hook/JsonapiHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0956eed10723e26189d289e7661c940e108e208a --- /dev/null +++ b/core/modules/jsonapi/src/Hook/JsonapiHooks.php @@ -0,0 +1,265 @@ +<?php + +namespace Drupal\jsonapi\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\jsonapi\Routing\Routes; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for jsonapi. + */ +class JsonapiHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.jsonapi': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The JSON:API module is a fully compliant implementation of the <a href=":spec">JSON:API Specification</a>. By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on what matters: your application. Clients built around JSON:API are able to take advantage of features like efficient response caching, which can sometimes eliminate network requests entirely. For more information, see the <a href=":docs">online documentation for the JSON:API module</a>.', [ + ':spec' => 'https://jsonapi.org', + ':docs' => 'https://www.drupal.org/docs/8/modules/json-api', + ]) . '</p>'; + $output .= '<dl>'; + $output .= '<dt>' . t('General') . '</dt>'; + $output .= '<dd>' . t('JSON:API is a particular implementation of REST that provides conventions for resource relationships, collections, filters, pagination, and sorting. These conventions help developers build clients faster and encourages reuse of code.') . '</dd>'; + $output .= '<dd>' . t('The <a href=":jsonapi-docs">JSON:API</a> and <a href=":rest-docs">RESTful Web Services</a> modules serve similar purposes. <a href=":comparison">Read the comparison of the RESTFul Web Services and JSON:API modules</a> to determine the best choice for your site.', [ + ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/json-api', + ':rest-docs' => 'https://www.drupal.org/docs/8/core/modules/rest', + ':comparison' => 'https://www.drupal.org/docs/8/modules/jsonapi/jsonapi-vs-cores-rest-module', + ]) . '</dd>'; + $output .= '<dd>' . t('Some multilingual features currently do not work well with JSON:API. See the <a href=":jsonapi-docs">JSON:API multilingual support documentation</a> for more information on the current status of multilingual support.', [':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations']) . '</dd>'; + $output .= '<dd>' . t('Revision support is currently read-only and only for the "Content" and "Media" entity types in JSON:API. See the <a href=":jsonapi-docs">JSON:API revision support documentation</a> for more information on the current status of revision support.', [':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/revisions']) . '</dd>'; + $output .= '</dl>'; + return $output; + } + return NULL; + } + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + $potential_conflicts = ['content_translation', 'config_translation', 'language']; + if (!empty(array_intersect($modules, $potential_conflicts))) { + \Drupal::messenger()->addWarning(t('Some multilingual features currently do not work well with JSON:API. See the <a href=":jsonapi-docs">JSON:API multilingual support documentation</a> for more information on the current status of multilingual support.', [':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations'])); + } + } + + /** + * Implements hook_entity_bundle_create(). + */ + #[Hook('entity_bundle_create')] + public function entityBundleCreate() { + Routes::rebuild(); + } + + /** + * Implements hook_entity_bundle_delete(). + */ + #[Hook('entity_bundle_delete')] + public function entityBundleDelete() { + Routes::rebuild(); + } + + /** + * Implements hook_entity_create(). + */ + #[Hook('entity_create')] + public function entityCreate(EntityInterface $entity) { + if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { + // @todo Only do this when relationship fields are updated, not just any field. + Routes::rebuild(); + } + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { + // @todo Only do this when relationship fields are updated, not just any field. + Routes::rebuild(); + } + } + + /** + * Implements hook_jsonapi_entity_filter_access(). + */ + #[Hook('jsonapi_entity_filter_access')] + public function jsonapiEntityFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // All core entity types and most or all contrib entity types allow users + // with the entity type's administrative permission to view all of the + // entities, so enable similarly permissive filtering to those users as well. + // A contrib module may override this decision by returning + // AccessResult::forbidden() from its implementation of this hook. + if ($admin_permission = $entity_type->getAdminPermission()) { + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, $admin_permission), + ]; + } + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'block_content'. + */ + #[Hook('jsonapi_block_content_filter_access')] + public function jsonapiBlockContentFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\block_content\BlockContentAccessControlHandler::checkAccess() + // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for + // (isReusable()), so this does not have to. + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access block library'), + JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed(), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'comment'. + */ + #[Hook('jsonapi_comment_filter_access')] + public function jsonapiCommentFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\comment\CommentAccessControlHandler::checkAccess() + // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for + // (access to the commented entity), so this does not have to. + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer comments'), + JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'access comments'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'entity_test'. + */ + #[Hook('jsonapi_entity_test_filter_access')] + public function jsonapiEntityTestFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess() + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'view test entity'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'file'. + */ + #[Hook('jsonapi_file_filter_access')] + public function jsonapiFileFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\file\FileAccessControlHandler::checkAccess() + // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for + // (public OR owner), so this does not have to. + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access content'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'media'. + */ + #[Hook('jsonapi_media_filter_access')] + public function jsonapiMediaFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\media\MediaAccessControlHandler::checkAccess() + return [ + JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'view media'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'node'. + */ + #[Hook('jsonapi_node_filter_access')] + public function jsonapiNodeFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\node\NodeAccessControlHandler::access() + if ($account->hasPermission('bypass node access')) { + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowed()->cachePerPermissions(), + ]; + } + if (!$account->hasPermission('access content')) { + $forbidden = AccessResult::forbidden("The 'access content' permission is required.")->cachePerPermissions(); + return [ + JSONAPI_FILTER_AMONG_ALL => $forbidden, + JSONAPI_FILTER_AMONG_OWN => $forbidden, + JSONAPI_FILTER_AMONG_PUBLISHED => $forbidden, + // For legacy reasons, the Node entity type has a "status" key, so forbid + // this subset as well, even though it has no semantic meaning. + JSONAPI_FILTER_AMONG_ENABLED => $forbidden, + ]; + } + return [ + // @see \Drupal\node\NodeAccessControlHandler::checkAccess() + JSONAPI_FILTER_AMONG_OWN => AccessResult::allowedIfHasPermission($account, 'view own unpublished content'), + // @see \Drupal\node\NodeGrantDatabaseStorage::access() + // Note that: + // - This is just for the default grant. Other node access conditions are + // added via the 'node_access' query tag. + // - Permissions were checked earlier in this function, so we must vary the + // cache by them. + JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed()->cachePerPermissions(), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'shortcut'. + */ + #[Hook('jsonapi_shortcut_filter_access')] + public function jsonapiShortcutFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\shortcut\ShortcutAccessControlHandler::checkAccess() + // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for + // (shortcut_set = $shortcut_set_storage->getDisplayedToUser($current_user)), + // so this does not have to. + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer shortcuts')->orIf(AccessResult::allowedIfHasPermissions($account, [ + 'access shortcuts', + 'customize shortcut links', + ])), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'taxonomy_term'. + */ + #[Hook('jsonapi_taxonomy_term_filter_access')] + public function jsonapiTaxonomyTermFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\taxonomy\TermAccessControlHandler::checkAccess() + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer taxonomy'), + JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'access content'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'user'. + */ + #[Hook('jsonapi_user_filter_access')] + public function jsonapiUserFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\user\UserAccessControlHandler::checkAccess() + // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for + // (!isAnonymous()), so this does not have to. + return [ + JSONAPI_FILTER_AMONG_OWN => AccessResult::allowed(), + JSONAPI_FILTER_AMONG_ENABLED => AccessResult::allowedIfHasPermission($account, 'access user profiles'), + ]; + } + + /** + * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'workspace'. + */ + #[Hook('jsonapi_workspace_filter_access')] + public function jsonapiWorkspaceFilterAccess(EntityTypeInterface $entity_type, AccountInterface $account) { + // @see \Drupal\workspaces\WorkspaceAccessControlHandler::checkAccess() + return [ + JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'view any workspace'), + JSONAPI_FILTER_AMONG_OWN => AccessResult::allowedIfHasPermission($account, 'view own workspace'), + ]; + } + +} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/jsonapi_test_field_access.module b/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/jsonapi_test_field_access.module deleted file mode 100644 index 275e3d9ab2750164c9baef21a4a8d0c8b136142b..0000000000000000000000000000000000000000 --- a/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/jsonapi_test_field_access.module +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for testing the JSON:API module. - */ - -declare(strict_types=1); - -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_field_access(). - */ -function jsonapi_test_field_access_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account) { - // @see \Drupal\Tests\jsonapi\Functional\ResourceTestBase::testRelationships(). - if ($field_definition->getName() === 'field_jsonapi_test_entity_ref') { - // Forbid access in all cases. - $permission = "field_jsonapi_test_entity_ref $operation access"; - $access_result = $account->hasPermission($permission) - ? AccessResult::allowed() - : AccessResult::forbidden("The '$permission' permission is required."); - return $access_result->addCacheContexts(['user.permissions']); - } - - // No opinion. - return AccessResult::neutral(); -} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/src/Hook/JsonapiTestFieldAccessHooks.php b/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/src/Hook/JsonapiTestFieldAccessHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0eac08911f9190cea33cc8ca958775f2b3f00ade --- /dev/null +++ b/core/modules/jsonapi/tests/modules/jsonapi_test_field_access/src/Hook/JsonapiTestFieldAccessHooks.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\jsonapi_test_field_access\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for jsonapi_test_field_access. + */ +class JsonapiTestFieldAccessHooks { + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account) { + // @see \Drupal\Tests\jsonapi\Functional\ResourceTestBase::testRelationships(). + if ($field_definition->getName() === 'field_jsonapi_test_entity_ref') { + // Forbid access in all cases. + $permission = "field_jsonapi_test_entity_ref {$operation} access"; + $access_result = $account->hasPermission($permission) ? AccessResult::allowed() : AccessResult::forbidden("The '{$permission}' permission is required."); + return $access_result->addCacheContexts(['user.permissions']); + } + // No opinion. + return AccessResult::neutral(); + } + +} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/jsonapi_test_non_cacheable_methods.module b/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/jsonapi_test_non_cacheable_methods.module deleted file mode 100644 index 665052f6803db160f8a8113b63a8e59e6860e102..0000000000000000000000000000000000000000 --- a/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/jsonapi_test_non_cacheable_methods.module +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for testing the JSON:API module. - * - * @see: https://www.drupal.org/project/drupal/issues/3072076. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Url; - -/** - * Implements hook_entity_presave(). - */ -function jsonapi_test_non_cacheable_methods_entity_presave(EntityInterface $entity) { - Url::fromRoute('<front>')->toString(); -} - -/** - * Implements hook_entity_predelete(). - */ -function jsonapi_test_non_cacheable_methods_entity_predelete(EntityInterface $entity) { - Url::fromRoute('<front>')->toString(); -} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/src/Hook/JsonapiTestNonCacheableMethodsHooks.php b/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/src/Hook/JsonapiTestNonCacheableMethodsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f1ea916ce55d3f3d10933af3efd84b869823bdee --- /dev/null +++ b/core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/src/Hook/JsonapiTestNonCacheableMethodsHooks.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\jsonapi_test_non_cacheable_methods\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for jsonapi_test_non_cacheable_methods. + */ +class JsonapiTestNonCacheableMethodsHooks { + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + Url::fromRoute('<front>')->toString(); + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + Url::fromRoute('<front>')->toString(); + } + +} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_user/jsonapi_test_user.module b/core/modules/jsonapi/tests/modules/jsonapi_test_user/jsonapi_test_user.module deleted file mode 100644 index 7e553506aa1de4b438220bbd09cd40e7b92a16bb..0000000000000000000000000000000000000000 --- a/core/modules/jsonapi/tests/modules/jsonapi_test_user/jsonapi_test_user.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Support module for JSON:API user hooks testing. - */ - -declare(strict_types=1); - -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_user_format_name_alter(). - */ -function jsonapi_test_user_user_format_name_alter(&$name, AccountInterface $account) { - if ($account->isAnonymous()) { - $name = 'User ' . $account->id(); - } -} diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_user/src/Hook/JsonapiTestUserHooks.php b/core/modules/jsonapi/tests/modules/jsonapi_test_user/src/Hook/JsonapiTestUserHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d25b219163df94850f8325b1caafa83a4a656f5a --- /dev/null +++ b/core/modules/jsonapi/tests/modules/jsonapi_test_user/src/Hook/JsonapiTestUserHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\jsonapi_test_user\Hook; + +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for jsonapi_test_user. + */ +class JsonapiTestUserHooks { + + /** + * Implements hook_user_format_name_alter(). + */ + #[Hook('user_format_name_alter')] + public function userFormatNameAlter(&$name, AccountInterface $account) { + if ($account->isAnonymous()) { + $name = 'User ' . $account->id(); + } + } + +} diff --git a/core/modules/jsonapi/tests/src/Functional/ActionTest.php b/core/modules/jsonapi/tests/src/Functional/ActionTest.php index 78f60e65faff987f5a944d80b63238bbbc8597bc..f2f293ad6c337ed241a2afe998dfac8fafd54142 100644 --- a/core/modules/jsonapi/tests/src/Functional/ActionTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ActionTest.php @@ -45,7 +45,7 @@ class ActionTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer actions']); } diff --git a/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php b/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php index 17f9191c2d2a7a089d6b6cfda0631772ad3d8f38..c26bb17a3f1d5e6c016a99d04ead28ee37e9b232 100644 --- a/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php +++ b/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php @@ -45,7 +45,7 @@ class BaseFieldOverrideTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer node fields']); } diff --git a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php index 6c0adf820f07349dcde0dd6f3c9ff5d2f363fcf8..3678644af4726181103263e9be10a64dc14d44e1 100644 --- a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php +++ b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php @@ -66,7 +66,7 @@ class BlockContentTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole([ @@ -94,7 +94,7 @@ protected function setUpAuthorization($method) { /** * {@inheritdoc} */ - protected function setUpRevisionAuthorization($method) { + protected function setUpRevisionAuthorization($method): void { parent::setUpRevisionAuthorization($method); $this->grantPermissionsToTestedRole(['view any basic block content history']); } diff --git a/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php b/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php index efa1281ac40aaf49be2e0915caf63b8c2f3b661f..4fb58c343f46ca2c6732966bd4a821ae2a5badfa 100644 --- a/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php @@ -44,7 +44,7 @@ class BlockContentTypeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer block types']); } diff --git a/core/modules/jsonapi/tests/src/Functional/BlockTest.php b/core/modules/jsonapi/tests/src/Functional/BlockTest.php index db01d8b0b39de8c9d24c3962caefa9f7844d925d..1543feb48edbadde58d61c8cfcfcfe4dd7b1bef4 100644 --- a/core/modules/jsonapi/tests/src/Functional/BlockTest.php +++ b/core/modules/jsonapi/tests/src/Functional/BlockTest.php @@ -45,7 +45,7 @@ class BlockTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->entity->setVisibilityConfig('user_role', [])->save(); diff --git a/core/modules/jsonapi/tests/src/Functional/CommentTest.php b/core/modules/jsonapi/tests/src/Functional/CommentTest.php index 53edfec7e4b4fc7ccfd64b6c03ebdc9da9f76f9d..9f3a691fd665790ebd25b95cfc7941e7deed71c9 100644 --- a/core/modules/jsonapi/tests/src/Functional/CommentTest.php +++ b/core/modules/jsonapi/tests/src/Functional/CommentTest.php @@ -81,7 +81,7 @@ class CommentTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access comments', 'view test entity']); diff --git a/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php b/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php index 1d7ef3686790419f1dc1c480f17110f9c11776d2..4c63521082e5e6b005b3ea70152a2386d8cda1ef 100644 --- a/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php @@ -44,7 +44,7 @@ class CommentTypeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer comment types']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php b/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php index 089da6cad04232733d38d2a7eadb4e5bde276be4..e6fcf2230c17afc7a106ab120c1a8b0ebf48ad9d 100644 --- a/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php @@ -44,7 +44,7 @@ class ConfigTestTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['view config_test']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php index 3df7fc488d8a21a30f79919a7c82b5645ceb1000..ca11e4dfdfe790c42bac5c6cf59281b6bc706edc 100644 --- a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php @@ -47,7 +47,7 @@ class ConfigurableLanguageTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer languages']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php b/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php index b25f664d014b028a71b5f1e880f532d00e28471d..6601401603ff05107df0e8923ad0ee34926dc7fa 100644 --- a/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php @@ -44,7 +44,7 @@ class ContactFormTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['access site-wide contact form']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php b/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php index decdbf8175e959c79e84cfc4c3a1553e84b6b54a..a3446d7257d06de46eecc45cbf1a1aaa04411f30 100644 --- a/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php @@ -47,7 +47,7 @@ class ContentLanguageSettingsTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer languages']); } diff --git a/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php b/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php index 60db6fb82cd3e22338efd0c7e4eb0771b3c119a4..52575b69150a000a7be74582f7e215a3bdb1a107 100644 --- a/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php +++ b/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php @@ -49,7 +49,7 @@ class DateFormatTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer site configuration']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EditorTest.php b/core/modules/jsonapi/tests/src/Functional/EditorTest.php index d4c8b679db8a4cc1970beff63fd5aabdd12039ed..0cdd52931f75d687463d4dcf6d8b47c744205c2b 100644 --- a/core/modules/jsonapi/tests/src/Functional/EditorTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EditorTest.php @@ -48,7 +48,7 @@ class EditorTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer filters']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php b/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php index 1a42162bcf1d9d2a704c21e2d3e1aef4c43e7d96..45127dba6538d58c1b170bbe7ce7d562a065259a 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php @@ -45,7 +45,7 @@ class EntityFormDisplayTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer node form display']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php index c611d686aed1c98976bb7d16bb9eb18f167b9686..46df804ba6f1277a447305c060250496b901a72e 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php @@ -46,7 +46,7 @@ class EntityFormModeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer display modes']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityTestComputedFieldTest.php b/core/modules/jsonapi/tests/src/Functional/EntityTestComputedFieldTest.php index b5edf510c2ad56b84d43c40e92a80ea5a6ddd7d3..2163c58d365d9a30366df295eb75269d38070b98 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityTestComputedFieldTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityTestComputedFieldTest.php @@ -51,7 +51,7 @@ class EntityTestComputedFieldTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer entity_test content']); switch ($method) { diff --git a/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php b/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php index d40df7a61fed9ae5aa01b5ad3d80aee47f3b6027..c710fb0c3fb11b2e977b8ad5c594b8323a9de58c 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php @@ -66,7 +66,7 @@ class EntityTestMapFieldTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer entity_test content']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php b/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php index bccb6ee5bb3fcee8dea544e9bb05dd7a3270b82e..c468322f44a124612a90a8188929482ab928eadc 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php @@ -52,7 +52,7 @@ class EntityTestTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['view test entity']); diff --git a/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php b/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php index ef94743f64649a5b93a34ab30d587548fa8c6b14..628232d7d59030211c6ca5f99db55e1c5c3d8f88 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php @@ -45,7 +45,7 @@ class EntityViewDisplayTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer node display']); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php index 034c473cd32c4e5fe20cb583ef7a4e8459e35cf9..c85c4f55888dc09f53bc2ec259ec0056b5912592 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php @@ -46,7 +46,7 @@ class EntityViewModeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer display modes']); } diff --git a/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php b/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php index 57a4d2ffda49415050ad6501fdb633b1cc1180c9..d1bdc3d98b00598be4da0acc71054a22f30f197d 100644 --- a/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php @@ -48,7 +48,7 @@ class FieldConfigTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer node fields']); } diff --git a/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php b/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php index 6ec01159a92f8991d3ee9f7dfb4cf7cab4f84b5b..dfe693e5aa279d1db78f0fff9209b0dbb5afe8b6 100644 --- a/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php @@ -44,7 +44,7 @@ class FieldStorageConfigTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer node fields']); } diff --git a/core/modules/jsonapi/tests/src/Functional/FileTest.php b/core/modules/jsonapi/tests/src/Functional/FileTest.php index 63f384382c14d0367be59c19a5e9a2e968e52c41..1c89a7bcffcd0cccd24216ee6bbe1e891eb65a1f 100644 --- a/core/modules/jsonapi/tests/src/Functional/FileTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FileTest.php @@ -69,7 +69,7 @@ class FileTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access content']); @@ -92,7 +92,7 @@ protected function setUpAuthorization($method) { /** * Makes the current user the file owner. */ - protected function makeCurrentUserFileOwner() { + protected function makeCurrentUserFileOwner(): void { $account = User::load(2); $this->entity->setOwnerId($account->id()); $this->entity->setOwner($account); diff --git a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php index a667ea6653bb74cbdffbce23a5d7cbf1fda2e9a2..1a4b0a2d151072533a458a873497659e885bee55 100644 --- a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php @@ -363,7 +363,7 @@ protected function getPostDocument(): array { /** * Tests using the file upload POST route with invalid headers. */ - protected function testPostFileUploadInvalidHeaders() { + protected function testPostFileUploadInvalidHeaders(): void { $uri = Url::fromUri('base:' . static::$postUri); // The wrong content type header should return a 415 code. @@ -541,7 +541,7 @@ public function testFileUploadZeroByteFile(): void { /** * Tests using the file upload route with an invalid file type. */ - protected function testFileUploadInvalidFileType() { + protected function testFileUploadInvalidFileType(): void { $uri = Url::fromUri('base:' . static::$postUri); // Test with a JSON file. @@ -556,7 +556,7 @@ protected function testFileUploadInvalidFileType() { /** * Tests using the file upload route with a file size larger than allowed. */ - protected function testFileUploadLargerFileSize() { + protected function testFileUploadLargerFileSize(): void { // Set a limit of 50 bytes. $this->field->setSetting('max_filesize', 50) ->save(); @@ -575,7 +575,7 @@ protected function testFileUploadLargerFileSize() { /** * Tests using the file upload POST route with malicious extensions. */ - protected function testFileUploadMaliciousExtension() { + protected function testFileUploadMaliciousExtension(): void { // Allow all file uploads but system.file::allow_insecure_uploads is set to // FALSE. $this->field->setSetting('file_extensions', '')->save(); @@ -824,7 +824,7 @@ protected function getExpectedDocument($fid = 1, $expected_filename = 'example.t * * @see \GuzzleHttp\ClientInterface::request() */ - protected function fileRequest(Url $url, $file_contents, array $headers = []) { + protected function fileRequest(Url $url, $file_contents, array $headers = []): ResponseInterface { $request_options = []; $headers = $headers + [ // Set the required (and only accepted) content type for the request. @@ -846,7 +846,7 @@ protected function fileRequest(Url $url, $file_contents, array $headers = []) { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['view test entity']); diff --git a/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php b/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php index 503724b1b5965655fd859c50279da8f26c91807b..174a1bb4b20eaecc352b887ce067470a4c9980ef 100644 --- a/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php @@ -44,7 +44,7 @@ class FilterFormatTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer filters']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php b/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php index 04606c3c174a19d48e5675b35b20bef997b256be..23629ffa40b2ed69485fe43d4dcc819d3c5d1f52 100644 --- a/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php @@ -51,7 +51,7 @@ class ImageStyleTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer image styles']); } diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php index 1ed47faa06af64e4615d68f9d3c182622885aa43..3eaf0c4d3d0fb7ebca815d5abadbbed0611c411d 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php @@ -19,6 +19,7 @@ use Drupal\user\RoleInterface; use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\ServerException; +use Psr\Http\Message\ResponseInterface; /** * Provides helper methods for the JSON:API module's functional tests. @@ -218,7 +219,7 @@ protected function setUp(): void { * * @see \GuzzleHttp\ClientInterface::request */ - protected function request($method, Url $url, array $request_options) { + protected function request($method, Url $url, array $request_options): ResponseInterface { try { $response = $this->httpClient->request($method, $url->toString(), $request_options); } diff --git a/core/modules/jsonapi/tests/src/Functional/MediaTest.php b/core/modules/jsonapi/tests/src/Functional/MediaTest.php index a5a097aa22d9c63f913f58505cdb6eaa9c2983de..d1ce6a61a902b16ae1454d98ab7e99be2300c157 100644 --- a/core/modules/jsonapi/tests/src/Functional/MediaTest.php +++ b/core/modules/jsonapi/tests/src/Functional/MediaTest.php @@ -63,7 +63,7 @@ class MediaTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['view media', 'view any camelids media revisions']); @@ -88,7 +88,7 @@ protected function setUpAuthorization($method) { /** * {@inheritdoc} */ - protected function setUpRevisionAuthorization($method) { + protected function setUpRevisionAuthorization($method): void { parent::setUpRevisionAuthorization($method); $this->grantPermissionsToTestedRole(['view all media revisions']); } @@ -397,7 +397,7 @@ protected function getExpectedGetRelationshipDocumentData($relationship_field_na * * @todo Remove this in https://www.drupal.org/node/2824851. */ - protected function doTestRelationshipMutation(array $request_options) { + protected function doTestRelationshipMutation(array $request_options): void { $this->grantPermissionsToTestedRole(['access content']); parent::doTestRelationshipMutation($request_options); } diff --git a/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php b/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php index 673df1c94d4c6fc51a407bad09741f6035f4701b..6cfbc20edec0f2b7cab5b1f641e9e3421dccbb29 100644 --- a/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php @@ -44,7 +44,7 @@ class MediaTypeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer media types']); } diff --git a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php index 293741411a5d971de7d2845064c0f426707f73e9..ed41e22b6c9f49f4db2becdaff0f758d14a4eb0a 100644 --- a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php +++ b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php @@ -62,7 +62,7 @@ class MenuLinkContentTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer menu']); } diff --git a/core/modules/jsonapi/tests/src/Functional/MenuTest.php b/core/modules/jsonapi/tests/src/Functional/MenuTest.php index 3e5406b9c046f905f0da74d9c2ae16ec22c612da..ad0836bcb68e02223c357ea44106b352dd582d5f 100644 --- a/core/modules/jsonapi/tests/src/Functional/MenuTest.php +++ b/core/modules/jsonapi/tests/src/Functional/MenuTest.php @@ -49,7 +49,7 @@ class MenuTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer menu']); } diff --git a/core/modules/jsonapi/tests/src/Functional/MessageTest.php b/core/modules/jsonapi/tests/src/Functional/MessageTest.php index 9683712d946636a12ebaae6c04e205e48e1034f9..896a5590039ca440aae756ae7123abc317225a08 100644 --- a/core/modules/jsonapi/tests/src/Functional/MessageTest.php +++ b/core/modules/jsonapi/tests/src/Functional/MessageTest.php @@ -53,7 +53,7 @@ class MessageTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['access site-wide contact form']); } diff --git a/core/modules/jsonapi/tests/src/Functional/NodeTest.php b/core/modules/jsonapi/tests/src/Functional/NodeTest.php index f0d490976523c26488ff4086039d5503ec7c1650..c40b95ae58537005d340c5f511b09ac5a1ca6f77 100644 --- a/core/modules/jsonapi/tests/src/Functional/NodeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/NodeTest.php @@ -81,7 +81,7 @@ class NodeTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access content']); @@ -108,7 +108,7 @@ protected function setUpAuthorization($method) { /** * {@inheritdoc} */ - protected function setUpRevisionAuthorization($method) { + protected function setUpRevisionAuthorization($method): void { parent::setUpRevisionAuthorization($method); $this->grantPermissionsToTestedRole(['view all revisions']); } diff --git a/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php b/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php index 3f657ac8ea3b3fb016b7ae4106d02f36d83bc34b..da15111ab95c5d5ee28c17655f917676162d4dd9 100644 --- a/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php @@ -44,7 +44,7 @@ class NodeTypeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer content types', 'access content']); } diff --git a/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php b/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php index 4db19844a224d02129c304175933c981c1bee6b1..6618515e3e59eb7e7852a05083bd3bfdb4fa30d6 100644 --- a/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php +++ b/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php @@ -55,7 +55,7 @@ class PathAliasTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer url aliases']); } diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php index 2fe7a4510db71c2ade01a17f0959b067a3f850c8..bd587735352d183b1e33381f6ba105532933c210 100644 --- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php @@ -260,7 +260,7 @@ protected function setUp(): void { * * @throws \Drupal\Core\Entity\EntityStorageException */ - protected function setUpFields(EntityInterface $entity, UserInterface $account) { + protected function setUpFields(EntityInterface $entity, UserInterface $account): EntityInterface { if (!$entity instanceof FieldableEntityInterface) { return $entity; } diff --git a/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php b/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php index 49f411c24285b410bb004b9d61d5829faa175867..db68b40dd818ce2dce396ca8adbeb6311ddc4233 100644 --- a/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php @@ -44,7 +44,7 @@ class ResponsiveImageStyleTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer responsive images']); } diff --git a/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php b/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php index aa9a578a83d2cdc3f3bfa4c3e21053ebe336294a..0a2e60201f46622a2eab4e1d86971f3d4e4586d1 100644 --- a/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php +++ b/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php @@ -44,7 +44,7 @@ class RestResourceConfigTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer rest resources']); } diff --git a/core/modules/jsonapi/tests/src/Functional/RoleTest.php b/core/modules/jsonapi/tests/src/Functional/RoleTest.php index 10d5ea0a711332cfc43855e541902000d57b5fff..f43a2486e75037b5dcdcb8749492f138862d9674 100644 --- a/core/modules/jsonapi/tests/src/Functional/RoleTest.php +++ b/core/modules/jsonapi/tests/src/Functional/RoleTest.php @@ -44,7 +44,7 @@ class RoleTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer permissions']); } diff --git a/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php b/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php index e320c68aecc4533ef92ff1149a50e5524e3d7a95..a6975401864c1a0a6f756ec4c5bc7ab38f4009d3 100644 --- a/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php +++ b/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php @@ -46,7 +46,7 @@ class SearchPageTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access content']); diff --git a/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php b/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php index 12b6a1ac5df804b9730ebaf85c48163d35578f36..7172b8ce65e98bc32fee058b3e46ece4dc395507 100644 --- a/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php @@ -44,7 +44,7 @@ class ShortcutSetTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access shortcuts']); diff --git a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php index 3cd019877d40f4481c86b7481371ecda21b21f91..d7b111043188f1bd176e02b8f8f1a9691d14e4d4 100644 --- a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php @@ -56,7 +56,7 @@ class ShortcutTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['access shortcuts', 'customize shortcut links']); } diff --git a/core/modules/jsonapi/tests/src/Functional/TermTest.php b/core/modules/jsonapi/tests/src/Functional/TermTest.php index 35c2ce3336622b3aa208bce29bf36839e61c25c9..c76de970eb0c608f0990c3036433d4b7255610a6 100644 --- a/core/modules/jsonapi/tests/src/Functional/TermTest.php +++ b/core/modules/jsonapi/tests/src/Functional/TermTest.php @@ -65,7 +65,7 @@ class TermTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'GET': $this->grantPermissionsToTestedRole(['access content', 'view vocabulary labels']); @@ -92,7 +92,7 @@ protected function setUpAuthorization($method) { /** * {@inheritdoc} */ - protected function setUpRevisionAuthorization($method) { + protected function setUpRevisionAuthorization($method): void { parent::setUpRevisionAuthorization($method); $this->grantPermissionsToTestedRole(['administer taxonomy']); } diff --git a/core/modules/jsonapi/tests/src/Functional/UserTest.php b/core/modules/jsonapi/tests/src/Functional/UserTest.php index 775728c3b206437ff52b02d147b98e83d8af5a34..ccdcf31e19ed5f434debced4f53f17a3639d7947 100644 --- a/core/modules/jsonapi/tests/src/Functional/UserTest.php +++ b/core/modules/jsonapi/tests/src/Functional/UserTest.php @@ -81,7 +81,7 @@ class UserTest extends ResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { // @todo Remove this in $this->grantPermissionsToTestedRole(['access content']); @@ -826,7 +826,7 @@ protected function makeNormalizationInvalid(array $document, $entity_key) { * @param string $cancel_method * The cancel method. */ - private function sendDeleteRequestForUser(UserInterface $account, string $cancel_method) { + private function sendDeleteRequestForUser(UserInterface $account, string $cancel_method): void { $url = Url::fromRoute(sprintf('jsonapi.%s.individual', static::$resourceTypeName), ['entity' => $account->uuid()]); $request_options = []; $request_options[RequestOptions::HEADERS]['Accept'] = 'application/vnd.api+json'; diff --git a/core/modules/jsonapi/tests/src/Functional/ViewTest.php b/core/modules/jsonapi/tests/src/Functional/ViewTest.php index a3280be5024ddf22258eb28f69a0c07cd56efd34..828ce5da3df7bdfb8df6e8f88df0870cf14a9d0e 100644 --- a/core/modules/jsonapi/tests/src/Functional/ViewTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ViewTest.php @@ -44,7 +44,7 @@ class ViewTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer views']); } diff --git a/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php b/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php index dcaba9edbfc1dc6674d65aef0d488a5269873f93..73e516f083081f6f268ec45850cc5d70268d686f 100644 --- a/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php +++ b/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php @@ -44,7 +44,7 @@ class VocabularyTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer taxonomy']); } diff --git a/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php b/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php index 42421e5d07f8dfb8ae4c7e77c6771a24e28242a7..dc3051a67f33e411cf536710661f335c36e68f05 100644 --- a/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php +++ b/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php @@ -44,7 +44,7 @@ class WorkflowTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { $this->grantPermissionsToTestedRole(['administer workflows']); } diff --git a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php index de7aed89105b795469630b33acb39ccfd053dd7d..5118736120c72a9bca2657db8f65b7696e934ea1 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php @@ -354,7 +354,7 @@ public static function resolveInternalEntityQueryPathErrorProvider() { * @param string $name * The name of the bundle to create. */ - protected function makeBundle($name) { + protected function makeBundle($name): void { EntityTestBundle::create([ 'id' => $name, ])->save(); @@ -376,7 +376,7 @@ protected function makeBundle($name) { * @param array $config_settings * Custom configuration settings for the field. */ - protected function makeField($type, $name, $entity_type, array $bundles, array $storage_settings = [], array $config_settings = []) { + protected function makeField($type, $name, $entity_type, array $bundles, array $storage_settings = [], array $config_settings = []): void { $storage_config = [ 'field_name' => $name, 'type' => $type, diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php index c392432bf216e4f0a4a11fc79a40125e9d0f7b43..c053782bbf505096010ed1906d57f122c20a5a3b 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php @@ -268,7 +268,7 @@ protected function queryConditionData(): array { /** * Sets up the schemas. */ - protected function setUpSchemas() { + protected function setUpSchemas(): void { $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); @@ -281,7 +281,7 @@ protected function setUpSchemas() { /** * Creates a painting node type. */ - protected function savePaintingType() { + protected function savePaintingType(): void { NodeType::create([ 'type' => 'painting', 'name' => 'Painting', @@ -302,7 +302,7 @@ protected function savePaintingType() { /** * Creates painting nodes. */ - protected function savePaintings($paintings) { + protected function savePaintings($paintings): void { foreach ($paintings as $painting) { Node::create(array_merge([ 'type' => 'painting', diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php index 5341b489cddf5b99b02d5b9eae23fbf1c50803b9..ad80508816b093a83577ddadd18ff5968560703d 100644 --- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php @@ -204,7 +204,7 @@ public function testGetRelatableResourceTypesFromFieldDefinition(): void { ]); $fields = $field_config_storage->loadByProperties(['field_name' => 'field_ref_with_missing_bundle']); static::assertSame(['missing_bundle'], $fields['node.foo.field_ref_with_missing_bundle']->getItemDefinition()->getSetting('handler_settings')['target_bundles']); - $a = $this->resourceTypeRepository->get('node', 'foo')->getRelatableResourceTypesByField('field_ref_with_missing_bundle'); + $this->resourceTypeRepository->get('node', 'foo')->getRelatableResourceTypesByField('field_ref_with_missing_bundle'); static::assertSame(['missing_bundle'], $fields['node.foo.field_ref_with_missing_bundle']->getItemDefinition()->getSetting('handler_settings')['target_bundles']); $arguments = [ '@name' => 'field_ref_with_missing_bundle', diff --git a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php b/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php index 16154b64c6371ad4fda3a50c53e23abedd27ddd8..fe62942a7748ddf527a01c1f76708d6bc9ff4a6a 100644 --- a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php +++ b/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php @@ -131,7 +131,7 @@ public function testGetLinkRelationType(): void { /** * Mocks the unrouted URL assembler. */ - protected function mockUrlAssembler() { + protected function mockUrlAssembler(): void { $url_assembler = $this->getMockBuilder(UnroutedUrlAssemblerInterface::class) ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/language/language.admin.inc b/core/modules/language/language.admin.inc index 7a5c4fa1d1c53ccd60f24d4ea5271dd1d70ed968..82c07c4bf21ecef90b43abb540a45fac6b5f4d96 100644 --- a/core/modules/language/language.admin.inc +++ b/core/modules/language/language.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Administration functions for language.module. */ use Drupal\Core\Render\Element; diff --git a/core/modules/language/language.install b/core/modules/language/language.install index e3ab47e250998781745174e6a9f55b785b0b7fd7..b9d52e4f93be424f060c7c6427ce632ba31ddac6 100644 --- a/core/modules/language/language.install +++ b/core/modules/language/language.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function language_update_last_removed() { +function language_update_last_removed(): int { return 8001; } diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 1e2064ae8aa9f60cdf3ba28436d0abcbfd077ae0..42a72f6e4e878e89b0352395362e2995516f4523 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -2,146 +2,12 @@ /** * @file - * Add language handling functionality to Drupal. */ -use Drupal\Core\Url; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Config\FileStorage; -use Drupal\Core\Config\InstallStorage; -use Drupal\Core\Entity\ContentEntityFormInterface; use Drupal\Core\Entity\EntityFormInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Installer\InstallerKernel; use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Session\AccountInterface; use Drupal\language\Entity\ContentLanguageSettings; -use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI; -use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl; -use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrlFallback; - -/** - * Implements hook_help(). - */ -function language_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.language': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Language module allows you to configure the languages used on your site, and provides information for the <a href=":content">Content Translation</a>, <a href=":interface">Interface Translation</a>, and <a href=":configuration">Configuration Translation</a> modules, if they are installed. For more information, see the <a href=":doc_url">online documentation for the Language module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/language', ':content' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? Url::fromRoute('help.page', ['name' => 'content_translation'])->toString() : '#', ':interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#', ':configuration' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? Url::fromRoute('help.page', ['name' => 'config_translation'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Adding languages') . '</dt>'; - $output .= '<dd>' . t('You can add languages on the <a href=":language_list">Languages</a> page by selecting <em>Add language</em> and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the <a href=":interface">Interface translation module</a> is installed, and the <em>translation server</em> is set as a translation source, then the interface translation for this language is automatically downloaded as well.', [':language_list' => Url::fromRoute('entity.configurable_language.collection')->toString(), ':interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Adding custom languages') . '</dt>'; - $output .= '<dd>' . t('You can add a language that is not provided in the drop-down list by choosing <em>Custom language</em> at the end of the list. You then have to configure its language code, name, and direction in the form provided.') . '</dd>'; - $output .= '<dt>' . t('Configuring content languages') . '</dt>'; - $output .= '<dd>' . t('By default, content is created in the site\'s default language and no language selector is displayed on content creation pages. On the <a href=":content_language">Content language</a> page you can customize the language configuration for any supported content entity on your site (for example for content types or menu links). After choosing an entity, you are provided with a drop-down menu to set the default language and a check-box to display language selectors.', [':content_language' => Url::fromRoute('language.content_settings_page')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Adding a language switcher block') . '</dt>'; - $output .= '<dd>' . t('If the Block module is installed, then you can add a language switcher block on the <a href=":blocks">Block layout</a> page to allow users to switch between languages.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Making a block visible per language') . '</dt>'; - $output .= '<dd>' . t('If the Block module is installed, then the Language module allows you to set the visibility of a block based on selected languages on the <a href=":blocks">Block layout</a> page.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Choosing user languages') . '</dt>'; - $output .= '<dd>' . t("Users can choose a <em>Site language</em> on their profile page. This language is used for email messages, and can be used by modules to determine a user's language. It can also be used for interface text, if the <em>User</em> method is enabled as a <em>Detection and selection</em> method (see below). Administrative users can choose a separate <em>Administration pages language</em> for the interface text on administration pages. This configuration is only available on the user's profile page if the <em>Account administration pages</em> method is enabled (see below).") . '</dd>'; - $output .= '<dt>' . t('Language detection and selection') . '</dt>'; - $output .= '<dd>' . t('The <a href=":detection">Detection and selection</a> page provides several methods for deciding which language is used for displaying interface text. When a method detects and selects an interface language, then the following methods in the list are not applied. You can order them by importance, with your preferred method at the top of the list, followed by one or several fall-back methods.', [':detection' => Url::fromRoute('language.negotiation')->toString()]); - $output .= '<ul><li>' . t('<em>URL</em> sets the interface language based on a path prefix or domain (for example specifying <em>de</em> for German would result in URLs like <em>example.com/de/contact</em>). The default language does not require a path prefix, but can have one assigned as well. If the language detection is done by domain name, a domain needs to be specified for each language.') . '</li>'; - $output .= '<li>' . t('<em>Session</em> determines the interface language from a request or session parameter (for example <em>example.com?language=de</em> would set the interface language to German based on the use of <em>de</em> as the <em>language</em> parameter).') . '</li>'; - $output .= '<li>' . t("<em>User</em> follows the language configuration set on the user's profile page.") . '</li>'; - $output .= '<li>' . t('<em>Browser</em> sets the interface language based on the browser\'s language settings. Since browsers use different language codes to refer to the same languages, you can add and edit languages codes to map the browser language codes to the <a href=":language_list">language codes</a> used on your site.', [':language_list' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</li>'; - $output .= '<li>' . t('<em>Account administration pages</em> follows the configuration set as <em>Administration pages language</em> on the profile page of an administrative user. This method is similar to the <em>User</em> method, but only sets the interface text language on administration pages, independent of the interface text language on other pages.') . '</li>'; - $output .= '<li>' . t("<em>Selected language</em> allows you to specify the site's default language or a specific language as the fall-back language. This method should be listed last.") . '</li></ul></dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.configurable_language.collection': - $output = '<p>' . t('Reorder the configured languages to set their order in the language switcher block and, when editing content, in the list of selectable languages. This ordering does not impact <a href=":detection">detection and selection</a>.', [':detection' => Url::fromRoute('language.negotiation')->toString()]) . '</p>'; - $output .= '<p>' . t('The site default language can also be set. It is not recommended to change the default language on a working site. <a href=":language-detection">Configure the Selected language</a> setting on the detection and selection page to change the fallback language for language selection.', [':language-detection' => Url::fromRoute('language.negotiation')->toString()]) . '</p>'; - return $output; - - case 'language.add': - return '<p>' . t('Add a language to be supported by your site. If your desired language is not available, pick <em>Custom language...</em> at the end and provide a language code and other details manually.') . '</p>'; - - case 'language.negotiation': - $output = '<p>' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language detection methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the <a href=":admin-change-language">list of languages</a>.', [':admin-change-language' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</p>'; - return $output; - - case 'language.negotiation_session': - $output = '<p>' . t('Determine the language from a request/session parameter. Example: "http://example.com?language=de" sets language to German based on the use of "de" within the "language" parameter.') . '</p>'; - return $output; - - case 'language.negotiation_browser': - $output = '<p>' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to <a href=":configure-languages">site languages</a>.', [':configure-languages' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</p>'; - return $output; - - case 'language.negotiation_selected': - $output = '<p>' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). <a href=":admin-change-language">Changing the site\'s default language</a> itself might have other undesired side effects.', [':admin-change-language' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</p>'; - return $output; - - case 'entity.block.edit_form': - if (($block = $route_match->getParameter('block')) && $block->getPluginId() == 'language_block:language_interface') { - return '<p>' . t('With multiple languages configured, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>'; - } - break; - - case 'block.admin_add': - if ($route_match->getParameter('plugin_id') == 'language_block:language_interface') { - return '<p>' . t('With multiple languages configured, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>'; - } - break; - - case 'language.content_settings_page': - return '<p>' . t("Change language settings for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>user profiles</em>, or any other supported element on your site. By default, language settings hide the language selector and the language is the site's default language.") . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function language_theme() { - return [ - 'language_negotiation_configure_form' => [ - 'render element' => 'form', - 'file' => 'language.admin.inc', - ], - 'language_content_settings_table' => [ - 'render element' => 'element', - 'file' => 'language.admin.inc', - ], - ]; -} - -/** - * Implements hook_element_info_alter(). - * - * @see \Drupal\Core\Render\Element\LanguageSelect - * @see \Drupal\Core\Render\Element\Select - */ -function language_element_info_alter(&$type) { - // Alter the language_select element so that it will be rendered like a select - // field. - if (isset($type['language_select'])) { - if (!isset($type['language_select']['#process'])) { - $type['language_select']['#process'] = []; - } - if (!isset($type['language_select']['#theme_wrappers'])) { - $type['language_select']['#theme_wrappers'] = []; - } - $type['language_select']['#process'] = array_merge($type['language_select']['#process'], [ - 'language_process_language_select', - ['Drupal\Core\Render\Element\Select', 'processSelect'], - ['Drupal\Core\Render\Element\RenderElementBase', 'processAjaxForm'], - ]); - $type['language_select']['#theme'] = 'select'; - $type['language_select']['#theme_wrappers'] = array_merge($type['language_select']['#theme_wrappers'], ['form_element']); - $type['language_select']['#languages'] = LanguageInterface::STATE_CONFIGURABLE; - $type['language_select']['#multiple'] = FALSE; - } -} /** * Processes a language select list form element. @@ -164,24 +30,6 @@ function language_process_language_select($element) { return $element; } -/** - * Implements hook_entity_base_field_info_alter(). - */ -function language_entity_base_field_info_alter(&$fields) { - foreach ($fields as $definition) { - // Set configurable form display for language fields with display options. - if ($definition->getType() == 'language') { - foreach (['form', 'view'] as $type) { - if ($definition->getDisplayOptions($type)) { - // The related configurations will be purged manually on Language - // module uninstallation. @see language_modules_uninstalled(). - $definition->setDisplayConfigurable($type, TRUE); - } - } - } - } -} - /** * Submit handler for the forms that have a language_configuration element. */ @@ -214,17 +62,6 @@ function language_configuration_element_submit(&$form, FormStateInterface $form_ } } -/** - * Implements hook_entity_bundle_delete(). - */ -function language_entity_bundle_delete($entity_type_id, $bundle) { - // Remove the content language settings associated with the bundle. - $settings = ContentLanguageSettings::loadByEntityTypeBundle($entity_type_id, $bundle); - if (!$settings->isNew()) { - $settings->delete(); - } -} - /** * Returns the default language code assigned to an entity type and a bundle. * @@ -289,60 +126,6 @@ function language_negotiation_url_prefixes_update() { $config->set('url.prefixes', $prefixes)->save(TRUE); } -/** - * Implements hook_modules_installed(). - */ -function language_modules_installed($modules, $is_syncing) { - if ($is_syncing) { - return; - } - - if (!in_array('language', $modules)) { - if (InstallerKernel::installationAttempted() && $profile = \Drupal::installProfile()) { - // If the install profile provides its own language.types configuration do - // not overwrite it. - $profile_directory = \Drupal::service('extension.list.profile')->getPath($profile); - $profile_storages = [ - new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY), - new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY), - ]; - foreach ($profile_storages as $storage) { - if ($storage->exists('language.types')) { - return; - } - } - } - // Since newly (un)installed modules may change the default settings for - // non-locked language types (e.g. content language), we need to resave the - // language type configuration. - /** @var \Drupal\language\LanguageNegotiatorInterface $negotiator */ - $negotiator = \Drupal::service('language_negotiator'); - $configurable = \Drupal::config('language.types')->get('configurable'); - $negotiator->updateConfiguration($configurable); - $negotiator->purgeConfiguration(); - } - else { - // In language_entity_base_field_info_alter() we are altering view/form - // display definitions to make language fields display configurable. Since - // this is not a hard dependency, and thus is not detected by the config - // system, we have to clean up the related values manually. - foreach (['entity_view_display', 'entity_form_display'] as $key) { - $displays = \Drupal::entityTypeManager()->getStorage($key)->loadMultiple(); - /** @var \Drupal\Core\Entity\Display\EntityDisplayInterface $display */ - foreach ($displays as $display) { - $display->save(); - } - } - } -} - -/** - * Implements hook_modules_uninstalled(). - */ -function language_modules_uninstalled($modules, $is_syncing) { - language_modules_installed($modules, $is_syncing); -} - /** * Implements hook_preprocess_HOOK() for block templates. */ @@ -366,102 +149,3 @@ function language_get_browser_drupal_langcode_mappings() { } return $config->get('map'); } - -/** - * Implements hook_form_alter(). - */ -function language_form_alter(&$form, FormStateInterface $form_state) { - // Content entity forms may have added a langcode field. But content language - // configuration should decide if it should be exposed or not in the forms. - $form_object = $form_state->getFormObject(); - if ($form_object instanceof ContentEntityFormInterface && $form_object->getEntity()->getEntityType()->hasKey('langcode')) { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - $entity = $form_object->getEntity(); - $entity_type = $entity->getEntityType(); - $langcode_key = $entity_type->getKey('langcode'); - if (isset($form[$langcode_key]) && $form[$langcode_key]['#access'] !== FALSE) { - $language_configuration = ContentLanguageSettings::loadByEntityTypeBundle($entity->getEntityTypeId(), $entity->bundle()); - $form[$langcode_key]['#access'] = $language_configuration->isLanguageAlterable(); - } - } -} - -/** - * Implements hook_field_info_alter(). - */ -function language_field_info_alter(&$info) { - // Change the default behavior of language field. - $info['language']['class'] = '\Drupal\language\DefaultLanguageItem'; -} - -/** - * Implements hook_entity_field_access(). - */ -function language_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - // Only allow edit access on a langcode field if the entity it is attached to - // is configured to have an alterable language. Also without items we can not - // decide whether or not to allow access. - if ($items && $operation == 'edit') { - // Check if we are dealing with a langcode field. - $langcode_key = $items->getEntity()->getEntityType()->getKey('langcode'); - if ($field_definition->getName() == $langcode_key) { - // Grant access depending on whether the entity language can be altered. - $entity = $items->getEntity(); - $config = ContentLanguageSettings::loadByEntityTypeBundle($entity->getEntityTypeId(), $entity->bundle()); - return AccessResult::forbiddenIf(!$config->isLanguageAlterable()); - } - } - return AccessResult::neutral(); -} - -/** - * Implements hook_tour_tips_alter(). - */ -function language_tour_tips_alter(array &$tour_tips, EntityInterface $entity) { - $module_extension_list = \Drupal::service('extension.list.module'); - foreach ($tour_tips as $tour_tip) { - if ($tour_tip->get('id') == 'language-overview') { - $additional_overview = ''; - if (Drupal::service('module_handler')->moduleExists('locale')) { - $additional_overview = t("This page also provides an overview of how much of the site's interface has been translated for each configured language."); - } - else { - $additional_overview = t("If the Interface Translation module is installed, this page will provide an overview of how much of the site's interface has been translated for each configured language."); - } - $tour_tip->set('body', $tour_tip->get('body') . '<p>' . $additional_overview . '</p>'); - } - elseif ($tour_tip->get('id') == 'language-continue') { - $additional_continue = ''; - $additional_modules = []; - if (!Drupal::service('module_handler')->moduleExists('locale')) { - $additional_modules[] = $module_extension_list->getName('locale'); - } - if (!Drupal::service('module_handler')->moduleExists('content_translation')) { - $additional_modules[] = $module_extension_list->getName('content_translation'); - } - if (!empty($additional_modules)) { - $additional_continue = t('Depending on your site features, additional modules that you might want to install are:') . '<ul>'; - foreach ($additional_modules as $additional_module) { - $additional_continue .= '<li>' . $additional_module . '</li>'; - } - $additional_continue .= '</ul>'; - } - if (!empty($additional_continue)) { - $tour_tip->set('body', $tour_tip->get('body') . '<p>' . $additional_continue . '</p>'); - } - } - } -} - -/** - * Implements hook_language_types_info_alter(). - * - * We can't set the fixed properties in \Drupal\Core\Language\LanguageManager, - * where the rest of the properties for the default language types are defined. - * The LanguageNegation classes are only loaded when the language module is - * enabled and we can't be sure of that in the LanguageManager. - */ -function language_language_types_info_alter(array &$language_types) { - $language_types[LanguageInterface::TYPE_CONTENT]['fixed'] = [LanguageNegotiationUI::METHOD_ID]; - $language_types[LanguageInterface::TYPE_URL]['fixed'] = [LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationUrlFallback::METHOD_ID]; -} diff --git a/core/modules/language/language.post_update.php b/core/modules/language/language.post_update.php index 47defe12db70795145765ac0ceaddc120696fcd0..350d83cfc68209fdcc7cb580d5da771e9ef7609d 100644 --- a/core/modules/language/language.post_update.php +++ b/core/modules/language/language.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function language_removed_post_updates() { +function language_removed_post_updates(): array { return [ 'language_post_update_language_select_widget' => '9.0.0', ]; diff --git a/core/modules/language/src/Entity/ConfigurableLanguage.php b/core/modules/language/src/Entity/ConfigurableLanguage.php index 6a5681079b9e711784af7881cd4884b54ef9f998..9ac8c9a0839ff8c054c8dfde05069242d3e579f8 100644 --- a/core/modules/language/src/Entity/ConfigurableLanguage.php +++ b/core/modules/language/src/Entity/ConfigurableLanguage.php @@ -4,6 +4,7 @@ use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Language\LanguageManager; use Drupal\Core\StringTranslation\TranslatableMarkup; @@ -11,50 +12,53 @@ use Drupal\language\ConfigurableLanguageManagerInterface; use Drupal\language\Exception\DeleteDefaultLanguageException; use Drupal\language\ConfigurableLanguageInterface; +use Drupal\language\Form\LanguageAddForm; +use Drupal\language\Form\LanguageDeleteForm; +use Drupal\language\Form\LanguageEditForm; +use Drupal\language\LanguageAccessControlHandler; +use Drupal\language\LanguageListBuilder; /** * Defines the ConfigurableLanguage entity. - * - * @ConfigEntityType( - * id = "configurable_language", - * label = @Translation("Language"), - * label_collection = @Translation("Languages"), - * label_singular = @Translation("language"), - * label_plural = @Translation("languages"), - * label_count = @PluralTranslation( - * singular = "@count language", - * plural = "@count languages", - * ), - * handlers = { - * "list_builder" = "Drupal\language\LanguageListBuilder", - * "access" = "Drupal\language\LanguageAccessControlHandler", - * "form" = { - * "add" = "Drupal\language\Form\LanguageAddForm", - * "edit" = "Drupal\language\Form\LanguageEditForm", - * "delete" = "Drupal\language\Form\LanguageDeleteForm" - * } - * }, - * admin_permission = "administer languages", - * config_prefix = "entity", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "weight" = "weight" - * }, - * config_export = { - * "id", - * "label", - * "direction", - * "weight", - * "locked" - * }, - * links = { - * "delete-form" = "/admin/config/regional/language/delete/{configurable_language}", - * "edit-form" = "/admin/config/regional/language/edit/{configurable_language}", - * "collection" = "/admin/config/regional/language", - * } - * ) */ +#[ConfigEntityType( + id: 'configurable_language', + label: new TranslatableMarkup('Language'), + label_collection: new TranslatableMarkup('Languages'), + label_singular: new TranslatableMarkup('language'), + label_plural: new TranslatableMarkup('languages'), + config_prefix: 'entity', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'weight' => 'weight', + ], handlers: [ + 'list_builder' => LanguageListBuilder::class, + 'access' => LanguageAccessControlHandler::class, + 'form' => [ + 'add' => LanguageAddForm::class, + 'edit' => LanguageEditForm::class, + 'delete' => LanguageDeleteForm::class, + ], + ], + links: [ + 'delete-form' => '/admin/config/regional/language/delete/{configurable_language}', + 'edit-form' => '/admin/config/regional/language/edit/{configurable_language}', + 'collection' => '/admin/config/regional/language', + ], + admin_permission: 'administer languages', + label_count: [ + 'singular' => '@count language', + 'plural' => '@count languages', + ], + config_export: [ + 'id', + 'label', + 'direction', + 'weight', + 'locked', + ], +)] class ConfigurableLanguage extends ConfigEntityBase implements ConfigurableLanguageInterface { /** diff --git a/core/modules/language/src/Entity/ContentLanguageSettings.php b/core/modules/language/src/Entity/ContentLanguageSettings.php index 72f554a0a0537f4060352d62ceb84f5b9d47d432..f2b1f7d19239ad232302f1397793b58d60089dd6 100644 --- a/core/modules/language/src/Entity/ContentLanguageSettings.php +++ b/core/modules/language/src/Entity/ContentLanguageSettings.php @@ -2,6 +2,8 @@ namespace Drupal\language\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Language\LanguageInterface; @@ -10,35 +12,39 @@ /** * Defines the ContentLanguageSettings entity. - * - * @ConfigEntityType( - * id = "language_content_settings", - * label = @Translation("Content language settings"), - * label_collection = @Translation("Content language settings"), - * label_singular = @Translation("content language setting"), - * label_plural = @Translation("content languages settings"), - * label_count = @PluralTranslation( - * singular = "@count content language setting", - * plural = "@count content languages settings", - * ), - * admin_permission = "administer languages", - * config_prefix = "content_settings", - * entity_keys = { - * "id" = "id" - * }, - * config_export = { - * "id", - * "target_entity_type_id", - * "target_bundle", - * "default_langcode", - * "language_alterable", - * }, - * list_cache_tags = { "rendered" }, - * constraints = { - * "ImmutableProperties" = {"id", "target_entity_type_id", "target_bundle"}, - * }, - * ) */ +#[ConfigEntityType( + id: 'language_content_settings', + label: new TranslatableMarkup('Content language settings'), + label_collection: new TranslatableMarkup('Content language settings'), + label_singular: new TranslatableMarkup('content language setting'), + label_plural: new TranslatableMarkup('content languages settings'), + config_prefix: 'content_settings', + entity_keys: [ + 'id' => 'id', + ], + admin_permission: 'administer languages', + label_count: [ + 'singular' => '@count content language setting', + 'plural' => '@count content languages settings', + ], + list_cache_tags: [ + 'rendered', + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'target_entity_type_id', + 'target_bundle', + ], + ], + config_export: [ + 'id', + 'target_entity_type_id', + 'target_bundle', + 'default_langcode', + 'language_alterable', + ])] class ContentLanguageSettings extends ConfigEntityBase implements ContentLanguageSettingsInterface { /** diff --git a/core/modules/language/src/Hook/LanguageHooks.php b/core/modules/language/src/Hook/LanguageHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2264461ec16f2041064909ef68b2e047eb297495 --- /dev/null +++ b/core/modules/language/src/Hook/LanguageHooks.php @@ -0,0 +1,377 @@ +<?php + +namespace Drupal\language\Hook; + +use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrlFallback; +use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl; +use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Entity\ContentEntityFormInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Config\InstallStorage; +use Drupal\Core\Config\FileStorage; +use Drupal\Core\Installer\InstallerKernel; +use Drupal\language\Entity\ContentLanguageSettings; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for language. + */ +class LanguageHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.language': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Language module allows you to configure the languages used on your site, and provides information for the <a href=":content">Content Translation</a>, <a href=":interface">Interface Translation</a>, and <a href=":configuration">Configuration Translation</a> modules, if they are installed. For more information, see the <a href=":doc_url">online documentation for the Language module</a>.', [ + ':doc_url' => 'https://www.drupal.org/documentation/modules/language', + ':content' => \Drupal::moduleHandler()->moduleExists('content_translation') ? Url::fromRoute('help.page', [ + 'name' => 'content_translation', + ])->toString() : '#', + ':interface' => \Drupal::moduleHandler()->moduleExists('locale') ? Url::fromRoute('help.page', [ + 'name' => 'locale', + ])->toString() : '#', + ':configuration' => \Drupal::moduleHandler()->moduleExists('config_translation') ? Url::fromRoute('help.page', [ + 'name' => 'config_translation', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Adding languages') . '</dt>'; + $output .= '<dd>' . t('You can add languages on the <a href=":language_list">Languages</a> page by selecting <em>Add language</em> and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the <a href=":interface">Interface translation module</a> is installed, and the <em>translation server</em> is set as a translation source, then the interface translation for this language is automatically downloaded as well.', [ + ':language_list' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ':interface' => \Drupal::moduleHandler()->moduleExists('locale') ? Url::fromRoute('help.page', [ + 'name' => 'locale', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Adding custom languages') . '</dt>'; + $output .= '<dd>' . t('You can add a language that is not provided in the drop-down list by choosing <em>Custom language</em> at the end of the list. You then have to configure its language code, name, and direction in the form provided.') . '</dd>'; + $output .= '<dt>' . t('Configuring content languages') . '</dt>'; + $output .= '<dd>' . t('By default, content is created in the site\'s default language and no language selector is displayed on content creation pages. On the <a href=":content_language">Content language</a> page you can customize the language configuration for any supported content entity on your site (for example for content types or menu links). After choosing an entity, you are provided with a drop-down menu to set the default language and a check-box to display language selectors.', [ + ':content_language' => Url::fromRoute('language.content_settings_page')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Adding a language switcher block') . '</dt>'; + $output .= '<dd>' . t('If the Block module is installed, then you can add a language switcher block on the <a href=":blocks">Block layout</a> page to allow users to switch between languages.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Making a block visible per language') . '</dt>'; + $output .= '<dd>' . t('If the Block module is installed, then the Language module allows you to set the visibility of a block based on selected languages on the <a href=":blocks">Block layout</a> page.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Choosing user languages') . '</dt>'; + $output .= '<dd>' . t("Users can choose a <em>Site language</em> on their profile page. This language is used for email messages, and can be used by modules to determine a user's language. It can also be used for interface text, if the <em>User</em> method is enabled as a <em>Detection and selection</em> method (see below). Administrative users can choose a separate <em>Administration pages language</em> for the interface text on administration pages. This configuration is only available on the user's profile page if the <em>Account administration pages</em> method is enabled (see below).") . '</dd>'; + $output .= '<dt>' . t('Language detection and selection') . '</dt>'; + $output .= '<dd>' . t('The <a href=":detection">Detection and selection</a> page provides several methods for deciding which language is used for displaying interface text. When a method detects and selects an interface language, then the following methods in the list are not applied. You can order them by importance, with your preferred method at the top of the list, followed by one or several fall-back methods.', [':detection' => Url::fromRoute('language.negotiation')->toString()]); + $output .= '<ul><li>' . t('<em>URL</em> sets the interface language based on a path prefix or domain (for example specifying <em>de</em> for German would result in URLs like <em>example.com/de/contact</em>). The default language does not require a path prefix, but can have one assigned as well. If the language detection is done by domain name, a domain needs to be specified for each language.') . '</li>'; + $output .= '<li>' . t('<em>Session</em> determines the interface language from a request or session parameter (for example <em>example.com?language=de</em> would set the interface language to German based on the use of <em>de</em> as the <em>language</em> parameter).') . '</li>'; + $output .= '<li>' . t("<em>User</em> follows the language configuration set on the user's profile page.") . '</li>'; + $output .= '<li>' . t('<em>Browser</em> sets the interface language based on the browser\'s language settings. Since browsers use different language codes to refer to the same languages, you can add and edit languages codes to map the browser language codes to the <a href=":language_list">language codes</a> used on your site.', [ + ':language_list' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</li>'; + $output .= '<li>' . t('<em>Account administration pages</em> follows the configuration set as <em>Administration pages language</em> on the profile page of an administrative user. This method is similar to the <em>User</em> method, but only sets the interface text language on administration pages, independent of the interface text language on other pages.') . '</li>'; + $output .= '<li>' . t("<em>Selected language</em> allows you to specify the site's default language or a specific language as the fall-back language. This method should be listed last.") . '</li></ul></dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.configurable_language.collection': + $output = '<p>' . t('Reorder the configured languages to set their order in the language switcher block and, when editing content, in the list of selectable languages. This ordering does not impact <a href=":detection">detection and selection</a>.', [':detection' => Url::fromRoute('language.negotiation')->toString()]) . '</p>'; + $output .= '<p>' . t('The site default language can also be set. It is not recommended to change the default language on a working site. <a href=":language-detection">Configure the Selected language</a> setting on the detection and selection page to change the fallback language for language selection.', [ + ':language-detection' => Url::fromRoute('language.negotiation')->toString(), + ]) . '</p>'; + return $output; + + case 'language.add': + return '<p>' . t('Add a language to be supported by your site. If your desired language is not available, pick <em>Custom language...</em> at the end and provide a language code and other details manually.') . '</p>'; + + case 'language.negotiation': + $output = '<p>' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language detection methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the <a href=":admin-change-language">list of languages</a>.', [ + ':admin-change-language' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</p>'; + return $output; + + case 'language.negotiation_session': + $output = '<p>' . t('Determine the language from a request/session parameter. Example: "http://example.com?language=de" sets language to German based on the use of "de" within the "language" parameter.') . '</p>'; + return $output; + + case 'language.negotiation_browser': + $output = '<p>' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to <a href=":configure-languages">site languages</a>.', [ + ':configure-languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</p>'; + return $output; + + case 'language.negotiation_selected': + $output = '<p>' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). <a href=":admin-change-language">Changing the site\'s default language</a> itself might have other undesired side effects.', [ + ':admin-change-language' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</p>'; + return $output; + + case 'entity.block.edit_form': + if (($block = $route_match->getParameter('block')) && $block->getPluginId() == 'language_block:language_interface') { + return '<p>' . t('With multiple languages configured, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>'; + } + break; + + case 'block.admin_add': + if ($route_match->getParameter('plugin_id') == 'language_block:language_interface') { + return '<p>' . t('With multiple languages configured, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>'; + } + break; + + case 'language.content_settings_page': + return '<p>' . t("Change language settings for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>user profiles</em>, or any other supported element on your site. By default, language settings hide the language selector and the language is the site's default language.") . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'language_negotiation_configure_form' => [ + 'render element' => 'form', + 'file' => 'language.admin.inc', + ], + 'language_content_settings_table' => [ + 'render element' => 'element', + 'file' => 'language.admin.inc', + ], + ]; + } + + /** + * Implements hook_element_info_alter(). + * + * @see \Drupal\Core\Render\Element\LanguageSelect + * @see \Drupal\Core\Render\Element\Select + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(&$type) { + // Alter the language_select element so that it will be rendered like a select + // field. + if (isset($type['language_select'])) { + if (!isset($type['language_select']['#process'])) { + $type['language_select']['#process'] = []; + } + if (!isset($type['language_select']['#theme_wrappers'])) { + $type['language_select']['#theme_wrappers'] = []; + } + $type['language_select']['#process'] = array_merge($type['language_select']['#process'], [ + 'language_process_language_select', + [ + 'Drupal\Core\Render\Element\Select', + 'processSelect', + ], + [ + 'Drupal\Core\Render\Element\RenderElementBase', + 'processAjaxForm', + ], + ]); + $type['language_select']['#theme'] = 'select'; + $type['language_select']['#theme_wrappers'] = array_merge($type['language_select']['#theme_wrappers'], ['form_element']); + $type['language_select']['#languages'] = LanguageInterface::STATE_CONFIGURABLE; + $type['language_select']['#multiple'] = FALSE; + } + } + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$fields) { + foreach ($fields as $definition) { + // Set configurable form display for language fields with display options. + if ($definition->getType() == 'language') { + foreach (['form', 'view'] as $type) { + if ($definition->getDisplayOptions($type)) { + // The related configurations will be purged manually on Language + // module uninstallation. @see language_modules_uninstalled(). + $definition->setDisplayConfigurable($type, TRUE); + } + } + } + } + } + + /** + * Implements hook_entity_bundle_delete(). + */ + #[Hook('entity_bundle_delete')] + public function entityBundleDelete($entity_type_id, $bundle) { + // Remove the content language settings associated with the bundle. + $settings = ContentLanguageSettings::loadByEntityTypeBundle($entity_type_id, $bundle); + if (!$settings->isNew()) { + $settings->delete(); + } + } + + /** + * Implements hook_modules_installed(). + * + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_installed')] + #[Hook('modules_uninstalled')] + public function modulesInstalled($modules, $is_syncing) { + if ($is_syncing) { + return; + } + if (!in_array('language', $modules)) { + if (InstallerKernel::installationAttempted() && ($profile = \Drupal::installProfile())) { + // If the install profile provides its own language.types configuration do + // not overwrite it. + $profile_directory = \Drupal::service('extension.list.profile')->getPath($profile); + $profile_storages = [ + new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY), + new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY), + ]; + foreach ($profile_storages as $storage) { + if ($storage->exists('language.types')) { + return; + } + } + } + // Since newly (un)installed modules may change the default settings for + // non-locked language types (e.g. content language), we need to resave the + // language type configuration. + /** @var \Drupal\language\LanguageNegotiatorInterface $negotiator */ + $negotiator = \Drupal::service('language_negotiator'); + $configurable = \Drupal::config('language.types')->get('configurable'); + $negotiator->updateConfiguration($configurable); + $negotiator->purgeConfiguration(); + } + else { + // In language_entity_base_field_info_alter() we are altering view/form + // display definitions to make language fields display configurable. Since + // this is not a hard dependency, and thus is not detected by the config + // system, we have to clean up the related values manually. + foreach (['entity_view_display', 'entity_form_display'] as $key) { + $displays = \Drupal::entityTypeManager()->getStorage($key)->loadMultiple(); + /** @var \Drupal\Core\Entity\Display\EntityDisplayInterface $display */ + foreach ($displays as $display) { + $display->save(); + } + } + } + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state) : void { + // Content entity forms may have added a langcode field. But content language + // configuration should decide if it should be exposed or not in the forms. + $form_object = $form_state->getFormObject(); + if ($form_object instanceof ContentEntityFormInterface && $form_object->getEntity()->getEntityType()->hasKey('langcode')) { + /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ + $entity = $form_object->getEntity(); + $entity_type = $entity->getEntityType(); + $langcode_key = $entity_type->getKey('langcode'); + if (isset($form[$langcode_key]) && $form[$langcode_key]['#access'] !== FALSE) { + $language_configuration = ContentLanguageSettings::loadByEntityTypeBundle($entity->getEntityTypeId(), $entity->bundle()); + $form[$langcode_key]['#access'] = $language_configuration->isLanguageAlterable(); + } + } + } + + /** + * Implements hook_field_info_alter(). + */ + #[Hook('field_info_alter')] + public function fieldInfoAlter(&$info) { + // Change the default behavior of language field. + $info['language']['class'] = '\Drupal\language\DefaultLanguageItem'; + } + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + // Only allow edit access on a langcode field if the entity it is attached to + // is configured to have an alterable language. Also without items we can not + // decide whether or not to allow access. + if ($items && $operation == 'edit') { + // Check if we are dealing with a langcode field. + $langcode_key = $items->getEntity()->getEntityType()->getKey('langcode'); + if ($field_definition->getName() == $langcode_key) { + // Grant access depending on whether the entity language can be altered. + $entity = $items->getEntity(); + $config = ContentLanguageSettings::loadByEntityTypeBundle($entity->getEntityTypeId(), $entity->bundle()); + return AccessResult::forbiddenIf(!$config->isLanguageAlterable()); + } + } + return AccessResult::neutral(); + } + + /** + * Implements hook_tour_tips_alter(). + */ + #[Hook('tour_tips_alter')] + public function tourTipsAlter(array &$tour_tips, EntityInterface $entity) { + $module_extension_list = \Drupal::service('extension.list.module'); + foreach ($tour_tips as $tour_tip) { + if ($tour_tip->get('id') == 'language-overview') { + $additional_overview = ''; + if (\Drupal::service('module_handler')->moduleExists('locale')) { + $additional_overview = t("This page also provides an overview of how much of the site's interface has been translated for each configured language."); + } + else { + $additional_overview = t("If the Interface Translation module is installed, this page will provide an overview of how much of the site's interface has been translated for each configured language."); + } + $tour_tip->set('body', $tour_tip->get('body') . '<p>' . $additional_overview . '</p>'); + } + elseif ($tour_tip->get('id') == 'language-continue') { + $additional_continue = ''; + $additional_modules = []; + if (!\Drupal::service('module_handler')->moduleExists('locale')) { + $additional_modules[] = $module_extension_list->getName('locale'); + } + if (!\Drupal::service('module_handler')->moduleExists('content_translation')) { + $additional_modules[] = $module_extension_list->getName('content_translation'); + } + if (!empty($additional_modules)) { + $additional_continue = t('Depending on your site features, additional modules that you might want to install are:') . '<ul>'; + foreach ($additional_modules as $additional_module) { + $additional_continue .= '<li>' . $additional_module . '</li>'; + } + $additional_continue .= '</ul>'; + } + if (!empty($additional_continue)) { + $tour_tip->set('body', $tour_tip->get('body') . '<p>' . $additional_continue . '</p>'); + } + } + } + } + + /** + * Implements hook_language_types_info_alter(). + * + * We can't set the fixed properties in \Drupal\Core\Language\LanguageManager, + * where the rest of the properties for the default language types are defined. + * The LanguageNegation classes are only loaded when the language module is + * enabled and we can't be sure of that in the LanguageManager. + */ + #[Hook('language_types_info_alter')] + public function languageTypesInfoAlter(array &$language_types) { + $language_types[LanguageInterface::TYPE_CONTENT]['fixed'] = [LanguageNegotiationUI::METHOD_ID]; + $language_types[LanguageInterface::TYPE_URL]['fixed'] = [ + LanguageNegotiationUrl::METHOD_ID, + LanguageNegotiationUrlFallback::METHOD_ID, + ]; + } + +} diff --git a/core/modules/language/src/Plugin/Block/LanguageBlock.php b/core/modules/language/src/Plugin/Block/LanguageBlock.php index d516b259f1ea54927667dcd11ce99907709f9456..8b146db4adbd31b2f96328a9148e3be1b5b611c2 100644 --- a/core/modules/language/src/Plugin/Block/LanguageBlock.php +++ b/core/modules/language/src/Plugin/Block/LanguageBlock.php @@ -45,7 +45,7 @@ class LanguageBlock extends BlockBase implements ContainerFactoryPluginInterface * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager diff --git a/core/modules/language/src/Plugin/Condition/Language.php b/core/modules/language/src/Plugin/Condition/Language.php index 9fea9d010376ca80cbe613dff6e86cd50b7fd708..67b3fc845d092f6e1dda40c750f97d2d7cae7c29 100644 --- a/core/modules/language/src/Plugin/Condition/Language.php +++ b/core/modules/language/src/Plugin/Condition/Language.php @@ -45,7 +45,7 @@ class Language extends ConditionPluginBase implements ContainerFactoryPluginInte * initialize the defined contexts by setting it to an array of context * values keyed by context names. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/modules/language/src/ProxyClass/LanguageConverter.php b/core/modules/language/src/ProxyClass/LanguageConverter.php index 5511c6859e55394218bacb5e6fa677107490391f..9f2fbbb1a1f198b2e759b005af5eeea79d30740a 100644 --- a/core/modules/language/src/ProxyClass/LanguageConverter.php +++ b/core/modules/language/src/ProxyClass/LanguageConverter.php @@ -7,15 +7,20 @@ namespace Drupal\language\ProxyClass { + use Drupal\Core\ParamConverter\ParamConverterInterface; + use Drupal\Core\DependencyInjection\DependencySerializationTrait; + use Symfony\Component\DependencyInjection\ContainerInterface; + use Symfony\Component\Routing\Route; + /** * Provides a proxy class for \Drupal\language\LanguageConverter. * * @see \Drupal\Component\ProxyBuilder */ - class LanguageConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface + class LanguageConverter implements ParamConverterInterface { - use \Drupal\Core\DependencyInjection\DependencySerializationTrait; + use DependencySerializationTrait; /** * The id of the original proxied service. @@ -46,7 +51,7 @@ class LanguageConverter implements \Drupal\Core\ParamConverter\ParamConverterInt * @param string $drupal_proxy_original_service_id * The service ID of the original service. */ - public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) + public function __construct(ContainerInterface $container, $drupal_proxy_original_service_id) { $this->container = $container; $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id; @@ -78,7 +83,7 @@ public function convert($value, $definition, $name, array $defaults) /** * {@inheritdoc} */ - public function applies($definition, $name, \Symfony\Component\Routing\Route $route) + public function applies($definition, $name, Route $route) { return $this->lazyLoadItself()->applies($definition, $name, $route); } diff --git a/core/modules/language/tests/language_entity_field_access_test/language_entity_field_access_test.module b/core/modules/language/tests/language_entity_field_access_test/language_entity_field_access_test.module deleted file mode 100644 index 4b8ea6545b02390f9325a60313ee4407252576b7..0000000000000000000000000000000000000000 --- a/core/modules/language/tests/language_entity_field_access_test/language_entity_field_access_test.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Hook implementations for language_entity_field_access_test. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_field_access(). - */ -function language_entity_field_access_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - return AccessResult::forbidden(); -} diff --git a/core/modules/language/tests/language_entity_field_access_test/src/Hook/LanguageEntityFieldAccessTestHooks.php b/core/modules/language/tests/language_entity_field_access_test/src/Hook/LanguageEntityFieldAccessTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..95fcfeef468e8c573db3f9cf8d220355b46b4c49 --- /dev/null +++ b/core/modules/language/tests/language_entity_field_access_test/src/Hook/LanguageEntityFieldAccessTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\language_entity_field_access_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for language_entity_field_access_test. + */ +class LanguageEntityFieldAccessTestHooks { + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + return AccessResult::forbidden(); + } + +} diff --git a/core/modules/language/tests/language_test/language_test.module b/core/modules/language/tests/language_test/language_test.module index fefc9f6848b138b98a750818c79a9232856bb896..ffa153163de8fa84fa1deeec231ecbfd2982892e 100644 --- a/core/modules/language/tests/language_test/language_test.module +++ b/core/modules/language/tests/language_test/language_test.module @@ -7,65 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Url; -use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI; - -/** - * Implements hook_page_top(). - */ -function language_test_page_top() { - if (\Drupal::moduleHandler()->moduleExists('language')) { - language_test_store_language_negotiation(); - \Drupal::messenger()->addStatus(t('Language negotiation method: @name', ['@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod() ?? 'Not defined'])); - } -} - -/** - * Implements hook_language_types_info(). - */ -function language_test_language_types_info() { - if (\Drupal::state()->get('language_test.language_types')) { - return [ - 'test_language_type' => [ - 'name' => t('Test'), - 'description' => t('A test language type.'), - ], - 'fixed_test_language_type' => [ - 'fixed' => ['test_language_negotiation_method'], - 'locked' => TRUE, - ], - ]; - } -} - -/** - * Implements hook_language_types_info_alter(). - */ -function language_test_language_types_info_alter(array &$language_types) { - if (\Drupal::state()->get('language_test.content_language_type')) { - $language_types[LanguageInterface::TYPE_CONTENT]['locked'] = FALSE; - unset($language_types[LanguageInterface::TYPE_CONTENT]['fixed']); - // By default languages are not configurable. Make - // LanguageInterface::TYPE_CONTENT configurable. - $config = \Drupal::configFactory()->getEditable('language.types'); - $configurable = $config->get('configurable'); - if (!in_array(LanguageInterface::TYPE_CONTENT, $configurable)) { - $configurable[] = LanguageInterface::TYPE_CONTENT; - $config->set('configurable', $configurable)->save(); - } - } -} - -/** - * Implements hook_language_negotiation_info_alter(). - */ -function language_test_language_negotiation_info_alter(array &$negotiation_info) { - if (\Drupal::state()->get('language_test.language_negotiation_info_alter')) { - unset($negotiation_info[LanguageNegotiationUI::METHOD_ID]); - } -} - /** * Store the last negotiated languages. */ @@ -76,37 +17,3 @@ function language_test_store_language_negotiation() { } \Drupal::keyValue('language_test')->set('language_negotiation_last', $last); } - -/** - * Implements hook_language_fallback_candidates_alter(). - */ -function language_test_language_fallback_candidates_alter(array &$candidates, array $context) { - if (Drupal::state()->get('language_test.fallback_alter.candidates')) { - unset($candidates[LanguageInterface::LANGCODE_NOT_SPECIFIED]); - } -} - -/** - * Implements hook_language_fallback_candidates_OPERATION_alter(). - */ -function language_test_language_fallback_candidates_test_alter(array &$candidates, array $context) { - if (Drupal::state()->get('language_test.fallback_operation_alter.candidates')) { - $langcode = LanguageInterface::LANGCODE_NOT_APPLICABLE; - $candidates[$langcode] = $langcode; - } -} - -/** - * Implements hook_module_preinstall(). - */ -function language_test_module_preinstall() { - \Drupal::state()->set('language_test.language_count_preinstall', count(\Drupal::languageManager()->getLanguages())); -} - -/** - * Implements hook_language_switch_links_alter(). - */ -function language_test_language_switch_links_alter(array &$links, $type, Url $url) { - // Record which languages had links passed in. - \Drupal::state()->set('language_test.language_switch_link_ids', array_keys($links)); -} diff --git a/core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php b/core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php index 4f8c07993ded1bff7ade2f64876f305551001970..93711536b37bb975fb725be382dab9aea607e325 100644 --- a/core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php +++ b/core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php @@ -4,27 +4,29 @@ namespace Drupal\language_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "no_language_entity_test", - * label = @Translation("Test entity without language support"), - * handlers = { - * "views_data" = "Drupal\entity_test\EntityTestViewsData" - * }, - * base_table = "no_language_entity_test", - * persistent_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * }, - * ) */ +#[ContentEntityType( + id: 'no_language_entity_test', + label: new TranslatableMarkup('Test entity without language support'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + ], + handlers: [ + 'views_data' => EntityTestViewsData::class, + ], + base_table: 'no_language_entity_test' +)] class NoLanguageEntityTest extends ContentEntityBase { /** diff --git a/core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php b/core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..07a1d80932066e042560f381c202aa4e51e21e83 --- /dev/null +++ b/core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php @@ -0,0 +1,118 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\language_test\Hook; + +use Drupal\Core\Url; +use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for language_test. + */ +class LanguageTestHooks { + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop() { + if (\Drupal::moduleHandler()->moduleExists('language')) { + language_test_store_language_negotiation(); + \Drupal::messenger()->addStatus(t('Language negotiation method: @name', [ + '@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod() ?? 'Not defined', + ])); + } + } + + /** + * Implements hook_language_types_info(). + */ + #[Hook('language_types_info')] + public function languageTypesInfo() { + if (\Drupal::state()->get('language_test.language_types')) { + return [ + 'test_language_type' => [ + 'name' => t('Test'), + 'description' => t('A test language type.'), + ], + 'fixed_test_language_type' => [ + 'fixed' => [ + 'test_language_negotiation_method', + ], + 'locked' => TRUE, + ], + ]; + } + } + + /** + * Implements hook_language_types_info_alter(). + */ + #[Hook('language_types_info_alter')] + public function languageTypesInfoAlter(array &$language_types) { + if (\Drupal::state()->get('language_test.content_language_type')) { + $language_types[LanguageInterface::TYPE_CONTENT]['locked'] = FALSE; + unset($language_types[LanguageInterface::TYPE_CONTENT]['fixed']); + // By default languages are not configurable. Make + // LanguageInterface::TYPE_CONTENT configurable. + $config = \Drupal::configFactory()->getEditable('language.types'); + $configurable = $config->get('configurable'); + if (!in_array(LanguageInterface::TYPE_CONTENT, $configurable)) { + $configurable[] = LanguageInterface::TYPE_CONTENT; + $config->set('configurable', $configurable)->save(); + } + } + } + + /** + * Implements hook_language_negotiation_info_alter(). + */ + #[Hook('language_negotiation_info_alter')] + public function languageNegotiationInfoAlter(array &$negotiation_info) { + if (\Drupal::state()->get('language_test.language_negotiation_info_alter')) { + unset($negotiation_info[LanguageNegotiationUI::METHOD_ID]); + } + } + + /** + * Implements hook_language_fallback_candidates_alter(). + */ + #[Hook('language_fallback_candidates_alter')] + public function languageFallbackCandidatesAlter(array &$candidates, array $context) { + if (\Drupal::state()->get('language_test.fallback_alter.candidates')) { + unset($candidates[LanguageInterface::LANGCODE_NOT_SPECIFIED]); + } + } + + /** + * Implements hook_language_fallback_candidates_OPERATION_alter(). + */ + #[Hook('language_fallback_candidates_test_alter')] + public function languageFallbackCandidatesTestAlter(array &$candidates, array $context) { + if (\Drupal::state()->get('language_test.fallback_operation_alter.candidates')) { + $langcode = LanguageInterface::LANGCODE_NOT_APPLICABLE; + $candidates[$langcode] = $langcode; + } + } + + /** + * Implements hook_module_preinstall(). + */ + #[Hook('module_preinstall')] + public function modulePreinstall() { + \Drupal::state()->set('language_test.language_count_preinstall', count(\Drupal::languageManager()->getLanguages())); + } + + /** + * Implements hook_language_switch_links_alter(). + */ + #[Hook('language_switch_links_alter')] + public function languageSwitchLinksAlter(array &$links, $type, Url $url) { + // Record which languages had links passed in. + \Drupal::state()->set('language_test.language_switch_link_ids', array_keys($links)); + } + +} diff --git a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php index 1096c75419f8ca2b6ffed82264d44a58c999ec52..ade8728409669930da0cb8e5821f4ef930b84954 100644 --- a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php +++ b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php @@ -14,6 +14,9 @@ */ class AdminPathEntityConverterLanguageTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['language', 'language_test']; /** diff --git a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php index ffaf49d6829f5a99d9dd4255d893f2dea5e4e0f2..95d72569ee60bee14d9f366f8cac04894419f4c0 100644 --- a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php +++ b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php @@ -13,6 +13,9 @@ */ class LanguageBlockSettingsVisibilityTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['block', 'language']; /** diff --git a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php index 92e843e0e5a4ad01a3644f329b6b2ca26554f67d..310b428d5a55434cd6042615fc71842a86658ca2 100644 --- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php +++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php @@ -14,6 +14,9 @@ */ class LanguageBrowserDetectionTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['language']; /** diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php index b99b0b29a69fdb9b29ff577604adf359294f5cf1..f6732f13741d022d41224f170e139b0b6c863dbb 100644 --- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php +++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php @@ -199,7 +199,7 @@ public function testLanguageConfigurationWeight(): void { * description of the state of the check, for example: 'after re-ordering'. * Defaults to 'by default'. */ - protected function checkConfigurableLanguageWeight($state = 'by default') { + protected function checkConfigurableLanguageWeight($state = 'by default'): void { // Reset language list. \Drupal::languageManager()->reset(); $max_configurable_language_weight = $this->getHighestConfigurableLanguageWeight(); @@ -214,7 +214,7 @@ protected function checkConfigurableLanguageWeight($state = 'by default') { * @return int * Maximum weight of configurable languages. */ - protected function getHighestConfigurableLanguageWeight() { + protected function getHighestConfigurableLanguageWeight(): int { $max_weight = 0; $storage = $this->container->get('entity_type.manager') diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php index 94b963358c3d0f864af1152e88a8c455ad3c8cd9..3db65f083fd4ab11131df46e7fb5b4af8b4aadfe 100644 --- a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php +++ b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php @@ -167,7 +167,7 @@ public function testEnabledLanguageContentNegotiator(): void { /** * Creates a translated entity. */ - protected function createTranslatableEntity() { + protected function createTranslatableEntity(): void { $this->entity = EntityTest::create(); $this->entity->addTranslation('es', ['name' => 'name spanish']); $this->entity->addTranslation('fr', ['name' => 'name french']); @@ -183,7 +183,7 @@ protected function createTranslatableEntity() { * The route name for which the route object for the request should be * created. */ - protected function setCurrentRequestForRoute($path, $route_name) { + protected function setCurrentRequestForRoute($path, $route_name): void { $request = Request::create($path); $request->attributes->set(RouteObjectInterface::ROUTE_NAME, $route_name); $request->attributes->set(RouteObjectInterface::ROUTE_OBJECT, new Route($path)); diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php index 7066786f6ed1fdabc7c7a7f12f6fd7dfc204cefb..2b4596e282ce5e455a1836767b4c0a5b6b279c1f 100644 --- a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php +++ b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php @@ -59,7 +59,7 @@ protected function languageManager() { * @param array $values * The key/value pairs to set in state. */ - protected function stateSet(array $values) { + protected function stateSet(array $values): void { // Set the new state values. $this->container->get('state')->setMultiple($values); // Refresh in-memory static state/config caches and static variables. @@ -168,7 +168,7 @@ public function testInfoAlterations(): void { /** * Check that language negotiation for fixed types matches the stored one. */ - protected function checkFixedLanguageTypes() { + protected function checkFixedLanguageTypes(): void { $configurable = $this->languageManager()->getLanguageTypes(); foreach ($this->languageManager()->getDefinedLanguageTypesInfo() as $type => $info) { if (!in_array($type, $configurable) && isset($info['fixed'])) { diff --git a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php index 9469ce393dd751ff8178afd9150ab44e99979d4f..1691c5d40138d5127aba2b06ef1aad1b79e237b9 100644 --- a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php +++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php @@ -108,7 +108,7 @@ public function testLanguageBlock(): void { * * @see self::testLanguageBlock() */ - protected function doTestHomePageLinks($block_label) { + protected function doTestHomePageLinks($block_label): void { // Create a node and set as home page. $this->createHomePage(); // Go to home page. @@ -170,7 +170,7 @@ protected function doTestHomePageLinks($block_label) { * * @see self::testLanguageBlock() */ - protected function doTestLanguageBlockAuthenticated($block_label) { + protected function doTestLanguageBlockAuthenticated($block_label): void { // Assert that the language switching block is displayed on the frontpage. $this->drupalGet(''); $this->assertSession()->pageTextContains($block_label); @@ -219,7 +219,7 @@ protected function doTestLanguageBlockAuthenticated($block_label) { * * @see self::testLanguageBlock() */ - protected function doTestLanguageBlockAnonymous($block_label) { + protected function doTestLanguageBlockAnonymous($block_label): void { $this->drupalLogout(); // Assert that the language switching block is displayed on the frontpage @@ -272,7 +272,7 @@ protected function doTestLanguageBlockAnonymous($block_label) { * * @see self::testLanguageBlock() */ - protected function doTestLanguageBlock404(string $block_label, string $system_path) { + protected function doTestLanguageBlock404(string $block_label, string $system_path): void { $this->drupalGet('does-not-exist-' . $this->randomMachineName()); $this->assertSession()->pageTextContains($block_label); @@ -428,7 +428,7 @@ public function testLanguageBodyClass(): void { * * @see self::testLanguageLinkActiveClass() */ - protected function doTestLanguageLinkActiveClassAuthenticated() { + protected function doTestLanguageLinkActiveClassAuthenticated(): void { $function_name = '#type link'; $path = 'language_test/type-link-active-class'; @@ -480,7 +480,7 @@ protected function doTestLanguageLinkActiveClassAuthenticated() { * * @see self::testLanguageLinkActiveClass() */ - protected function doTestLanguageLinkActiveClassAnonymous() { + protected function doTestLanguageLinkActiveClassAnonymous(): void { $function_name = '#type link'; $this->drupalLogout(); @@ -693,7 +693,7 @@ protected function assertLinkMarkup(string $path, int $status, string $marker, s * @param string $label * The native name of the language. */ - protected function saveNativeLanguageName($langcode, $label) { + protected function saveNativeLanguageName($langcode, $label): void { \Drupal::service('language.config_factory_override') ->getOverride($langcode, 'language.entity.' . $langcode)->set('label', $label)->save(); } @@ -701,7 +701,7 @@ protected function saveNativeLanguageName($langcode, $label) { /** * Create a node and set it as the home pages. */ - protected function createHomePage() { + protected function createHomePage(): void { $entity_type_manager = \Drupal::entityTypeManager(); // Create a node type and make it translatable. diff --git a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php index 1e87247ec86a8b2c2888e64bfd927a52cf879833..6365f34b01fc3f432b229bda1b6eee19d7253a0d 100644 --- a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php @@ -414,7 +414,7 @@ public function testUILanguageNegotiation(): void { } } - protected function doRunTest($test) { + protected function doRunTest($test): void { $test += ['path_options' => []]; if (!empty($test['language_negotiation'])) { $method_weights = array_flip($test['language_negotiation']); diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php index 7595480eea8a241d1c063a823c81616b7d08226a..87fef39a73e0ff36558ad46c6c156729e5ac82a4 100644 --- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php +++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php @@ -89,7 +89,7 @@ public function testUrlRewritingEdgeCases(): void { * @param string $message * Message to display in assertion that language prefixes are not added. */ - private function checkUrl(LanguageInterface $language, $message) { + private function checkUrl(LanguageInterface $language, $message): void { $options = ['language' => $language, 'script' => '']; $base_path = trim(base_path(), '/'); $rewritten_path = trim(str_replace($base_path, '', Url::fromRoute('<front>', [], $options)->toString()), '/'); diff --git a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php index f8404af283634003516d333b47009a33a93374f6..36877cfbd5378d8b2b81f584f4d1cf8d9cfda16e 100644 --- a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php @@ -108,7 +108,7 @@ public function testEntityTranslationDefaultLanguageViaCode(): void { * @param string $langcode * Default language code of the nodes of this type. */ - protected function createContentType($name, $langcode) { + protected function createContentType($name, $langcode): void { $content_type = $this->container->get('entity_type.manager')->getStorage('node_type')->create([ 'name' => 'Test ' . $name, 'title_label' => 'Title', diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php index 8237f9206820595a0aac152c838ea68bd42ca554..c904407d97942790447608829dff749a789ce771 100644 --- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php @@ -114,7 +114,7 @@ public function testEntityUrlLanguageWithLanguageContentEnabled(): void { /** * Creates a translated entity. */ - protected function createTranslatableEntity() { + protected function createTranslatableEntity(): void { $this->entity = EntityTest::create(); $this->entity->addTranslation('es', ['name' => 'name spanish']); $this->entity->addTranslation('fr', ['name' => 'name french']); @@ -130,7 +130,7 @@ protected function createTranslatableEntity() { * The route name for which the route object for the request should be * created. */ - protected function setCurrentRequestForRoute($path, $route_name) { + protected function setCurrentRequestForRoute($path, $route_name): void { $request = Request::create($path); $request->attributes->set(RouteObjectInterface::ROUTE_NAME, $route_name); $request->attributes->set(RouteObjectInterface::ROUTE_OBJECT, new Route($path)); diff --git a/core/modules/language/tests/src/Kernel/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/LanguageTestBase.php index f4452cfde58c9397c717ce8a09f9ca71e368f117..58aa1b527472fc09e450821dbaa2fdc8246ab0de 100644 --- a/core/modules/language/tests/src/Kernel/LanguageTestBase.php +++ b/core/modules/language/tests/src/Kernel/LanguageTestBase.php @@ -11,6 +11,9 @@ */ abstract class LanguageTestBase extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'language', 'language_test']; /** * The language manager. diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php index ce5167947ff3a16a73ed972f0bf2bdec1d45625a..f0f9e2b6f1b7705daa89c98c7a55ae09eb54f993 100644 --- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php @@ -77,7 +77,7 @@ public function testMigrationWithUnsetVariable(): void { * @param string $langcode * The langcode of the default language. */ - protected function setDefaultLanguage($langcode) { + protected function setDefaultLanguage($langcode): void { // The default language of the test fixture is English. Change it to // something else before migrating, to be sure that the source site // default language is migrated. diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php index cbcb91b390b5e6804f8295b7bf2b51f975df9e9c..73d6d1ecf503a6021c1eeb9605f28d5178f2a00d 100644 --- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php @@ -77,7 +77,7 @@ public function testMigrationWithUnsetVariable(): void { * @param string $langcode * The langcode of the default language. */ - protected function setDefaultLanguage($langcode) { + protected function setDefaultLanguage($langcode): void { // The default language of the test fixture is English. Change it to // something else before migrating, to be sure that the source site // default language is migrated. diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php index 9cf007a8593f64cc6a10ab0d29cded393e20250f..11821c6c65a2a5e0905c432c52a601281e555319 100644 --- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php +++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php @@ -44,7 +44,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public static function migrateDumpAlter(KernelTestBase $test) { + public static function migrateDumpAlter(KernelTestBase $test): void { // Disable comment entity translation. $db = Database::getConnection('default', 'migrate'); diff --git a/core/modules/language/tests/src/Traits/LanguageTestTrait.php b/core/modules/language/tests/src/Traits/LanguageTestTrait.php index a82ea29bf54d614abdf5bf08a458a49a7b994d34..c52ad1ee578bcdb08aa44814ae30999f54de6937 100644 --- a/core/modules/language/tests/src/Traits/LanguageTestTrait.php +++ b/core/modules/language/tests/src/Traits/LanguageTestTrait.php @@ -62,7 +62,7 @@ public static function enableBundleTranslation(string $entity_type_id, string $b * @param string $bundle * The bundle name. */ - public static function disableBundleTranslation(string $entity_type_id, string $bundle) { + public static function disableBundleTranslation(string $entity_type_id, string $bundle): void { // @todo Move to API call when it exists, to be added at // https://www.drupal.org/project/drupal/issues/3408046 $content_language_settings = ContentLanguageSettings::loadByEntityTypeBundle($entity_type_id, $bundle); diff --git a/core/modules/layout_builder/layout_builder.install b/core/modules/layout_builder/layout_builder.install index 18df64a2fbd4de91c0b6b7953b5908c30b546ca9..587aa49153f9f50ccba4c2cd66075b8b95137edf 100644 --- a/core/modules/layout_builder/layout_builder.install +++ b/core/modules/layout_builder/layout_builder.install @@ -13,7 +13,7 @@ /** * Implements hook_install(). */ -function layout_builder_install() { +function layout_builder_install(): void { $display_changed = FALSE; $displays = LayoutBuilderEntityViewDisplay::loadMultiple(); @@ -79,6 +79,6 @@ function layout_builder_schema() { /** * Implements hook_update_last_removed(). */ -function layout_builder_update_last_removed() { +function layout_builder_update_last_removed(): int { return 8602; } diff --git a/core/modules/layout_builder/layout_builder.module b/core/modules/layout_builder/layout_builder.module index 6692621ba317f1f01e6e4e93b4525980de8d4ef3..ddc5ab8fb34e2f976d711807a5e3374ebf191dbf 100644 --- a/core/modules/layout_builder/layout_builder.module +++ b/core/modules/layout_builder/layout_builder.module @@ -2,179 +2,10 @@ /** * @file - * Provides hook implementations for Layout Builder. */ -use Drupal\Core\Breadcrumb\Breadcrumb; -use Drupal\Core\Cache\CacheableMetadata; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\FieldableEntityInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Link; -use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; -use Drupal\field\FieldConfigInterface; -use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; -use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage; -use Drupal\layout_builder\Form\DefaultsEntityForm; -use Drupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForm; -use Drupal\layout_builder\Form\OverridesEntityForm; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\layout_builder\Plugin\Block\ExtraFieldBlock; -use Drupal\layout_builder\InlineBlockEntityOperations; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Access\AccessResult; use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; -/** - * Implements hook_help(). - */ -function layout_builder_help($route_name, RouteMatchInterface $route_match) { - // Add help text to the Layout Builder UI. - if ($route_match->getRouteObject()->getOption('_layout_builder')) { - $output = '<p>' . t('This layout builder tool allows you to configure the layout of the main content area.') . '</p>'; - if (\Drupal::currentUser()->hasPermission('administer blocks')) { - $output .= '<p>' . t('To manage other areas of the page, use the <a href="@block-ui">block administration page</a>.', ['@block-ui' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; - } - else { - $output .= '<p>' . t('To manage other areas of the page, use the block administration page.') . '</p>'; - } - $output .= '<p>' . t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>'; - return $output; - } - - switch ($route_name) { - case 'help.page.layout_builder': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('Layout Builder allows you to use layouts to customize how content, content blocks, and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a> are displayed.', [':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":layout-builder-documentation">online documentation for the Layout Builder module</a>.', [':layout-builder-documentation' => 'https://www.drupal.org/docs/8/core/modules/layout-builder']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Default layouts') . '</dt>'; - $output .= '<dd>' . t('Layout Builder can be selectively enabled on the "Manage Display" page in the <a href=":field_ui">Field UI</a>. This allows you to control the output of each type of display individually. For example, a "Basic page" might have view modes such as Full and Teaser, with each view mode having different layouts selected.', [':field_ui' => Url::fromRoute('help.page', ['name' => 'field_ui'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Overridden layouts') . '</dt>'; - $output .= '<dd>' . t('If enabled, each individual content item can have a custom layout. Once the layout for an individual content item is overridden, changes to the Default layout will no longer affect it. Overridden layouts may be reverted to return to matching and being synchronized to their Default layout.') . '</dd>'; - $output .= '<dt>' . t('User permissions') . '</dt>'; - $output .= '<dd>' . t('The Layout Builder module makes a number of permissions available, which can be set by role on the <a href=":permissions">permissions page</a>. For more information, see the <a href=":layout-builder-permissions">Configuring Layout Builder permissions</a> online documentation.', [ - ':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'layout_builder'])->toString(), - ':layout-builder-permissions' => 'https://www.drupal.org/docs/8/core/modules/layout-builder/configuring-layout-builder-permissions', - ]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function layout_builder_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['entity_view_display'] - ->setClass(LayoutBuilderEntityViewDisplay::class) - ->setStorageClass(LayoutBuilderEntityViewDisplayStorage::class) - ->setFormClass('layout_builder', DefaultsEntityForm::class) - ->setFormClass('edit', LayoutBuilderEntityViewDisplayForm::class); - - // Ensure every fieldable entity type has a layout form. - foreach ($entity_types as $entity_type) { - if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) { - $entity_type->setFormClass('layout_builder', OverridesEntityForm::class); - } - } -} - -/** - * Implements hook_form_FORM_ID_alter() for \Drupal\field_ui\Form\EntityFormDisplayEditForm. - */ -function layout_builder_form_entity_form_display_edit_form_alter(&$form, FormStateInterface $form_state) { - // Hides the Layout Builder field. It is rendered directly in - // \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::buildMultiple(). - unset($form['fields'][OverridesSectionStorage::FIELD_NAME]); - $key = array_search(OverridesSectionStorage::FIELD_NAME, $form['#fields']); - if ($key !== FALSE) { - unset($form['#fields'][$key]); - } -} - -/** - * Implements hook_field_config_insert(). - */ -function layout_builder_field_config_insert(FieldConfigInterface $field_config) { - // Clear the sample entity for this entity type and bundle. - $sample_entity_generator = \Drupal::service('layout_builder.sample_entity_generator'); - $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle()); - \Drupal::service('plugin.manager.block')->clearCachedDefinitions(); -} - -/** - * Implements hook_field_config_delete(). - */ -function layout_builder_field_config_delete(FieldConfigInterface $field_config) { - // Clear the sample entity for this entity type and bundle. - $sample_entity_generator = \Drupal::service('layout_builder.sample_entity_generator'); - $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle()); - \Drupal::service('plugin.manager.block')->clearCachedDefinitions(); -} - -/** - * Implements hook_entity_view_alter(). - * - * ExtraFieldBlock block plugins add placeholders for each extra field which is - * configured to be displayed. Those placeholders are replaced by this hook. - * Modules that implement hook_entity_extra_field_info() use their - * implementations of hook_entity_view_alter() to add the rendered output of - * the extra fields they provide, so we cannot get the rendered output of extra - * fields before this point in the view process. - * layout_builder_module_implements_alter() moves this implementation of - * hook_entity_view_alter() to the end of the list. - * - * @see \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::build() - * @see layout_builder_module_implements_alter() - */ -function layout_builder_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { - // Only replace extra fields when Layout Builder has been used to alter the - // build. See \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::buildMultiple(). - if (isset($build['_layout_builder']) && !Element::isEmpty($build['_layout_builder'])) { - /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $field_manager */ - $field_manager = \Drupal::service('entity_field.manager'); - $extra_fields = $field_manager->getExtraFields($entity->getEntityTypeId(), $entity->bundle()); - if (!empty($extra_fields['display'])) { - foreach ($extra_fields['display'] as $field_name => $extra_field) { - // If the extra field is not set replace with an empty array to avoid - // the placeholder text from being rendered. - $replacement = $build[$field_name] ?? []; - ExtraFieldBlock::replaceFieldPlaceholder($build, $replacement, $field_name); - // After the rendered field in $build has been copied over to the - // ExtraFieldBlock block we must remove it from its original location or - // else it will be rendered twice. - unset($build[$field_name]); - } - } - } - - $route_name = \Drupal::routeMatch()->getRouteName(); - - // If the entity is displayed within a Layout Builder block and the current - // route is in the Layout Builder UI, then remove all contextual link - // placeholders. - if ($route_name && $display instanceof LayoutBuilderEntityViewDisplay && str_starts_with($route_name, 'layout_builder.')) { - unset($build['#contextual_links']); - } -} - -/** - * Implements hook_entity_build_defaults_alter(). - */ -function layout_builder_entity_build_defaults_alter(array &$build, EntityInterface $entity, $view_mode) { - // Contextual links are removed for entities viewed in Layout Builder's UI. - // The route.name.is_layout_builder_ui cache context accounts for this - // difference. - // @see layout_builder_entity_view_alter() - // @see \Drupal\layout_builder\Cache\LayoutBuilderUiCacheContext - $build['#cache']['contexts'][] = 'route.name.is_layout_builder_ui'; -} - /** * Implements hook_module_implements_alter(). */ @@ -189,196 +20,6 @@ function layout_builder_module_implements_alter(&$implementations, $hook) { } } -/** - * Implements hook_entity_presave(). - */ -function layout_builder_entity_presave(EntityInterface $entity) { - if (\Drupal::moduleHandler()->moduleExists('block_content')) { - /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ - $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); - $entity_operations->handlePreSave($entity); - } -} - -/** - * Implements hook_entity_delete(). - */ -function layout_builder_entity_delete(EntityInterface $entity) { - if (\Drupal::moduleHandler()->moduleExists('block_content')) { - /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ - $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); - $entity_operations->handleEntityDelete($entity); - } -} - -/** - * Implements hook_cron(). - */ -function layout_builder_cron() { - if (\Drupal::moduleHandler()->moduleExists('block_content')) { - /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ - $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); - $entity_operations->removeUnused(); - } -} - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - */ -function layout_builder_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) { - // Remove blocks that are not useful within Layout Builder. - unset($definitions['system_messages_block']); - unset($definitions['help_block']); - unset($definitions['local_tasks_block']); - unset($definitions['local_actions_block']); - - // Remove blocks that are non-functional within Layout Builder. - unset($definitions['system_main_block']); - // @todo Restore the page title block in https://www.drupal.org/node/2938129. - unset($definitions['page_title_block']); -} - -/** - * Implements hook_plugin_filter_TYPE_alter(). - */ -function layout_builder_plugin_filter_block_alter(array &$definitions, array $extra, $consumer) { - // @todo Determine the 'inline_block' blocks should be allowed outside - // of layout_builder https://www.drupal.org/node/2979142. - if ($consumer !== 'layout_builder' || !isset($extra['list']) || $extra['list'] !== 'inline_blocks') { - foreach ($definitions as $id => $definition) { - if ($definition['id'] === 'inline_block') { - unset($definitions[$id]); - } - } - } -} - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function layout_builder_block_content_access(EntityInterface $entity, $operation, AccountInterface $account) { - /** @var \Drupal\block_content\BlockContentInterface $entity */ - if ($operation === 'view' || $entity->isReusable() || empty(\Drupal::service('inline_block.usage')->getUsage($entity->id()))) { - // If the operation is 'view' or this is reusable block or if this is - // non-reusable that isn't used by this module then don't alter the access. - return AccessResult::neutral(); - } - - if ($account->hasPermission('create and edit custom blocks')) { - return AccessResult::allowed(); - } - return AccessResult::forbidden(); -} - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - */ -function layout_builder_plugin_filter_block__block_ui_alter(array &$definitions, array $extra) { - foreach ($definitions as $id => $definition) { - // Filter out any layout_builder-provided block that has required context - // definitions. - if ($definition['provider'] === 'layout_builder' && !empty($definition['context_definitions'])) { - /** @var \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition */ - foreach ($definition['context_definitions'] as $context_definition) { - if ($context_definition->isRequired()) { - unset($definitions[$id]); - break; - } - } - } - } -} - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - */ -function layout_builder_plugin_filter_layout__layout_builder_alter(array &$definitions, array $extra) { - // Remove layouts provide by layout discovery that are not needed because of - // layouts provided by this module. - $duplicate_layouts = [ - 'layout_twocol', - 'layout_twocol_bricks', - 'layout_threecol_25_50_25', - 'layout_threecol_33_34_33', - ]; - - foreach ($duplicate_layouts as $duplicate_layout) { - /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */ - if (isset($definitions[$duplicate_layout])) { - if ($definitions[$duplicate_layout]->getProvider() === 'layout_discovery') { - unset($definitions[$duplicate_layout]); - } - } - } - - // Move the one column layout to the top. - if (isset($definitions['layout_onecol']) && $definitions['layout_onecol']->getProvider() === 'layout_discovery') { - $one_col = $definitions['layout_onecol']; - unset($definitions['layout_onecol']); - $definitions = [ - 'layout_onecol' => $one_col, - ] + $definitions; - } -} - -/** - * Implements hook_plugin_filter_TYPE_alter(). - */ -function layout_builder_plugin_filter_layout_alter(array &$definitions, array $extra, $consumer) { - // Hide the blank layout plugin from listings. - unset($definitions['layout_builder_blank']); -} - -/** - * Implements hook_system_breadcrumb_alter(). - */ -function layout_builder_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) { - // Remove the extra 'Manage display' breadcrumb for Layout Builder defaults. - if ($route_match->getRouteObject() && $route_match->getRouteObject()->hasOption('_layout_builder') && $route_match->getParameter('section_storage_type') === 'defaults') { - $links = array_filter($breadcrumb->getLinks(), function (Link $link) use ($route_match) { - $entity_type_id = $route_match->getParameter('entity_type_id'); - if (!$link->getUrl()->isRouted()) { - return TRUE; - } - return $link->getUrl()->getRouteName() !== "entity.entity_view_display.$entity_type_id.default"; - }); - // Links cannot be removed from an existing breadcrumb object. Create a new - // object but carry over the cacheable metadata. - $cacheability = CacheableMetadata::createFromObject($breadcrumb); - $breadcrumb = new Breadcrumb(); - $breadcrumb->setLinks($links); - $breadcrumb->addCacheableDependency($cacheability); - } -} - -/** - * Implements hook_entity_translation_create(). - */ -function layout_builder_entity_translation_create(EntityInterface $translation) { - /** @var \Drupal\Core\Entity\FieldableEntityInterface $translation */ - if ($translation->hasField(OverridesSectionStorage::FIELD_NAME) && $translation->getFieldDefinition(OverridesSectionStorage::FIELD_NAME)->isTranslatable()) { - // When creating a new translation do not copy untranslated sections because - // per-language layouts are not supported. - $translation->set(OverridesSectionStorage::FIELD_NAME, []); - } -} - -/** - * Implements hook_theme_registry_alter(). - */ -function layout_builder_theme_registry_alter(&$theme_registry) { - // Move our preprocess to run after - // content_translation_preprocess_language_content_settings_table(). - if (!empty($theme_registry['language_content_settings_table']['preprocess functions'])) { - $preprocess_functions = &$theme_registry['language_content_settings_table']['preprocess functions']; - $index = array_search('layout_builder_preprocess_language_content_settings_table', $preprocess_functions); - if ($index !== FALSE) { - unset($preprocess_functions[$index]); - $preprocess_functions[] = 'layout_builder_preprocess_language_content_settings_table'; - } - } -} - /** * Implements hook_preprocess_HOOK() for language-content-settings-table.html.twig. */ @@ -400,15 +41,3 @@ function layout_builder_preprocess_language_content_settings_table(&$variables) } } } - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function layout_builder_theme_suggestions_field_alter(&$suggestions, array $variables) { - $element = $variables['element']; - if (isset($element['#third_party_settings']['layout_builder']['view_mode'])) { - // See system_theme_suggestions_field(). - $suggestions[] = 'field__' . $element['#entity_type'] . '__' . $element['#field_name'] . '__' . $element['#bundle'] . '__' . $element['#third_party_settings']['layout_builder']['view_mode']; - } - return $suggestions; -} diff --git a/core/modules/layout_builder/layout_builder.post_update.php b/core/modules/layout_builder/layout_builder.post_update.php index 22c98f15563cfc436ef781ba368462b25ebbabc1..abfe3e1ac95afa50bfffc4bd53c55c8373112bc4 100644 --- a/core/modules/layout_builder/layout_builder.post_update.php +++ b/core/modules/layout_builder/layout_builder.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function layout_builder_removed_post_updates() { +function layout_builder_removed_post_updates(): array { return [ 'layout_builder_post_update_rebuild_plugin_dependencies' => '9.0.0', 'layout_builder_post_update_add_extra_fields' => '9.0.0', diff --git a/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/layout_builder_expose_all_field_blocks.module b/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/layout_builder_expose_all_field_blocks.module deleted file mode 100644 index 8da8050c57ef200b736452acb485126ec0220f0e..0000000000000000000000000000000000000000 --- a/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/layout_builder_expose_all_field_blocks.module +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/** - * @file - * Module implementation file. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function layout_builder_expose_all_field_blocks_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.layout_builder_expose_all_field_blocks': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Layout Builder Expose All Field Blocks module is a Feature Flag module which, when enabled, exposes all fields on all bundles as field blocks for use in Layout Builder.') . '</p>'; - $output .= '<p>' . t('Leaving this module enabled can significantly affect the performance of medium to large sites due to the number of Field Block plugins that will be created. It is recommended to turn it off if possible.') . '</p>'; - $output .= '<p>' . t('While it is recommended to turn this module off, note that this may remove blocks that are already being used in existing site configurations.') . '</p>'; - $output .= '<p>' . t("For example, if you have Layout Builder enabled on a Node bundle (Content type), and that bundle's display is using field blocks from the User entity (e.g the Author's name), but Layout Builder is not enabled for the User bundle, then that field block would no longer exist after disabling this module.") . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":href">online documentation for the Layout Builder Expose All Field Blocks module</a>.', [':href' => 'https://www.drupal.org/node/3223395#s-layout-builder-expose-all-field-blocks']) . '</p>'; - return $output; - } - return NULL; -} diff --git a/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php b/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d569ba893496c8e3634f26050f55c80509e041 --- /dev/null +++ b/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php @@ -0,0 +1,33 @@ +<?php + +namespace Drupal\layout_builder_expose_all_field_blocks\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_builder_expose_all_field_blocks. + */ +class LayoutBuilderExposeAllFieldBlocksHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.layout_builder_expose_all_field_blocks': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Layout Builder Expose All Field Blocks module is a Feature Flag module which exposes all fields on all bundles as field blocks for use in Layout Builder.') . '</p>'; + $output .= '<p>' . t('Using this feature can significantly reduce the performance of medium to large sites due to the number of Field Block plugins that will be created. It is recommended to uninstall this module, if possible.') . '</p>'; + $output .= '<p>' . t('While it is recommended to uninstall this module, doing so may remove blocks that are being used in your site.') . '</p>'; + $output .= '<p>' . t("For example, if Layout Builder is enabled on a Node bundle (Content type), and that bundle's display is using field blocks from the User entity (e.g. the Author's name), but Layout Builder is not enabled for the User bundle, then that field block would no longer exist after uninstalling this module.") . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":href">online documentation for the Layout Builder Expose All Field Blocks module</a>.', [ + ':href' => 'https://www.drupal.org/node/3223395#s-layout-builder-expose-all-field-blocks', + ]) . '</p>'; + return $output; + } + return NULL; + } + +} diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php index 6e058878bfae291b07216181098b0dc075f6fb48..9602fe8fc4cfe2e4a7aeef993430077e0d6c319e 100644 --- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php @@ -6,6 +6,7 @@ use Drupal\Component\Plugin\DerivativeInspectionInterface; use Drupal\Component\Plugin\PluginBase; use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Entity\Entity\EntityViewDisplay as BaseEntityViewDisplay; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\FieldableEntityInterface; @@ -58,6 +59,7 @@ public function isOverridable() { /** * {@inheritdoc} */ + #[ActionMethod(adminLabel: new TranslatableMarkup('Toggle overridable layouts'), pluralize: FALSE, name: 'allowLayoutOverrides')] public function setOverridable($overridable = TRUE) { $this->setThirdPartySetting('layout_builder', 'allow_custom', $overridable); // Enable Layout Builder if it's not already enabled and overriding. @@ -82,6 +84,7 @@ public function isLayoutBuilderEnabled() { /** * {@inheritdoc} */ + #[ActionMethod(adminLabel: new TranslatableMarkup('Enable Layout Builder'), pluralize: FALSE)] public function enableLayoutBuilder() { $this->setThirdPartySetting('layout_builder', 'enabled', TRUE); return $this; @@ -90,6 +93,7 @@ public function enableLayoutBuilder() { /** * {@inheritdoc} */ + #[ActionMethod(adminLabel: new TranslatableMarkup('Disable Layout Builder'), pluralize: FALSE)] public function disableLayoutBuilder() { $this->setOverridable(FALSE); $this->setThirdPartySetting('layout_builder', 'enabled', FALSE); diff --git a/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php b/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7617f050394e1a9fd43694e8305fd7d83a58a37b --- /dev/null +++ b/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php @@ -0,0 +1,401 @@ +<?php + +namespace Drupal\layout_builder\Hook; + +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Link; +use Drupal\Core\Breadcrumb\Breadcrumb; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\layout_builder\InlineBlockEntityOperations; +use Drupal\layout_builder\Plugin\Block\ExtraFieldBlock; +use Drupal\Core\Render\Element; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\field\FieldConfigInterface; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; +use Drupal\Core\Form\FormStateInterface; +use Drupal\layout_builder\Form\OverridesEntityForm; +use Drupal\Core\Entity\FieldableEntityInterface; +use Drupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForm; +use Drupal\layout_builder\Form\DefaultsEntityForm; +use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage; +use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_builder. + */ +class LayoutBuilderHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + // Add help text to the Layout Builder UI. + if ($route_match->getRouteObject()->getOption('_layout_builder')) { + $output = '<p>' . t('This layout builder tool allows you to configure the layout of the main content area.') . '</p>'; + if (\Drupal::currentUser()->hasPermission('administer blocks')) { + $output .= '<p>' . t('To manage other areas of the page, use the <a href="@block-ui">block administration page</a>.', ['@block-ui' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; + } + else { + $output .= '<p>' . t('To manage other areas of the page, use the block administration page.') . '</p>'; + } + $output .= '<p>' . t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>'; + return $output; + } + switch ($route_name) { + case 'help.page.layout_builder': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('Layout Builder allows you to use layouts to customize how content, content blocks, and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a> are displayed.', [ + ':field_help' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":layout-builder-documentation">online documentation for the Layout Builder module</a>.', [ + ':layout-builder-documentation' => 'https://www.drupal.org/docs/8/core/modules/layout-builder', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Default layouts') . '</dt>'; + $output .= '<dd>' . t('Layout Builder can be selectively enabled on the "Manage Display" page in the <a href=":field_ui">Field UI</a>. This allows you to control the output of each type of display individually. For example, a "Basic page" might have view modes such as Full and Teaser, with each view mode having different layouts selected.', [ + ':field_ui' => Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Overridden layouts') . '</dt>'; + $output .= '<dd>' . t('If enabled, each individual content item can have a custom layout. Once the layout for an individual content item is overridden, changes to the Default layout will no longer affect it. Overridden layouts may be reverted to return to matching and being synchronized to their Default layout.') . '</dd>'; + $output .= '<dt>' . t('User permissions') . '</dt>'; + $output .= '<dd>' . t('The Layout Builder module makes a number of permissions available, which can be set by role on the <a href=":permissions">permissions page</a>. For more information, see the <a href=":layout-builder-permissions">Configuring Layout Builder permissions</a> online documentation.', [ + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'layout_builder', + ])->toString(), + ':layout-builder-permissions' => 'https://www.drupal.org/docs/8/core/modules/layout-builder/configuring-layout-builder-permissions', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['entity_view_display']->setClass(LayoutBuilderEntityViewDisplay::class)->setStorageClass(LayoutBuilderEntityViewDisplayStorage::class)->setFormClass('layout_builder', DefaultsEntityForm::class)->setFormClass('edit', LayoutBuilderEntityViewDisplayForm::class); + // Ensure every fieldable entity type has a layout form. + foreach ($entity_types as $entity_type) { + if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) { + $entity_type->setFormClass('layout_builder', OverridesEntityForm::class); + } + } + } + + /** + * Implements hook_form_FORM_ID_alter() for \Drupal\field_ui\Form\EntityFormDisplayEditForm. + */ + #[Hook('form_entity_form_display_edit_form_alter')] + public function formEntityFormDisplayEditFormAlter(&$form, FormStateInterface $form_state) : void { + // Hides the Layout Builder field. It is rendered directly in + // \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::buildMultiple(). + unset($form['fields'][OverridesSectionStorage::FIELD_NAME]); + $key = array_search(OverridesSectionStorage::FIELD_NAME, $form['#fields']); + if ($key !== FALSE) { + unset($form['#fields'][$key]); + } + } + + /** + * Implements hook_field_config_insert(). + */ + #[Hook('field_config_insert')] + public function fieldConfigInsert(FieldConfigInterface $field_config) { + // Clear the sample entity for this entity type and bundle. + $sample_entity_generator = \Drupal::service('layout_builder.sample_entity_generator'); + $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle()); + \Drupal::service('plugin.manager.block')->clearCachedDefinitions(); + } + + /** + * Implements hook_field_config_delete(). + */ + #[Hook('field_config_delete')] + public function fieldConfigDelete(FieldConfigInterface $field_config) { + // Clear the sample entity for this entity type and bundle. + $sample_entity_generator = \Drupal::service('layout_builder.sample_entity_generator'); + $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle()); + \Drupal::service('plugin.manager.block')->clearCachedDefinitions(); + } + + /** + * Implements hook_entity_view_alter(). + * + * ExtraFieldBlock block plugins add placeholders for each extra field which is + * configured to be displayed. Those placeholders are replaced by this hook. + * Modules that implement hook_entity_extra_field_info() use their + * implementations of hook_entity_view_alter() to add the rendered output of + * the extra fields they provide, so we cannot get the rendered output of extra + * fields before this point in the view process. + * layout_builder_module_implements_alter() moves this implementation of + * hook_entity_view_alter() to the end of the list. + * + * @see \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::build() + * @see layout_builder_module_implements_alter() + */ + #[Hook('entity_view_alter')] + public function entityViewAlter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { + // Only replace extra fields when Layout Builder has been used to alter the + // build. See \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::buildMultiple(). + if (isset($build['_layout_builder']) && !Element::isEmpty($build['_layout_builder'])) { + /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $field_manager */ + $field_manager = \Drupal::service('entity_field.manager'); + $extra_fields = $field_manager->getExtraFields($entity->getEntityTypeId(), $entity->bundle()); + if (!empty($extra_fields['display'])) { + foreach ($extra_fields['display'] as $field_name => $extra_field) { + // If the extra field is not set replace with an empty array to avoid + // the placeholder text from being rendered. + $replacement = $build[$field_name] ?? []; + ExtraFieldBlock::replaceFieldPlaceholder($build, $replacement, $field_name); + // After the rendered field in $build has been copied over to the + // ExtraFieldBlock block we must remove it from its original location or + // else it will be rendered twice. + unset($build[$field_name]); + } + } + } + $route_name = \Drupal::routeMatch()->getRouteName(); + // If the entity is displayed within a Layout Builder block and the current + // route is in the Layout Builder UI, then remove all contextual link + // placeholders. + if ($route_name && $display instanceof LayoutBuilderEntityViewDisplay && str_starts_with($route_name, 'layout_builder.')) { + unset($build['#contextual_links']); + } + } + + /** + * Implements hook_entity_build_defaults_alter(). + */ + #[Hook('entity_build_defaults_alter')] + public function entityBuildDefaultsAlter(array &$build, EntityInterface $entity, $view_mode) { + // Contextual links are removed for entities viewed in Layout Builder's UI. + // The route.name.is_layout_builder_ui cache context accounts for this + // difference. + // @see layout_builder_entity_view_alter() + // @see \Drupal\layout_builder\Cache\LayoutBuilderUiCacheContext + $build['#cache']['contexts'][] = 'route.name.is_layout_builder_ui'; + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + if (\Drupal::moduleHandler()->moduleExists('block_content')) { + /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ + $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); + $entity_operations->handlePreSave($entity); + } + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + if (\Drupal::moduleHandler()->moduleExists('block_content')) { + /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ + $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); + $entity_operations->handleEntityDelete($entity); + } + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + if (\Drupal::moduleHandler()->moduleExists('block_content')) { + /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */ + $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class); + $entity_operations->removeUnused(); + } + } + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ + #[Hook('plugin_filter_block__layout_builder_alter')] + public function pluginFilterBlockLayoutBuilderAlter(array &$definitions, array $extra) { + // Remove blocks that are not useful within Layout Builder. + unset($definitions['system_messages_block']); + unset($definitions['help_block']); + unset($definitions['local_tasks_block']); + unset($definitions['local_actions_block']); + // Remove blocks that are non-functional within Layout Builder. + unset($definitions['system_main_block']); + // @todo Restore the page title block in https://www.drupal.org/node/2938129. + unset($definitions['page_title_block']); + } + + /** + * Implements hook_plugin_filter_TYPE_alter(). + */ + #[Hook('plugin_filter_block_alter')] + public function pluginFilterBlockAlter(array &$definitions, array $extra, $consumer) { + // @todo Determine the 'inline_block' blocks should be allowed outside + // of layout_builder https://www.drupal.org/node/2979142. + if ($consumer !== 'layout_builder' || !isset($extra['list']) || $extra['list'] !== 'inline_blocks') { + foreach ($definitions as $id => $definition) { + if ($definition['id'] === 'inline_block') { + unset($definitions[$id]); + } + } + } + } + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('block_content_access')] + public function blockContentAccess(EntityInterface $entity, $operation, AccountInterface $account) { + /** @var \Drupal\block_content\BlockContentInterface $entity */ + if ($operation === 'view' || $entity->isReusable() || empty(\Drupal::service('inline_block.usage')->getUsage($entity->id()))) { + // If the operation is 'view' or this is reusable block or if this is + // non-reusable that isn't used by this module then don't alter the access. + return AccessResult::neutral(); + } + if ($account->hasPermission('create and edit custom blocks')) { + return AccessResult::allowed(); + } + return AccessResult::forbidden(); + } + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ + #[Hook('plugin_filter_block__block_ui_alter')] + public function pluginFilterBlockBlockUiAlter(array &$definitions, array $extra) { + foreach ($definitions as $id => $definition) { + // Filter out any layout_builder-provided block that has required context + // definitions. + if ($definition['provider'] === 'layout_builder' && !empty($definition['context_definitions'])) { + /** @var \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition */ + foreach ($definition['context_definitions'] as $context_definition) { + if ($context_definition->isRequired()) { + unset($definitions[$id]); + break; + } + } + } + } + } + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ + #[Hook('plugin_filter_layout__layout_builder_alter')] + public function pluginFilterLayoutLayoutBuilderAlter(array &$definitions, array $extra) { + // Remove layouts provide by layout discovery that are not needed because of + // layouts provided by this module. + $duplicate_layouts = [ + 'layout_twocol', + 'layout_twocol_bricks', + 'layout_threecol_25_50_25', + 'layout_threecol_33_34_33', + ]; + foreach ($duplicate_layouts as $duplicate_layout) { + /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */ + if (isset($definitions[$duplicate_layout])) { + if ($definitions[$duplicate_layout]->getProvider() === 'layout_discovery') { + unset($definitions[$duplicate_layout]); + } + } + } + // Move the one column layout to the top. + if (isset($definitions['layout_onecol']) && $definitions['layout_onecol']->getProvider() === 'layout_discovery') { + $one_col = $definitions['layout_onecol']; + unset($definitions['layout_onecol']); + $definitions = ['layout_onecol' => $one_col] + $definitions; + } + } + + /** + * Implements hook_plugin_filter_TYPE_alter(). + */ + #[Hook('plugin_filter_layout_alter')] + public function pluginFilterLayoutAlter(array &$definitions, array $extra, $consumer) { + // Hide the blank layout plugin from listings. + unset($definitions['layout_builder_blank']); + } + + /** + * Implements hook_system_breadcrumb_alter(). + */ + #[Hook('system_breadcrumb_alter')] + public function systemBreadcrumbAlter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) { + // Remove the extra 'Manage display' breadcrumb for Layout Builder defaults. + if ($route_match->getRouteObject() && $route_match->getRouteObject()->hasOption('_layout_builder') && $route_match->getParameter('section_storage_type') === 'defaults') { + $links = array_filter($breadcrumb->getLinks(), function (Link $link) use ($route_match) { + $entity_type_id = $route_match->getParameter('entity_type_id'); + if (!$link->getUrl()->isRouted()) { + return TRUE; + } + return $link->getUrl()->getRouteName() !== "entity.entity_view_display.{$entity_type_id}.default"; + }); + // Links cannot be removed from an existing breadcrumb object. Create a new + // object but carry over the cacheable metadata. + $cacheability = CacheableMetadata::createFromObject($breadcrumb); + $breadcrumb = new Breadcrumb(); + $breadcrumb->setLinks($links); + $breadcrumb->addCacheableDependency($cacheability); + } + } + + /** + * Implements hook_entity_translation_create(). + */ + #[Hook('entity_translation_create')] + public function entityTranslationCreate(EntityInterface $translation) { + /** @var \Drupal\Core\Entity\FieldableEntityInterface $translation */ + if ($translation->hasField(OverridesSectionStorage::FIELD_NAME) && $translation->getFieldDefinition(OverridesSectionStorage::FIELD_NAME)->isTranslatable()) { + // When creating a new translation do not copy untranslated sections because + // per-language layouts are not supported. + $translation->set(OverridesSectionStorage::FIELD_NAME, []); + } + } + + /** + * Implements hook_theme_registry_alter(). + */ + #[Hook('theme_registry_alter')] + public function themeRegistryAlter(&$theme_registry) { + // Move our preprocess to run after + // content_translation_preprocess_language_content_settings_table(). + if (!empty($theme_registry['language_content_settings_table']['preprocess functions'])) { + $preprocess_functions =& $theme_registry['language_content_settings_table']['preprocess functions']; + $index = array_search('layout_builder_preprocess_language_content_settings_table', $preprocess_functions); + if ($index !== FALSE) { + unset($preprocess_functions[$index]); + $preprocess_functions[] = 'layout_builder_preprocess_language_content_settings_table'; + } + } + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_field_alter')] + public function themeSuggestionsFieldAlter(&$suggestions, array $variables) { + $element = $variables['element']; + if (isset($element['#third_party_settings']['layout_builder']['view_mode'])) { + // See system_theme_suggestions_field(). + $suggestions[] = 'field__' . $element['#entity_type'] . '__' . $element['#field_name'] . '__' . $element['#bundle'] . '__' . $element['#third_party_settings']['layout_builder']['view_mode']; + } + return $suggestions; + } + +} diff --git a/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/layout_builder_extra_field_test.module b/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/layout_builder_extra_field_test.module index 7af0cf235e28d483d4910aca2bd081fcc37f58ab..1b4365e0772de515a3c2b9395168998ff9ee2c63 100644 --- a/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/layout_builder_extra_field_test.module +++ b/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/layout_builder_extra_field_test.module @@ -10,18 +10,6 @@ use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; -/** - * Implements hook_entity_extra_field_info(). - */ -function layout_builder_extra_field_test_entity_extra_field_info() { - $extra['node']['bundle_with_section_field']['display']['layout_builder_extra_field_test'] = [ - 'label' => t('New Extra Field'), - 'description' => t('New Extra Field description'), - 'weight' => 0, - ]; - return $extra; -} - /** * Implements hook_entity_node_view(). */ diff --git a/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/src/Hook/LayoutBuilderExtraFieldTestHooks.php b/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/src/Hook/LayoutBuilderExtraFieldTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2a3ca3c22e69ed623b53d923555e66f8916600e5 --- /dev/null +++ b/core/modules/layout_builder/tests/modules/layout_builder_extra_field_test/src/Hook/LayoutBuilderExtraFieldTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\layout_builder_extra_field_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_builder_extra_field_test. + */ +class LayoutBuilderExtraFieldTestHooks { + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $extra['node']['bundle_with_section_field']['display']['layout_builder_extra_field_test'] = [ + 'label' => t('New Extra Field'), + 'description' => t('New Extra Field description'), + 'weight' => 0, + ]; + return $extra; + } + +} diff --git a/core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module b/core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module index aae30c4b9d7912dd5c582f86a7eb325e859599ce..a48a553a2871c9fb341ed4058acf9497bbb0fd13 100644 --- a/core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module +++ b/core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module @@ -7,60 +7,8 @@ declare(strict_types=1); -use Drupal\Core\Breadcrumb\Breadcrumb; -use Drupal\Core\Entity\Display\EntityFormDisplayInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Link; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - */ -function layout_builder_test_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) { - // Explicitly remove the "Help" blocks from the list. - unset($definitions['help_block']); - - // Explicitly remove the "Sticky at top of lists field_block". - $disallowed_fields = [ - 'sticky', - ]; - - // Remove "Changed" field if this is the first section. - if ($extra['delta'] === 0) { - $disallowed_fields[] = 'changed'; - } - - foreach ($definitions as $plugin_id => $definition) { - // Field block IDs are in the form 'field_block:{entity}:{bundle}:{name}', - // for example 'field_block:node:article:revision_timestamp'. - preg_match('/field_block:.*:.*:(.*)/', $plugin_id, $parts); - if (isset($parts[1]) && in_array($parts[1], $disallowed_fields, TRUE)) { - // Unset any field blocks that match our predefined list. - unset($definitions[$plugin_id]); - } - } -} - -/** - * Implements hook_entity_extra_field_info(). - */ -function layout_builder_test_entity_extra_field_info() { - $extra['node']['bundle_with_section_field']['display']['layout_builder_test'] = [ - 'label' => t('Extra label'), - 'description' => t('Extra description'), - 'weight' => 0, - ]; - $extra['node']['bundle_with_section_field']['display']['layout_builder_test_2'] = [ - 'label' => t('Extra Field 2'), - 'description' => t('Extra Field 2 description'), - 'weight' => 0, - 'visible' => FALSE, - ]; - return $extra; -} /** * Implements hook_entity_node_view(). @@ -78,62 +26,6 @@ function layout_builder_test_node_view(array &$build, EntityInterface $entity, E } } -/** - * Implements hook_form_BASE_FORM_ID_alter() for layout_builder_configure_block. - */ -function layout_builder_test_form_layout_builder_configure_block_alter(&$form, FormStateInterface $form_state, $form_id) { - /** @var \Drupal\layout_builder\Form\ConfigureBlockFormBase $form_object */ - $form_object = $form_state->getFormObject(); - - $form['layout_builder_test']['storage'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Storage: ' . $form_object->getSectionStorage()->getStorageId(), - ]; - $form['layout_builder_test']['section'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Section: ' . $form_object->getCurrentSection()->getLayoutId(), - ]; - $form['layout_builder_test']['component'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Component: ' . $form_object->getCurrentComponent()->getPluginId(), - ]; -} - -/** - * Implements hook_form_BASE_FORM_ID_alter() for layout_builder_configure_section. - */ -function layout_builder_test_form_layout_builder_configure_section_alter(&$form, FormStateInterface $form_state, $form_id) { - /** @var \Drupal\layout_builder\Form\ConfigureSectionForm $form_object */ - $form_object = $form_state->getFormObject(); - - $form['layout_builder_test']['storage'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Storage: ' . $form_object->getSectionStorage()->getStorageId(), - ]; - $form['layout_builder_test']['section'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Section: ' . $form_object->getCurrentSection()->getLayoutId(), - ]; - $form['layout_builder_test']['layout'] = [ - '#type' => 'item', - '#title' => 'Layout Builder Layout: ' . $form_object->getCurrentLayout()->getPluginId(), - ]; -} - -/** - * Implements hook_entity_form_display_alter(). - */ -function layout_builder_entity_form_display_alter(EntityFormDisplayInterface $form_display, array $context) { - if ($context['form_mode'] === 'layout_builder') { - $form_display->setComponent('status', [ - 'type' => 'boolean_checkbox', - 'settings' => [ - 'display_label' => TRUE, - ], - ]); - } -} - /** * Implements hook_preprocess_HOOK() for one-column layout template. */ @@ -158,13 +50,6 @@ function layout_builder_test_preprocess_layout__twocol_section(&$vars) { } } -/** - * Implements hook_system_breadcrumb_alter(). - */ -function layout_builder_test_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) { - $breadcrumb->addLink(Link::fromTextAndUrl('External link', Url::fromUri('http://www.example.com'))); -} - /** * Implements hook_module_implements_alter(). */ @@ -178,14 +63,3 @@ function layout_builder_test_module_implements_alter(&$implementations, $hook) { ] + $implementations; } } - -/** - * Implements hook_theme(). - */ -function layout_builder_test_theme() { - return [ - 'block__preview_aware_block' => [ - 'base hook' => 'block', - ], - ]; -} diff --git a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..06b748b224ad46ce55d47554bd9331394cf1513a --- /dev/null +++ b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php @@ -0,0 +1,131 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\layout_builder_test\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Link; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Breadcrumb\Breadcrumb; +use Drupal\Core\Entity\Display\EntityFormDisplayInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_builder_test. + */ +class LayoutBuilderTestHooks { + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ + #[Hook('plugin_filter_block__layout_builder_alter')] + public function pluginFilterBlockLayoutBuilderAlter(array &$definitions, array $extra) { + // Explicitly remove the "Help" blocks from the list. + unset($definitions['help_block']); + // Explicitly remove the "Sticky at top of lists field_block". + $disallowed_fields = ['sticky']; + // Remove "Changed" field if this is the first section. + if ($extra['delta'] === 0) { + $disallowed_fields[] = 'changed'; + } + foreach ($definitions as $plugin_id => $definition) { + // Field block IDs are in the form 'field_block:{entity}:{bundle}:{name}', + // for example 'field_block:node:article:revision_timestamp'. + preg_match('/field_block:.*:.*:(.*)/', $plugin_id, $parts); + if (isset($parts[1]) && in_array($parts[1], $disallowed_fields, TRUE)) { + // Unset any field blocks that match our predefined list. + unset($definitions[$plugin_id]); + } + } + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $extra['node']['bundle_with_section_field']['display']['layout_builder_test'] = [ + 'label' => t('Extra label'), + 'description' => t('Extra description'), + 'weight' => 0, + ]; + $extra['node']['bundle_with_section_field']['display']['layout_builder_test_2'] = [ + 'label' => t('Extra Field 2'), + 'description' => t('Extra Field 2 description'), + 'weight' => 0, + 'visible' => FALSE, + ]; + return $extra; + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for layout_builder_configure_block. + */ + #[Hook('form_layout_builder_configure_block_alter')] + public function formLayoutBuilderConfigureBlockAlter(&$form, FormStateInterface $form_state, $form_id) : void { + /** @var \Drupal\layout_builder\Form\ConfigureBlockFormBase $form_object */ + $form_object = $form_state->getFormObject(); + $form['layout_builder_test']['storage'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Storage: ' . $form_object->getSectionStorage()->getStorageId(), + ]; + $form['layout_builder_test']['section'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Section: ' . $form_object->getCurrentSection()->getLayoutId(), + ]; + $form['layout_builder_test']['component'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Component: ' . $form_object->getCurrentComponent()->getPluginId(), + ]; + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for layout_builder_configure_section. + */ + #[Hook('form_layout_builder_configure_section_alter')] + public function formLayoutBuilderConfigureSectionAlter(&$form, FormStateInterface $form_state, $form_id) : void { + /** @var \Drupal\layout_builder\Form\ConfigureSectionForm $form_object */ + $form_object = $form_state->getFormObject(); + $form['layout_builder_test']['storage'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Storage: ' . $form_object->getSectionStorage()->getStorageId(), + ]; + $form['layout_builder_test']['section'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Section: ' . $form_object->getCurrentSection()->getLayoutId(), + ]; + $form['layout_builder_test']['layout'] = [ + '#type' => 'item', + '#title' => 'Layout Builder Layout: ' . $form_object->getCurrentLayout()->getPluginId(), + ]; + } + + /** + * Implements hook_entity_form_display_alter(). + */ + #[Hook('entity_form_display_alter', module: 'layout_builder')] + public function layoutBuilderEntityFormDisplayAlter(EntityFormDisplayInterface $form_display, array $context) { + if ($context['form_mode'] === 'layout_builder') { + $form_display->setComponent('status', ['type' => 'boolean_checkbox', 'settings' => ['display_label' => TRUE]]); + } + } + + /** + * Implements hook_system_breadcrumb_alter(). + */ + #[Hook('system_breadcrumb_alter')] + public function systemBreadcrumbAlter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) { + $breadcrumb->addLink(Link::fromTextAndUrl('External link', Url::fromUri('http://www.example.com'))); + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['block__preview_aware_block' => ['base hook' => 'block']]; + } + +} diff --git a/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module b/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module index 53d6b1083ebe3d69426ebb04f9000e2dfb0d1a79..80708a9cc8d35e7a11cc438017620fea7bc688b1 100644 --- a/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module +++ b/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module @@ -7,19 +7,6 @@ declare(strict_types=1); -/** - * Implements hook_theme(). - */ -function layout_builder_theme_suggestions_test_theme() { - // It is necessary to explicitly register the template via hook_theme() - // because it is added via a module, not a theme. - return [ - 'field__node__body__bundle_with_section_field__default' => [ - 'base hook' => 'field', - ], - ]; -} - /** * Implements hook_preprocess_HOOK() for the list of layouts. */ diff --git a/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/src/Hook/LayoutBuilderThemeSuggestionsTestHooks.php b/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/src/Hook/LayoutBuilderThemeSuggestionsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6f90fe6287038b10dc855bf74c1d934d79682730 --- /dev/null +++ b/core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/src/Hook/LayoutBuilderThemeSuggestionsTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\layout_builder_theme_suggestions_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_builder_theme_suggestions_test. + */ +class LayoutBuilderThemeSuggestionsTestHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + // It is necessary to explicitly register the template via hook_theme() + // because it is added via a module, not a theme. + return [ + 'field__node__body__bundle_with_section_field__default' => [ + 'base hook' => 'field', + ], + ]; + } + +} diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php index 9d099dfe9c32eb2a0019ed04f126e9229eae76fd..a1a1694a5d17056e5481ba19e2430906bab6ab42 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php @@ -117,7 +117,7 @@ public function testDefaultValues(): void { /** * Test for expected text on node 1. */ - protected function assertNodeWithValues() { + protected function assertNodeWithValues(): void { $this->drupalGet('node/1'); $assert_session = $this->assertSession(); // String field with no default should render a value. @@ -165,7 +165,7 @@ protected function assertNodeWithValues() { /** * Test for expected text on node 2. */ - protected function assertNodeWithDefaultValues() { + protected function assertNodeWithDefaultValues(): void { // Switch theme to starterkit_theme so that layout builder components will // have block classes. /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ @@ -208,7 +208,7 @@ protected function assertNodeWithDefaultValues() { /** * Helper function to add string fields. */ - protected function addTextFields() { + protected function addTextFields(): void { // String field with no default. $field_storage = FieldStorageConfig::create([ 'field_name' => 'field_string_no_default', @@ -284,7 +284,7 @@ protected function addTextFields() { /** * Helper function to add image fields. */ - protected function addImageFields() { + protected function addImageFields(): void { // Create files to use as the default images. $files = $this->drupalGetTestFiles('image'); $images = []; diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php index 0599f0f1d55f6c83847bec4527b73afe3f10df58..4d0c1f894434d20859727334787df0a77639c44e 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php @@ -127,7 +127,7 @@ public function testEntityReferenceFieldBlockCaching(): void { * This tests whether all expected tags are in the page cache tags, not that * expected tags and page cache tags are identical. */ - protected function verifyPageCacheContainsTags(Url $url, $hit_or_miss, $tags = FALSE) { + protected function verifyPageCacheContainsTags(Url $url, $hit_or_miss, $tags = FALSE): void { $this->drupalGet($url); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', $hit_or_miss); diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php index a64dd16ac5bdd0797b46316848d3359162953d2f..58b569db19674de85254d7a5f715d8f41c2a200a 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php @@ -139,7 +139,7 @@ protected function getTranslatorPermissions() { /** * Setup translated entity with layouts. */ - protected function setUpEntities() { + protected function setUpEntities(): void { $this->drupalLogin($this->administrator); // @todo The Layout Builder UI relies on local tasks; fix in @@ -160,7 +160,7 @@ protected function setUpEntities() { /** * Set up the View Display. */ - protected function setUpViewDisplay() { + protected function setUpViewDisplay(): void { EntityViewDisplay::create([ 'targetEntityType' => $this->entityTypeId, 'bundle' => $this->bundle, @@ -176,7 +176,7 @@ protected function setUpViewDisplay() { /** * Adds an entity translation. */ - protected function addEntityTranslation() { + protected function addEntityTranslation(): void { $user = $this->loggedInUser; $this->drupalLogin($this->translator); $add_translation_url = Url::fromRoute("entity.$this->entityTypeId.content_translation_add", [ @@ -192,7 +192,7 @@ protected function addEntityTranslation() { /** * Adds a layout override. */ - protected function addLayoutOverride() { + protected function addLayoutOverride(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $entity_url = $this->entity->toUrl()->toString(); diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php index c80f35ca753480204fc4965a76e3c8ae95eaaa21..17ca3d1fa8935ab6f2b19d54df67c0044a15c436 100644 --- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php +++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php @@ -92,7 +92,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function request($method, Url $url, array $request_options = []) { + protected function request($method, Url $url, array $request_options = []): ResponseInterface { $request_options[RequestOptions::HEADERS] = [ 'Content-Type' => static::$mimeType, ]; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php index 6003c0c11d140a76cc98deabc024dc9eab5ed25b..efa1b1ba979d490c997cb1afdccf7b6a30392cb9 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -131,7 +131,7 @@ public function testContextualLinksOutsideLayout(): void { * @param string $block_name * The block name as it appears in the Add block form. */ - protected function addBlock($block_name) { + protected function addBlock($block_name): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); @@ -189,7 +189,7 @@ protected function assertCorrectContextualLinksInNode(): void { * * @internal */ - protected function assertCorrectContextualLinks() { + protected function assertCorrectContextualLinks(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.block-views-blocktest-block-view-block-2')); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php index 570bdee7a135c404a3c8d8d8d8f73d2f8b20b0d9..97808e73b697e57d66b9eb1aa808b26169403076 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php @@ -169,7 +169,7 @@ public function testPrivateFiles(): void { * @param \Drupal\file\FileInterface $file * The file entity. */ - protected function replaceFileInBlock(FileInterface $file) { + protected function replaceFileInBlock(FileInterface $file): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $this->clickContextualLink(static::INLINE_BLOCK_LOCATOR, 'Configure'); @@ -189,7 +189,7 @@ protected function replaceFileInBlock(FileInterface $file) { * @param \Drupal\file\Entity\File $file * The file entity. */ - protected function addInlineFileBlockToLayout($title, File $file) { + protected function addInlineFileBlockToLayout($title, File $file): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $page->clickLink('Add block'); @@ -268,7 +268,7 @@ protected function getFileSecret(FileInterface $file): string { * @param \Drupal\file\FileInterface $file * The file to be attached. */ - protected function attachFileToBlockForm(FileInterface $file) { + protected function attachFileToBlockForm(FileInterface $file): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $this->assertSession()->waitForElementVisible('named', ['field', 'files[settings_block_form_field_file_0]']); @@ -283,7 +283,7 @@ protected function attachFileToBlockForm(FileInterface $file) { * @param int $node_id * The node id. */ - protected function createNewNodeRevision($node_id) { + protected function createNewNodeRevision($node_id): void { $node = Node::load($node_id); $node->setTitle('Update node'); $node->setNewRevision(); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php index 014bbbf600d8feb8fb52f655f72e890f514238fa..4067edd2616a03f16f912543751926737b89334e 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php @@ -156,7 +156,7 @@ public function testFormsLinksDisabled(): void { * @param string $rendered_locator * The CSS locator to confirm the block was rendered. */ - protected function addBlock($block_link_text, $rendered_locator) { + protected function addBlock($block_link_text, $rendered_locator): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); @@ -315,7 +315,7 @@ protected function assertContextualLinkRetainsMouseup(): void { * @return int * The element position. */ - protected function getElementVerticalPosition($css_selector, $position_type) { + protected function getElementVerticalPosition($css_selector, $position_type): int { $this->assertContains($position_type, ['top', 'bottom'], 'Expected position type.'); return (int) $this->getSession()->evaluateScript("document.querySelector('$css_selector').getBoundingClientRect().$position_type + window.pageYOffset"); } @@ -331,7 +331,7 @@ protected function getElementVerticalPosition($css_selector, $position_type) { * * @see https://www.drupal.org/node/3460567 */ - protected function movePointerTo($selector) { + protected function movePointerTo($selector): void { @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use $this->getSession()->getDriver()->mouseOver() instead. See https://www.drupal.org/node/3460567', E_USER_DEPRECATED); $driver_session = $this->getSession()->getDriver()->getWebDriverSession(); $element = $driver_session->element('css selector', $selector); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php index 4c402fa013a260acda0950ca62ebf744a869e7c5..6cb5b136b8766da55bb825aab77d3f7358b13c8f 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php @@ -134,7 +134,7 @@ public function testAddingFormBlocksToOverrides(): void { * @param string $expected_save_message * The message that should be displayed after successful layout save. */ - protected function addFormBlock($label, $path, $expected_save_message) { + protected function addFormBlock($label, $path, $expected_save_message): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php index e5b81f7ddbd53c38555808a963d7d294c9c51f86..fb237f03a22640399912ebfd6fc32460677c0662 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php @@ -407,7 +407,7 @@ public function testLayoutNoDialog(): void { * * @todo Remove this in https://www.drupal.org/project/drupal/issues/2918718. */ - protected function clickContextualLink($selector, $link_locator, $force_visible = TRUE) { + protected function clickContextualLink($selector, $link_locator, $force_visible = TRUE): void { /** @var \Drupal\FunctionalJavascriptTests\JSWebAssert $assert_session */ $assert_session = $this->assertSession(); /** @var \Behat\Mink\Element\DocumentElement $page */ @@ -450,7 +450,7 @@ protected function clickContextualLink($selector, $link_locator, $force_visible * @param bool $allow_custom * Whether to allow custom layouts. */ - private function enableLayoutsForBundle($path, $allow_custom = FALSE) { + private function enableLayoutsForBundle($path, $allow_custom = FALSE): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $this->drupalGet($path); @@ -470,7 +470,7 @@ private function enableLayoutsForBundle($path, $allow_custom = FALSE) { * @param string $block_title * The block title which will be the link text. */ - private function openAddBlockForm($block_title) { + private function openAddBlockForm($block_title): void { $assert_session = $this->assertSession(); $assert_session->linkExists('Add block'); $this->clickLink('Add block'); @@ -503,7 +503,7 @@ private function assertOffCanvasFormAfterWait(string $expected_form_id): void { * * @todo Remove in https://www.drupal.org/project/drupal/issues/2909782. */ - private function markCurrentPage() { + private function markCurrentPage(): void { $this->pageReloadMarker = $this->randomMachineName(); $this->getSession()->executeScript('document.body.appendChild(document.createTextNode("' . $this->pageReloadMarker . '"));'); } diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php index 8fae6ae1c288aa4d670ffdfb15ba3bcedd2ec9d4..2c0923d7a88e97231d3cd966507cf938c30033ad 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php @@ -212,7 +212,7 @@ protected function assertBlockTable(array $expected_block_labels): void { * @param array $updated_blocks * The updated blocks order. */ - protected function moveBlockWithKeyboard($direction, $block_label, array $updated_blocks) { + protected function moveBlockWithKeyboard($direction, $block_label, array $updated_blocks): void { $keys = [ 'up' => 38, 'down' => 40, @@ -285,7 +285,7 @@ protected function assertRegionBlocksOrder(int $section_delta, string $region, a * @param array $initial_blocks * The initial blocks that should be shown in the draggable table. */ - protected function openBodyMoveForm($delta, $region, array $initial_blocks) { + protected function openBodyMoveForm($delta, $region, array $initial_blocks): void { $assert_session = $this->assertSession(); $body_field_locator = "[data-layout-delta=\"$delta\"] [data-region=\"$region\"] .block-field-blocknodebundle-with-section-fieldbody"; diff --git a/core/modules/layout_builder/tests/src/Kernel/ConfigActionsTest.php b/core/modules/layout_builder/tests/src/Kernel/ConfigActionsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0072d261728884592a5396f04a42eb1acc3e79ea --- /dev/null +++ b/core/modules/layout_builder/tests/src/Kernel/ConfigActionsTest.php @@ -0,0 +1,58 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\layout_builder\Kernel; + +use Drupal\Core\Entity\EntityDisplayRepositoryInterface; +use Drupal\entity_test\Entity\EntityTestBundle; +use Drupal\KernelTests\KernelTestBase; +use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; + +/** + * @group Recipe + */ +class ConfigActionsTest extends KernelTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'entity_test', + 'field', + 'layout_builder', + 'layout_discovery', + ]; + + /** + * Tests config actions exposed by Layout Builder. + */ + public function testLayoutBuilderActions(): void { + /** @var \Drupal\Core\Config\Action\ConfigActionManager $manager */ + $manager = $this->container->get('plugin.manager.config_action'); + + EntityTestBundle::create(['id' => 'test'])->save(); + + /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */ + $display_repository = $this->container->get(EntityDisplayRepositoryInterface::class); + + /** @var \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay $display */ + $display = $display_repository->getViewDisplay('entity_test_with_bundle', 'test'); + $this->assertInstanceOf(LayoutBuilderEntityViewDisplay::class, $display); + $display->save(); + + $this->assertFalse($display->isLayoutBuilderEnabled()); + $manager->applyAction('enableLayoutBuilder', $display->getConfigDependencyName(), []); + $this->assertTrue($display_repository->getViewDisplay('entity_test_with_bundle', 'test')->isLayoutBuilderEnabled()); + + $this->assertFalse($display->isOverridable()); + $manager->applyAction('allowLayoutOverrides', $display->getConfigDependencyName(), TRUE); + $this->assertTrue($display_repository->getViewDisplay('entity_test_with_bundle', 'test')->isOverridable()); + $manager->applyAction('allowLayoutOverrides', $display->getConfigDependencyName(), FALSE); + $this->assertFalse($display_repository->getViewDisplay('entity_test_with_bundle', 'test')->isOverridable()); + + $manager->applyAction('disableLayoutBuilder', $display->getConfigDependencyName(), []); + $this->assertFalse($display_repository->getViewDisplay('entity_test_with_bundle', 'test')->isLayoutBuilderEnabled()); + } + +} diff --git a/core/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php b/core/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php index 48f829a30836fba5917a80e0765d2a3e89066d7a..ea166c6f1938243a36b5b39b3aec75f6bbd44cb0 100644 --- a/core/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php @@ -12,6 +12,7 @@ use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\Routing\Route; +use Drupal\layout_builder\Hook\LayoutBuilderHooks; /** * @covers layout_builder_entity_view_alter @@ -57,7 +58,8 @@ public function testContextualLinksRemoved(): void { $request->setSession(new Session(new MockArraySessionStorage())); \Drupal::requestStack()->push($request); // Assert the contextual links are removed. - layout_builder_entity_view_alter($build, $entity, $display); + $layoutBuilderEntityViewAlter = new LayoutBuilderHooks(); + $layoutBuilderEntityViewAlter->entityViewAlter($build, $entity, $display); $this->assertArrayNotHasKey('#contextual_links', $build); } diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php index 8fc56da03228797fd7ed5de21b9887fefa91a754..5ab541a40be3a2ec8e3b3f840442ca3fb6501fba 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php @@ -7,6 +7,7 @@ use Drupal\Core\Breadcrumb\Breadcrumb; use Drupal\Core\Routing\NullRouteMatch; use Drupal\KernelTests\Core\Entity\EntityKernelTestBase; +use Drupal\layout_builder\Hook\LayoutBuilderHooks; /** * Tests layout_builder_system_breadcrumb_alter(). @@ -29,7 +30,8 @@ class LayoutBuilderBreadcrumbAlterTest extends EntityKernelTestBase { public function testBreadcrumbAlterNullRouteMatch(): void { $breadcrumb = new Breadcrumb(); $route_match = new NullRouteMatch(); - layout_builder_system_breadcrumb_alter($breadcrumb, $route_match, []); + $layoutBuilderSystemBreadcrumbAlter = new LayoutBuilderHooks(); + $layoutBuilderSystemBreadcrumbAlter->systemBreadcrumbAlter($breadcrumb, $route_match, []); } } diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayValidationTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayValidationTest.php index 132b5a8a03e6fb3cffa6eb59f112f16d15ce841f..24eb61c309fe1f6a1d95c793c162cab401585503 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayValidationTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayValidationTest.php @@ -72,6 +72,7 @@ public function testLabelValidation(): void { */ public function testImmutableProperties(array $valid_values = []): void { parent::testImmutableProperties([ + 'id' => 'entity_test_with_bundle.two.full', 'targetEntityType' => 'entity_test_with_bundle', 'bundle' => 'two', ]); diff --git a/core/modules/layout_discovery/layout_discovery.module b/core/modules/layout_discovery/layout_discovery.module index 02bedc535344a83ce996f2a5ff931d14eeebb08d..5db696c7c4a8148b821ee40007f929a953ecc211 100644 --- a/core/modules/layout_discovery/layout_discovery.module +++ b/core/modules/layout_discovery/layout_discovery.module @@ -2,32 +2,11 @@ /** * @file - * Provides hook implementations for Layout Discovery. */ use Drupal\Core\Render\Element; use Drupal\Core\Template\Attribute; -/** - * Implements hook_help(). - */ -function layout_discovery_help($route_name) { - switch ($route_name) { - case 'help.page.layout_discovery': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('Layout Discovery allows modules or themes to register layouts, and for other modules to list the available layouts and render them.') . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":layout-discovery-documentation">online documentation for the Layout Discovery module</a>.', [':layout-discovery-documentation' => 'https://www.drupal.org/docs/8/api/layout-api']) . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function layout_discovery_theme() { - return \Drupal::service('plugin.manager.core.layout')->getThemeImplementations(); -} - /** * Prepares variables for layout templates. * diff --git a/core/modules/layout_discovery/layout_discovery.post_update.php b/core/modules/layout_discovery/layout_discovery.post_update.php index ba679a9666b7ce45775553aa87d0a05426041dad..336fa0696004edd4c6702798afc2fdc2ef540a8c 100644 --- a/core/modules/layout_discovery/layout_discovery.post_update.php +++ b/core/modules/layout_discovery/layout_discovery.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function layout_discovery_removed_post_updates() { +function layout_discovery_removed_post_updates(): array { return [ 'layout_discovery_post_update_recalculate_entity_form_display_dependencies' => '9.0.0', 'layout_discovery_post_update_recalculate_entity_view_display_dependencies' => '9.0.0', diff --git a/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php b/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a9efe3b10d4b528bd3ea0ec73c2e61a81d75cc8c --- /dev/null +++ b/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php @@ -0,0 +1,36 @@ +<?php + +namespace Drupal\layout_discovery\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for layout_discovery. + */ +class LayoutDiscoveryHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name) { + switch ($route_name) { + case 'help.page.layout_discovery': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('Layout Discovery allows modules or themes to register layouts, and for other modules to list the available layouts and render them.') . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":layout-discovery-documentation">online documentation for the Layout Discovery module</a>.', [ + ':layout-discovery-documentation' => 'https://www.drupal.org/docs/8/api/layout-api', + ]) . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return \Drupal::service('plugin.manager.core.layout')->getThemeImplementations(); + } + +} diff --git a/core/modules/link/link.module b/core/modules/link/link.module index fdc94e287e98ab1ac541f9bbc27f1eb90e1e88fc..bf08aecb40b33a6326e86bda6b4b0093d32809c4 100644 --- a/core/modules/link/link.module +++ b/core/modules/link/link.module @@ -2,52 +2,9 @@ /** * @file - * Defines simple link field types. */ -use Drupal\Core\Field\FieldTypeCategoryManagerInterface; use Drupal\Core\Link; -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function link_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.link': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Link module allows you to create fields that contain internal or external URLs and optional link text. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":link_documentation">online documentation for the Link module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':link_documentation' => 'https://www.drupal.org/documentation/modules/link']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying link fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the link field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Setting the allowed link type') . '</dt>'; - $output .= '<dd>' . t('In the field settings you can define the allowed link type to be <em>internal links only</em>, <em>external links only</em>, or <em>both internal and external links</em>. <em>Internal links only</em> and <em>both internal and external links</em> options enable an autocomplete widget for internal links, so a user does not have to copy or remember a URL.') . '</dd>'; - $output .= '<dt>' . t('Adding link text') . '</dt>'; - $output .= '<dd>' . t('In the field settings you can define additional link text to be <em>optional</em> or <em>required</em> in any link field.') . '</dd>'; - $output .= '<dt>' . t('Displaying link text') . '</dt>'; - $output .= '<dd>' . t('If link text has been submitted for a URL, then by default this link text is displayed as a link to the URL. If you want to display both the link text <em>and</em> the URL, choose the appropriate link format from the drop-down menu in the <em>Manage display</em> page. If you only want to display the URL even if link text has been submitted, choose <em>Link</em> as the format, and then change its <em>Format settings</em> to display <em>URL only</em>.') . '</dd>'; - $output .= '<dt>' . t('Adding attributes to links') . '</dt>'; - $output .= '<dd>' . t('You can add attributes to links, by changing the <em>Format settings</em> in the <em>Manage display</em> page. Adding <em>rel="nofollow"</em> notifies search engines that links should not be followed.') . '</dd>'; - $output .= '<dt>' . t('Validating URLs') . '</dt>'; - $output .= '<dd>' . t('All links are validated after a link field is filled in. They can include anchors or query strings.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function link_theme() { - return [ - 'link_formatter_link_separate' => [ - 'variables' => ['title' => NULL, 'url_title' => NULL, 'url' => NULL], - ], - ]; -} /** * Prepares variables for separated link field templates. @@ -66,12 +23,3 @@ function link_theme() { function template_preprocess_link_formatter_link_separate(&$variables) { $variables['link'] = Link::fromTextAndUrl($variables['url_title'], $variables['url'])->toString(); } - -/** - * Implements hook_field_type_category_info_alter(). - */ -function link_field_type_category_info_alter(&$definitions) { - // The `link` field type belongs in the `general` category, so the libraries - // need to be attached using an alter hook. - $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'link/drupal.link-icon'; -} diff --git a/core/modules/link/src/Hook/LinkHooks.php b/core/modules/link/src/Hook/LinkHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..412b291467e20a44e7e49a5d182db7cd8b89b5b0 --- /dev/null +++ b/core/modules/link/src/Hook/LinkHooks.php @@ -0,0 +1,82 @@ +<?php + +namespace Drupal\link\Hook; + +use Drupal\Core\Field\FieldTypeCategoryManagerInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for link. + */ +class LinkHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.link': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Link module allows you to create fields that contain internal or external URLs and optional link text. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":link_documentation">online documentation for the Link module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':link_documentation' => 'https://www.drupal.org/documentation/modules/link', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying link fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the link field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Setting the allowed link type') . '</dt>'; + $output .= '<dd>' . t('In the field settings you can define the allowed link type to be <em>internal links only</em>, <em>external links only</em>, or <em>both internal and external links</em>. <em>Internal links only</em> and <em>both internal and external links</em> options enable an autocomplete widget for internal links, so a user does not have to copy or remember a URL.') . '</dd>'; + $output .= '<dt>' . t('Adding link text') . '</dt>'; + $output .= '<dd>' . t('In the field settings you can define additional link text to be <em>optional</em> or <em>required</em> in any link field.') . '</dd>'; + $output .= '<dt>' . t('Displaying link text') . '</dt>'; + $output .= '<dd>' . t('If link text has been submitted for a URL, then by default this link text is displayed as a link to the URL. If you want to display both the link text <em>and</em> the URL, choose the appropriate link format from the drop-down menu in the <em>Manage display</em> page. If you only want to display the URL even if link text has been submitted, choose <em>Link</em> as the format, and then change its <em>Format settings</em> to display <em>URL only</em>.') . '</dd>'; + $output .= '<dt>' . t('Adding attributes to links') . '</dt>'; + $output .= '<dd>' . t('You can add attributes to links, by changing the <em>Format settings</em> in the <em>Manage display</em> page. Adding <em>rel="nofollow"</em> notifies search engines that links should not be followed.') . '</dd>'; + $output .= '<dt>' . t('Validating URLs') . '</dt>'; + $output .= '<dd>' . t('All links are validated after a link field is filled in. They can include anchors or query strings.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'link_formatter_link_separate' => [ + 'variables' => [ + 'title' => NULL, + 'url_title' => NULL, + 'url' => NULL, + ], + ], + ]; + } + + /** + * Implements hook_field_type_category_info_alter(). + */ + #[Hook('field_type_category_info_alter')] + public function fieldTypeCategoryInfoAlter(&$definitions) { + // The `link` field type belongs in the `general` category, so the libraries + // need to be attached using an alter hook. + $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'link/drupal.link-icon'; + } + +} diff --git a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php index f07c51e324aca72541f55d6b8bef9fbcf8cd40bd..cb3eac99c88f67a0940c8f8666e8ded1fce168d3 100644 --- a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php +++ b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php @@ -53,7 +53,7 @@ public static function create(ContainerInterface $container, array $configuratio * Constructs a new LinkFormatter. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php index 3bde4a57aed6cdebacb9b9215fb140bb4ecef15b..af8413d166f27ff2672a7f63e6729f6375524dde 100644 --- a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php +++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php @@ -18,7 +18,7 @@ class LinkAccessConstraintValidator extends ConstraintValidator implements Conta * * @var \Drupal\Core\Session\AccountProxyInterface */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $current_user; /** diff --git a/core/modules/link/tests/modules/link_test_base_field/link_test_base_field.module b/core/modules/link/tests/modules/link_test_base_field/link_test_base_field.module deleted file mode 100644 index 734e8bb9baa275acb03621c8ec475b36219c8ddf..0000000000000000000000000000000000000000 --- a/core/modules/link/tests/modules/link_test_base_field/link_test_base_field.module +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @file - * Contains main module functions. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\Field\FieldStorageDefinitionInterface; -use Drupal\link\LinkItemInterface; - -/** - * Implements hook_entity_base_field_info(). - */ -function link_test_base_field_entity_base_field_info(EntityTypeInterface $entity_type) { - $fields = []; - if ($entity_type->id() === 'entity_test') { - $fields['links'] = BaseFieldDefinition::create('link') - ->setLabel(t('Links')) - ->setRevisionable(TRUE) - ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED) - ->setDescription(t('Add links to the entity.')) - ->setRequired(FALSE) - ->setSettings([ - 'link_type' => LinkItemInterface::LINK_GENERIC, - 'title' => DRUPAL_REQUIRED, - ]) - ->setDisplayOptions('form', [ - 'type' => 'link_default', - 'weight' => 49, - ]); - } - return $fields; -} diff --git a/core/modules/link/tests/modules/link_test_base_field/src/Hook/LinkTestBaseFieldHooks.php b/core/modules/link/tests/modules/link_test_base_field/src/Hook/LinkTestBaseFieldHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..07a890d8af6a30c4d6cd6ae6e2baadbb1e8e829e --- /dev/null +++ b/core/modules/link/tests/modules/link_test_base_field/src/Hook/LinkTestBaseFieldHooks.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\link_test_base_field\Hook; + +use Drupal\link\LinkItemInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for link_test_base_field. + */ +class LinkTestBaseFieldHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + $fields = []; + if ($entity_type->id() === 'entity_test') { + $fields['links'] = BaseFieldDefinition::create('link')->setLabel(t('Links'))->setRevisionable(TRUE)->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)->setDescription(t('Add links to the entity.'))->setRequired(FALSE)->setSettings([ + 'link_type' => LinkItemInterface::LINK_GENERIC, + 'title' => DRUPAL_REQUIRED, + ])->setDisplayOptions('form', ['type' => 'link_default', 'weight' => 49]); + } + return $fields; + } + +} diff --git a/core/modules/link/tests/src/Functional/LinkFieldTest.php b/core/modules/link/tests/src/Functional/LinkFieldTest.php index 23df828984aff4033127b11d8846e29e101298ce..8e28ab4a5933d5ca49104cc468d92d90c6c4d9d4 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldTest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php @@ -86,7 +86,7 @@ public function testLinkField(): void { /** * Tests link field URL validation. */ - protected function doTestURLValidation() { + protected function doTestURLValidation(): void { $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ @@ -273,7 +273,7 @@ protected function assertInvalidEntries(string $field_name, array $invalid_entri /** * Tests the link title settings of a link field. */ - protected function doTestLinkTitle() { + protected function doTestLinkTitle(): void { $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ @@ -398,7 +398,7 @@ protected function doTestLinkTitle() { /** * Tests the default 'link' formatter. */ - protected function doTestLinkFormatter() { + protected function doTestLinkFormatter(): void { $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ @@ -734,7 +734,7 @@ protected function getUrlWithComplexQueryInputList(): array { * This test is mostly the same as testLinkFormatter(), but they cannot be * merged, since they involve different configuration and output. */ - protected function doTestLinkSeparateFormatter() { + protected function doTestLinkSeparateFormatter(): void { $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ @@ -861,7 +861,7 @@ protected function doTestLinkSeparateFormatter() { * a link and also which LinkItemInterface::LINK_* is (EXTERNAL, GENERIC, * INTERNAL). */ - protected function doTestLinkTypeOnLinkWidget() { + protected function doTestLinkTypeOnLinkWidget(): void { $link_type = LinkItemInterface::LINK_EXTERNAL; $field_name = $this->randomMachineName(); @@ -899,7 +899,7 @@ protected function doTestLinkTypeOnLinkWidget() { /** * Tests editing a link to a non-node entity. */ - protected function doTestEditNonNodeEntityLink() { + protected function doTestEditNonNodeEntityLink(): void { $entity_type_manager = \Drupal::entityTypeManager(); $entity_test_storage = $entity_type_manager->getStorage('entity_test'); diff --git a/core/modules/link/tests/src/Functional/LinkFieldUITest.php b/core/modules/link/tests/src/Functional/LinkFieldUITest.php index 6f6d8d79b06b4c5782c37d257978c0b90d129245..694fb6b3677462b6d7941725a13a95fd7b0d5641 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php @@ -149,7 +149,7 @@ protected function providerTestFieldUI() { * @param string $default_uri * The default URI value. */ - public function runFieldUIItem($cardinality, $link_type, $title, $label, $field_name, $default_uri) { + public function runFieldUIItem($cardinality, $link_type, $title, $label, $field_name, $default_uri): void { $this->drupalLogin($this->adminUser); $type_path = 'admin/structure/types/manage/' . $this->contentType->id(); @@ -243,7 +243,7 @@ protected function assertNoFieldContainsRawText(string $field_name, string $text /** * Returns the raw HTML for the given field. * - * @param $field_name + * @param string $field_name * The name of the field for which to return the HTML. * * @return string diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc index d69a1a743fb19c26030b5e7036c489b9f6c77321..408ba383fa8c3bd168ee7802d8affe62b4eaaa20 100644 --- a/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -2,7 +2,6 @@ /** * @file - * Batch process to check the availability of remote or local po files. */ use Drupal\Core\File\Exception\FileException; diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 44696b0874a68ca3daa99fc9dbe9d2c995267cf2..a5873e91ee00c92c8f2329704ff4800327d4035e 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -2,7 +2,6 @@ /** * @file - * Mass import-export and batch import functionality for Gettext .po files. */ use Drupal\Core\Batch\BatchBuilder; diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc index 02f1fd87d6c9a3d0f03563a23829e4a86519b388..8c46c245a9f8f3560788db1257dae36eae796c91 100644 --- a/core/modules/locale/locale.compare.inc +++ b/core/modules/locale/locale.compare.inc @@ -2,7 +2,6 @@ /** * @file - * The API for comparing project translation status with available translation. */ use Drupal\Core\Batch\BatchBuilder; diff --git a/core/modules/locale/locale.fetch.inc b/core/modules/locale/locale.fetch.inc index a6a9b36689abba9d3f1d0ec34b96ef139c024b48..d47a9f1f59da58345d26472ddd4f8a0f7b4112d9 100644 --- a/core/modules/locale/locale.fetch.inc +++ b/core/modules/locale/locale.fetch.inc @@ -2,7 +2,6 @@ /** * @file - * The API for download and import of translations from remote and local sources. */ use Drupal\Core\Batch\BatchBuilder; diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install index 0b204f7103db879cb9cba4859454fb2879604650..3ca2ce3db24fd87dfb6687c0b549b94edf5af8e1 100644 --- a/core/modules/locale/locale.install +++ b/core/modules/locale/locale.install @@ -13,7 +13,7 @@ /** * Implements hook_install(). */ -function locale_install() { +function locale_install(): void { // Create the interface translations directory and ensure it's writable. if (!$directory = \Drupal::config('locale.settings')->get('translation.path')) { $site_path = \Drupal::getContainer()->getParameter('site.path'); @@ -32,7 +32,7 @@ function locale_install() { /** * Implements hook_uninstall(). */ -function locale_uninstall() { +function locale_uninstall(): void { $config = \Drupal::config('locale.settings'); // Delete all JavaScript translation files. $locale_js_directory = 'public://' . $config->get('javascript.directory'); @@ -319,7 +319,7 @@ function locale_requirements($phase) { /** * Implements hook_update_last_removed(). */ -function locale_update_last_removed() { +function locale_update_last_removed(): int { return 10100; } diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 9124aa29cc7b348eb91e86b7ce27b3e9ea19a0a9..b34432847c54c632b4342df4342fa3fbebbcf364 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -2,12 +2,6 @@ /** * @file - * Enables the translation of the user interface to languages other than English. - * - * When enabled, multiple languages can be added. The site interface can be - * displayed in different languages, and nodes can have languages assigned. The - * setup of languages and translations is completely web based. Gettext portable - * object files are supported. */ use Drupal\Component\Gettext\PoItem; @@ -18,14 +12,9 @@ use Drupal\Core\File\Exception\FileException; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Installer\InstallerKernel; -use Drupal\Core\Link; use Drupal\Core\Site\Settings; -use Drupal\Core\Url; -use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Language\LanguageInterface; -use Drupal\language\ConfigurableLanguageInterface; use Drupal\Component\Utility\Crypt; use Drupal\locale\LocaleEvent; use Drupal\locale\LocaleEvents; @@ -145,109 +134,6 @@ */ const LOCALE_TRANSLATION_CURRENT = 'current'; -/** - * Implements hook_help(). - */ -function locale_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.locale': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Interface Translation module allows you to translate interface text (<em>strings</em>) into different languages, and to switch between them for the display of interface text. It uses the functionality provided by the <a href=":language">Language module</a>. For more information, see the <a href=":doc-url">online documentation for the Interface Translation module</a>.', [':doc-url' => 'https://www.drupal.org/documentation/modules/locale/', ':language' => Url::fromRoute('help.page', ['name' => 'language'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Importing translation files') . '</dt>'; - $output .= '<dd>' . t('Translation files with translated interface text are imported automatically when languages are added on the <a href=":languages">Languages</a> page, or when modules or themes are installed. On the <a href=":locale-settings">Interface translation settings</a> page, the <em>Translation source</em> can be restricted to local files only, or to include the <a href=":server">Drupal translation server</a>. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the <a href=":locale-settings">Interface translation settings</a> page. You can also manually import a translation file on the <a href=":import">Interface translation import</a> page.', [':import' => Url::fromRoute('locale.translate_import')->toString(), ':locale-settings' => Url::fromRoute('locale.settings')->toString(), ':languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), ':server' => 'https://localize.drupal.org']) . '</dd>'; - $output .= '<dt>' . t('Checking the translation status') . '</dt>'; - $output .= '<dd>' . t('You can check how much of the interface on your site is translated into which language on the <a href=":languages">Languages</a> page. On the <a href=":translation-updates">Available translation updates</a> page, you can check whether interface translation updates are available on the <a href=":server">Drupal translation server</a>.', [':languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), ':translation-updates' => Url::fromRoute('locale.translate_status')->toString(), ':server' => 'https://localize.drupal.org']) . '<dd>'; - $output .= '<dt>' . t('Translating individual strings') . '</dt>'; - $output .= '<dd>' . t('You can translate individual strings directly on the <a href=":translate">User interface translation</a> page, or download the currently-used translation file for a specific language on the <a href=":export">Interface translation export</a> page. Once you have edited the translation file, you can then import it again on the <a href=":import">Interface translation import</a> page.', [':translate' => Url::fromRoute('locale.translate_page')->toString(), ':export' => Url::fromRoute('locale.translate_export')->toString(), ':import' => Url::fromRoute('locale.translate_import')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Overriding default English strings') . '</dt>'; - $output .= '<dd>' . t('If translation is enabled for English, you can <em>override</em> the default English interface text strings in your site with other English text strings on the <a href=":translate">User interface translation</a> page. Translation is off by default for English, but you can turn it on by visiting the <em>Edit language</em> page for <em>English</em> from the <a href=":languages">Languages</a> page.', [':translate' => Url::fromRoute('locale.translate_page')->toString(), ':languages' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.configurable_language.collection': - return '<p>' . t('Interface translations are automatically imported when a language is added, or when new modules or themes are installed. The report <a href=":update">Available translation updates</a> shows the status. Interface text can be customized in the <a href=":translate">user interface translation</a> page.', [':update' => Url::fromRoute('locale.translate_status')->toString(), ':translate' => Url::fromRoute('locale.translate_page')->toString()]) . '</p>'; - - case 'locale.translate_page': - $output = '<p>' . t('This page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations. (Note: Because translation tasks involve many strings, it may be more convenient to <a title="User interface translation export" href=":export">export</a> strings for offline editing in a desktop Gettext translation editor.) Searches may be limited to strings in a specific language.', [':export' => Url::fromRoute('locale.translate_export')->toString()]) . '</p>'; - return $output; - - case 'locale.translate_import': - $output = '<p>' . t('Translation files are automatically downloaded and imported when <a title="Languages" href=":language">languages</a> are added, or when modules or themes are installed.', [':language' => Url::fromRoute('entity.configurable_language.collection')->toString()]) . '</p>'; - $output .= '<p>' . t('This page allows translators to manually import translated strings contained in a Gettext Portable Object (.po) file. Manual import may be used for customized translations or for the translation of custom modules and themes. To customize translations you can download a translation file from the <a href=":url">Drupal translation server</a> or <a title="User interface translation export" href=":export">export</a> translations from the site, customize the translations using a Gettext translation editor, and import the result using this page.', [':url' => 'https://localize.drupal.org', ':export' => Url::fromRoute('locale.translate_export')->toString()]) . '</p>'; - $output .= '<p>' . t('Note that importing large .po files may take several minutes.') . '</p>'; - return $output; - - case 'locale.translate_export': - return '<p>' . t('This page exports the translated strings used by your site. An export file may be in Gettext Portable Object (<em>.po</em>) form, which includes both the original string and the translation (used to share translations with others), or in Gettext Portable Object Template (<em>.pot</em>) form, which includes the original strings only (used to create new translations with a Gettext translation editor).') . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function locale_theme() { - return [ - 'locale_translation_last_check' => [ - 'variables' => ['last' => NULL], - 'file' => 'locale.pages.inc', - ], - 'locale_translation_update_info' => [ - 'variables' => ['updates' => [], 'not_found' => []], - 'file' => 'locale.pages.inc', - ], - ]; -} - -/** - * Implements hook_ENTITY_TYPE_insert() for 'configurable_language'. - */ -function locale_configurable_language_insert(ConfigurableLanguageInterface $language) { - // @todo move these two cache clears out. See - // https://www.drupal.org/node/1293252. - // Changing the language settings impacts the interface: clear render cache. - \Drupal::cache('render')->deleteAll(); - // Force JavaScript translation file re-creation for the new language. - _locale_invalidate_js($language->id()); -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'configurable_language'. - */ -function locale_configurable_language_update(ConfigurableLanguageInterface $language) { - // @todo move these two cache clears out. See - // https://www.drupal.org/node/1293252. - // Changing the language settings impacts the interface: clear render cache. - \Drupal::cache('render')->deleteAll(); - // Force JavaScript translation file re-creation for the modified language. - _locale_invalidate_js($language->id()); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. - */ -function locale_configurable_language_delete(ConfigurableLanguageInterface $language) { - // Remove translations. - \Drupal::service('locale.storage')->deleteTranslations(['language' => $language->id()]); - - // Remove interface translation files. - \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.bulk'); - locale_translate_delete_translation_files([], [$language->id()]); - - // Remove translated configuration objects. - \Drupal::service('locale.config_manager')->deleteLanguageTranslations($language->id()); - - // Changing the language settings impacts the interface: - _locale_invalidate_js($language->id()); - \Drupal::cache('render')->deleteAll(); - - // Clear locale translation caches. - locale_translation_status_delete_languages([$language->id()]); - \Drupal::cache()->delete('locale:' . $language->id()); -} - /** * Returns list of translatable languages. * @@ -315,53 +201,6 @@ function locale_get_plural($count, $langcode = NULL) { return $plural_indexes[$langcode][$count]; } -/** - * Implements hook_modules_installed(). - */ -function locale_modules_installed($modules) { - $components['module'] = $modules; - locale_system_update($components); -} - -/** - * Implements hook_module_preuninstall(). - */ -function locale_module_preuninstall($module) { - $components['module'] = [$module]; - locale_system_remove($components); -} - -/** - * Implements hook_themes_installed(). - */ -function locale_themes_installed($themes) { - $components['theme'] = $themes; - locale_system_update($components); -} - -/** - * Implements hook_themes_uninstalled(). - */ -function locale_themes_uninstalled($themes) { - $components['theme'] = $themes; - locale_system_remove($components); -} - -/** - * Implements hook_cron(). - * - * @see \Drupal\locale\Plugin\QueueWorker\LocaleTranslation - */ -function locale_cron() { - // Update translations only when an update frequency was set by the admin - // and a translatable language was set. - // Update tasks are added to the queue here but processed by Drupal's cron. - if (\Drupal::config('locale.settings')->get('translation.update_interval_days') && locale_translatable_language_list()) { - \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.translation'); - locale_cron_fill_queue(); - } -} - /** * Updates default configuration when new modules or themes are installed. */ @@ -457,45 +296,6 @@ function locale_system_remove($components) { } } -/** - * Implements hook_cache_flush(). - */ -function locale_cache_flush() { - \Drupal::state()->delete('system.javascript_parsed'); -} - -/** - * Implements hook_js_alter(). - */ -function locale_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { - $files = []; - foreach ($javascript as $item) { - if (isset($item['type']) && $item['type'] == 'file') { - // Ignore the JS translation placeholder file. - if ($item['data'] === 'core/modules/locale/locale.translation.js') { - continue; - } - $files[] = $item['data']; - } - } - - // Replace the placeholder file with the actual JS translation file. - $placeholder_file = 'core/modules/locale/locale.translation.js'; - if (isset($javascript[$placeholder_file])) { - if ($translation_file = locale_js_translate($files, $language)) { - $js_translation_asset = &$javascript[$placeholder_file]; - $js_translation_asset['data'] = $translation_file; - // @todo Remove this when https://www.drupal.org/node/1945262 lands. - // Decrease the weight so that the translation file is loaded first. - $js_translation_asset['weight'] = $javascript['core/misc/drupal.js']['weight'] - 0.001; - } - else { - // If no translation file exists, then remove the placeholder JS asset. - unset($javascript[$placeholder_file]); - } - } -} - /** * Returns a list of translation files given a list of JavaScript files. * @@ -566,80 +366,6 @@ function locale_js_translate(array $files = [], $language_interface = NULL) { return $translation_file; } -/** - * Implements hook_library_info_alter(). - * - * Provides language support. - */ -function locale_library_info_alter(array &$libraries, $module) { - // When the locale module is enabled, we update the core/drupal library to - // have a dependency on the locale/translations library, which provides - // window.drupalTranslations, containing the translations for all strings in - // JavaScript assets in the current language. - // @see locale_js_alter() - if ($module === 'core' && isset($libraries['drupal'])) { - $libraries['drupal']['dependencies'][] = 'locale/translations'; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for language_admin_overview_form(). - */ -function locale_form_language_admin_overview_form_alter(&$form, FormStateInterface $form_state) { - $languages = $form['languages']['#languages']; - - $total_strings = \Drupal::service('locale.storage')->countStrings(); - $stats = array_fill_keys(array_keys($languages), []); - - // If we have source strings, count translations and calculate progress. - if (!empty($total_strings)) { - $translations = \Drupal::service('locale.storage')->countTranslations(); - foreach ($translations as $langcode => $translated) { - $stats[$langcode]['translated'] = $translated; - if ($translated > 0) { - $stats[$langcode]['ratio'] = round($translated / $total_strings * 100, 2); - } - } - } - - array_splice($form['languages']['#header'], -1, 0, ['translation-interface' => t('Interface translation')]); - - foreach ($languages as $langcode => $language) { - $stats[$langcode] += [ - 'translated' => 0, - 'ratio' => 0, - ]; - if (!$language->isLocked() && locale_is_translatable($langcode)) { - $form['languages'][$langcode]['locale_statistics'] = Link::fromTextAndUrl( - t('@translated/@total (@ratio%)', [ - '@translated' => $stats[$langcode]['translated'], - '@total' => $total_strings, - '@ratio' => $stats[$langcode]['ratio'], - ]), - Url::fromRoute('locale.translate_page', [], ['query' => ['langcode' => $langcode]]) - )->toRenderable(); - } - else { - $form['languages'][$langcode]['locale_statistics'] = [ - '#markup' => t('not applicable'), - ]; - } - // #type = link doesn't work with #weight on table. - // reset and set it back after locale_statistics to get it at the right end. - $operations = $form['languages'][$langcode]['operations']; - unset($form['languages'][$langcode]['operations']); - $form['languages'][$langcode]['operations'] = $operations; - } -} - -/** - * Implements hook_form_FORM_ID_alter() for language_admin_add_form(). - */ -function locale_form_language_admin_add_form_alter(&$form, FormStateInterface $form_state) { - $form['predefined_submit']['#submit'][] = 'locale_form_language_admin_add_form_alter_submit'; - $form['custom_language']['submit']['#submit'][] = 'locale_form_language_admin_add_form_alter_submit'; -} - /** * Form submission handler for language_admin_add_form(). * @@ -673,20 +399,6 @@ function locale_form_language_admin_add_form_alter_submit($form, FormStateInterf } } -/** - * Implements hook_form_FORM_ID_alter() for language_admin_edit_form(). - */ -function locale_form_language_admin_edit_form_alter(&$form, FormStateInterface $form_state) { - if ($form['langcode']['#type'] == 'value' && $form['langcode']['#value'] == 'en') { - $form['locale_translate_english'] = [ - '#title' => t('Enable interface translation to English'), - '#type' => 'checkbox', - '#default_value' => \Drupal::configFactory()->getEditable('locale.settings')->get('translate_english'), - ]; - $form['actions']['submit']['#submit'][] = 'locale_form_language_admin_edit_form_alter_submit'; - } -} - /** * Form submission handler for language_admin_edit_form(). */ @@ -707,28 +419,6 @@ function locale_is_translatable($langcode) { return $langcode != 'en' || \Drupal::config('locale.settings')->get('translate_english'); } -/** - * Implements hook_form_FORM_ID_alter() for system_file_system_settings(). - * - * Add interface translation directory setting to directories configuration. - */ -function locale_form_system_file_system_settings_alter(&$form, FormStateInterface $form_state) { - $form['translation_path'] = [ - '#type' => 'textfield', - '#title' => t('Interface translations directory'), - '#default_value' => \Drupal::configFactory()->getEditable('locale.settings')->get('translation.path'), - '#maxlength' => 255, - '#description' => t('A local file system path where interface translation files will be stored.'), - '#required' => TRUE, - '#after_build' => ['system_check_directory'], - '#weight' => 10, - ]; - if ($form['file_default_scheme']) { - $form['file_default_scheme']['#weight'] = 20; - } - $form['#submit'][] = 'locale_system_file_system_settings_submit'; -} - /** * Submit handler for the file system settings form. * diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc index 578f066b1b2d7691559ecc153387537c1949cd75..c5ac2e5ec3d71f8b151ca82049b25165f27ed050 100644 --- a/core/modules/locale/locale.pages.inc +++ b/core/modules/locale/locale.pages.inc @@ -2,7 +2,6 @@ /** * @file - * Interface translation summary, editing and deletion user interfaces. */ use Drupal\Core\Link; diff --git a/core/modules/locale/locale.post_update.php b/core/modules/locale/locale.post_update.php index 01fef245a4b74fddb754d9e02706358b5073ffea..b6b553f30b4a9c2241d809d45b0ed2a3c8f18545 100644 --- a/core/modules/locale/locale.post_update.php +++ b/core/modules/locale/locale.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function locale_removed_post_updates() { +function locale_removed_post_updates(): array { return [ 'locale_post_update_clear_cache_for_old_translations' => '9.0.0', ]; diff --git a/core/modules/locale/locale.translation.inc b/core/modules/locale/locale.translation.inc index 44bf5c6661260f92d527b0d4311fb5deefde5e0e..b0c577c14850bf257fa8f5c04fc15320ed2167ee 100644 --- a/core/modules/locale/locale.translation.inc +++ b/core/modules/locale/locale.translation.inc @@ -2,7 +2,6 @@ /** * @file - * Common API for interface translation. */ use Drupal\Core\StreamWrapper\StreamWrapperManager; diff --git a/core/modules/locale/src/Hook/LocaleHooks.php b/core/modules/locale/src/Hook/LocaleHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0dbde7eeef5de0fbe27d302d0c323a4282a22d9d --- /dev/null +++ b/core/modules/locale/src/Hook/LocaleHooks.php @@ -0,0 +1,354 @@ +<?php + +namespace Drupal\locale\Hook; + +use Drupal\Core\Link; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\language\ConfigurableLanguageInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for locale. + */ +class LocaleHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.locale': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Interface Translation module allows you to translate interface text (<em>strings</em>) into different languages, and to switch between them for the display of interface text. It uses the functionality provided by the <a href=":language">Language module</a>. For more information, see the <a href=":doc-url">online documentation for the Interface Translation module</a>.', [ + ':doc-url' => 'https://www.drupal.org/documentation/modules/locale/', + ':language' => Url::fromRoute('help.page', [ + 'name' => 'language', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Importing translation files') . '</dt>'; + $output .= '<dd>' . t('Translation files with translated interface text are imported automatically when languages are added on the <a href=":languages">Languages</a> page, or when modules or themes are installed. On the <a href=":locale-settings">Interface translation settings</a> page, the <em>Translation source</em> can be restricted to local files only, or to include the <a href=":server">Drupal translation server</a>. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the <a href=":locale-settings">Interface translation settings</a> page. You can also manually import a translation file on the <a href=":import">Interface translation import</a> page.', [ + ':import' => Url::fromRoute('locale.translate_import')->toString(), + ':locale-settings' => Url::fromRoute('locale.settings')->toString(), + ':languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ':server' => 'https://localize.drupal.org', + ]) . '</dd>'; + $output .= '<dt>' . t('Checking the translation status') . '</dt>'; + $output .= '<dd>' . t('You can check how much of the interface on your site is translated into which language on the <a href=":languages">Languages</a> page. On the <a href=":translation-updates">Available translation updates</a> page, you can check whether interface translation updates are available on the <a href=":server">Drupal translation server</a>.', [ + ':languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ':translation-updates' => Url::fromRoute('locale.translate_status')->toString(), + ':server' => 'https://localize.drupal.org', + ]) . '<dd>'; + $output .= '<dt>' . t('Translating individual strings') . '</dt>'; + $output .= '<dd>' . t('You can translate individual strings directly on the <a href=":translate">User interface translation</a> page, or download the currently-used translation file for a specific language on the <a href=":export">Interface translation export</a> page. Once you have edited the translation file, you can then import it again on the <a href=":import">Interface translation import</a> page.', [ + ':translate' => Url::fromRoute('locale.translate_page')->toString(), + ':export' => Url::fromRoute('locale.translate_export')->toString(), + ':import' => Url::fromRoute('locale.translate_import')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Overriding default English strings') . '</dt>'; + $output .= '<dd>' . t('If translation is enabled for English, you can <em>override</em> the default English interface text strings in your site with other English text strings on the <a href=":translate">User interface translation</a> page. Translation is off by default for English, but you can turn it on by visiting the <em>Edit language</em> page for <em>English</em> from the <a href=":languages">Languages</a> page.', [ + ':translate' => Url::fromRoute('locale.translate_page')->toString(), + ':languages' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.configurable_language.collection': + return '<p>' . t('Interface translations are automatically imported when a language is added, or when new modules or themes are installed. The report <a href=":update">Available translation updates</a> shows the status. Interface text can be customized in the <a href=":translate">user interface translation</a> page.', [ + ':update' => Url::fromRoute('locale.translate_status')->toString(), + ':translate' => Url::fromRoute('locale.translate_page')->toString(), + ]) . '</p>'; + + case 'locale.translate_page': + $output = '<p>' . t('This page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations. (Note: Because translation tasks involve many strings, it may be more convenient to <a title="User interface translation export" href=":export">export</a> strings for offline editing in a desktop Gettext translation editor.) Searches may be limited to strings in a specific language.', [':export' => Url::fromRoute('locale.translate_export')->toString()]) . '</p>'; + return $output; + + case 'locale.translate_import': + $output = '<p>' . t('Translation files are automatically downloaded and imported when <a title="Languages" href=":language">languages</a> are added, or when modules or themes are installed.', [ + ':language' => Url::fromRoute('entity.configurable_language.collection')->toString(), + ]) . '</p>'; + $output .= '<p>' . t('This page allows translators to manually import translated strings contained in a Gettext Portable Object (.po) file. Manual import may be used for customized translations or for the translation of custom modules and themes. To customize translations you can download a translation file from the <a href=":url">Drupal translation server</a> or <a title="User interface translation export" href=":export">export</a> translations from the site, customize the translations using a Gettext translation editor, and import the result using this page.', [ + ':url' => 'https://localize.drupal.org', + ':export' => Url::fromRoute('locale.translate_export')->toString(), + ]) . '</p>'; + $output .= '<p>' . t('Note that importing large .po files may take several minutes.') . '</p>'; + return $output; + + case 'locale.translate_export': + return '<p>' . t('This page exports the translated strings used by your site. An export file may be in Gettext Portable Object (<em>.po</em>) form, which includes both the original string and the translation (used to share translations with others), or in Gettext Portable Object Template (<em>.pot</em>) form, which includes the original strings only (used to create new translations with a Gettext translation editor).') . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'locale_translation_last_check' => [ + 'variables' => [ + 'last' => NULL, + ], + 'file' => 'locale.pages.inc', + ], + 'locale_translation_update_info' => [ + 'variables' => [ + 'updates' => [], + 'not_found' => [], + ], + 'file' => 'locale.pages.inc', + ], + ]; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'configurable_language'. + */ + #[Hook('configurable_language_insert')] + public function configurableLanguageInsert(ConfigurableLanguageInterface $language) { + // @todo move these two cache clears out. See + // https://www.drupal.org/node/1293252. + // Changing the language settings impacts the interface: clear render cache. + \Drupal::cache('render')->deleteAll(); + // Force JavaScript translation file re-creation for the new language. + _locale_invalidate_js($language->id()); + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'configurable_language'. + */ + #[Hook('configurable_language_update')] + public function configurableLanguageUpdate(ConfigurableLanguageInterface $language) { + // @todo move these two cache clears out. See + // https://www.drupal.org/node/1293252. + // Changing the language settings impacts the interface: clear render cache. + \Drupal::cache('render')->deleteAll(); + // Force JavaScript translation file re-creation for the modified language. + _locale_invalidate_js($language->id()); + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. + */ + #[Hook('configurable_language_delete')] + public function configurableLanguageDelete(ConfigurableLanguageInterface $language) { + // Remove translations. + \Drupal::service('locale.storage')->deleteTranslations(['language' => $language->id()]); + // Remove interface translation files. + \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.bulk'); + locale_translate_delete_translation_files([], [$language->id()]); + // Remove translated configuration objects. + \Drupal::service('locale.config_manager')->deleteLanguageTranslations($language->id()); + // Changing the language settings impacts the interface: + _locale_invalidate_js($language->id()); + \Drupal::cache('render')->deleteAll(); + // Clear locale translation caches. + locale_translation_status_delete_languages([$language->id()]); + \Drupal::cache()->delete('locale:' . $language->id()); + } + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + $components['module'] = $modules; + locale_system_update($components); + } + + /** + * Implements hook_module_preuninstall(). + */ + #[Hook('module_preuninstall')] + public function modulePreuninstall($module) { + $components['module'] = [$module]; + locale_system_remove($components); + } + + /** + * Implements hook_themes_installed(). + */ + #[Hook('themes_installed')] + public function themesInstalled($themes) { + $components['theme'] = $themes; + locale_system_update($components); + } + + /** + * Implements hook_themes_uninstalled(). + */ + #[Hook('themes_uninstalled')] + public function themesUninstalled($themes) { + $components['theme'] = $themes; + locale_system_remove($components); + } + + /** + * Implements hook_cron(). + * + * @see \Drupal\locale\Plugin\QueueWorker\LocaleTranslation + */ + #[Hook('cron')] + public function cron() { + // Update translations only when an update frequency was set by the admin + // and a translatable language was set. + // Update tasks are added to the queue here but processed by Drupal's cron. + if (\Drupal::config('locale.settings')->get('translation.update_interval_days') && locale_translatable_language_list()) { + \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.translation'); + locale_cron_fill_queue(); + } + } + + /** + * Implements hook_cache_flush(). + */ + #[Hook('cache_flush')] + public function cacheFlush() { + \Drupal::state()->delete('system.javascript_parsed'); + } + + /** + * Implements hook_js_alter(). + */ + #[Hook('js_alter')] + public function jsAlter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { + $files = []; + foreach ($javascript as $item) { + if (isset($item['type']) && $item['type'] == 'file') { + // Ignore the JS translation placeholder file. + if ($item['data'] === 'core/modules/locale/locale.translation.js') { + continue; + } + $files[] = $item['data']; + } + } + // Replace the placeholder file with the actual JS translation file. + $placeholder_file = 'core/modules/locale/locale.translation.js'; + if (isset($javascript[$placeholder_file])) { + if ($translation_file = locale_js_translate($files, $language)) { + $js_translation_asset =& $javascript[$placeholder_file]; + $js_translation_asset['data'] = $translation_file; + // @todo Remove this when https://www.drupal.org/node/1945262 lands. + // Decrease the weight so that the translation file is loaded first. + $js_translation_asset['weight'] = $javascript['core/misc/drupal.js']['weight'] - 0.001; + } + else { + // If no translation file exists, then remove the placeholder JS asset. + unset($javascript[$placeholder_file]); + } + } + } + + /** + * Implements hook_library_info_alter(). + * + * Provides language support. + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(array &$libraries, $module) { + // When the locale module is enabled, we update the core/drupal library to + // have a dependency on the locale/translations library, which provides + // window.drupalTranslations, containing the translations for all strings in + // JavaScript assets in the current language. + // @see locale_js_alter() + if ($module === 'core' && isset($libraries['drupal'])) { + $libraries['drupal']['dependencies'][] = 'locale/translations'; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for language_admin_overview_form(). + */ + #[Hook('form_language_admin_overview_form_alter')] + public function formLanguageAdminOverviewFormAlter(&$form, FormStateInterface $form_state) : void { + $languages = $form['languages']['#languages']; + $total_strings = \Drupal::service('locale.storage')->countStrings(); + $stats = array_fill_keys(array_keys($languages), []); + // If we have source strings, count translations and calculate progress. + if (!empty($total_strings)) { + $translations = \Drupal::service('locale.storage')->countTranslations(); + foreach ($translations as $langcode => $translated) { + $stats[$langcode]['translated'] = $translated; + if ($translated > 0) { + $stats[$langcode]['ratio'] = round($translated / $total_strings * 100, 2); + } + } + } + array_splice($form['languages']['#header'], -1, 0, ['translation-interface' => t('Interface translation')]); + foreach ($languages as $langcode => $language) { + $stats[$langcode] += ['translated' => 0, 'ratio' => 0]; + if (!$language->isLocked() && locale_is_translatable($langcode)) { + $form['languages'][$langcode]['locale_statistics'] = Link::fromTextAndUrl(t('@translated/@total (@ratio%)', [ + '@translated' => $stats[$langcode]['translated'], + '@total' => $total_strings, + '@ratio' => $stats[$langcode]['ratio'], + ]), Url::fromRoute('locale.translate_page', [], ['query' => ['langcode' => $langcode]]))->toRenderable(); + } + else { + $form['languages'][$langcode]['locale_statistics'] = ['#markup' => t('not applicable')]; + } + // #type = link doesn't work with #weight on table. + // reset and set it back after locale_statistics to get it at the right end. + $operations = $form['languages'][$langcode]['operations']; + unset($form['languages'][$langcode]['operations']); + $form['languages'][$langcode]['operations'] = $operations; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for language_admin_add_form(). + */ + #[Hook('form_language_admin_add_form_alter')] + public function formLanguageAdminAddFormAlter(&$form, FormStateInterface $form_state) : void { + $form['predefined_submit']['#submit'][] = 'locale_form_language_admin_add_form_alter_submit'; + $form['custom_language']['submit']['#submit'][] = 'locale_form_language_admin_add_form_alter_submit'; + } + + /** + * Implements hook_form_FORM_ID_alter() for language_admin_edit_form(). + */ + #[Hook('form_language_admin_edit_form_alter')] + public function formLanguageAdminEditFormAlter(&$form, FormStateInterface $form_state) : void { + if ($form['langcode']['#type'] == 'value' && $form['langcode']['#value'] == 'en') { + $form['locale_translate_english'] = [ + '#title' => t('Enable interface translation to English'), + '#type' => 'checkbox', + '#default_value' => \Drupal::configFactory()->getEditable('locale.settings')->get('translate_english'), + ]; + $form['actions']['submit']['#submit'][] = 'locale_form_language_admin_edit_form_alter_submit'; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for system_file_system_settings(). + * + * Add interface translation directory setting to directories configuration. + */ + #[Hook('form_system_file_system_settings_alter')] + public function formSystemFileSystemSettingsAlter(&$form, FormStateInterface $form_state) : void { + $form['translation_path'] = [ + '#type' => 'textfield', + '#title' => t('Interface translations directory'), + '#default_value' => \Drupal::configFactory()->getEditable('locale.settings')->get('translation.path'), + '#maxlength' => 255, + '#description' => t('A local file system path where interface translation files will be stored.'), + '#required' => TRUE, + '#after_build' => [ + 'system_check_directory', + ], + '#weight' => 10, + ]; + if ($form['file_default_scheme']) { + $form['file_default_scheme']['#weight'] = 20; + } + $form['#submit'][] = 'locale_system_file_system_settings_submit'; + } + +} diff --git a/core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php b/core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php index edde6a92f64cb52ef96f2568500367511587a653..8fa8c15cdf44f444e1ee3be02980220ee5de615a 100644 --- a/core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php +++ b/core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php @@ -40,7 +40,7 @@ class LocaleTranslation extends QueueWorkerBase implements ContainerFactoryPlugi * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.install b/core/modules/locale/tests/modules/locale_test/locale_test.install index d3045ec8a5837a28bbbd02781ede51ae2dc7bc58..745771f22b4fc67dbae386b6db508d50b632ff7a 100644 --- a/core/modules/locale/tests/modules/locale_test/locale_test.install +++ b/core/modules/locale/tests/modules/locale_test/locale_test.install @@ -10,7 +10,7 @@ /** * Implements hook_uninstall(). */ -function locale_test_uninstall() { +function locale_test_uninstall(): void { // Clear variables. \Drupal::state()->delete('locale.test_system_info_alter'); \Drupal::state()->delete('locale.test_projects_alter'); diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.module b/core/modules/locale/tests/modules/locale_test/locale_test.module deleted file mode 100644 index be4a8318f5c30c9754e7ca3aed5211d8ff3c2896..0000000000000000000000000000000000000000 --- a/core/modules/locale/tests/modules/locale_test/locale_test.module +++ /dev/null @@ -1,225 +0,0 @@ -<?php - -/** - * @file - * Simulate a custom module with a local po file. - */ - -declare(strict_types=1); - -use Drupal\Core\Url; -use Drupal\Core\Extension\Extension; -use Drupal\Core\StreamWrapper\PublicStream; - -/** - * Implements hook_system_info_alter(). - * - * Make the test scripts to be believe this is not a hidden test module, but - * a regular custom module. - */ -function locale_test_system_info_alter(&$info, Extension $file, $type) { - // Only modify the system info if required. - // By default the locale_test modules are hidden and have a project specified. - // To test the module detection process by locale_project_list() the - // test modules should mimic a custom module. I.e. be non-hidden. - if (\Drupal::state()->get('locale.test_system_info_alter')) { - if ($file->getName() == 'locale_test' || $file->getName() == 'locale_test_translate') { - // Don't hide the module. - $info['hidden'] = FALSE; - } - } - - // Alter the name and the core version of the project. This should not affect - // the locale project information. - if (\Drupal::state()->get('locale.test_system_info_alter_name_core')) { - if ($file->getName() == 'locale_test') { - $info['core'] = '8.6.7'; - $info['name'] = 'locale_test_alter'; - } - } -} - -/** - * Implements hook_locale_translation_projects_alter(). - * - * The translation status process by default checks the status of the installed - * projects. This function replaces the data of the installed modules by a - * predefined set of modules with fixed file names and release versions. Project - * names, versions, timestamps etc must be fixed because they must match the - * files created by the test script. - * - * The "locale.test_projects_alter" state variable must be set by the - * test script in order for this hook to take effect. - */ -function locale_test_locale_translation_projects_alter(&$projects) { - // Drupal core should not be translated. By overriding the server pattern we - // make sure that no translation for drupal core will be found and that the - // translation update system will not go out to l.d.o to check. - $projects['drupal']['server_pattern'] = 'translations://'; - - if (\Drupal::state()->get('locale.remove_core_project')) { - unset($projects['drupal']); - } - - if (\Drupal::state()->get('locale.test_projects_alter')) { - - // Instead of the default ftp.drupal.org we use the file system of the test - // instance to simulate a remote file location. - $url = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(); - $remote_url = $url . PublicStream::basePath() . '/remote/'; - - // Completely replace the project data with a set of test projects. - $projects = [ - 'contrib_module_one' => [ - 'name' => 'contrib_module_one', - 'info' => [ - 'name' => 'Contributed module one', - 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', - 'package' => 'Other', - 'version' => '8.x-1.1', - 'project' => 'contrib_module_one', - 'datestamp' => '1344471537', - '_info_file_ctime' => 1348767306, - ], - 'datestamp' => '1344471537', - 'project_type' => 'module', - 'project_status' => TRUE, - ], - 'contrib_module_two' => [ - 'name' => 'contrib_module_two', - 'info' => [ - 'name' => 'Contributed module two', - 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', - 'package' => 'Other', - 'version' => '8.x-2.0-beta4', - 'project' => 'contrib_module_two', - 'datestamp' => '1344471537', - '_info_file_ctime' => 1348767306, - ], - 'datestamp' => '1344471537', - 'project_type' => 'module', - 'project_status' => TRUE, - ], - 'contrib_module_three' => [ - 'name' => 'contrib_module_three', - 'info' => [ - 'name' => 'Contributed module three', - 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', - 'package' => 'Other', - 'version' => '8.x-1.0', - 'project' => 'contrib_module_three', - 'datestamp' => '1344471537', - '_info_file_ctime' => 1348767306, - ], - 'datestamp' => '1344471537', - 'project_type' => 'module', - 'project_status' => TRUE, - ], - 'locale_test' => [ - 'name' => 'locale_test', - 'info' => [ - 'name' => 'Locale test', - 'interface translation project' => 'locale_test', - 'interface translation server pattern' => 'core/modules/locale/tests/test.%language.po', - 'package' => 'Other', - 'version' => NULL, - 'project' => 'locale_test', - '_info_file_ctime' => 1348767306, - 'datestamp' => 0, - ], - 'datestamp' => 0, - 'project_type' => 'module', - 'project_status' => TRUE, - ], - 'custom_module_one' => [ - 'name' => 'custom_module_one', - 'info' => [ - 'name' => 'Custom module one', - 'interface translation project' => 'custom_module_one', - 'interface translation server pattern' => 'translations://custom_module_one.%language.po', - 'package' => 'Other', - 'version' => NULL, - 'project' => 'custom_module_one', - '_info_file_ctime' => 1348767306, - 'datestamp' => 0, - ], - 'datestamp' => 0, - 'project_type' => 'module', - 'project_status' => TRUE, - ], - ]; - } -} - -/** - * Implements hook_language_fallback_candidates_OPERATION_alter(). - */ -function locale_test_language_fallback_candidates_locale_lookup_alter(array &$candidates, array $context) { - \Drupal::state()->set('locale.test_language_fallback_candidates_locale_lookup_alter_candidates', $candidates); - \Drupal::state()->set('locale.test_language_fallback_candidates_locale_lookup_alter_context', $context); -} - -/** - * Implements hook_theme(). - */ -function locale_test_theme() { - $return = []; - - $return['locale_test_tokenized'] = [ - 'variable' => ['content' => ''], - ]; - - return $return; -} - -/** - * Implements hook_token_info(). - */ -function locale_test_token_info() { - $info = []; - - $info['types']['locale_test'] = [ - 'name' => t('Locale test'), - 'description' => t('Locale test'), - ]; - - $info['tokens']['locale_test']['security_test1'] = [ - 'type' => 'text', - 'name' => t('Security test 1'), - ]; - $info['tokens']['locale_test']['security_test2'] = [ - 'type' => 'text', - 'name' => t('Security test 2'), - ]; - - return $info; -} - -/** - * Implements hook_tokens(). - */ -function locale_test_tokens($type, $tokens, array $data = [], array $options = []) { - $return = []; - if ($type == 'locale_test') { - foreach ($tokens as $name => $original) { - switch ($name) { - case 'security_test1': - $return[$original] = "javascript:alert('Hello!');"; - break; - - case 'security_test2': - $return[$original] = "<script>alert('Hello!');</script>"; - break; - } - } - } - - return $return; -} - -/** - * Implements hook_countries_alter(). - */ -function locale_test_countries_alter(&$countries) { - $countries['EB'] = 'Elbonia'; -} diff --git a/core/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php b/core/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7765470e711e3d496344708dfb6a3a6707061e20 --- /dev/null +++ b/core/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php @@ -0,0 +1,215 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\locale_test\Hook; + +use Drupal\Core\StreamWrapper\PublicStream; +use Drupal\Core\Url; +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for locale_test. + */ +class LocaleTestHooks { + + /** + * Implements hook_system_info_alter(). + * + * Make the test scripts to be believe this is not a hidden test module, but + * a regular custom module. + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + // Only modify the system info if required. + // By default the locale_test modules are hidden and have a project specified. + // To test the module detection process by locale_project_list() the + // test modules should mimic a custom module. I.e. be non-hidden. + if (\Drupal::state()->get('locale.test_system_info_alter')) { + if ($file->getName() == 'locale_test' || $file->getName() == 'locale_test_translate') { + // Don't hide the module. + $info['hidden'] = FALSE; + } + } + // Alter the name and the core version of the project. This should not affect + // the locale project information. + if (\Drupal::state()->get('locale.test_system_info_alter_name_core')) { + if ($file->getName() == 'locale_test') { + $info['core'] = '8.6.7'; + $info['name'] = 'locale_test_alter'; + } + } + } + + /** + * Implements hook_locale_translation_projects_alter(). + * + * The translation status process by default checks the status of the installed + * projects. This function replaces the data of the installed modules by a + * predefined set of modules with fixed file names and release versions. Project + * names, versions, timestamps etc must be fixed because they must match the + * files created by the test script. + * + * The "locale.test_projects_alter" state variable must be set by the + * test script in order for this hook to take effect. + */ + #[Hook('locale_translation_projects_alter')] + public function localeTranslationProjectsAlter(&$projects) { + // Drupal core should not be translated. By overriding the server pattern we + // make sure that no translation for drupal core will be found and that the + // translation update system will not go out to l.d.o to check. + $projects['drupal']['server_pattern'] = 'translations://'; + if (\Drupal::state()->get('locale.remove_core_project')) { + unset($projects['drupal']); + } + if (\Drupal::state()->get('locale.test_projects_alter')) { + // Instead of the default ftp.drupal.org we use the file system of the test + // instance to simulate a remote file location. + $url = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(); + $remote_url = $url . PublicStream::basePath() . '/remote/'; + // Completely replace the project data with a set of test projects. + $projects = [ + 'contrib_module_one' => [ + 'name' => 'contrib_module_one', + 'info' => [ + 'name' => 'Contributed module one', + 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', + 'package' => 'Other', + 'version' => '8.x-1.1', + 'project' => 'contrib_module_one', + 'datestamp' => '1344471537', + '_info_file_ctime' => 1348767306, + ], + 'datestamp' => '1344471537', + 'project_type' => 'module', + 'project_status' => TRUE, + ], + 'contrib_module_two' => [ + 'name' => 'contrib_module_two', + 'info' => [ + 'name' => 'Contributed module two', + 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', + 'package' => 'Other', + 'version' => '8.x-2.0-beta4', + 'project' => 'contrib_module_two', + 'datestamp' => '1344471537', + '_info_file_ctime' => 1348767306, + ], + 'datestamp' => '1344471537', + 'project_type' => 'module', + 'project_status' => TRUE, + ], + 'contrib_module_three' => [ + 'name' => 'contrib_module_three', + 'info' => [ + 'name' => 'Contributed module three', + 'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po', + 'package' => 'Other', + 'version' => '8.x-1.0', + 'project' => 'contrib_module_three', + 'datestamp' => '1344471537', + '_info_file_ctime' => 1348767306, + ], + 'datestamp' => '1344471537', + 'project_type' => 'module', + 'project_status' => TRUE, + ], + 'locale_test' => [ + 'name' => 'locale_test', + 'info' => [ + 'name' => 'Locale test', + 'interface translation project' => 'locale_test', + 'interface translation server pattern' => 'core/modules/locale/tests/test.%language.po', + 'package' => 'Other', + 'version' => NULL, + 'project' => 'locale_test', + '_info_file_ctime' => 1348767306, + 'datestamp' => 0, + ], + 'datestamp' => 0, + 'project_type' => 'module', + 'project_status' => TRUE, + ], + 'custom_module_one' => [ + 'name' => 'custom_module_one', + 'info' => [ + 'name' => 'Custom module one', + 'interface translation project' => 'custom_module_one', + 'interface translation server pattern' => 'translations://custom_module_one.%language.po', + 'package' => 'Other', + 'version' => NULL, + 'project' => 'custom_module_one', + '_info_file_ctime' => 1348767306, + 'datestamp' => 0, + ], + 'datestamp' => 0, + 'project_type' => 'module', + 'project_status' => TRUE, + ], + ]; + } + } + + /** + * Implements hook_language_fallback_candidates_OPERATION_alter(). + */ + #[Hook('language_fallback_candidates_locale_lookup_alter')] + public function languageFallbackCandidatesLocaleLookupAlter(array &$candidates, array $context) { + \Drupal::state()->set('locale.test_language_fallback_candidates_locale_lookup_alter_candidates', $candidates); + \Drupal::state()->set('locale.test_language_fallback_candidates_locale_lookup_alter_context', $context); + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + $return = []; + $return['locale_test_tokenized'] = ['variable' => ['content' => '']]; + return $return; + } + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $info = []; + $info['types']['locale_test'] = ['name' => t('Locale test'), 'description' => t('Locale test')]; + $info['tokens']['locale_test']['security_test1'] = ['type' => 'text', 'name' => t('Security test 1')]; + $info['tokens']['locale_test']['security_test2'] = ['type' => 'text', 'name' => t('Security test 2')]; + return $info; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data = [], array $options = []) { + $return = []; + if ($type == 'locale_test') { + foreach ($tokens as $name => $original) { + switch ($name) { + case 'security_test1': + $return[$original] = "javascript:alert('Hello!');"; + break; + + case 'security_test2': + $return[$original] = "<script>alert('Hello!');</script>"; + break; + } + } + } + return $return; + } + + /** + * Implements hook_countries_alter(). + */ + #[Hook('countries_alter')] + public function countriesAlter(&$countries) { + $countries['EB'] = 'Elbonia'; + } + +} diff --git a/core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module b/core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module deleted file mode 100644 index f0f526611c000ae4d07278595b3e21f04bb53940..0000000000000000000000000000000000000000 --- a/core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** - * @file - * Simulate a Drupal version. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - * - * Change the core version number to a development one for testing. - * 8.0.0-alpha102-dev is the simulated version. - */ -function locale_test_development_release_system_info_alter(&$info, Extension $file, $type) { - if (isset($info['package']) && $info['package'] == 'Core') { - $info['version'] = '8.0.0-alpha102-dev'; - } -} - -/** - * Implements hook_locale_translation_projects_alter(). - * - * Add a contrib module with a dev release to list of translatable modules. - */ -function locale_test_development_release_locale_translation_projects_alter(&$projects) { - $projects['contrib'] = [ - 'name' => 'contrib', - 'info' => [ - 'name' => 'Contributed module', - 'package' => 'Other', - 'version' => '12.x-10.4-unstable11+14-dev', - 'project' => 'contrib_module', - 'datestamp' => '0', - '_info_file_ctime' => 1442933959, - ], - 'datestamp' => '0', - 'project_type' => 'module', - 'project_status' => TRUE, - ]; -} diff --git a/core/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php b/core/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..3ebf6fed0e596e5194a06eb4fce98096f9611f9a --- /dev/null +++ b/core/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php @@ -0,0 +1,51 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\locale_test_development_release\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for locale_test_development_release. + */ +class LocaleTestDevelopmentReleaseHooks { + + /** + * Implements hook_system_info_alter(). + * + * Change the core version number to a development one for testing. + * 8.0.0-alpha102-dev is the simulated version. + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + if (isset($info['package']) && $info['package'] == 'Core') { + $info['version'] = '8.0.0-alpha102-dev'; + } + } + + /** + * Implements hook_locale_translation_projects_alter(). + * + * Add a contrib module with a dev release to list of translatable modules. + */ + #[Hook('locale_translation_projects_alter')] + public function localeTranslationProjectsAlter(&$projects) { + $projects['contrib'] = [ + 'name' => 'contrib', + 'info' => [ + 'name' => 'Contributed module', + 'package' => 'Other', + 'version' => '12.x-10.4-unstable11+14-dev', + 'project' => 'contrib_module', + 'datestamp' => '0', + '_info_file_ctime' => 1442933959, + ], + 'datestamp' => '0', + 'project_type' => 'module', + 'project_status' => TRUE, + ]; + } + +} diff --git a/core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module b/core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module deleted file mode 100644 index 7c9789018ca6d176694bfdc81dc5ae4eb8776253..0000000000000000000000000000000000000000 --- a/core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/** - * @file - * Simulates a custom module with a local po file. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - * - * By default this modules is hidden but once enabled it behaves like a normal - * (not hidden) module. This hook implementation changes the .info.yml data by - * setting the hidden status to FALSE. - */ -function locale_test_translate_system_info_alter(&$info, Extension $file, $type) { - if ($file->getName() == 'locale_test_translate') { - // Don't hide the module. - $info['hidden'] = FALSE; - } -} - -/** - * Implements hook_modules_installed(). - * - * @see \Drupal\Tests\locale\Functional\LocaleConfigTranslationImportTest::testConfigTranslationWithForeignLanguageDefault - */ -function locale_test_translate_modules_installed($modules, $is_syncing) { - // Ensure that writing to configuration during install does not cause - // \Drupal\locale\LocaleConfigSubscriber to create incorrect translations due - // the configuration langcode and data being out-of-sync. - \Drupal::configFactory()->getEditable('locale_test_translate.settings')->set('key_set_during_install', TRUE)->save(); -} diff --git a/core/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php b/core/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9490e47b0624d91d336abc42422ce52711443a37 --- /dev/null +++ b/core/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\locale_test_translate\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for locale_test_translate. + */ +class LocaleTestTranslateHooks { + + /** + * Implements hook_system_info_alter(). + * + * By default this modules is hidden but once enabled it behaves like a normal + * (not hidden) module. This hook implementation changes the .info.yml data by + * setting the hidden status to FALSE. + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + if ($file->getName() == 'locale_test_translate') { + // Don't hide the module. + $info['hidden'] = FALSE; + } + } + + /** + * Implements hook_modules_installed(). + * + * @see \Drupal\Tests\locale\Functional\LocaleConfigTranslationImportTest::testConfigTranslationWithForeignLanguageDefault + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules, $is_syncing) { + // Ensure that writing to configuration during install does not cause + // \Drupal\locale\LocaleConfigSubscriber to create incorrect translations due + // the configuration langcode and data being out-of-sync. + \Drupal::configFactory()->getEditable('locale_test_translate.settings')->set('key_set_during_install', TRUE)->save(); + } + +} diff --git a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php index db50cef067194814c47ca9f4d740441a6594df54..5bbca4227c66e4bd3a8e14f1ee20b17ca850ce3c 100644 --- a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php @@ -408,7 +408,7 @@ public function testCreatedLanguageTranslation(): void { * @param array $encodings * (optional) The encoding of the file. */ - public function importPoFile($contents, array $options = [], array $encodings = []) { + public function importPoFile($contents, array $options = [], array $encodings = []): void { $file_system = \Drupal::service('file_system'); $name = $file_system->tempnam('temporary://', "po_") . '.po'; foreach ($encodings as $encoding) { diff --git a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php index 7ba90c9bc777e567c2bb43b70adfa0f76c61935a..1bb919413b0d7fdf1697ff9f67d5db2ab89c3f18 100644 --- a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php +++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php @@ -385,7 +385,7 @@ public function testPluralEditExport(): void { * @param array $options * Additional options to pass to the translation import form. */ - public function importPoFile($contents, array $options = []) { + public function importPoFile($contents, array $options = []): void { $file_system = \Drupal::service('file_system'); $name = $file_system->tempnam('temporary://', "po_") . '.po'; file_put_contents($name, $contents); diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php index 2950ab3937fdbce03bbb77fcbfbf727414b9494e..f0ab40d31cb074d59e20cb2efafcf936043c02b4 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php @@ -6,6 +6,7 @@ use Drupal\Core\Database\Database; use Drupal\Tests\Traits\Core\CronRunTrait; +use Drupal\locale\Hook\LocaleHooks; /** * Tests for using cron to update project interface translations. @@ -16,8 +17,6 @@ class LocaleUpdateCronTest extends LocaleUpdateBase { use CronRunTrait; - protected $batchOutput = []; - /** * {@inheritdoc} */ @@ -81,7 +80,8 @@ public function testUpdateCron(): void { $this->submitForm($edit, 'Save configuration'); // Execute locale cron tasks to add tasks to the queue. - locale_cron(); + $localeCron = new LocaleHooks(); + $localeCron->cron(); // Check whether no tasks are added to the queue. $queue = \Drupal::queue('locale_translation', TRUE); @@ -97,7 +97,7 @@ public function testUpdateCron(): void { $this->submitForm($edit, 'Save configuration'); // Execute locale cron tasks to add tasks to the queue. - locale_cron(); + $localeCron->cron(); // Check whether tasks are added to the queue. // Expected tasks: @@ -112,7 +112,7 @@ public function testUpdateCron(): void { // Test: Run cron for a second time and check if tasks are not added to // the queue twice. - locale_cron(); + $localeCron->cron(); // Check whether no more tasks are added to the queue. $queue = \Drupal::queue('locale_translation', TRUE); diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php index 67476923dbc2d2574e4d90ebeee33154d4630974..6988c62cec13858a589f86d39f51b478f5ba578a 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php @@ -13,6 +13,9 @@ */ class LocaleUpdateDevelopmentReleaseTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['locale', 'locale_test_development_release']; /** diff --git a/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php b/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php index 8c471ffd1bbd6a0e3f37bcb27666496524987a45..9861453b6015954692222b5e5b421aca57c8c4a5 100644 --- a/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php +++ b/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php @@ -21,7 +21,7 @@ class LocalesLocationAddIndexUpdateTest extends UpdatePathTestBase { /** * {@inheritdoc} */ - protected function setDatabaseDumpFiles() { + protected function setDatabaseDumpFiles(): void { $this->databaseDumpFiles[] = $this->root . '/core/modules/system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz'; } diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php index 8648ca59f70706374f29cc1043fb9fd55341d15e..578c68b4bb7b4b9355d2c70bf638cb9ed3e9faec 100644 --- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php +++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php @@ -18,7 +18,7 @@ class LocaleConfigSubscriberForeignTest extends LocaleConfigSubscriberTest { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $language = Language::$defaultValues; @@ -30,7 +30,7 @@ public function register(ContainerBuilder $container) { /** * {@inheritdoc} */ - protected function setUpLanguages() { + protected function setUpLanguages(): void { parent::setUpLanguages(); ConfigurableLanguage::createFromLangcode('hu')->save(); } @@ -38,7 +38,7 @@ protected function setUpLanguages() { /** * {@inheritdoc} */ - protected function setUpLocale() { + protected function setUpLocale(): void { parent::setUpLocale(); $this->setUpTranslation('locale_test.translation', 'test', 'English test', 'Hungarian test', 'hu', TRUE); } @@ -158,7 +158,7 @@ public function testEnglish(): void { * @param string $langcode * The language code. */ - protected function saveLanguageActive($config_name, $key, $value, $langcode) { + protected function saveLanguageActive($config_name, $key, $value, $langcode): void { $this ->configFactory ->getEditable($config_name) diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php index e0dd50c9396b8c9fec72d36efae43118116ebb2f..bcf2b77388165e68c12d960470da1977ebdec371 100644 --- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php +++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php @@ -83,21 +83,21 @@ protected function setUp(): void { /** * Sets up default language for this test. */ - protected function setUpDefaultLanguage() { + protected function setUpDefaultLanguage(): void { // Keep the default English. } /** * Sets up languages needed for this test. */ - protected function setUpLanguages() { + protected function setUpLanguages(): void { ConfigurableLanguage::createFromLangcode('de')->save(); } /** * Sets up the locale storage strings to be in line with configuration. */ - protected function setUpLocale() { + protected function setUpLocale(): void { // Set up the locale database the same way we have in the config samples. $this->setUpNoTranslation('locale_test.no_translation', 'test', 'Test', 'de'); $this->setUpTranslation('locale_test.translation', 'test', 'English test', 'German test', 'de'); @@ -201,7 +201,7 @@ public function testLocaleDeleteTranslation(): void { * @param string $langcode * The language code. */ - protected function setUpNoTranslation($config_name, $key, $source, $langcode) { + protected function setUpNoTranslation($config_name, $key, $source, $langcode): void { $this->localeConfigManager->updateConfigTranslations([$config_name], [$langcode]); $this->assertNoConfigOverride($config_name, $key); $this->assertNoTranslation($config_name, $langcode); @@ -228,7 +228,7 @@ protected function setUpNoTranslation($config_name, $key, $source, $langcode) { * @param bool $is_active * Whether the update will affect the active configuration. */ - protected function setUpTranslation($config_name, $key, $source, $translation, $langcode, $is_active = FALSE) { + protected function setUpTranslation($config_name, $key, $source, $translation, $langcode, $is_active = FALSE): void { // Create source and translation strings for the configuration value and add // the configuration name as a location. This would be performed by // locale_translate_batch_import() invoking @@ -270,7 +270,7 @@ protected function setUpTranslation($config_name, $key, $source, $translation, $ * @param string $langcode * The language code. */ - protected function saveLanguageOverride($config_name, $key, $value, $langcode) { + protected function saveLanguageOverride($config_name, $key, $value, $langcode): void { $translation_override = $this->languageManager ->getLanguageConfigOverride($langcode, $config_name); $translation_override @@ -303,7 +303,7 @@ protected function saveLanguageOverride($config_name, $key, $value, $langcode) { * @param bool $is_active * Whether the update will affect the active configuration. */ - protected function saveLocaleTranslationData($config_name, $key, $source, $translation, $langcode, $is_active = FALSE) { + protected function saveLocaleTranslationData($config_name, $key, $source, $translation, $langcode, $is_active = FALSE): void { $this->localeConfigManager->reset(); $this->localeConfigManager ->getStringTranslation($config_name, $langcode, $source, '') @@ -340,7 +340,7 @@ protected function saveLocaleTranslationData($config_name, $key, $source, $trans * @param string $langcode * The language code. */ - protected function deleteLanguageOverride($config_name, $key, $source_value, $langcode) { + protected function deleteLanguageOverride($config_name, $key, $source_value, $langcode): void { $translation_override = $this->languageManager ->getLanguageConfigOverride($langcode, $config_name); $translation_override @@ -370,7 +370,7 @@ protected function deleteLanguageOverride($config_name, $key, $source_value, $la * @param string $langcode * The language code. */ - protected function deleteLocaleTranslationData($config_name, $key, $source_value, $langcode) { + protected function deleteLocaleTranslationData($config_name, $key, $source_value, $langcode): void { $this->localeConfigManager ->getStringTranslation($config_name, $langcode, $source_value, '') ->delete(); diff --git a/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php b/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php index f84c5b9c2c0855afe33fd05d538609b22309445c..34666b8b7fa098590ea9c6ea0756feb1a4f35d79 100644 --- a/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php +++ b/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php @@ -13,6 +13,9 @@ */ class LocaleDefaultConfigStorageTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'language', 'locale', diff --git a/core/modules/media/media.api.php b/core/modules/media/media.api.php index 93244f58a8a11b0450bdeec7b8df18a1e9152c2f..1a17005961349e7094a480c52a031412882f7168 100644 --- a/core/modules/media/media.api.php +++ b/core/modules/media/media.api.php @@ -1,5 +1,11 @@ <?php +/** + * @file + */ + +use Drupal\media\OEmbed\Provider; + /** * @file * Hooks related to Media and its plugins. @@ -30,7 +36,7 @@ function hook_media_source_info_alter(array &$sources) { * * @see \Drupal\media\OEmbed\UrlResolverInterface::getResourceUrl() */ -function hook_oembed_resource_url_alter(array &$parsed_url, \Drupal\media\OEmbed\Provider $provider) { +function hook_oembed_resource_url_alter(array &$parsed_url, Provider $provider) { // Always serve YouTube videos from youtube-nocookie.com. if ($provider->getName() === 'YouTube') { $parsed_url['path'] = str_replace('://youtube.com/', '://youtube-nocookie.com/', $parsed_url['path']); diff --git a/core/modules/media/media.install b/core/modules/media/media.install index ec43e36cb36d86f738e9390555f964b39bf9b11b..0d4f40889302603df78c8a3832c57a8fd251fe2e 100644 --- a/core/modules/media/media.install +++ b/core/modules/media/media.install @@ -19,7 +19,7 @@ /** * Implements hook_install(). */ -function media_install() { +function media_install(): void { $source = \Drupal::service('extension.list.module')->getPath('media') . '/images/icons'; $destination = \Drupal::config('media.settings')->get('icon_base_uri'); /** @var \Drupal\Core\File\FileSystemInterface $file_system */ @@ -178,6 +178,6 @@ function media_requirements($phase) { /** * Implements hook_update_last_removed(). */ -function media_update_last_removed() { +function media_update_last_removed(): int { return 8700; } diff --git a/core/modules/media/media.module b/core/modules/media/media.module index 9267942e9e936cd5365e9d826fe951135ffba671..d10dd8601955af31fe14492f916c70bb32190b53 100644 --- a/core/modules/media/media.module +++ b/core/modules/media/media.module @@ -2,107 +2,15 @@ /** * @file - * Provides media items. */ use Drupal\Component\Plugin\DerivativeInspectionInterface; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Field\FieldTypeCategoryManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; use Drupal\Core\Render\Element\RenderElementBase; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Session\AccountInterface; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; -use Drupal\field\FieldConfigInterface; use Drupal\media\Plugin\media\Source\OEmbedInterface; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_help(). - */ -function media_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.media': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Media module manages the creation, editing, deletion, settings, and display of media. Items are typically images, documents, slideshows, YouTube videos, tweets, Instagram photos, etc. You can reference media items from any other content on your site. For more information, see the <a href=":media">online documentation for the Media module</a>.', [':media' => 'https://www.drupal.org/docs/8/core/modules/media']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating media items') . '</dt>'; - $output .= '<dd>' . t('When a new media item is created, the Media module records basic information about it, including the author, date of creation, and the <a href=":media-type">media type</a>. It also manages the <em>publishing options</em>, which define whether or not the item is published. Default settings can be configured for each type of media on your site.', [':media-type' => Url::fromRoute('entity.media_type.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Listing media items') . '</dt>'; - $output .= '<dd>' . t('Media items are listed at the <a href=":media-collection">media administration page</a>.', [ - ':media-collection' => Url::fromRoute('entity.media.collection')->toString(), - ]) . '</dd>'; - $output .= '<dt>' . t('Creating custom media types') . '</dt>'; - $output .= '<dd>' . t('The Media module gives users with the <em>Administer media types</em> permission the ability to <a href=":media-new">create new media types</a> in addition to the default ones already configured. Each media type has an associated media source (such as the image source) which support thumbnail generation and metadata extraction. Fields managed by the <a href=":field">Field module</a> may be added for storing that metadata, such as width and height, as well as any other associated values.', [ - ':media-new' => Url::fromRoute('entity.media_type.add_form')->toString(), - ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), - ]) . '</dd>'; - $output .= '<dt>' . t('Creating revisions') . '</dt>'; - $output .= '<dd>' . t('The Media module also enables you to create multiple versions of any media item, and revert to older versions using the <em>Revision information</em> settings.') . '</dd>'; - $output .= '<dt>' . t('User permissions') . '</dt>'; - $output .= '<dd>' . t('The Media module makes a number of permissions available, which can be set by role on the <a href=":permissions">permissions page</a>.', [ - ':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'media'])->toString(), - ]) . '</dd>'; - $output .= '<dt>' . t('Adding media to other content') . '</dt>'; - $output .= '<dd>' . t('Users with permission to administer content types can add media support by adding a media reference field to the content type on the content type administration page. (The same is true of block types, taxonomy terms, user profiles, and other content that supports fields.) A media reference field can refer to any configured media type. It is possible to allow multiple media types in the same field.') . '</dd>'; - $output .= '</dl>'; - $output .= '<h2>' . t('Differences between Media, File, and Image reference fields') . '</h2>'; - $output .= '<p>' . t('<em>Media</em> reference fields offer several advantages over basic <em>File</em> and <em>Image</em> references:') . '</p>'; - $output .= '<ul>'; - $output .= '<li>' . t('Media reference fields can reference multiple media types in the same field.') . '</li>'; - $output .= '<li>' . t('Fields can also be added to media types themselves, which means that custom metadata like descriptions and taxonomy tags can be added for the referenced media. (Basic file and image fields do not support this.)') . '</li>'; - $output .= '<li>' . t('Media types for audio and video files are provided by default, so there is no need for additional configuration to upload these media.') . '</li>'; - $output .= '<li>' . t('Contributed or custom projects can provide additional media sources (such as third-party websites, Twitter, etc.).') . '</li>'; - $output .= '<li>' . t('Existing media items can be reused on any other content items with a media reference field.') . '</li>'; - $output .= '</ul>'; - $output .= '<p>' . t('Use <em>Media</em> reference fields for most files, images, audio, videos, and remote media. Use <em>File</em> or <em>Image</em> reference fields when creating your own media types, or for legacy files and images created before installing the Media module.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function media_theme() { - return [ - 'media' => [ - 'render element' => 'elements', - ], - 'media_reference_help' => [ - 'render element' => 'element', - 'base hook' => 'field_multiple_value_form', - ], - 'media_oembed_iframe' => [ - 'variables' => [ - 'resource' => NULL, - 'media' => NULL, - 'placeholder_token' => '', - ], - ], - 'media_embed_error' => [ - 'variables' => [ - 'message' => NULL, - 'attributes' => [], - ], - ], - ]; -} - -/** - * Implements hook_entity_access(). - */ -function media_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - if ($operation === 'delete' && $entity instanceof FieldConfigInterface && $entity->getTargetEntityTypeId() === 'media') { - /** @var \Drupal\media\MediaTypeInterface $media_type */ - $media_type = \Drupal::entityTypeManager()->getStorage('media_type')->load($entity->getTargetBundle()); - return AccessResult::forbiddenIf($entity->id() === 'media.' . $media_type->id() . '.' . $media_type->getSource()->getConfiguration()['source_field']); - } - return AccessResult::neutral(); -} /** * Implements hook_theme_suggestions_HOOK(). @@ -168,135 +76,6 @@ function template_preprocess_media(array &$variables) { } } -/** - * Implements hook_field_ui_preconfigured_options_alter(). - */ -function media_field_ui_preconfigured_options_alter(array &$options, $field_type) { - // If the field is not an "entity_reference"-based field, bail out. - /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ - $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); - $class = $field_type_manager->getPluginClass($field_type); - if (!is_a($class, 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem', TRUE)) { - return; - } - - // Set the default formatter for media in entity reference fields to be the - // "Rendered entity" formatter. - if (!empty($options['media'])) { - $options['media']['description'] = t('Field to reference media. Allows uploading and selecting from uploaded media.'); - $options['media']['weight'] = -25; - $options['media']['category'] = FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY; - $options['media']['entity_view_display']['type'] = 'entity_reference_entity_view'; - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function media_form_field_ui_field_storage_add_form_alter(&$form, FormStateInterface $form_state, $form_id) { - // Provide some help text to aid users decide whether they need a Media, - // File, or Image reference field. - $description_text = t('Use <em>Media</em> reference fields for most files, images, audio, videos, and remote media. Use <em>File</em> or <em>Image</em> reference fields when creating your own media types, or for legacy files and images created before installing the Media module.'); - if (\Drupal::moduleHandler()->moduleExists('help')) { - $description_text .= ' ' . t('For more information, see the <a href="@help_url">Media help page</a>.', [ - '@help_url' => Url::fromRoute('help.page', ['name' => 'media'])->toString(), - ]); - } - $field_types = [ - 'file_upload', - 'field_ui:entity_reference:media', - ]; - if (in_array($form_state->getValue('new_storage_type'), $field_types)) { - $form['group_field_options_wrapper']['description_wrapper'] = [ - '#type' => 'item', - '#markup' => $description_text, - ]; - } -} - -/** - * Implements hook_field_widget_complete_form_alter(). - */ -function media_field_widget_complete_form_alter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { - $elements = &$field_widget_complete_form['widget']; - // Do not alter the default settings form. - if ($context['default']) { - return; - } - - // Only act on entity reference fields that reference media. - $field_type = $context['items']->getFieldDefinition()->getType(); - $target_type = $context['items']->getFieldDefinition()->getFieldStorageDefinition()->getSetting('target_type'); - if ($field_type !== 'entity_reference' || $target_type !== 'media') { - return; - } - - // Autocomplete widgets need different help text than options widgets. - $widget_plugin_id = $context['widget']->getPluginId(); - if (in_array($widget_plugin_id, ['entity_reference_autocomplete', 'entity_reference_autocomplete_tags'])) { - $is_autocomplete = TRUE; - } - else { - // @todo We can't yet properly alter non-autocomplete fields. Resolve this - // in https://www.drupal.org/node/2943020 and remove this condition. - return; - } - $elements['#media_help'] = []; - - // Retrieve the media bundle list and add information for the user based on - // which bundles are available to be created or referenced. - $settings = $context['items']->getFieldDefinition()->getSetting('handler_settings'); - $allowed_bundles = !empty($settings['target_bundles']) ? $settings['target_bundles'] : []; - $add_url = _media_get_add_url($allowed_bundles); - if ($add_url) { - $elements['#media_help']['#media_add_help'] = t('Create your media on the <a href=":add_page" target="_blank">media add page</a> (opens a new window), then add it by name to the field below.', [':add_page' => $add_url]); - } - - $elements['#theme'] = 'media_reference_help'; - // @todo template_preprocess_field_multiple_value_form() assumes this key - // exists, but it does not exist in the case of a single widget that - // accepts multiple values. This is for some reason necessary to use - // our template for the entity_autocomplete_tags widget. - // Research and resolve this in https://www.drupal.org/node/2943020. - if (empty($elements['#cardinality_multiple'])) { - $elements['#cardinality_multiple'] = NULL; - } - - // Use the title set on the element if it exists, otherwise fall back to the - // field label. - $elements['#media_help']['#original_label'] = $elements['#title'] ?? $context['items']->getFieldDefinition()->getLabel(); - - // Customize the label for the field widget. - // @todo Research a better approach https://www.drupal.org/node/2943024. - $use_existing_label = t('Use existing media'); - if (!empty($elements[0]['target_id']['#title'])) { - $elements[0]['target_id']['#title'] = $use_existing_label; - } - if (!empty($elements['#title'])) { - $elements['#title'] = $use_existing_label; - } - if (!empty($elements['target_id']['#title'])) { - $elements['target_id']['#title'] = $use_existing_label; - } - - // This help text is only relevant for autocomplete widgets. When the user - // is presented with options, they don't need to type anything or know what - // types of media are allowed. - if ($is_autocomplete) { - $elements['#media_help']['#media_list_help'] = t('Type part of the media name.'); - - $overview_url = Url::fromRoute('entity.media.collection'); - if ($overview_url->access()) { - $elements['#media_help']['#media_list_link'] = t('See the <a href=":list_url" target="_blank">media list</a> (opens a new window) to help locate media.', [':list_url' => $overview_url->toString()]); - } - $all_bundles = \Drupal::service('entity_type.bundle.info')->getBundleInfo('media'); - $bundle_labels = array_map(function ($bundle) use ($all_bundles) { - return $all_bundles[$bundle]['label']; - }, $allowed_bundles); - $elements['#media_help']['#allowed_types_help'] = t('Allowed media types: %types', ['%types' => implode(", ", $bundle_labels)]); - } -} - /** * Implements hook_preprocess_HOOK() for media reference widgets. */ @@ -351,35 +130,6 @@ function _media_get_add_url($allowed_bundles) { return FALSE; } -/** - * Implements hook_entity_type_alter(). - */ -function media_entity_type_alter(array &$entity_types) { - if (\Drupal::config('media.settings')->get('standalone_url')) { - /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */ - $entity_type = $entity_types['media']; - $entity_type->setLinkTemplate('canonical', '/media/{media}'); - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function media_form_filter_format_edit_form_alter(array &$form, FormStateInterface $form_state, $form_id) { - // Add an additional validate callback so we can ensure the order of filters - // is correct. - $form['#validate'][] = 'media_filter_format_edit_form_validate'; -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function media_form_filter_format_add_form_alter(array &$form, FormStateInterface $form_state, $form_id) { - // Add an additional validate callback so we can ensure the order of filters - // is correct. - $form['#validate'][] = 'media_filter_format_edit_form_validate'; -} - /** * Validate callback to ensure filter order and allowed_html are compatible. */ @@ -498,34 +248,3 @@ function media_filter_format_edit_form_validate($form, FormStateInterface $form_ $form_state->setErrorByName('filters', $error_message); } } - -/** - * Implements hook_field_widget_single_element_form_alter(). - */ -function media_field_widget_single_element_form_alter(&$element, FormStateInterface $form_state, $context) { - // Add an attribute so that text editors plugins can pass the host entity's - // language, allowing it to present entities in the same language. - if (!empty($element['#type']) && $element['#type'] == 'text_format') { - $element['#attributes']['data-media-embed-host-entity-langcode'] = $context['items']->getLangcode(); - } -} - -/** - * Implements hook_views_query_substitutions(). - */ -function media_views_query_substitutions(ViewExecutable $view) { - $account = \Drupal::currentUser(); - return [ - '***VIEW_OWN_UNPUBLISHED_MEDIA***' => (int) $account->hasPermission('view own unpublished media'), - '***ADMINISTER_MEDIA***' => (int) $account->hasPermission('administer media'), - ]; -} - -/** - * Implements hook_field_type_category_info_alter(). - */ -function media_field_type_category_info_alter(&$definitions) { - // The `media` field type belongs in the `general` category, so the libraries - // need to be attached using an alter hook. - $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'media/drupal.media-icon'; -} diff --git a/core/modules/media/media.post_update.php b/core/modules/media/media.post_update.php index 7ab89500d231bfe7956e110d0d875e3df58315fe..1c56319bfe850e55d6563a2090bd533f83a4d53b 100644 --- a/core/modules/media/media.post_update.php +++ b/core/modules/media/media.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function media_removed_post_updates() { +function media_removed_post_updates(): array { return [ 'media_post_update_collection_route' => '9.0.0', 'media_post_update_storage_handler' => '9.0.0', @@ -20,3 +20,10 @@ function media_removed_post_updates() { 'media_post_update_remove_mappings_targeting_source_field' => '11.0.0', ]; } + +/** + * Empty update function to clear the Views data cache. + */ +function media_post_update_media_author_views_filter_update(): void { + // Empty update function to clear the Views data cache. +} diff --git a/core/modules/media/src/Entity/Media.php b/core/modules/media/src/Entity/Media.php index 7fcf32b94cdae3e500dc1d5cfa8d4c9f22d8b69c..87204415f41bafcc28b18c73ae63af1514fd9aaa 100644 --- a/core/modules/media/src/Entity/Media.php +++ b/core/modules/media/src/Entity/Media.php @@ -2,14 +2,28 @@ namespace Drupal\media\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\ContentEntityDeleteForm; +use Drupal\Core\Entity\EntityViewBuilder; +use Drupal\Core\Entity\Form\DeleteMultipleForm; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\media\MediaAccessControlHandler; +use Drupal\media\MediaForm; use Drupal\media\MediaInterface; +use Drupal\media\MediaListBuilder; use Drupal\media\MediaSourceEntityConstraintsInterface; use Drupal\media\MediaSourceFieldConstraintsInterface; +use Drupal\media\MediaStorage; +use Drupal\media\MediaViewsData; +use Drupal\media\Routing\MediaRouteProvider; use Drupal\user\EntityOwnerTrait; /** @@ -17,78 +31,76 @@ * * @todo Remove default/fallback entity form operation when #2006348 is done. * @see https://www.drupal.org/node/2006348. - * - * @ContentEntityType( - * id = "media", - * label = @Translation("Media"), - * label_singular = @Translation("media item"), - * label_plural = @Translation("media items"), - * label_count = @PluralTranslation( - * singular = "@count media item", - * plural = "@count media items" - * ), - * bundle_label = @Translation("Media type"), - * handlers = { - * "storage" = "Drupal\media\MediaStorage", - * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", - * "list_builder" = "Drupal\media\MediaListBuilder", - * "access" = "Drupal\media\MediaAccessControlHandler", - * "form" = { - * "default" = "Drupal\media\MediaForm", - * "add" = "Drupal\media\MediaForm", - * "edit" = "Drupal\media\MediaForm", - * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm", - * "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm", - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "views_data" = "Drupal\media\MediaViewsData", - * "route_provider" = { - * "html" = "Drupal\media\Routing\MediaRouteProvider", - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * } - * }, - * base_table = "media", - * data_table = "media_field_data", - * revision_table = "media_revision", - * revision_data_table = "media_field_revision", - * translatable = TRUE, - * show_revision_ui = TRUE, - * entity_keys = { - * "id" = "mid", - * "revision" = "vid", - * "bundle" = "bundle", - * "label" = "name", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "published" = "status", - * "owner" = "uid", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message", - * }, - * bundle_entity_type = "media_type", - * permission_granularity = "bundle", - * admin_permission = "administer media", - * field_ui_base_route = "entity.media_type.edit_form", - * common_reference_target = TRUE, - * links = { - * "add-page" = "/media/add", - * "add-form" = "/media/add/{media_type}", - * "canonical" = "/media/{media}/edit", - * "collection" = "/admin/content/media", - * "delete-form" = "/media/{media}/delete", - * "delete-multiple-form" = "/media/delete", - * "edit-form" = "/media/{media}/edit", - * "revision" = "/media/{media}/revisions/{media_revision}/view", - * "revision-delete-form" = "/media/{media}/revision/{media_revision}/delete", - * "revision-revert-form" = "/media/{media}/revision/{media_revision}/revert", - * "version-history" = "/media/{media}/revisions", - * } - * ) */ +#[ContentEntityType( + id: 'media', + label: new TranslatableMarkup('Media'), + label_singular: new TranslatableMarkup('media item'), + label_plural: new TranslatableMarkup('media items'), + entity_keys: [ + 'id' => 'mid', + 'revision' => 'vid', + 'bundle' => 'bundle', + 'label' => 'name', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'published' => 'status', + 'owner' => 'uid', + ], + handlers: [ + 'storage' => MediaStorage::class, + 'view_builder' => EntityViewBuilder::class, + 'list_builder' => MediaListBuilder::class, + 'access' => MediaAccessControlHandler::class, + 'form' => [ + 'default' => MediaForm::class, + 'add' => MediaForm::class, + 'edit' => MediaForm::class, + 'delete' => ContentEntityDeleteForm::class, + 'delete-multiple-confirm' => DeleteMultipleForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'views_data' => MediaViewsData::class, + 'route_provider' => [ + 'html' => MediaRouteProvider::class, + 'revision' => RevisionHtmlRouteProvider::class, + ], + ], + links: [ + 'add-page' => '/media/add', + 'add-form' => '/media/add/{media_type}', + 'canonical' => '/media/{media}/edit', + 'collection' => '/admin/content/media', + 'delete-form' => '/media/{media}/delete', + 'delete-multiple-form' => '/media/delete', + 'edit-form' => '/media/{media}/edit', + 'revision' => '/media/{media}/revisions/{media_revision}/view', + 'revision-delete-form' => '/media/{media}/revision/{media_revision}/delete', + 'revision-revert-form' => '/media/{media}/revision/{media_revision}/revert', + 'version-history' => '/media/{media}/revisions', + ], + admin_permission: 'administer media', + permission_granularity: 'bundle', + bundle_entity_type: 'media_type', + bundle_label: new TranslatableMarkup('Media type'), + base_table: 'media', + data_table: 'media_field_data', + revision_table: 'media_revision', + revision_data_table: 'media_field_revision', + translatable: TRUE, + show_revision_ui: TRUE, + label_count: [ + 'singular' => '@count media item', + 'plural' => '@count media items', + ], + field_ui_base_route: 'entity.media_type.edit_form', + common_reference_target: TRUE, + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ])] class Media extends EditorialContentEntityBase implements MediaInterface { use EntityOwnerTrait; diff --git a/core/modules/media/src/Entity/MediaType.php b/core/modules/media/src/Entity/MediaType.php index e80b2d3a1a38456fcde793c645c94b4c1fdc0239..4cfc89e2e15b51a988a28b583daa6f5fc7f9ee42 100644 --- a/core/modules/media/src/Entity/MediaType.php +++ b/core/modules/media/src/Entity/MediaType.php @@ -4,69 +4,77 @@ use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Entity\EntityWithPluginCollectionInterface; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\media\Form\MediaTypeDeleteConfirmForm; +use Drupal\media\MediaTypeAccessControlHandler; +use Drupal\media\MediaTypeForm; use Drupal\media\MediaTypeInterface; +use Drupal\media\MediaTypeListBuilder; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the Media type configuration entity. - * - * @ConfigEntityType( - * id = "media_type", - * label = @Translation("Media type"), - * label_collection = @Translation("Media types"), - * label_singular = @Translation("media type"), - * label_plural = @Translation("media types"), - * label_count = @PluralTranslation( - * singular = "@count media type", - * plural = "@count media types" - * ), - * handlers = { - * "access" = "Drupal\media\MediaTypeAccessControlHandler", - * "form" = { - * "add" = "Drupal\media\MediaTypeForm", - * "edit" = "Drupal\media\MediaTypeForm", - * "delete" = "Drupal\media\Form\MediaTypeDeleteConfirmForm" - * }, - * "list_builder" = "Drupal\media\MediaTypeListBuilder", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * } - * }, - * admin_permission = "administer media types", - * config_prefix = "type", - * bundle_of = "media", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "status" = "status", - * }, - * config_export = { - * "id", - * "label", - * "description", - * "source", - * "queue_thumbnail_downloads", - * "new_revision", - * "source_configuration", - * "field_map", - * "status", - * }, - * links = { - * "add-form" = "/admin/structure/media/add", - * "edit-form" = "/admin/structure/media/manage/{media_type}", - * "delete-form" = "/admin/structure/media/manage/{media_type}/delete", - * "entity-permissions-form" = "/admin/structure/media/manage/{media_type}/permissions", - * "collection" = "/admin/structure/media", - * }, - * constraints = { - * "ImmutableProperties" = {"id", "source"}, - * "MediaMappingsConstraint" = { }, - * } - * ) */ +#[ConfigEntityType( + id: 'media_type', + label: new TranslatableMarkup('Media type'), + label_collection: new TranslatableMarkup('Media types'), + label_singular: new TranslatableMarkup('media type'), + label_plural: new TranslatableMarkup('media types'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'status' => 'status', + ], + handlers: [ + 'access' => MediaTypeAccessControlHandler::class, + 'form' => [ + 'add' => MediaTypeForm::class, + 'edit' => MediaTypeForm::class, + 'delete' => MediaTypeDeleteConfirmForm::class, + ], + 'list_builder' => MediaTypeListBuilder::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + 'permissions' => EntityPermissionsRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/admin/structure/media/add', + 'edit-form' => '/admin/structure/media/manage/{media_type}', + 'delete-form' => '/admin/structure/media/manage/{media_type}/delete', + 'entity-permissions-form' => '/admin/structure/media/manage/{media_type}/permissions', + 'collection' => '/admin/structure/media', + ], + admin_permission: 'administer media types', + bundle_of: 'media', + label_count: [ + 'singular' => '@count media type', + 'plural' => '@count media types', + ], + constraints: [ + 'ImmutableProperties' => [ + 'id', + 'source', + ], + 'MediaMappingsConstraint' => [], + ], + config_export: [ + 'id', + 'label', + 'description', + 'source', + 'queue_thumbnail_downloads', + 'new_revision', + 'source_configuration', + 'field_map', + 'status', + ])] class MediaType extends ConfigEntityBundleBase implements MediaTypeInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/media/src/Hook/MediaHooks.php b/core/modules/media/src/Hook/MediaHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b39aa8aa294a49dbb9f0dddfe852cf88af57ec9f --- /dev/null +++ b/core/modules/media/src/Hook/MediaHooks.php @@ -0,0 +1,299 @@ +<?php + +namespace Drupal\media\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Field\FieldTypeCategoryManagerInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\field\FieldConfigInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media. + */ +class MediaHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.media': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Media module manages the creation, editing, deletion, settings, and display of media. Items are typically images, documents, slideshows, YouTube videos, tweets, Instagram photos, etc. You can reference media items from any other content on your site. For more information, see the <a href=":media">online documentation for the Media module</a>.', [':media' => 'https://www.drupal.org/docs/8/core/modules/media']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating media items') . '</dt>'; + $output .= '<dd>' . t('When a new media item is created, the Media module records basic information about it, including the author, date of creation, and the <a href=":media-type">media type</a>. It also manages the <em>publishing options</em>, which define whether or not the item is published. Default settings can be configured for each type of media on your site.', [ + ':media-type' => Url::fromRoute('entity.media_type.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Listing media items') . '</dt>'; + $output .= '<dd>' . t('Media items are listed at the <a href=":media-collection">media administration page</a>.', [ + ':media-collection' => Url::fromRoute('entity.media.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Creating custom media types') . '</dt>'; + $output .= '<dd>' . t('The Media module gives users with the <em>Administer media types</em> permission the ability to <a href=":media-new">create new media types</a> in addition to the default ones already configured. Each media type has an associated media source (such as the image source) which support thumbnail generation and metadata extraction. Fields managed by the <a href=":field">Field module</a> may be added for storing that metadata, such as width and height, as well as any other associated values.', [ + ':media-new' => Url::fromRoute('entity.media_type.add_form')->toString(), + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Creating revisions') . '</dt>'; + $output .= '<dd>' . t('The Media module also enables you to create multiple versions of any media item, and revert to older versions using the <em>Revision information</em> settings.') . '</dd>'; + $output .= '<dt>' . t('User permissions') . '</dt>'; + $output .= '<dd>' . t('The Media module makes a number of permissions available, which can be set by role on the <a href=":permissions">permissions page</a>.', [ + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'media', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Adding media to other content') . '</dt>'; + $output .= '<dd>' . t('Users with permission to administer content types can add media support by adding a media reference field to the content type on the content type administration page. (The same is true of block types, taxonomy terms, user profiles, and other content that supports fields.) A media reference field can refer to any configured media type. It is possible to allow multiple media types in the same field.') . '</dd>'; + $output .= '</dl>'; + $output .= '<h2>' . t('Differences between Media, File, and Image reference fields') . '</h2>'; + $output .= '<p>' . t('<em>Media</em> reference fields offer several advantages over basic <em>File</em> and <em>Image</em> references:') . '</p>'; + $output .= '<ul>'; + $output .= '<li>' . t('Media reference fields can reference multiple media types in the same field.') . '</li>'; + $output .= '<li>' . t('Fields can also be added to media types themselves, which means that custom metadata like descriptions and taxonomy tags can be added for the referenced media. (Basic file and image fields do not support this.)') . '</li>'; + $output .= '<li>' . t('Media types for audio and video files are provided by default, so there is no need for additional configuration to upload these media.') . '</li>'; + $output .= '<li>' . t('Contributed or custom projects can provide additional media sources (such as third-party websites, Twitter, etc.).') . '</li>'; + $output .= '<li>' . t('Existing media items can be reused on any other content items with a media reference field.') . '</li>'; + $output .= '</ul>'; + $output .= '<p>' . t('Use <em>Media</em> reference fields for most files, images, audio, videos, and remote media. Use <em>File</em> or <em>Image</em> reference fields when creating your own media types, or for legacy files and images created before installing the Media module.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'media' => [ + 'render element' => 'elements', + ], + 'media_reference_help' => [ + 'render element' => 'element', + 'base hook' => 'field_multiple_value_form', + ], + 'media_oembed_iframe' => [ + 'variables' => [ + 'resource' => NULL, + 'media' => NULL, + 'placeholder_token' => '', + ], + ], + 'media_embed_error' => [ + 'variables' => [ + 'message' => NULL, + 'attributes' => [], + ], + ], + ]; + } + + /** + * Implements hook_entity_access(). + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + if ($operation === 'delete' && $entity instanceof FieldConfigInterface && $entity->getTargetEntityTypeId() === 'media') { + /** @var \Drupal\media\MediaTypeInterface $media_type */ + $media_type = \Drupal::entityTypeManager()->getStorage('media_type')->load($entity->getTargetBundle()); + return AccessResult::forbiddenIf($entity->id() === 'media.' . $media_type->id() . '.' . $media_type->getSource()->getConfiguration()['source_field']); + } + return AccessResult::neutral(); + } + + /** + * Implements hook_field_ui_preconfigured_options_alter(). + */ + #[Hook('field_ui_preconfigured_options_alter')] + public function fieldUiPreconfiguredOptionsAlter(array &$options, $field_type) { + // If the field is not an "entity_reference"-based field, bail out. + /** @var \Drupal\Core\Field\FieldTypePluginManager $field_type_manager */ + $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); + $class = $field_type_manager->getPluginClass($field_type); + if (!is_a($class, 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem', TRUE)) { + return; + } + // Set the default formatter for media in entity reference fields to be the + // "Rendered entity" formatter. + if (!empty($options['media'])) { + $options['media']['description'] = t('Field to reference media. Allows uploading and selecting from uploaded media.'); + $options['media']['weight'] = -25; + $options['media']['category'] = FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY; + $options['media']['entity_view_display']['type'] = 'entity_reference_entity_view'; + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_field_ui_field_storage_add_form_alter')] + public function formFieldUiFieldStorageAddFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + // Provide some help text to aid users decide whether they need a Media, + // File, or Image reference field. + $description_text = t('Use <em>Media</em> reference fields for most files, images, audio, videos, and remote media. Use <em>File</em> or <em>Image</em> reference fields when creating your own media types, or for legacy files and images created before installing the Media module.'); + if (\Drupal::moduleHandler()->moduleExists('help')) { + $description_text .= ' ' . t('For more information, see the <a href="@help_url">Media help page</a>.', [ + '@help_url' => Url::fromRoute('help.page', [ + 'name' => 'media', + ])->toString(), + ]); + } + $field_types = ['file_upload', 'field_ui:entity_reference:media']; + if (in_array($form_state->getValue('new_storage_type'), $field_types)) { + $form['group_field_options_wrapper']['description_wrapper'] = ['#type' => 'item', '#markup' => $description_text]; + } + } + + /** + * Implements hook_field_widget_complete_form_alter(). + */ + #[Hook('field_widget_complete_form_alter')] + public function fieldWidgetCompleteFormAlter(array &$field_widget_complete_form, FormStateInterface $form_state, array $context) { + $elements =& $field_widget_complete_form['widget']; + // Do not alter the default settings form. + if ($context['default']) { + return; + } + // Only act on entity reference fields that reference media. + $field_type = $context['items']->getFieldDefinition()->getType(); + $target_type = $context['items']->getFieldDefinition()->getFieldStorageDefinition()->getSetting('target_type'); + if ($field_type !== 'entity_reference' || $target_type !== 'media') { + return; + } + // Autocomplete widgets need different help text than options widgets. + $widget_plugin_id = $context['widget']->getPluginId(); + if (in_array($widget_plugin_id, ['entity_reference_autocomplete', 'entity_reference_autocomplete_tags'])) { + $is_autocomplete = TRUE; + } + else { + // @todo We can't yet properly alter non-autocomplete fields. Resolve this + // in https://www.drupal.org/node/2943020 and remove this condition. + return; + } + $elements['#media_help'] = []; + // Retrieve the media bundle list and add information for the user based on + // which bundles are available to be created or referenced. + $settings = $context['items']->getFieldDefinition()->getSetting('handler_settings'); + $allowed_bundles = !empty($settings['target_bundles']) ? $settings['target_bundles'] : []; + $add_url = _media_get_add_url($allowed_bundles); + if ($add_url) { + $elements['#media_help']['#media_add_help'] = t('Create your media on the <a href=":add_page" target="_blank">media add page</a> (opens a new window), then add it by name to the field below.', [':add_page' => $add_url]); + } + $elements['#theme'] = 'media_reference_help'; + // @todo template_preprocess_field_multiple_value_form() assumes this key + // exists, but it does not exist in the case of a single widget that + // accepts multiple values. This is for some reason necessary to use + // our template for the entity_autocomplete_tags widget. + // Research and resolve this in https://www.drupal.org/node/2943020. + if (empty($elements['#cardinality_multiple'])) { + $elements['#cardinality_multiple'] = NULL; + } + // Use the title set on the element if it exists, otherwise fall back to the + // field label. + $elements['#media_help']['#original_label'] = $elements['#title'] ?? $context['items']->getFieldDefinition()->getLabel(); + // Customize the label for the field widget. + // @todo Research a better approach https://www.drupal.org/node/2943024. + $use_existing_label = t('Use existing media'); + if (!empty($elements[0]['target_id']['#title'])) { + $elements[0]['target_id']['#title'] = $use_existing_label; + } + if (!empty($elements['#title'])) { + $elements['#title'] = $use_existing_label; + } + if (!empty($elements['target_id']['#title'])) { + $elements['target_id']['#title'] = $use_existing_label; + } + // This help text is only relevant for autocomplete widgets. When the user + // is presented with options, they don't need to type anything or know what + // types of media are allowed. + if ($is_autocomplete) { + $elements['#media_help']['#media_list_help'] = t('Type part of the media name.'); + $overview_url = Url::fromRoute('entity.media.collection'); + if ($overview_url->access()) { + $elements['#media_help']['#media_list_link'] = t('See the <a href=":list_url" target="_blank">media list</a> (opens a new window) to help locate media.', [':list_url' => $overview_url->toString()]); + } + $all_bundles = \Drupal::service('entity_type.bundle.info')->getBundleInfo('media'); + $bundle_labels = array_map(function ($bundle) use ($all_bundles) { + return $all_bundles[$bundle]['label']; + }, $allowed_bundles); + $elements['#media_help']['#allowed_types_help'] = t('Allowed media types: %types', ['%types' => implode(", ", $bundle_labels)]); + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + if (\Drupal::config('media.settings')->get('standalone_url')) { + /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */ + $entity_type = $entity_types['media']; + $entity_type->setLinkTemplate('canonical', '/media/{media}'); + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_filter_format_edit_form_alter')] + public function formFilterFormatEditFormAlter(array &$form, FormStateInterface $form_state, $form_id) : void { + // Add an additional validate callback so we can ensure the order of filters + // is correct. + $form['#validate'][] = 'media_filter_format_edit_form_validate'; + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_filter_format_add_form_alter')] + public function formFilterFormatAddFormAlter(array &$form, FormStateInterface $form_state, $form_id) : void { + // Add an additional validate callback so we can ensure the order of filters + // is correct. + $form['#validate'][] = 'media_filter_format_edit_form_validate'; + } + + /** + * Implements hook_field_widget_single_element_form_alter(). + */ + #[Hook('field_widget_single_element_form_alter')] + public function fieldWidgetSingleElementFormAlter(&$element, FormStateInterface $form_state, $context) { + // Add an attribute so that text editors plugins can pass the host entity's + // language, allowing it to present entities in the same language. + if (!empty($element['#type']) && $element['#type'] == 'text_format') { + $element['#attributes']['data-media-embed-host-entity-langcode'] = $context['items']->getLangcode(); + } + } + + /** + * Implements hook_views_query_substitutions(). + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + $account = \Drupal::currentUser(); + return [ + '***VIEW_OWN_UNPUBLISHED_MEDIA***' => (int) $account->hasPermission('view own unpublished media'), + '***ADMINISTER_MEDIA***' => (int) $account->hasPermission('administer media'), + ]; + } + + /** + * Implements hook_field_type_category_info_alter(). + */ + #[Hook('field_type_category_info_alter')] + public function fieldTypeCategoryInfoAlter(&$definitions) { + // The `media` field type belongs in the `general` category, so the libraries + // need to be attached using an alter hook. + $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'media/drupal.media-icon'; + } + +} diff --git a/core/modules/media/src/MediaSourceBase.php b/core/modules/media/src/MediaSourceBase.php index 063706d4a1c2e94762c26a2ea3876e3beb0216a2..a07dcc9f59cb63083a0bbff6d6a98082c610d662 100644 --- a/core/modules/media/src/MediaSourceBase.php +++ b/core/modules/media/src/MediaSourceBase.php @@ -60,7 +60,7 @@ abstract class MediaSourceBase extends PluginBase implements MediaSourceInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager @@ -357,7 +357,7 @@ public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayIn * {@inheritdoc} */ public function prepareFormDisplay(MediaTypeInterface $type, EntityFormDisplayInterface $display) { - // Make sure the source field is placed just after the "name" basefield. + // Make sure the source field is placed just after the "name" base field. $name_component = $display->getComponent('name'); $source_field_weight = ($name_component && isset($name_component['weight'])) ? $name_component['weight'] + 5 : -50; $display->setComponent($this->getSourceFieldDefinition($type)->getName(), [ diff --git a/core/modules/media/src/MediaViewsData.php b/core/modules/media/src/MediaViewsData.php index 393548be84c6c94ce6118ee6d62a842e0db64b60..fdfada27281974108b01845326c58ee79fe53357 100644 --- a/core/modules/media/src/MediaViewsData.php +++ b/core/modules/media/src/MediaViewsData.php @@ -18,6 +18,12 @@ public function getViewsData() { $data['media_field_data']['table']['wizard_id'] = 'media'; $data['media_field_revision']['table']['wizard_id'] = 'media_revision'; + $data['media_field_data']['user_name']['filter'] = $data['media_field_data']['uid']['filter']; + $data['media_field_data']['user_name']['filter']['title'] = $this->t('Authored by'); + $data['media_field_data']['user_name']['filter']['help'] = $this->t('The username of the content author.'); + $data['media_field_data']['user_name']['filter']['id'] = 'user_name'; + $data['media_field_data']['user_name']['filter']['real field'] = 'uid'; + $data['media_field_data']['status_extra'] = [ 'title' => $this->t('Published status or admin user'), 'help' => $this->t('Filters out unpublished media if the current user cannot view it.'), diff --git a/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php b/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php index 398e5283759d2a533ca1e1dc73649a0c71e39594..1057abba25470a3783d2bdfe5e0b0522fdcfc29f 100644 --- a/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php +++ b/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php @@ -40,7 +40,7 @@ class MediaThumbnailFormatter extends ImageFormatter { * Constructs a MediaThumbnailFormatter object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php b/core/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php index 5deb19f03e5695d0660dc6bf8dcf3dafd03e5cf0..0f0f5a54e846790d122c9475e515048002cba72c 100644 --- a/core/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php +++ b/core/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php @@ -32,7 +32,7 @@ class ThumbnailDownloader extends QueueWorkerBase implements ContainerFactoryPlu * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/media/src/Plugin/media/Source/Image.php b/core/modules/media/src/Plugin/media/Source/Image.php index e896f3b41a22238dbde40decb6f50e90914ac790..10a538034becde06ed4cc7c59bb93445bbc3075b 100644 --- a/core/modules/media/src/Plugin/media/Source/Image.php +++ b/core/modules/media/src/Plugin/media/Source/Image.php @@ -64,7 +64,7 @@ class Image extends File { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager @@ -144,7 +144,7 @@ public function getMetadata(MediaInterface $media, $name) { return $uri; case 'thumbnail_alt_value': - return $media->get($this->configuration['source_field'])->alt ?: parent::getMetadata($media, $name); + return $media->get($this->configuration['source_field'])->alt ?? parent::getMetadata($media, $name); } return parent::getMetadata($media, $name); diff --git a/core/modules/media/src/Plugin/media/Source/OEmbed.php b/core/modules/media/src/Plugin/media/Source/OEmbed.php index 3f58ca120511badd58c223b8f2e3254eac284ef0..9cb2d7974f3e773f6198e41ad0026c508475bb93 100644 --- a/core/modules/media/src/Plugin/media/Source/OEmbed.php +++ b/core/modules/media/src/Plugin/media/Source/OEmbed.php @@ -141,7 +141,7 @@ class OEmbed extends MediaSourceBase implements OEmbedInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/media/tests/modules/media_test_embed/media_test_embed.module b/core/modules/media/tests/modules/media_test_embed/media_test_embed.module index 260adb2a178515a36d83dc4a8256404a19ab9519..ec3eec8279b610bb83a0ade1485e4d3810b48f74 100644 --- a/core/modules/media/tests/modules/media_test_embed/media_test_embed.module +++ b/core/modules/media/tests/modules/media_test_embed/media_test_embed.module @@ -7,29 +7,9 @@ declare(strict_types=1); -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_view_alter(). - */ -function media_test_embed_entity_view_alter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) { - $build['#attributes']['data-media-embed-test-active-theme'] = \Drupal::theme()->getActiveTheme()->getName(); - $build['#attributes']['data-media-embed-test-view-mode'] = $display->getMode(); -} - /** * Implements hook_preprocess_HOOK(). */ function media_test_embed_preprocess_media_embed_error(&$variables) { $variables['attributes']['class'][] = 'this-error-message-is-themeable'; } - -/** - * Implements hook_entity_access(). - */ -function media_test_embed_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - return AccessResult::neutral()->addCacheTags(['_media_test_embed_filter_access:' . $entity->getEntityTypeId() . ':' . $entity->id()]); -} diff --git a/core/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php b/core/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b9783bbdc62163d1f09a303d0dc7bbd753401185 --- /dev/null +++ b/core/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\media_test_embed\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media_test_embed. + */ +class MediaTestEmbedHooks { + + /** + * Implements hook_entity_view_alter(). + */ + #[Hook('entity_view_alter')] + public function entityViewAlter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) { + $build['#attributes']['data-media-embed-test-active-theme'] = \Drupal::theme()->getActiveTheme()->getName(); + $build['#attributes']['data-media-embed-test-view-mode'] = $display->getMode(); + } + + /** + * Implements hook_entity_access(). + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + return AccessResult::neutral()->addCacheTags([ + '_media_test_embed_filter_access:' . $entity->getEntityTypeId() . ':' . $entity->id(), + ]); + } + +} diff --git a/core/modules/media/tests/modules/media_test_oembed/media_test_oembed.module b/core/modules/media/tests/modules/media_test_oembed/media_test_oembed.module index 2084d3d518081c6e82211b0aa83ccf0a0d1833aa..52b4be100c5cbd1cd5bdc6c279fb9e02f66a5f37 100644 --- a/core/modules/media/tests/modules/media_test_oembed/media_test_oembed.module +++ b/core/modules/media/tests/modules/media_test_oembed/media_test_oembed.module @@ -7,8 +7,6 @@ declare(strict_types=1); -use Drupal\media\OEmbed\Provider; - /** * Implements hook_preprocess_media_oembed_iframe(). */ @@ -20,12 +18,3 @@ function media_test_oembed_preprocess_media_oembed_iframe(array &$variables) { $variables['#attached']['library'][] = 'media_test_oembed/frame'; $variables['#cache']['tags'][] = 'yo_there'; } - -/** - * Implements hook_oembed_resource_url_alter(). - */ -function media_test_oembed_oembed_resource_url_alter(array &$parsed_url, Provider $provider) { - if ($provider->getName() === 'Vimeo') { - $parsed_url['query']['altered'] = 1; - } -} diff --git a/core/modules/media/tests/modules/media_test_oembed/src/Hook/MediaTestOembedHooks.php b/core/modules/media/tests/modules/media_test_oembed/src/Hook/MediaTestOembedHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ea4004e3359decb36197a8a88490d6faeeff6b44 --- /dev/null +++ b/core/modules/media/tests/modules/media_test_oembed/src/Hook/MediaTestOembedHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\media_test_oembed\Hook; + +use Drupal\media\OEmbed\Provider; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media_test_oembed. + */ +class MediaTestOembedHooks { + + /** + * Implements hook_oembed_resource_url_alter(). + */ + #[Hook('oembed_resource_url_alter')] + public function oembedResourceUrlAlter(array &$parsed_url, Provider $provider) { + if ($provider->getName() === 'Vimeo') { + $parsed_url['query']['altered'] = 1; + } + } + +} diff --git a/core/modules/media/tests/src/Functional/MediaAccessTest.php b/core/modules/media/tests/src/Functional/MediaAccessTest.php index 3ca5b7e65e0ea23f2cb56f719d1435fae7da78b2..62d43942a64ab2abcb83de935fa6b01032819601 100644 --- a/core/modules/media/tests/src/Functional/MediaAccessTest.php +++ b/core/modules/media/tests/src/Functional/MediaAccessTest.php @@ -220,6 +220,7 @@ public function testMediaAccess(): void { $mediaOverviewRole = $this->createRole(['access content overview', 'access media overview']); $this->nonAdminUser->addRole($mediaOverviewRole)->save(); + $this->grantPermissions($role, ['access user profiles']); $this->drupalGet('admin/content'); $assert_session->linkByHrefExists('/admin/content/media'); $this->clickLink('Media'); diff --git a/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php b/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php index 9328ef04c2673b7b3ffe41f52bac1ac2c267ba2e..196007249bd658d03ec43889b033f464b38a1457 100644 --- a/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php +++ b/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php @@ -8,6 +8,9 @@ use Drupal\media\Entity\Media; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use Drupal\field\Entity\FieldConfig; +use Drupal\file\Entity\File; +use Drupal\Tests\TestFileCreationTrait; /** * Tests the Media overview page. @@ -16,6 +19,8 @@ */ class MediaOverviewPageTest extends MediaFunctionalTestBase { + use TestFileCreationTrait; + /** * {@inheritdoc} */ @@ -185,4 +190,108 @@ public function testMediaOverviewPage(): void { $assert_session->linkByHrefExists('/media/' . $media3->id()); } + /** + * Tests the display of the alt attribute. + */ + public function testImageAltTextDisplay(): void { + $this->drupalLogin($this->adminUser); + $media_type = $this->createMediaType('image'); + $media_type_id = $media_type->id(); + $media_type->setFieldMap(['name' => 'name']); + $media_type->save(); + + /** @var \Drupal\field\FieldConfigInterface $field */ + $field = FieldConfig::load("media.$media_type_id.field_media_image"); + $settings = $field->getSettings(); + $settings['alt_field'] = TRUE; + $settings['alt_field_required'] = FALSE; + $field->set('settings', $settings); + $field->save(); + + $file = File::create([ + 'uri' => $this->getTestFiles('image')[0]->uri, + ]); + $file->save(); + + // Set the alt text to an empty string. + $media = Media::create([ + 'name' => 'Custom name', + 'bundle' => $media_type_id, + 'field_media_image' => [ + [ + 'target_id' => $file->id(), + 'alt' => '', + 'title' => 'default title', + ], + ], + ]); + $media->save(); + + $this->drupalGet('/admin/content/media'); + + // Confirm that the alt text attribute is present. + $assert_session = $this->assertSession(); + $element = $assert_session->elementAttributeExists('css', 'td.views-field-thumbnail__target-id img', 'alt'); + $this->assertSame('', (string) $element->getAttribute('alt')); + + } + + /** + * Tests the author views filter uses the user_name plugin. + */ + public function testMediaOverviewAuthorFilter(): void { + $this->drupalLogin($this->adminUser); + // Create some content for the view. + $media_type1 = $this->createMediaType('test'); + $media1 = Media::create([ + 'bundle' => $media_type1->id(), + 'name' => 'Media 1', + 'uid' => $this->adminUser->id(), + ]); + $media1->save(); + $media2 = Media::create([ + 'bundle' => $media_type1->id(), + 'name' => 'Media 2', + 'uid' => $this->adminUser->id(), + ]); + $media2->save(); + $media3 = Media::create([ + 'bundle' => $media_type1->id(), + 'name' => 'Media 3', + 'uid' => $this->nonAdminUser->id(), + ]); + $media3->save(); + + // Add the media author filter to the media overview view. + $this->drupalGet('admin/structure/views/nojs/add-handler/media/media_page_list/filter'); + $edit = [ + 'name[media_field_data.user_name]' => 1, + ]; + $this->submitForm($edit, 'Add and configure filter criteria'); + + $edit = [ + 'options[expose_button][checkbox][checkbox]' => 1, + ]; + $this->submitForm($edit, 'Expose filter'); + $edit = [ + 'options[expose_button][checkbox][checkbox]' => 1, + 'options[group_button][radios][radios]' => 0, + ]; + $this->submitForm($edit, 'Apply'); + $this->submitForm([], 'Save'); + + $role = Role::load(RoleInterface::AUTHENTICATED_ID); + $this->grantPermissions($role, ['access media overview']); + $this->drupalGet('/admin/content/media'); + $this->assertSession()->statusCodeEquals(200); + // Assert we are using the user_name filter. + $this->assertSession()->pageTextContains('Authored by'); + $this->submitForm([ + 'user_name' => $this->adminUser->getAccountName() . ' (' . $this->adminUser->id() . ')', + ], 'Filter'); + $this->assertSession()->linkByHrefExists('/media/' . $media1->id()); + $this->assertSession()->linkByHrefExists('/media/' . $media2->id()); + $this->assertSession()->linkByHrefNotExists('/media/' . $media3->id()); + } + } diff --git a/core/modules/media/tests/src/Functional/MediaTranslationUITest.php b/core/modules/media/tests/src/Functional/MediaTranslationUITest.php index 6606db11737e4990986916a0cbb6910eb354eae4..6802d7ec60ca4c225aaaf52cf0f7ca1f9e942dcf 100644 --- a/core/modules/media/tests/src/Functional/MediaTranslationUITest.php +++ b/core/modules/media/tests/src/Functional/MediaTranslationUITest.php @@ -57,7 +57,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function setupBundle() { + public function setupBundle(): void { $this->createMediaType('test', [ 'id' => $this->bundle, 'queue_thumbnail_downloads' => FALSE, diff --git a/core/modules/media/tests/src/Functional/UrlResolverTest.php b/core/modules/media/tests/src/Functional/UrlResolverTest.php index cbccc80b24bb3027e6b303b14db18d1216468d4c..acf266f722fc71042899e622bca418c328a1bc01 100644 --- a/core/modules/media/tests/src/Functional/UrlResolverTest.php +++ b/core/modules/media/tests/src/Functional/UrlResolverTest.php @@ -89,6 +89,9 @@ public function testEndpointMatching($url, $resource_url): void { public function testResourceUrlAlterHook(): void { $this->container->get('module_installer')->install(['media_test_oembed']); + // Much like FunctionalTestSetupTrait::installModulesFromClassProperty() + // after module install the rebuilt container needs to be used. + $this->container = \Drupal::getContainer(); $resource_url = $this->container->get('media.oembed.url_resolver') ->getResourceUrl('https://vimeo.com/14782834'); diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php index 259f0831ed682f2623bec57d6d6d38c970d8c073..554fc35e37c55b8fb13033e83f18b8280559c537 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php @@ -12,7 +12,7 @@ class MediaEmbedFilterConfigurationUiAddTest extends MediaEmbedFilterTestBase { /** - * @covers ::media_form_filter_format_add_form_alter + * @covers \Drupal\media\Hook\MediaHooks::formFilterFormatAddFormAlter * @dataProvider providerTestValidations */ public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void { diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php index 0b798f855330567ac9cc0e3bcb1a9673a6174da1..bcc62c736216a3b9f190212de9d4b5cbede52d6c 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php @@ -12,7 +12,7 @@ class MediaEmbedFilterConfigurationUiEditTest extends MediaEmbedFilterTestBase { /** - * @covers ::media_form_filter_format_edit_form_alter + * @covers \Drupal\media\Hook\MediaHooks::formFilterFormatEditFormAlter * @dataProvider providerTestValidations */ public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void { diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php index 2397324680c5cb725a9e1425de1fcf8cc06a0855..1413b629af14a67c127ddec13292844a592b1637 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function initConfig(ContainerInterface $container) { + protected function initConfig(ContainerInterface $container): void { parent::initConfig($container); // Enable twig debugging to make testing template usage easy. diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php index e85c357bc4eefd71d44b707a5137cf3d957beae3..72fa18190b7539a6fa3bb134faf464e8128fa1e7 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php @@ -102,7 +102,7 @@ public function testMediaSources(): void { /** * Tests the standard profile configuration for media type 'audio'. */ - protected function audioTest() { + protected function audioTest(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $source_field_id = 'field_media_audio_file'; @@ -196,7 +196,7 @@ protected function audioTest() { /** * Tests the standard profile configuration for media type 'image'. */ - protected function imageTest() { + protected function imageTest(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $source_field_id = 'field_media_image'; @@ -293,7 +293,7 @@ protected function imageTest() { /** * Tests the standard profile configuration for media type 'document'. */ - protected function documentTest() { + protected function documentTest(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $source_field_id = 'field_media_document'; @@ -383,7 +383,7 @@ protected function documentTest() { /** * Tests the standard profile configuration for media type 'remote_video'. */ - protected function remoteVideoTest() { + protected function remoteVideoTest(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $source_field_id = 'field_media_oembed_video'; @@ -478,7 +478,7 @@ protected function remoteVideoTest() { /** * Tests the standard profile configuration for media type 'video'. */ - protected function videoTest() { + protected function videoTest(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $source_field_id = 'field_media_video_file'; diff --git a/core/modules/media/tests/src/Kernel/MediaSourceTest.php b/core/modules/media/tests/src/Kernel/MediaSourceTest.php index 19e77ebfacd84e8c2cc4839fce9c00d1b97d302d..012a49d0b220d89fa16b29dbb93f635459b688df 100644 --- a/core/modules/media/tests/src/Kernel/MediaSourceTest.php +++ b/core/modules/media/tests/src/Kernel/MediaSourceTest.php @@ -616,7 +616,7 @@ public function testHiddenSourceField(): void { * @param string $field_name * Source field name. */ - protected function createMediaTypeViaForm($source_plugin_id, $field_name) { + protected function createMediaTypeViaForm($source_plugin_id, $field_name): void { /** @var \Drupal\media\MediaTypeInterface $type */ $type = MediaType::create(['source' => $source_plugin_id]); diff --git a/core/modules/media_library/media_library.install b/core/modules/media_library/media_library.install index c03aa041ef45465a32a2dfbaa42a4b9077bd5a5f..2aa41afe813cd854812d996f7ff628d903895942 100644 --- a/core/modules/media_library/media_library.install +++ b/core/modules/media_library/media_library.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function media_library_install($is_syncing) { +function media_library_install($is_syncing): void { if (!$is_syncing) { foreach (MediaType::loadMultiple() as $type) { _media_library_configure_form_display($type); @@ -22,6 +22,6 @@ function media_library_install($is_syncing) { /** * Implements hook_update_last_removed(). */ -function media_library_update_last_removed() { +function media_library_update_last_removed(): int { return 8704; } diff --git a/core/modules/media_library/media_library.module b/core/modules/media_library/media_library.module index 34865772eb8d28d42e4e6cbbae76f1ed4b4af454..14f1969507b8d1ad9abd123a926f7fa20a96672b 100644 --- a/core/modules/media_library/media_library.module +++ b/core/modules/media_library/media_library.module @@ -2,117 +2,16 @@ /** * @file - * Contains hook implementations for the media_library module. */ -use Drupal\Component\Utility\UrlHelper; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Session\AccountInterface; use Drupal\Core\Template\Attribute; -use Drupal\Core\Url; use Drupal\image\Entity\ImageStyle; use Drupal\image\Plugin\Field\FieldType\ImageItem; -use Drupal\media\MediaTypeForm; use Drupal\media\MediaTypeInterface; -use Drupal\media_library\Form\FileUploadForm; -use Drupal\media_library\Form\OEmbedForm; -use Drupal\media_library\MediaLibraryState; -use Drupal\views\Plugin\views\cache\CachePluginBase; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_help(). - */ -function media_library_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.media_library': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Media Library module provides a rich, visual interface for managing media, and allows media to be reused in entity reference fields or embedded into text content. It overrides the <a href=":media-collection">media administration page</a>, allowing users to toggle between the existing table-style interface and a new grid-style interface for browsing and performing administrative operations on media.', [ - ':media-collection' => Url::fromRoute('entity.media.collection')->toString(), - ]) . '</p>'; - $output .= '<p>' . t('To learn more about media management, begin by reviewing the <a href=":media-help">documentation for the Media module</a>. For more information about the media library and related functionality, see the <a href=":media-library-handbook">online documentation for the Media Library module</a>.', [ - ':media-help' => Url::fromRoute('help.page', ['name' => 'media'])->toString(), - ':media-library-handbook' => 'https://www.drupal.org/docs/8/core/modules/media-library-module', - ]) . '</p>'; - $output .= '<h2>' . t('Selection dialog') . '</h2>'; - $output .= '<p>' . t('When selecting media for an entity reference field or a text editor, Media Library opens a modal dialog to help users easily find and select media. The modal dialog can toggle between a grid-style and table-style interface, and new media items can be uploaded directly into it.') . '</p>'; - $output .= '<p>' . t('Within the dialog, media items are divided up by type. If more than one media type can be selected by the user, the available types will be displayed as a set of vertical tabs. To users who have appropriate permissions, each media type may also present a short form allowing you to upload or create new media items of that type.') . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Grid-style vs. table-style interface') . '</dt>'; - $output .= '<dd>' . t('The Media Library module provides a new grid-style interface for the media administration page that displays media as thumbnails, with minimal textual information, allowing users to visually browse media in their site. The existing table-style interface is better suited to displaying additional information about media items, in addition to being more accessible to users with assistive technology.') . '</dd>'; - $output .= '<dt>' . t('Reusing media in entity reference fields') . '</dt>'; - $output .= '<dd>' . t('Any entity reference field that references media can use the media library. To enable, configure the form display for the field to use the "Media library" widget.') . '</dd>'; - $output .= '<dt>' . t('Embedding media in text content') . '</dt>'; - $output .= '<dd>' . t('To use the media library within CKEditor, you must add the "Insert from Media Library" button to the CKEditor toolbar, and enable the "Embed media" filter in the text format associated with the text editor.') . '</dd>'; - $output .= '</dl>'; - $output .= '<h2>' . t('Customize') . '</h2>'; - $output .= '<ul>'; - $output .= '<li>'; - if (\Drupal::moduleHandler()->moduleExists('views_ui') && \Drupal::currentUser()->hasPermission('administer views')) { - $output .= t('Both the table-style and grid-style interfaces are regular views and can be customized via the <a href=":views-ui">Views UI</a>, including sorting and filtering. This is the case for both the administration page and the modal dialog.', [ - ':views_ui' => Url::fromRoute('entity.view.collection')->toString(), - ]); - } - else { - $output .= t('Both the table-style and grid-style interfaces are regular views and can be customized via the Views UI, including sorting and filtering. This is the case for both the administration page and the modal dialog.'); - } - $output .= '</li>'; - $output .= '<li>' . t('In the grid-style interface, the fields that are displayed (including which image style is used for images) can be customized by configuring the "Media library" view mode for each of your <a href=":media-types">media types</a>. The thumbnail images in the grid-style interface can be customized by configuring the "Media Library thumbnail (220×220)" image style.', [ - ':media-types' => Url::fromRoute('entity.media_type.collection')->toString(), - ]) . '</li>'; - $output .= '<li>' . t('When adding new media items within the modal dialog, the fields that are displayed can be customized by configuring the "Media library" form mode for each of your <a href=":media-types">media types</a>.', [ - ':media-types' => Url::fromRoute('entity.media_type.collection')->toString(), - ]) . '</li>'; - $output .= '</ul>'; - return $output; - } -} - -/** - * Implements hook_media_source_info_alter(). - */ -function media_library_media_source_info_alter(array &$sources) { - if (empty($sources['audio_file']['forms']['media_library_add'])) { - $sources['audio_file']['forms']['media_library_add'] = FileUploadForm::class; - } - if (empty($sources['file']['forms']['media_library_add'])) { - $sources['file']['forms']['media_library_add'] = FileUploadForm::class; - } - if (empty($sources['image']['forms']['media_library_add'])) { - $sources['image']['forms']['media_library_add'] = FileUploadForm::class; - } - if (empty($sources['video_file']['forms']['media_library_add'])) { - $sources['video_file']['forms']['media_library_add'] = FileUploadForm::class; - } - if (empty($sources['oembed:video']['forms']['media_library_add'])) { - $sources['oembed:video']['forms']['media_library_add'] = OEmbedForm::class; - } -} - -/** - * Implements hook_theme(). - */ -function media_library_theme() { - return [ - 'media__media_library' => [ - 'base hook' => 'media', - ], - 'media_library_wrapper' => [ - 'render element' => 'element', - ], - 'media_library_item' => [ - 'render element' => 'element', - ], - ]; -} /** * Prepares variables for the media library modal dialog. @@ -146,82 +45,6 @@ function template_preprocess_media_library_item(array &$variables) { } } -/** - * Implements hook_views_pre_render(). - */ -function media_library_views_pre_render(ViewExecutable $view) { - $add_classes = function (&$option, array $classes_to_add) { - $classes = $option ? preg_split('/\s+/', trim($option)) : []; - $classes = array_filter($classes); - $classes = array_merge($classes, $classes_to_add); - $option = implode(' ', array_unique($classes)); - }; - - if ($view->id() === 'media_library') { - if ($view->current_display === 'page') { - $add_classes($view->style_plugin->options['row_class'], ['js-media-library-item', 'js-click-to-select']); - - if (array_key_exists('media_bulk_form', $view->field)) { - $add_classes($view->field['media_bulk_form']->options['element_class'], ['js-click-to-select-checkbox']); - } - } - elseif (str_starts_with($view->current_display, 'widget')) { - if (array_key_exists('media_library_select_form', $view->field)) { - $add_classes($view->field['media_library_select_form']->options['element_wrapper_class'], ['js-click-to-select-checkbox']); - } - $add_classes($view->display_handler->options['css_class'], ['js-media-library-view']); - } - - $add_classes($view->style_plugin->options['row_class'], ['js-media-library-item', 'js-click-to-select']); - - if ($view->display_handler->options['defaults']['css_class']) { - $add_classes($view->displayHandlers->get('default')->options['css_class'], ['js-media-library-view']); - } - else { - $add_classes($view->display_handler->options['css_class'], ['js-media-library-view']); - } - } -} - -/** - * Implements hook_views_post_render(). - */ -function media_library_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) { - if ($view->id() === 'media_library') { - $output['#attached']['library'][] = 'media_library/view'; - if (str_starts_with($view->current_display, 'widget')) { - try { - $query = MediaLibraryState::fromRequest($view->getRequest())->all(); - } - catch (InvalidArgumentException $e) { - // MediaLibraryState::fromRequest() will throw an exception if the view - // is being previewed, since not all required query parameters will be - // present. In a preview, however, this can be omitted since we're - // merely previewing. - // @todo Use the views API for checking for the preview mode when it - // lands. https://www.drupal.org/project/drupal/issues/3060855 - if (empty($view->preview) && empty($view->live_preview)) { - throw $e; - } - } - - // If the current query contains any parameters we use to contextually - // filter the view, ensure they persist across AJAX rebuilds. - // The ajax_path is shared for all AJAX views on the page, but our query - // parameters are prefixed and should not interfere with any other views. - // @todo Rework or remove this in https://www.drupal.org/node/2983451 - if (!empty($query)) { - $ajax_path = &$output['#attached']['drupalSettings']['views']['ajax_path']; - $parsed_url = UrlHelper::parse($ajax_path); - $query = array_merge($query, $parsed_url['query']); - // Reset the pager so that the user starts on the first page. - unset($query['page']); - $ajax_path = $parsed_url['path'] . '?' . UrlHelper::buildQuery($query); - } - } - } -} - /** * Implements hook_preprocess_media(). */ @@ -272,7 +95,7 @@ function media_library_preprocess_views_view_fields(&$variables) { * * @todo Remove in https://www.drupal.org/node/2983454 */ -function media_library_form_views_form_media_library_page_alter(array &$form, FormStateInterface $form_state) { +function media_library_form_views_form_media_library_page_alter(array &$form, FormStateInterface $form_state): void { if (isset($form['media_bulk_form']) && isset($form['output'])) { /** @var \Drupal\views\ViewExecutable $view */ $view = $form['output'][0]['#view']; @@ -285,26 +108,6 @@ function media_library_form_views_form_media_library_page_alter(array &$form, Fo } } -/** - * Implements hook_form_alter(). - */ -function media_library_form_alter(array &$form, FormStateInterface $form_state, $form_id) { - // Add a process callback to ensure that the media library view's exposed - // filters submit button is not moved to the modal dialog's button area. - if ($form_id === 'views_exposed_form' && str_starts_with($form['#id'], 'views-exposed-form-media-library-widget')) { - $form['#after_build'][] = '_media_library_views_form_media_library_after_build'; - } - - // Configures media_library displays when a type is submitted. - if ($form_state->getFormObject() instanceof MediaTypeForm) { - $form['actions']['submit']['#submit'][] = '_media_library_media_type_form_submit'; - // @see field_ui_form_alter() - if (isset($form['actions']['save_continue'])) { - $form['actions']['save_continue']['#submit'][] = '_media_library_media_type_form_submit'; - } - } -} - /** * Form #after_build callback for media_library view's exposed filters form. */ @@ -339,49 +142,6 @@ function _media_library_media_type_form_submit(array &$form, FormStateInterface } } -/** - * Implements hook_field_ui_preconfigured_options_alter(). - */ -function media_library_field_ui_preconfigured_options_alter(array &$options, $field_type) { - // If the field is not an "entity_reference"-based field, bail out. - $class = \Drupal::service('plugin.manager.field.field_type')->getPluginClass($field_type); - if (!is_a($class, EntityReferenceItem::class, TRUE)) { - return; - } - - // Set the default field widget for media to be the Media library. - if (!empty($options['media'])) { - $options['media']['entity_form_display']['type'] = 'media_library_widget'; - } -} - -/** - * Implements hook_local_tasks_alter(). - * - * Removes tasks for the Media library if the view display no longer exists. - */ -function media_library_local_tasks_alter(&$local_tasks) { - /** @var \Symfony\Component\Routing\RouteCollection $route_collection */ - $route_collection = \Drupal::service('router')->getRouteCollection(); - foreach (['media_library.grid', 'media_library.table'] as $key) { - if (isset($local_tasks[$key]) && !$route_collection->get($local_tasks[$key]['route_name'])) { - unset($local_tasks[$key]); - } - } -} - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function media_library_image_style_access(EntityInterface $entity, $operation, AccountInterface $account) { - // Prevent the fallback 'media_library' image style from being deleted. - // @todo Lock the image style instead of preventing delete access. - // https://www.drupal.org/project/drupal/issues/2247293 - if ($operation === 'delete' && $entity->id() === 'media_library') { - return AccessResult::forbidden(); - } -} - /** * Ensures that the given media type has a media_library form display. * diff --git a/core/modules/media_library/media_library.post_update.php b/core/modules/media_library/media_library.post_update.php index 73e6052514307e0b3c049fc95b8283df1d705a83..9fab3345ee10080c16426ce9739b8c9cf012befc 100644 --- a/core/modules/media_library/media_library.post_update.php +++ b/core/modules/media_library/media_library.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function media_library_removed_post_updates() { +function media_library_removed_post_updates(): array { return [ 'media_library_post_update_display_modes' => '9.0.0', 'media_library_post_update_table_display' => '9.0.0', diff --git a/core/modules/media_library/media_library.views.inc b/core/modules/media_library/media_library.views.inc deleted file mode 100644 index 7d1ead4c8faa5d901df7d254ced553e7ea0d981b..0000000000000000000000000000000000000000 --- a/core/modules/media_library/media_library.views.inc +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Contains Views integration for the media_library module. - */ - -/** - * Implements hook_views_data(). - */ -function media_library_views_data() { - $data = []; - $data['media']['media_library_select_form'] = [ - 'title' => t('Select media'), - 'help' => t('Provides a field for selecting media entities in our media library view'), - 'real field' => 'mid', - 'field' => [ - 'id' => 'media_library_select_form', - ], - ]; - return $data; -} diff --git a/core/modules/media_library/src/Form/FileUploadForm.php b/core/modules/media_library/src/Form/FileUploadForm.php index fd2bc14a419cb4fe1076d4068420e6fe3fdf40e3..e9e25f108fca6afae3ed647d274cda1e2d1b1370 100644 --- a/core/modules/media_library/src/Form/FileUploadForm.php +++ b/core/modules/media_library/src/Form/FileUploadForm.php @@ -276,7 +276,7 @@ protected function buildEntityFormElement(MediaInterface $media, array $form, Fo * The entity form source field element. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current form state. - * @param $form + * @param array $form * The complete form. * * @return array diff --git a/core/modules/media_library/src/Hook/MediaLibraryHooks.php b/core/modules/media_library/src/Hook/MediaLibraryHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d617f539196155fe2f4d5f16b99bb2e1e4af773c --- /dev/null +++ b/core/modules/media_library/src/Hook/MediaLibraryHooks.php @@ -0,0 +1,254 @@ +<?php + +namespace Drupal\media_library\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; +use Drupal\media\MediaTypeForm; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Component\Utility\UrlHelper; +use Drupal\media_library\MediaLibraryState; +use Drupal\views\Plugin\views\cache\CachePluginBase; +use Drupal\views\ViewExecutable; +use Drupal\media_library\Form\OEmbedForm; +use Drupal\media_library\Form\FileUploadForm; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media_library. + */ +class MediaLibraryHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.media_library': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Media Library module provides a rich, visual interface for managing media, and allows media to be reused in entity reference fields or embedded into text content. It overrides the <a href=":media-collection">media administration page</a>, allowing users to toggle between the existing table-style interface and a new grid-style interface for browsing and performing administrative operations on media.', [ + ':media-collection' => Url::fromRoute('entity.media.collection')->toString(), + ]) . '</p>'; + $output .= '<p>' . t('To learn more about media management, begin by reviewing the <a href=":media-help">documentation for the Media module</a>. For more information about the media library and related functionality, see the <a href=":media-library-handbook">online documentation for the Media Library module</a>.', [ + ':media-help' => Url::fromRoute('help.page', [ + 'name' => 'media', + ])->toString(), + ':media-library-handbook' => 'https://www.drupal.org/docs/8/core/modules/media-library-module', + ]) . '</p>'; + $output .= '<h2>' . t('Selection dialog') . '</h2>'; + $output .= '<p>' . t('When selecting media for an entity reference field or a text editor, Media Library opens a modal dialog to help users easily find and select media. The modal dialog can toggle between a grid-style and table-style interface, and new media items can be uploaded directly into it.') . '</p>'; + $output .= '<p>' . t('Within the dialog, media items are divided up by type. If more than one media type can be selected by the user, the available types will be displayed as a set of vertical tabs. To users who have appropriate permissions, each media type may also present a short form allowing you to upload or create new media items of that type.') . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Grid-style vs. table-style interface') . '</dt>'; + $output .= '<dd>' . t('The Media Library module provides a new grid-style interface for the media administration page that displays media as thumbnails, with minimal textual information, allowing users to visually browse media in their site. The existing table-style interface is better suited to displaying additional information about media items, in addition to being more accessible to users with assistive technology.') . '</dd>'; + $output .= '<dt>' . t('Reusing media in entity reference fields') . '</dt>'; + $output .= '<dd>' . t('Any entity reference field that references media can use the media library. To enable, configure the form display for the field to use the "Media library" widget.') . '</dd>'; + $output .= '<dt>' . t('Embedding media in text content') . '</dt>'; + $output .= '<dd>' . t('To use the media library within CKEditor, you must add the "Insert from Media Library" button to the CKEditor toolbar, and enable the "Embed media" filter in the text format associated with the text editor.') . '</dd>'; + $output .= '</dl>'; + $output .= '<h2>' . t('Customize') . '</h2>'; + $output .= '<ul>'; + $output .= '<li>'; + if (\Drupal::moduleHandler()->moduleExists('views_ui') && \Drupal::currentUser()->hasPermission('administer views')) { + $output .= t('Both the table-style and grid-style interfaces are regular views and can be customized via the <a href=":views-ui">Views UI</a>, including sorting and filtering. This is the case for both the administration page and the modal dialog.', [':views_ui' => Url::fromRoute('entity.view.collection')->toString()]); + } + else { + $output .= t('Both the table-style and grid-style interfaces are regular views and can be customized via the Views UI, including sorting and filtering. This is the case for both the administration page and the modal dialog.'); + } + $output .= '</li>'; + $output .= '<li>' . t('In the grid-style interface, the fields that are displayed (including which image style is used for images) can be customized by configuring the "Media library" view mode for each of your <a href=":media-types">media types</a>. The thumbnail images in the grid-style interface can be customized by configuring the "Media Library thumbnail (220×220)" image style.', [ + ':media-types' => Url::fromRoute('entity.media_type.collection')->toString(), + ]) . '</li>'; + $output .= '<li>' . t('When adding new media items within the modal dialog, the fields that are displayed can be customized by configuring the "Media library" form mode for each of your <a href=":media-types">media types</a>.', [ + ':media-types' => Url::fromRoute('entity.media_type.collection')->toString(), + ]) . '</li>'; + $output .= '</ul>'; + return $output; + } + } + + /** + * Implements hook_media_source_info_alter(). + */ + #[Hook('media_source_info_alter')] + public function mediaSourceInfoAlter(array &$sources) { + if (empty($sources['audio_file']['forms']['media_library_add'])) { + $sources['audio_file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['file']['forms']['media_library_add'])) { + $sources['file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['image']['forms']['media_library_add'])) { + $sources['image']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['video_file']['forms']['media_library_add'])) { + $sources['video_file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['oembed:video']['forms']['media_library_add'])) { + $sources['oembed:video']['forms']['media_library_add'] = OEmbedForm::class; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'media__media_library' => [ + 'base hook' => 'media', + ], + 'media_library_wrapper' => [ + 'render element' => 'element', + ], + 'media_library_item' => [ + 'render element' => 'element', + ], + ]; + } + + /** + * Implements hook_views_pre_render(). + */ + #[Hook('views_pre_render')] + public function viewsPreRender(ViewExecutable $view) { + $add_classes = function (&$option, array $classes_to_add) { + $classes = $option ? preg_split('/\s+/', trim($option)) : []; + $classes = array_filter($classes); + $classes = array_merge($classes, $classes_to_add); + $option = implode(' ', array_unique($classes)); + }; + if ($view->id() === 'media_library') { + if ($view->current_display === 'page') { + $add_classes($view->style_plugin->options['row_class'], ['js-media-library-item', 'js-click-to-select']); + if (array_key_exists('media_bulk_form', $view->field)) { + $add_classes($view->field['media_bulk_form']->options['element_class'], ['js-click-to-select-checkbox']); + } + } + elseif (str_starts_with($view->current_display, 'widget')) { + if (array_key_exists('media_library_select_form', $view->field)) { + $add_classes($view->field['media_library_select_form']->options['element_wrapper_class'], ['js-click-to-select-checkbox']); + } + $add_classes($view->display_handler->options['css_class'], ['js-media-library-view']); + } + $add_classes($view->style_plugin->options['row_class'], ['js-media-library-item', 'js-click-to-select']); + if ($view->display_handler->options['defaults']['css_class']) { + $add_classes($view->displayHandlers->get('default')->options['css_class'], ['js-media-library-view']); + } + else { + $add_classes($view->display_handler->options['css_class'], ['js-media-library-view']); + } + } + } + + /** + * Implements hook_views_post_render(). + */ + #[Hook('views_post_render')] + public function viewsPostRender(ViewExecutable $view, &$output, CachePluginBase $cache) { + if ($view->id() === 'media_library') { + $output['#attached']['library'][] = 'media_library/view'; + if (str_starts_with($view->current_display, 'widget')) { + try { + $query = MediaLibraryState::fromRequest($view->getRequest())->all(); + } + catch (\InvalidArgumentException $e) { + // MediaLibraryState::fromRequest() will throw an exception if the view + // is being previewed, since not all required query parameters will be + // present. In a preview, however, this can be omitted since we're + // merely previewing. + // @todo Use the views API for checking for the preview mode when it + // lands. https://www.drupal.org/project/drupal/issues/3060855 + if (empty($view->preview) && empty($view->live_preview)) { + throw $e; + } + } + // If the current query contains any parameters we use to contextually + // filter the view, ensure they persist across AJAX rebuilds. + // The ajax_path is shared for all AJAX views on the page, but our query + // parameters are prefixed and should not interfere with any other views. + // @todo Rework or remove this in https://www.drupal.org/node/2983451 + if (!empty($query)) { + $ajax_path =& $output['#attached']['drupalSettings']['views']['ajax_path']; + $parsed_url = UrlHelper::parse($ajax_path); + $query = array_merge($query, $parsed_url['query']); + // Reset the pager so that the user starts on the first page. + unset($query['page']); + $ajax_path = $parsed_url['path'] . '?' . UrlHelper::buildQuery($query); + } + } + } + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(array &$form, FormStateInterface $form_state, $form_id) : void { + // Add a process callback to ensure that the media library view's exposed + // filters submit button is not moved to the modal dialog's button area. + if ($form_id === 'views_exposed_form' && str_starts_with($form['#id'], 'views-exposed-form-media-library-widget')) { + $form['#after_build'][] = '_media_library_views_form_media_library_after_build'; + } + // Configures media_library displays when a type is submitted. + if ($form_state->getFormObject() instanceof MediaTypeForm) { + $form['actions']['submit']['#submit'][] = '_media_library_media_type_form_submit'; + // @see field_ui_form_alter() + if (isset($form['actions']['save_continue'])) { + $form['actions']['save_continue']['#submit'][] = '_media_library_media_type_form_submit'; + } + } + } + + /** + * Implements hook_field_ui_preconfigured_options_alter(). + */ + #[Hook('field_ui_preconfigured_options_alter')] + public function fieldUiPreconfiguredOptionsAlter(array &$options, $field_type) { + // If the field is not an "entity_reference"-based field, bail out. + $class = \Drupal::service('plugin.manager.field.field_type')->getPluginClass($field_type); + if (!is_a($class, EntityReferenceItem::class, TRUE)) { + return; + } + // Set the default field widget for media to be the Media library. + if (!empty($options['media'])) { + $options['media']['entity_form_display']['type'] = 'media_library_widget'; + } + } + + /** + * Implements hook_local_tasks_alter(). + * + * Removes tasks for the Media library if the view display no longer exists. + */ + #[Hook('local_tasks_alter')] + public function localTasksAlter(&$local_tasks) { + /** @var \Symfony\Component\Routing\RouteCollection $route_collection */ + $route_collection = \Drupal::service('router')->getRouteCollection(); + foreach (['media_library.grid', 'media_library.table'] as $key) { + if (isset($local_tasks[$key]) && !$route_collection->get($local_tasks[$key]['route_name'])) { + unset($local_tasks[$key]); + } + } + } + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('image_style_access')] + public function imageStyleAccess(EntityInterface $entity, $operation, AccountInterface $account) { + // Prevent the fallback 'media_library' image style from being deleted. + // @todo Lock the image style instead of preventing delete access. + // https://www.drupal.org/project/drupal/issues/2247293 + if ($operation === 'delete' && $entity->id() === 'media_library') { + return AccessResult::forbidden(); + } + } + +} diff --git a/core/modules/media_library/src/Hook/MediaLibraryViewsHooks.php b/core/modules/media_library/src/Hook/MediaLibraryViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..60dd07f9c6a37599cccb2241f0e68137a95f4d5c --- /dev/null +++ b/core/modules/media_library/src/Hook/MediaLibraryViewsHooks.php @@ -0,0 +1,33 @@ +<?php + +namespace Drupal\media_library\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media_library. + */ +class MediaLibraryViewsHooks { + /** + * @file + * Contains Views integration for the media_library module. + */ + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + $data = []; + $data['media']['media_library_select_form'] = [ + 'title' => t('Select media'), + 'help' => t('Provides a field for selecting media entities in our media library view'), + 'real field' => 'mid', + 'field' => [ + 'id' => 'media_library_select_form', + ], + ]; + return $data; + } + +} diff --git a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php index 14902898cd2d91c55fb29b05f5a25b096581076f..3b36ee5e3773e237b43f6f686348f0b8d6294710 100644 --- a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +++ b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php @@ -69,7 +69,7 @@ class MediaLibraryWidget extends WidgetBase implements TrustedCallbackInterface * Constructs a MediaLibraryWidget widget. * * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition @@ -934,7 +934,6 @@ protected static function getNewMediaItems(array $element, FormStateInterface $f $ids = explode(',', $value['media_library_selection']); $ids = array_filter($ids, 'is_numeric'); if (!empty($ids)) { - /** @var \Drupal\media\MediaInterface[] $media */ return Media::loadMultiple($ids); } } diff --git a/core/modules/media_library/tests/modules/media_library_test/media_library_test.module b/core/modules/media_library/tests/modules/media_library_test/media_library_test.module deleted file mode 100644 index 959f6b4b21d319c6fb375bc20af39f4548978368..0000000000000000000000000000000000000000 --- a/core/modules/media_library/tests/modules/media_library_test/media_library_test.module +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for the media_library_test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\media_library_test\Form\TestNodeFormOverride; - -/** - * Implements hook_ENTITY_TYPE_create_access(). - */ -function media_library_test_media_create_access(AccountInterface $account, array $context, $entity_bundle) { - if (isset($context['media_library_state'])) { - /** @var \Drupal\media_library\MediaLibraryState $state */ - $state = $context['media_library_state']; - return AccessResult::forbiddenIf($state->getSelectedTypeId() === 'deny_access'); - } - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_field_access(). - */ -function media_library_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - $deny_fields = \Drupal::state()->get('media_library_test_entity_field_access_deny_fields', []); - // Always deny the field_media_no_access field. - $deny_fields[] = 'field_media_no_access'; - return AccessResult::forbiddenIf(in_array($field_definition->getName(), $deny_fields, TRUE), 'Field access denied by test module'); -} - -/** - * Implements hook_entity_type_alter(). - */ -function media_library_test_entity_type_alter(array &$entity_types) { - if (isset($entity_types['node'])) { - $entity_types['node']->setFormClass('default', TestNodeFormOverride::class); - $entity_types['node']->setFormClass('edit', TestNodeFormOverride::class); - } -} - -/** - * Implements hook_field_widget_info_alter(). - */ -function media_library_test_field_widget_info_alter(array &$info) { - $info['media_library_widget']['field_types'][] = 'entity_reference_subclass'; -} diff --git a/core/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php b/core/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..af5ae96f8d526ee28277742961351f3b94aeba38 --- /dev/null +++ b/core/modules/media_library/tests/modules/media_library_test/src/Hook/MediaLibraryTestHooks.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\media_library_test\Hook; + +use Drupal\media_library_test\Form\TestNodeFormOverride; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for media_library_test. + */ +class MediaLibraryTestHooks { + + /** + * Implements hook_ENTITY_TYPE_create_access(). + */ + #[Hook('media_create_access')] + public function mediaCreateAccess(AccountInterface $account, array $context, $entity_bundle) { + if (isset($context['media_library_state'])) { + /** @var \Drupal\media_library\MediaLibraryState $state */ + $state = $context['media_library_state']; + return AccessResult::forbiddenIf($state->getSelectedTypeId() === 'deny_access'); + } + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + $deny_fields = \Drupal::state()->get('media_library_test_entity_field_access_deny_fields', []); + // Always deny the field_media_no_access field. + $deny_fields[] = 'field_media_no_access'; + return AccessResult::forbiddenIf(in_array($field_definition->getName(), $deny_fields, TRUE), 'Field access denied by test module'); + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + if (isset($entity_types['node'])) { + $entity_types['node']->setFormClass('default', TestNodeFormOverride::class); + $entity_types['node']->setFormClass('edit', TestNodeFormOverride::class); + } + } + + /** + * Implements hook_field_widget_info_alter(). + */ + #[Hook('field_widget_info_alter')] + public function fieldWidgetInfoAlter(array &$info) { + $info['media_library_widget']['field_types'][] = 'entity_reference_subclass'; + } + +} diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php index 7dbc6f886d893656e2ba89651832c6c9eba89e84..99d206253bb5a40ac43f6c7ab3f8c370eb3d2ce6 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php @@ -578,7 +578,7 @@ protected function assertAnnounceContains(string $expected_message): void { /** * {@inheritdoc} */ - protected function sortableUpdate($item, $from, $to = NULL) { + protected function sortableUpdate($item, $from, $to = NULL): void { // See core/modules/media_library/js/media_library.widget.js. $script = <<<JS (function ($) { diff --git a/core/modules/menu_link_content/menu_link_content.install b/core/modules/menu_link_content/menu_link_content.install index 6086ac08f59ab3cf8123eca357ac814e15415198..67630702efaa481a3c6a5f2540f441dec38766c1 100644 --- a/core/modules/menu_link_content/menu_link_content.install +++ b/core/modules/menu_link_content/menu_link_content.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function menu_link_content_update_last_removed() { +function menu_link_content_update_last_removed(): int { return 8601; } diff --git a/core/modules/menu_link_content/menu_link_content.module b/core/modules/menu_link_content/menu_link_content.module index 74aa3e0a8aafa4014fabacdace6a1d6c5a87266a..5894c00aaaa0f29efee599bbbfff52dc43ba2f16 100644 --- a/core/modules/menu_link_content/menu_link_content.module +++ b/core/modules/menu_link_content/menu_link_content.module @@ -2,61 +2,8 @@ /** * @file - * Allows administrators to create custom menu links. */ -use Drupal\Core\Url; -use Drupal\Core\Entity\EntityInterface; -use Drupal\path_alias\PathAliasInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\system\MenuInterface; - -/** - * Implements hook_help(). - */ -function menu_link_content_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.menu_link_content': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Custom Menu Links module allows users to create menu links. These links can be translated if multiple languages are used for the site.'); - if (\Drupal::moduleHandler()->moduleExists('menu_ui')) { - $output .= ' ' . t('It is required by the Menu UI module, which provides an interface for managing menus and menu links. For more information, see the <a href=":menu-help">Menu UI module help page</a> and the <a href=":drupal-org-help">online documentation for the Custom Menu Links module</a>.', [':menu-help' => Url::fromRoute('help.page', ['name' => 'menu_ui'])->toString(), ':drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link']); - } - else { - $output .= ' ' . t('For more information, see the <a href=":drupal-org-help">online documentation for the Custom Menu Links module</a>. If you install the Menu UI module, it provides an interface for managing menus and menu links.', [':drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link']); - } - $output .= '</p>'; - return $output; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function menu_link_content_entity_type_alter(array &$entity_types) { - // @todo Moderation is disabled for custom menu links until when we have an UI - // for them. - // @see https://www.drupal.org/project/drupal/issues/2350939 - $entity_types['menu_link_content']->setHandlerClass('moderation', ''); -} - -/** - * Implements hook_menu_delete(). - */ -function menu_link_content_menu_delete(MenuInterface $menu) { - $storage = \Drupal::entityTypeManager()->getStorage('menu_link_content'); - $menu_links = $storage->loadByProperties(['menu_name' => $menu->id()]); - $storage->delete($menu_links); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for 'path_alias'. - */ -function menu_link_content_path_alias_insert(PathAliasInterface $path_alias) { - _menu_link_content_update_path_alias($path_alias->getAlias()); -} - /** * Helper function to update plugin definition using internal scheme. * @@ -74,56 +21,3 @@ function _menu_link_content_update_path_alias($path) { $menu_link_manager->updateDefinition($menu_link->getPluginId(), $menu_link->getPluginDefinition(), FALSE); } } - -/** - * Implements hook_ENTITY_TYPE_update() for 'path_alias'. - */ -function menu_link_content_path_alias_update(PathAliasInterface $path_alias) { - if ($path_alias->getAlias() != $path_alias->original->getAlias()) { - _menu_link_content_update_path_alias($path_alias->getAlias()); - _menu_link_content_update_path_alias($path_alias->original->getAlias()); - } - elseif ($path_alias->getPath() != $path_alias->original->getPath()) { - _menu_link_content_update_path_alias($path_alias->getAlias()); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'path_alias'. - */ -function menu_link_content_path_alias_delete(PathAliasInterface $path_alias) { - _menu_link_content_update_path_alias($path_alias->getAlias()); -} - -/** - * Implements hook_entity_predelete(). - */ -function menu_link_content_entity_predelete(EntityInterface $entity) { - /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ - $menu_link_manager = \Drupal::service('plugin.manager.menu.link'); - $entity_type_id = $entity->getEntityTypeId(); - foreach ($entity->uriRelationships() as $rel) { - $url = $entity->toUrl($rel); - // Entities can provide uri relationships that are not routed, in this case - // getRouteParameters() will throw an exception. - if (!$url->isRouted()) { - continue; - } - $route_parameters = $url->getRouteParameters(); - if (!isset($route_parameters[$entity_type_id])) { - // Do not delete links which do not relate to this exact entity. For - // example, "collection", "add-form", etc. - continue; - } - // Delete all MenuLinkContent links that point to this entity route. - $result = $menu_link_manager->loadLinksByRoute($url->getRouteName(), $route_parameters); - - if ($result) { - foreach ($result as $id => $instance) { - if ($instance->isDeletable() && str_starts_with($id, 'menu_link_content:')) { - $instance->deleteLink(); - } - } - } - } -} diff --git a/core/modules/menu_link_content/menu_link_content.post_update.php b/core/modules/menu_link_content/menu_link_content.post_update.php index 64441b6a815352581153b7a422270fb8a8627619..92e32a5863facd16908d7fc6277562e9fb46742e 100644 --- a/core/modules/menu_link_content/menu_link_content.post_update.php +++ b/core/modules/menu_link_content/menu_link_content.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function menu_link_content_removed_post_updates() { +function menu_link_content_removed_post_updates(): array { return [ 'menu_link_content_post_update_make_menu_link_content_revisionable' => '9.0.0', ]; diff --git a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php index db378d8559bfef14fd47b454137a354e52c593a6..28503a01c07ffc61126474a434a9187e29cca1c9 100644 --- a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php @@ -2,69 +2,75 @@ namespace Drupal\menu_link_content\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\link\LinkItemInterface; +use Drupal\menu_link_content\Form\MenuLinkContentDeleteForm; +use Drupal\menu_link_content\Form\MenuLinkContentForm; +use Drupal\menu_link_content\MenuLinkContentAccessControlHandler; use Drupal\menu_link_content\MenuLinkContentInterface; +use Drupal\menu_link_content\MenuLinkContentStorage; +use Drupal\menu_link_content\MenuLinkContentStorageSchema; +use Drupal\menu_link_content\MenuLinkListBuilder; /** * Defines the menu link content entity class. * * @property \Drupal\Core\Field\FieldItemList $link * @property \Drupal\Core\Field\FieldItemList $rediscover - * - * @ContentEntityType( - * id = "menu_link_content", - * label = @Translation("Custom menu link"), - * label_collection = @Translation("Custom menu links"), - * label_singular = @Translation("custom menu link"), - * label_plural = @Translation("custom menu links"), - * label_count = @PluralTranslation( - * singular = "@count custom menu link", - * plural = "@count custom menu links", - * ), - * handlers = { - * "storage" = "\Drupal\menu_link_content\MenuLinkContentStorage", - * "storage_schema" = "Drupal\menu_link_content\MenuLinkContentStorageSchema", - * "access" = "Drupal\menu_link_content\MenuLinkContentAccessControlHandler", - * "form" = { - * "default" = "Drupal\menu_link_content\Form\MenuLinkContentForm", - * "delete" = "Drupal\menu_link_content\Form\MenuLinkContentDeleteForm" - * }, - * "list_builder" = "Drupal\menu_link_content\MenuLinkListBuilder" - * }, - * admin_permission = "administer menu", - * base_table = "menu_link_content", - * data_table = "menu_link_content_data", - * revision_table = "menu_link_content_revision", - * revision_data_table = "menu_link_content_field_revision", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * "label" = "title", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "bundle" = "bundle", - * "published" = "enabled", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message", - * }, - * links = { - * "canonical" = "/admin/structure/menu/item/{menu_link_content}/edit", - * "edit-form" = "/admin/structure/menu/item/{menu_link_content}/edit", - * "delete-form" = "/admin/structure/menu/item/{menu_link_content}/delete", - * }, - * constraints = { - * "MenuTreeHierarchy" = {} - * }, - * ) */ +#[ContentEntityType( + id: 'menu_link_content', + label: new TranslatableMarkup('Custom menu link'), + label_collection: new TranslatableMarkup('Custom menu links'), + label_singular: new TranslatableMarkup('custom menu link'), + label_plural: new TranslatableMarkup('custom menu links'), + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + 'label' => 'title', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'bundle' => 'bundle', + 'published' => 'enabled', + ], + handlers: [ + 'storage' => MenuLinkContentStorage::class, + 'storage_schema' => MenuLinkContentStorageSchema::class, + 'access' => MenuLinkContentAccessControlHandler::class, + 'form' => [ + 'default' => MenuLinkContentForm::class, + 'delete' => MenuLinkContentDeleteForm::class, + ], + 'list_builder' => MenuLinkListBuilder::class, + ], + links: [ + 'canonical' => '/admin/structure/menu/item/{menu_link_content}/edit', + 'edit-form' => '/admin/structure/menu/item/{menu_link_content}/edit', + 'delete-form' => '/admin/structure/menu/item/{menu_link_content}/delete', + ], + admin_permission: 'administer menu', + base_table: 'menu_link_content', + data_table: 'menu_link_content_data', + revision_table: 'menu_link_content_revision', + revision_data_table: 'menu_link_content_field_revision', + translatable: TRUE, + label_count: [ + 'singular' => '@count custom menu link', + 'plural' => '@count custom menu links', + ], + constraints: [ + 'MenuTreeHierarchy' => [], + ], + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ])] class MenuLinkContent extends EditorialContentEntityBase implements MenuLinkContentInterface { /** diff --git a/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php b/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5e4695b1b6dd8175b67ef0656c3bbf5f82d328a0 --- /dev/null +++ b/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php @@ -0,0 +1,127 @@ +<?php + +namespace Drupal\menu_link_content\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\path_alias\PathAliasInterface; +use Drupal\system\MenuInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for menu_link_content. + */ +class MenuLinkContentHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.menu_link_content': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Custom Menu Links module allows users to create menu links. These links can be translated if multiple languages are used for the site.'); + if (\Drupal::moduleHandler()->moduleExists('menu_ui')) { + $output .= ' ' . t('It is required by the Menu UI module, which provides an interface for managing menus and menu links. For more information, see the <a href=":menu-help">Menu UI module help page</a> and the <a href=":drupal-org-help">online documentation for the Custom Menu Links module</a>.', [ + ':menu-help' => Url::fromRoute('help.page', [ + 'name' => 'menu_ui', + ])->toString(), + ':drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link', + ]); + } + else { + $output .= ' ' . t('For more information, see the <a href=":drupal-org-help">online documentation for the Custom Menu Links module</a>. If you install the Menu UI module, it provides an interface for managing menus and menu links.', [':drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link']); + } + $output .= '</p>'; + return $output; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // @todo Moderation is disabled for custom menu links until when we have an UI + // for them. + // @see https://www.drupal.org/project/drupal/issues/2350939 + $entity_types['menu_link_content']->setHandlerClass('moderation', ''); + } + + /** + * Implements hook_menu_delete(). + */ + #[Hook('menu_delete')] + public function menuDelete(MenuInterface $menu) { + $storage = \Drupal::entityTypeManager()->getStorage('menu_link_content'); + $menu_links = $storage->loadByProperties(['menu_name' => $menu->id()]); + $storage->delete($menu_links); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'path_alias'. + */ + #[Hook('path_alias_insert')] + public function pathAliasInsert(PathAliasInterface $path_alias) { + _menu_link_content_update_path_alias($path_alias->getAlias()); + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'path_alias'. + */ + #[Hook('path_alias_update')] + public function pathAliasUpdate(PathAliasInterface $path_alias) { + if ($path_alias->getAlias() != $path_alias->original->getAlias()) { + _menu_link_content_update_path_alias($path_alias->getAlias()); + _menu_link_content_update_path_alias($path_alias->original->getAlias()); + } + elseif ($path_alias->getPath() != $path_alias->original->getPath()) { + _menu_link_content_update_path_alias($path_alias->getAlias()); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'path_alias'. + */ + #[Hook('path_alias_delete')] + public function pathAliasDelete(PathAliasInterface $path_alias) { + _menu_link_content_update_path_alias($path_alias->getAlias()); + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ + $menu_link_manager = \Drupal::service('plugin.manager.menu.link'); + $entity_type_id = $entity->getEntityTypeId(); + foreach ($entity->uriRelationships() as $rel) { + $url = $entity->toUrl($rel); + // Entities can provide uri relationships that are not routed, in this case + // getRouteParameters() will throw an exception. + if (!$url->isRouted()) { + continue; + } + $route_parameters = $url->getRouteParameters(); + if (!isset($route_parameters[$entity_type_id])) { + // Do not delete links which do not relate to this exact entity. For + // example, "collection", "add-form", etc. + continue; + } + // Delete all MenuLinkContent links that point to this entity route. + $result = $menu_link_manager->loadLinksByRoute($url->getRouteName(), $route_parameters); + if ($result) { + foreach ($result as $id => $instance) { + if ($instance->isDeletable() && str_starts_with($id, 'menu_link_content:')) { + $instance->deleteLink(); + } + } + } + } + } + +} diff --git a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php index 4c07d4d9ccff28bdcd2bfca7c0be418fcda3a2e7..20f2715f7c3fdf9f00fb9f608e61963a9dd0fbaf 100644 --- a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php @@ -83,7 +83,7 @@ class MenuLinkContent extends MenuLinkBase implements ContainerFactoryPluginInte * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php b/core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php index c67e04010d913c02be8e9aa0f289168f68c9f515..04d189a713ed6e027d0528929c553c952047dc13 100644 --- a/core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php +++ b/core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php @@ -56,7 +56,7 @@ class LinkUri extends ProcessPluginBase implements ContainerFactoryPluginInterfa * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/menu_link_content/tests/menu_operations_link_test/menu_operations_link_test.module b/core/modules/menu_link_content/tests/menu_operations_link_test/menu_operations_link_test.module deleted file mode 100644 index 3dbae150c605854cae588c0f55ec50f7b3b2189f..0000000000000000000000000000000000000000 --- a/core/modules/menu_link_content/tests/menu_operations_link_test/menu_operations_link_test.module +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @file - * Primary module hooks for Menu Operations Link Test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; -use Drupal\menu_link_content\Entity\MenuLinkContent; -use Drupal\Core\Url; - -/** - * Implements hook_entity_operation_alter(). - */ -function menu_operations_link_test_entity_operation_alter(array &$operations, EntityInterface $entity) { - if (!$entity instanceof MenuLinkContent) { - return; - } - // Alter the title of the edit link appearing in operations menu. - $operations['edit']['title'] = t('Altered Edit Title'); -} - -/** - * Implements hook_entity_operation(). - */ -function menu_operations_link_test_entity_operation(EntityInterface $entity) { - if (!$entity instanceof MenuLinkContent) { - return; - } - $operations['custom_operation'] = [ - 'title' => t('Custom Home'), - 'weight' => 20, - 'url' => Url::fromRoute('<front>'), - ]; - return $operations; -} diff --git a/core/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php b/core/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..8d73790b61c30d9d5381a59d57b9931ab41d187c --- /dev/null +++ b/core/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\menu_operations_link_test\Hook; + +use Drupal\Core\Url; +use Drupal\menu_link_content\Entity\MenuLinkContent; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for menu_operations_link_test. + */ +class MenuOperationsLinkTestHooks { + + /** + * Implements hook_entity_operation_alter(). + */ + #[Hook('entity_operation_alter')] + public function entityOperationAlter(array &$operations, EntityInterface $entity) { + if (!$entity instanceof MenuLinkContent) { + return; + } + // Alter the title of the edit link appearing in operations menu. + $operations['edit']['title'] = t('Altered Edit Title'); + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + if (!$entity instanceof MenuLinkContent) { + return; + } + $operations['custom_operation'] = [ + 'title' => t('Custom Home'), + 'weight' => 20, + 'url' => Url::fromRoute('<front>'), + ]; + return $operations; + } + +} diff --git a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php index a1ee4b21f4aeaf7559f4eb4afcac7007fa5c9119..cfe708e875b9783cc2809473e3ed142244245507 100644 --- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php +++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php @@ -110,7 +110,7 @@ public function testTranslationLinkTheme(): void { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 40e9bc92e94041d917c452144b02d2e38c7248b9..eadff2cb0594e49fe474926380dcac7c4e40a041 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -2,86 +2,12 @@ /** * @file - * Allows administrators to customize the site's navigation menus. - * - * A menu (in this context) is a hierarchical collection of links, generally - * used for navigation. */ -use Drupal\block\BlockInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Url; -use Drupal\Core\Breadcrumb\Breadcrumb; -use Drupal\Core\Cache\CacheableMetadata; -use Drupal\Core\Block\BlockPluginInterface; -use Drupal\Core\Link; -use Drupal\Core\Menu\MenuLinkInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\node\NodeTypeInterface; -use Drupal\system\Entity\Menu; use Drupal\node\NodeInterface; -use Drupal\system\MenuInterface; - -/** - * Implements hook_help(). - */ -function menu_ui_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.menu_ui': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the <a href=":menu">online documentation for the Menu UI module</a>.', [':menu' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/menu-ui-module']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing menus') . '</dt>'; - $output .= '<dd>' . t('Users with the <em>Administer menus and menu links</em> permission can add, edit, and delete custom menus on the <a href=":menu">Menus page</a>. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the <a href=":block_help">Block module</a> installed). By selecting <em>Edit menu</em>, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', [':block_help' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('help.page', ['name' => 'block'])->toString() : '#', ':menu' => Url::fromRoute('entity.menu.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Displaying menus') . '</dt>'; - $output .= '<dd>' . t('If you have the Block module installed, then each menu that you create is rendered in a block that you enable and position on the <a href=":blocks">Block layout page</a>. In some <a href=":themes">themes</a>, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the <a href=":themes">theme\'s settings page</a>.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#', ':themes' => Url::fromRoute('system.themes_page')->toString(), ':theme_settings' => Url::fromRoute('system.theme_settings')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - } - if ($route_name == 'entity.menu.add_form' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { - return '<p>' . t('You can enable the newly-created block for this menu on the <a href=":blocks">Block layout page</a>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; - } - elseif ($route_name == 'entity.menu.collection' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { - return '<p>' . t('Each menu has a corresponding block that is managed on the <a href=":blocks">Block layout page</a>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; - } -} - -/** - * Implements hook_entity_type_build(). - */ -function menu_ui_entity_type_build(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['menu'] - ->setFormClass('add', 'Drupal\menu_ui\MenuForm') - ->setFormClass('edit', 'Drupal\menu_ui\MenuForm') - ->setFormClass('delete', 'Drupal\menu_ui\Form\MenuDeleteForm') - ->setListBuilderClass('Drupal\menu_ui\MenuListBuilder') - ->setLinkTemplate('add-form', '/admin/structure/menu/add') - ->setLinkTemplate('delete-form', '/admin/structure/menu/manage/{menu}/delete') - ->setLinkTemplate('edit-form', '/admin/structure/menu/manage/{menu}') - ->setLinkTemplate('add-link-form', '/admin/structure/menu/manage/{menu}/add') - ->setLinkTemplate('collection', '/admin/structure/menu'); - - if (isset($entity_types['node'])) { - $entity_types['node']->addConstraint('MenuSettings', []); - } -} - -/** - * Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'. - */ -function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block) { - if ($block->getBaseId() == 'system_menu_block') { - $menu_name = $block->getDerivativeId(); - $build['#contextual_links']['menu'] = [ - 'route_parameters' => ['menu' => $menu_name], - ]; - } -} /** * Helper function to create or update a menu link for a node. @@ -206,112 +132,6 @@ function menu_ui_get_menu_link_defaults(NodeInterface $node) { return $defaults; } -/** - * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm. - * - * Adds menu item fields to the node form. - * - * @see menu_ui_form_node_form_submit() - */ -function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { - // Generate a list of possible parents (not including this link or descendants). - // @todo This must be handled in a #process handler. - $node = $form_state->getFormObject()->getEntity(); - $defaults = menu_ui_get_menu_link_defaults($node); - /** @var \Drupal\node\NodeTypeInterface $node_type */ - $node_type = $node->type->entity; - /** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */ - $menu_parent_selector = \Drupal::service('menu.parent_form_selector'); - $type_menus_ids = $node_type->getThirdPartySetting('menu_ui', 'available_menus', ['main']); - if (empty($type_menus_ids)) { - return; - } - /** @var \Drupal\system\MenuInterface[] $type_menus */ - $type_menus = Menu::loadMultiple($type_menus_ids); - $available_menus = []; - foreach ($type_menus as $menu) { - $available_menus[$menu->id()] = $menu->label(); - } - if ($defaults['id']) { - $default = $defaults['menu_name'] . ':' . $defaults['parent']; - } - else { - $default = $node_type->getThirdPartySetting('menu_ui', 'parent', 'main:'); - } - $parent_element = $menu_parent_selector->parentSelectElement($default, $defaults['id'], $available_menus); - // If no possible parent menu items were found, there is nothing to display. - if (empty($parent_element)) { - return; - } - - $form['menu'] = [ - '#type' => 'details', - '#title' => t('Menu settings'), - '#access' => \Drupal::currentUser()->hasPermission('administer menu'), - '#open' => (bool) $defaults['id'], - '#group' => 'advanced', - '#attached' => [ - 'library' => ['menu_ui/drupal.menu_ui'], - ], - '#tree' => TRUE, - '#weight' => -2, - '#attributes' => ['class' => ['menu-link-form']], - ]; - $form['menu']['enabled'] = [ - '#type' => 'checkbox', - '#title' => t('Provide a menu link'), - '#default_value' => (int) (bool) $defaults['id'], - ]; - $form['menu']['link'] = [ - '#type' => 'container', - '#parents' => ['menu'], - '#states' => [ - 'invisible' => [ - 'input[name="menu[enabled]"]' => ['checked' => FALSE], - ], - ], - ]; - - // Populate the element with the link data. - foreach (['id', 'entity_id'] as $key) { - $form['menu']['link'][$key] = ['#type' => 'value', '#value' => $defaults[$key]]; - } - - $form['menu']['link']['title'] = [ - '#type' => 'textfield', - '#title' => t('Menu link title'), - '#default_value' => $defaults['title'], - '#maxlength' => $defaults['title_max_length'], - ]; - - $form['menu']['link']['description'] = [ - '#type' => 'textfield', - '#title' => t('Description'), - '#default_value' => $defaults['description'], - '#description' => t('Shown when hovering over the menu link.'), - '#maxlength' => $defaults['description_max_length'], - ]; - - $form['menu']['link']['menu_parent'] = $parent_element; - $form['menu']['link']['menu_parent']['#title'] = t('Parent link'); - $form['menu']['link']['menu_parent']['#attributes']['class'][] = 'menu-parent-select'; - - $form['menu']['link']['weight'] = [ - '#type' => 'number', - '#title' => t('Weight'), - '#default_value' => $defaults['weight'], - '#description' => t('Menu links with lower weights are displayed before links with higher weights.'), - ]; - - foreach (array_keys($form['actions']) as $action) { - if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { - $form['actions'][$action]['#submit'][] = 'menu_ui_form_node_form_submit'; - } - } - - $form['#entity_builders'][] = 'menu_ui_node_builder'; -} - /** * Entity form builder to add the menu information to the node. */ @@ -351,59 +171,6 @@ function menu_ui_form_node_form_submit($form, FormStateInterface $form_state) { } } -/** - * Implements hook_form_FORM_ID_alter() for \Drupal\node\NodeTypeForm. - * - * Adds menu options to the node type form. - * - * @see NodeTypeForm::form() - * @see menu_ui_form_node_type_form_builder() - */ -function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_state) { - /** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */ - $menu_parent_selector = \Drupal::service('menu.parent_form_selector'); - $menu_options = array_map(function (MenuInterface $menu) { - return $menu->label(); - }, Menu::loadMultiple()); - asort($menu_options); - /** @var \Drupal\node\NodeTypeInterface $type */ - $type = $form_state->getFormObject()->getEntity(); - $form['menu'] = [ - '#type' => 'details', - '#title' => t('Menu settings'), - '#attached' => [ - 'library' => ['menu_ui/drupal.menu_ui.admin'], - ], - '#group' => 'additional_settings', - ]; - $form['menu']['menu_options'] = [ - '#type' => 'checkboxes', - '#title' => t('Available menus'), - '#default_value' => $type->getThirdPartySetting('menu_ui', 'available_menus', ['main']), - '#options' => $menu_options, - '#description' => t('Content of this type can be placed in the selected menus.'), - ]; - // @todo See if we can avoid pre-loading all options by changing the form or - // using a #process callback. https://www.drupal.org/node/2310319 - // To avoid an 'illegal option' error after saving the form we have to load - // all available menu parents. Otherwise, it is not possible to dynamically - // add options to the list using ajax. - $options_cacheability = new CacheableMetadata(); - $options = $menu_parent_selector->getParentSelectOptions('', NULL, $options_cacheability); - $form['menu']['menu_parent'] = [ - '#type' => 'select', - '#title' => t('Default parent link'), - '#default_value' => $type->getThirdPartySetting('menu_ui', 'parent', 'main:'), - '#options' => $options, - '#description' => t('Choose the menu link to be the default parent for a new link in the content authoring form.'), - '#attributes' => ['class' => ['menu-title-select']], - ]; - $options_cacheability->applyTo($form['menu']['menu_parent']); - - $form['#validate'][] = 'menu_ui_form_node_type_form_validate'; - $form['#entity_builders'][] = 'menu_ui_form_node_type_form_builder'; -} - /** * Validate handler for forms with menu options. * @@ -442,51 +209,3 @@ function menu_ui_preprocess_block(&$variables) { $variables['attributes']['role'] = 'navigation'; } } - -/** - * Implements hook_system_breadcrumb_alter(). - */ -function menu_ui_system_breadcrumb_alter(Breadcrumb $breadcrumb, RouteMatchInterface $route_match, array $context) { - // Custom breadcrumb behavior for editing menu links, we append a link to - // the menu in which the link is found. - if (($route_match->getRouteName() == 'menu_ui.link_edit') && $menu_link = $route_match->getParameter('menu_link_plugin')) { - if (($menu_link instanceof MenuLinkInterface)) { - // Add a link to the menu admin screen. - $menu = Menu::load($menu_link->getMenuName()); - $breadcrumb->addLink(Link::createFromRoute($menu->label(), 'entity.menu.edit_form', ['menu' => $menu->id()])); - } - } -} - -/** - * Implements hook_theme(). - */ -function menu_ui_theme(): array { - return [ - 'menu_link_form' => [ - 'render element' => 'form', - ], - ]; -} - -/** - * Implements hook_entity_operation(). - */ -function menu_ui_entity_operation(EntityInterface $entity): array { - $operations = []; - if ($entity instanceof BlockInterface) { - $plugin = $entity->getPlugin(); - if ($plugin->getBaseId() === 'system_menu_block') { - $menu = Menu::load($plugin->getDerivativeId()); - if ($menu && $menu->access('edit')) { - $operations['menu-edit'] = [ - 'title' => t('Edit menu'), - 'url' => $menu->toUrl('edit-form'), - 'weight' => 50, - ]; - } - } - } - - return $operations; -} diff --git a/core/modules/menu_ui/src/Hook/MenuUiHooks.php b/core/modules/menu_ui/src/Hook/MenuUiHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ae91d3f2e2fb3bbb16dec8b2a1e03036c59c51b5 --- /dev/null +++ b/core/modules/menu_ui/src/Hook/MenuUiHooks.php @@ -0,0 +1,297 @@ +<?php + +namespace Drupal\menu_ui\Hook; + +use Drupal\block\BlockInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Link; +use Drupal\Core\Menu\MenuLinkInterface; +use Drupal\Core\Breadcrumb\Breadcrumb; +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\system\MenuInterface; +use Drupal\system\Entity\Menu; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for menu_ui. + */ +class MenuUiHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.menu_ui': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the <a href=":menu">online documentation for the Menu UI module</a>.', [ + ':menu' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/menu-ui-module', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing menus') . '</dt>'; + $output .= '<dd>' . t('Users with the <em>Administer menus and menu links</em> permission can add, edit, and delete custom menus on the <a href=":menu">Menus page</a>. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the <a href=":block_help">Block module</a> installed). By selecting <em>Edit menu</em>, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', [ + ':block_help' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('help.page', [ + 'name' => 'block', + ])->toString() : '#', + ':menu' => Url::fromRoute('entity.menu.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Displaying menus') . '</dt>'; + $output .= '<dd>' . t('If you have the Block module installed, then each menu that you create is rendered in a block that you enable and position on the <a href=":blocks">Block layout page</a>. In some <a href=":themes">themes</a>, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the <a href=":themes">theme\'s settings page</a>.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ':themes' => Url::fromRoute('system.themes_page')->toString(), + ':theme_settings' => Url::fromRoute('system.theme_settings')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + if ($route_name == 'entity.menu.add_form' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { + return '<p>' . t('You can enable the newly-created block for this menu on the <a href=":blocks">Block layout page</a>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; + } + elseif ($route_name == 'entity.menu.collection' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { + return '<p>' . t('Each menu has a corresponding block that is managed on the <a href=":blocks">Block layout page</a>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['menu']->setFormClass('add', 'Drupal\menu_ui\MenuForm')->setFormClass('edit', 'Drupal\menu_ui\MenuForm')->setFormClass('delete', 'Drupal\menu_ui\Form\MenuDeleteForm')->setListBuilderClass('Drupal\menu_ui\MenuListBuilder')->setLinkTemplate('add-form', '/admin/structure/menu/add')->setLinkTemplate('delete-form', '/admin/structure/menu/manage/{menu}/delete')->setLinkTemplate('edit-form', '/admin/structure/menu/manage/{menu}')->setLinkTemplate('add-link-form', '/admin/structure/menu/manage/{menu}/add')->setLinkTemplate('collection', '/admin/structure/menu'); + if (isset($entity_types['node'])) { + $entity_types['node']->addConstraint('MenuSettings', []); + } + } + + /** + * Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'. + */ + #[Hook('block_view_system_menu_block_alter')] + public function blockViewSystemMenuBlockAlter(array &$build, BlockPluginInterface $block) { + if ($block->getBaseId() == 'system_menu_block') { + $menu_name = $block->getDerivativeId(); + $build['#contextual_links']['menu'] = ['route_parameters' => ['menu' => $menu_name]]; + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm. + * + * Adds menu item fields to the node form. + * + * @see menu_ui_form_node_form_submit() + */ + #[Hook('form_node_form_alter')] + public function formNodeFormAlter(&$form, FormStateInterface $form_state) : void { + // Generate a list of possible parents (not including this link or descendants). + // @todo This must be handled in a #process handler. + $node = $form_state->getFormObject()->getEntity(); + $defaults = menu_ui_get_menu_link_defaults($node); + /** @var \Drupal\node\NodeTypeInterface $node_type */ + $node_type = $node->type->entity; + /** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */ + $menu_parent_selector = \Drupal::service('menu.parent_form_selector'); + $type_menus_ids = $node_type->getThirdPartySetting('menu_ui', 'available_menus', ['main']); + if (empty($type_menus_ids)) { + return; + } + /** @var \Drupal\system\MenuInterface[] $type_menus */ + $type_menus = Menu::loadMultiple($type_menus_ids); + $available_menus = []; + foreach ($type_menus as $menu) { + $available_menus[$menu->id()] = $menu->label(); + } + if ($defaults['id']) { + $default = $defaults['menu_name'] . ':' . $defaults['parent']; + } + else { + $default = $node_type->getThirdPartySetting('menu_ui', 'parent', 'main:'); + } + $parent_element = $menu_parent_selector->parentSelectElement($default, $defaults['id'], $available_menus); + // If no possible parent menu items were found, there is nothing to display. + if (empty($parent_element)) { + return; + } + $form['menu'] = [ + '#type' => 'details', + '#title' => t('Menu settings'), + '#access' => \Drupal::currentUser()->hasPermission('administer menu'), + '#open' => (bool) $defaults['id'], + '#group' => 'advanced', + '#attached' => [ + 'library' => [ + 'menu_ui/drupal.menu_ui', + ], + ], + '#tree' => TRUE, + '#weight' => -2, + '#attributes' => [ + 'class' => [ + 'menu-link-form', + ], + ], + ]; + $form['menu']['enabled'] = [ + '#type' => 'checkbox', + '#title' => t('Provide a menu link'), + '#default_value' => (int) (bool) $defaults['id'], + ]; + $form['menu']['link'] = [ + '#type' => 'container', + '#parents' => [ + 'menu', + ], + '#states' => [ + 'invisible' => [ + 'input[name="menu[enabled]"]' => [ + 'checked' => FALSE, + ], + ], + ], + ]; + // Populate the element with the link data. + foreach (['id', 'entity_id'] as $key) { + $form['menu']['link'][$key] = ['#type' => 'value', '#value' => $defaults[$key]]; + } + $form['menu']['link']['title'] = [ + '#type' => 'textfield', + '#title' => t('Menu link title'), + '#default_value' => $defaults['title'], + '#maxlength' => $defaults['title_max_length'], + ]; + $form['menu']['link']['description'] = [ + '#type' => 'textfield', + '#title' => t('Description'), + '#default_value' => $defaults['description'], + '#description' => t('Shown when hovering over the menu link.'), + '#maxlength' => $defaults['description_max_length'], + ]; + $form['menu']['link']['menu_parent'] = $parent_element; + $form['menu']['link']['menu_parent']['#title'] = t('Parent link'); + $form['menu']['link']['menu_parent']['#attributes']['class'][] = 'menu-parent-select'; + $form['menu']['link']['weight'] = [ + '#type' => 'number', + '#title' => t('Weight'), + '#default_value' => $defaults['weight'], + '#description' => t('Menu links with lower weights are displayed before links with higher weights.'), + ]; + foreach (array_keys($form['actions']) as $action) { + if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { + $form['actions'][$action]['#submit'][] = 'menu_ui_form_node_form_submit'; + } + } + $form['#entity_builders'][] = 'menu_ui_node_builder'; + } + + /** + * Implements hook_form_FORM_ID_alter() for \Drupal\node\NodeTypeForm. + * + * Adds menu options to the node type form. + * + * @see NodeTypeForm::form() + * @see menu_ui_form_node_type_form_builder() + */ + #[Hook('form_node_type_form_alter')] + public function formNodeTypeFormAlter(&$form, FormStateInterface $form_state) : void { + /** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */ + $menu_parent_selector = \Drupal::service('menu.parent_form_selector'); + $menu_options = array_map(function (MenuInterface $menu) { + return $menu->label(); + }, Menu::loadMultiple()); + asort($menu_options); + /** @var \Drupal\node\NodeTypeInterface $type */ + $type = $form_state->getFormObject()->getEntity(); + $form['menu'] = [ + '#type' => 'details', + '#title' => t('Menu settings'), + '#attached' => [ + 'library' => [ + 'menu_ui/drupal.menu_ui.admin', + ], + ], + '#group' => 'additional_settings', + ]; + $form['menu']['menu_options'] = [ + '#type' => 'checkboxes', + '#title' => t('Available menus'), + '#default_value' => $type->getThirdPartySetting('menu_ui', 'available_menus', [ + 'main', + ]), + '#options' => $menu_options, + '#description' => t('Content of this type can be placed in the selected menus.'), + ]; + // @todo See if we can avoid pre-loading all options by changing the form or + // using a #process callback. https://www.drupal.org/node/2310319 + // To avoid an 'illegal option' error after saving the form we have to load + // all available menu parents. Otherwise, it is not possible to dynamically + // add options to the list using ajax. + $options_cacheability = new CacheableMetadata(); + $options = $menu_parent_selector->getParentSelectOptions('', NULL, $options_cacheability); + $form['menu']['menu_parent'] = [ + '#type' => 'select', + '#title' => t('Default parent link'), + '#default_value' => $type->getThirdPartySetting('menu_ui', 'parent', 'main:'), + '#options' => $options, + '#description' => t('Choose the menu link to be the default parent for a new link in the content authoring form.'), + '#attributes' => [ + 'class' => [ + 'menu-title-select', + ], + ], + ]; + $options_cacheability->applyTo($form['menu']['menu_parent']); + $form['#validate'][] = 'menu_ui_form_node_type_form_validate'; + $form['#entity_builders'][] = 'menu_ui_form_node_type_form_builder'; + } + + /** + * Implements hook_system_breadcrumb_alter(). + */ + #[Hook('system_breadcrumb_alter')] + public function systemBreadcrumbAlter(Breadcrumb $breadcrumb, RouteMatchInterface $route_match, array $context) { + // Custom breadcrumb behavior for editing menu links, we append a link to + // the menu in which the link is found. + if ($route_match->getRouteName() == 'menu_ui.link_edit' && ($menu_link = $route_match->getParameter('menu_link_plugin'))) { + if ($menu_link instanceof MenuLinkInterface) { + // Add a link to the menu admin screen. + $menu = Menu::load($menu_link->getMenuName()); + $breadcrumb->addLink(Link::createFromRoute($menu->label(), 'entity.menu.edit_form', ['menu' => $menu->id()])); + } + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['menu_link_form' => ['render element' => 'form']]; + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) : array { + $operations = []; + if ($entity instanceof BlockInterface) { + $plugin = $entity->getPlugin(); + if ($plugin->getBaseId() === 'system_menu_block') { + $menu = Menu::load($plugin->getDerivativeId()); + if ($menu && $menu->access('edit')) { + $operations['menu-edit'] = ['title' => t('Edit menu'), 'url' => $menu->toUrl('edit-form'), 'weight' => 50]; + } + } + } + return $operations; + } + +} diff --git a/core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php b/core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php index 6424ff9f9dd71abaaa16cfdd4320bd0bfbfd965c..220899dc474c122524ec782b040dff80e6517610 100644 --- a/core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php +++ b/core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php @@ -26,7 +26,7 @@ class MenuLinkAdd extends LocalActionDefault { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php index 32ba6df9a384c0b059f77b230dc72c753e784796..f7f811c5e517be3809b1820ecc8447c8c32f3bef 100644 --- a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php +++ b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php @@ -234,7 +234,7 @@ public function testMenuAdministration(): void { /** * Adds a custom menu using CRUD functions. */ - public function addCustomMenuCRUD() { + public function addCustomMenuCRUD(): void { // Add a new custom menu. $menu_name = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH); $label = $this->randomMachineName(16); @@ -322,7 +322,7 @@ public function addCustomMenu() { * This deletes the custom menu that is stored in $this->menu and performs * tests on the menu delete user interface. */ - public function deleteCustomMenu() { + public function deleteCustomMenu(): void { $menu_name = $this->menu->id(); $label = $this->menu->label(); @@ -350,7 +350,7 @@ public function deleteCustomMenu() { /** * Tests menu functionality. */ - public function doMenuTests() { + public function doMenuTests(): void { // Add a link to the tools menu first, to test cacheability metadata of the // destination query string. $this->drupalGet('admin/structure/menu/manage/tools'); @@ -634,7 +634,7 @@ public function testLogoutLinkVisibility(): void { /** * Ensures that the proper default values are set when adding a menu link. */ - protected function doMenuLinkFormDefaultsTest() { + protected function doMenuLinkFormDefaultsTest(): void { $this->drupalGet("admin/structure/menu/manage/tools/add"); $this->assertSession()->statusCodeEquals(200); @@ -789,7 +789,7 @@ public function addMenuLink($parent = '', $path = '/', $menu_name = 'tools', $ex /** * Attempts to add menu link with invalid path or no access permission. */ - public function addInvalidMenuLink() { + public function addInvalidMenuLink(): void { foreach (['access' => '/admin/people/permissions'] as $type => $link_path) { $edit = [ 'link[0][uri]' => $link_path, @@ -804,7 +804,7 @@ public function addInvalidMenuLink() { /** * Tests that parent options are limited by depth when adding menu links. */ - public function checkInvalidParentMenuLinks() { + public function checkInvalidParentMenuLinks(): void { $last_link = NULL; $plugin_ids = []; @@ -866,7 +866,7 @@ public function checkInvalidParentMenuLinks() { * @param object $parent_node * Parent menu link content node. */ - public function verifyMenuLink(MenuLinkContent $item, $item_node, ?MenuLinkContent $parent = NULL, $parent_node = NULL) { + public function verifyMenuLink(MenuLinkContent $item, $item_node, ?MenuLinkContent $parent = NULL, $parent_node = NULL): void { // View home page. $this->drupalGet(''); $this->assertSession()->statusCodeEquals(200); @@ -903,7 +903,7 @@ public function verifyMenuLink(MenuLinkContent $item, $item_node, ?MenuLinkConte * @param string $menu_name * The menu the menu link will be moved to. */ - public function moveMenuLink(MenuLinkContent $item, $parent, $menu_name) { + public function moveMenuLink(MenuLinkContent $item, $parent, $menu_name): void { $menu_link_id = $item->id(); $edit = [ @@ -920,7 +920,7 @@ public function moveMenuLink(MenuLinkContent $item, $parent, $menu_name) { * @param \Drupal\menu_link_content\Entity\MenuLinkContent $item * Menu link entity. */ - public function modifyMenuLink(MenuLinkContent $item) { + public function modifyMenuLink(MenuLinkContent $item): void { $item->title->value = $this->randomMachineName(16); $menu_link_id = $item->id(); @@ -965,7 +965,7 @@ public function verifyAddChildLink(MenuLinkContent $item): void { * @param int $old_weight * Original title for menu link. */ - public function resetMenuLink(MenuLinkInterface $menu_link, $old_weight) { + public function resetMenuLink(MenuLinkInterface $menu_link, $old_weight): void { // Reset menu link. $this->drupalGet("admin/structure/menu/link/{$menu_link->getPluginId()}/reset"); $this->submitForm([], 'Reset'); @@ -983,7 +983,7 @@ public function resetMenuLink(MenuLinkInterface $menu_link, $old_weight) { * @param \Drupal\menu_link_content\Entity\MenuLinkContent $item * Menu link. */ - public function deleteMenuLink(MenuLinkContent $item) { + public function deleteMenuLink(MenuLinkContent $item): void { $menu_link_id = $item->id(); $title = $item->getTitle(); @@ -1004,7 +1004,7 @@ public function deleteMenuLink(MenuLinkContent $item) { * @param \Drupal\menu_link_content\Entity\MenuLinkContent $item * Menu link. */ - public function toggleMenuLink(MenuLinkContent $item) { + public function toggleMenuLink(MenuLinkContent $item): void { $this->disableMenuLink($item); // Verify menu link is absent. @@ -1023,7 +1023,7 @@ public function toggleMenuLink(MenuLinkContent $item) { * @param \Drupal\menu_link_content\Entity\MenuLinkContent $item * Menu link. */ - public function disableMenuLink(MenuLinkContent $item) { + public function disableMenuLink(MenuLinkContent $item): void { $menu_link_id = $item->id(); $edit['enabled[value]'] = FALSE; $this->drupalGet("admin/structure/menu/item/{$menu_link_id}/edit"); @@ -1040,7 +1040,7 @@ public function disableMenuLink(MenuLinkContent $item) { * @param \Drupal\menu_link_content\Entity\MenuLinkContent $item * Menu link. */ - public function enableMenuLink(MenuLinkContent $item) { + public function enableMenuLink(MenuLinkContent $item): void { $menu_link_id = $item->id(); $edit['enabled[value]'] = TRUE; $this->drupalGet("admin/structure/menu/item/{$menu_link_id}/edit"); @@ -1130,7 +1130,7 @@ private function getStandardMenuLink() { * @param int $response * (optional) The expected HTTP response code. Defaults to 200. */ - private function verifyAccess($response = 200) { + private function verifyAccess($response = 200): void { // View menu help page. $this->drupalGet('admin/help/menu'); $this->assertSession()->statusCodeEquals($response); @@ -1171,7 +1171,7 @@ private function verifyAccess($response = 200) { /** * Tests menu block settings. */ - protected function doTestMenuBlock() { + protected function doTestMenuBlock(): void { $menu_id = $this->menu->id(); $block_id = $this->blockPlacements[$menu_id]; $this->drupalGet('admin/structure/block/manage/' . $block_id); diff --git a/core/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php b/core/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php index f1586612eeed23cf705cb37292eed551ecbf5b49..f87a2639b877248c6616d7daeb8204e1ae1dfc6f 100644 --- a/core/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php +++ b/core/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php @@ -9,6 +9,7 @@ use Drupal\block\Entity\Block; use Drupal\system\MenuInterface; use Drupal\Tests\user\Traits\UserCreationTrait; +use Drupal\menu_ui\Hook\MenuUiHooks; /** * Tests SystemMenuBlock. @@ -70,17 +71,18 @@ public function testOperationLinks(): void { ]); // Test when user does have "administer menu" permission. + $menuUiEntityOperation = new MenuUiHooks(); $this->assertEquals([ 'menu-edit' => [ 'title' => 'Edit menu', 'url' => $this->menu->toUrl('edit-form'), 'weight' => 50, ], - ], menu_ui_entity_operation($block)); + ], $menuUiEntityOperation->entityOperation($block)); $this->setUpCurrentUser(); // Test when user doesn't have "administer menu" permission. - $this->assertEmpty(menu_ui_entity_operation($block)); + $this->assertEmpty($menuUiEntityOperation->entityOperation($block)); } } diff --git a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php index f999699a03198df5b207bcdf74d0d22839d1c309..002906f1ce9635ebf087c71427294c07aa40469a 100644 --- a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php +++ b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php @@ -13,6 +13,9 @@ */ class MigrateMenuSettingsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['menu_ui']; /** diff --git a/core/modules/migrate/migrate.install b/core/modules/migrate/migrate.install index 8df7dd47ea6fcdb5a26b3599352731d4caa9f0a7..81872f497c59f9b985e51ec4b35a3e330c0c0bb0 100644 --- a/core/modules/migrate/migrate.install +++ b/core/modules/migrate/migrate.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function migrate_update_last_removed() { +function migrate_update_last_removed(): int { return 10100; } diff --git a/core/modules/migrate/migrate.module b/core/modules/migrate/migrate.module deleted file mode 100644 index 3aa82dce8c3e939deec016b6a7f09b5121f6ff44..0000000000000000000000000000000000000000 --- a/core/modules/migrate/migrate.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Provides the Migrate API. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function migrate_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.migrate': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>'; - $output .= t('The Migrate module provides a framework for migrating data, usually from an external source into your site. It does not provide a user interface. For more information, see the <a href=":migrate">online documentation for the Migrate module</a>.', [':migrate' => 'https://www.drupal.org/documentation/modules/migrate']); - $output .= '</p>'; - return $output; - } -} diff --git a/core/modules/migrate/migrate.post_update.php b/core/modules/migrate/migrate.post_update.php index fb76b5b377c8b1af51219ae5b925c2f88826c0f8..821701c1aa53abb35dfeaa4691d0afefad431160 100644 --- a/core/modules/migrate/migrate.post_update.php +++ b/core/modules/migrate/migrate.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function migrate_removed_post_updates() { +function migrate_removed_post_updates(): array { return [ 'migrate_post_update_clear_migrate_source_count_cache' => '10.0.0', ]; diff --git a/core/modules/migrate/src/Hook/MigrateHooks.php b/core/modules/migrate/src/Hook/MigrateHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d1db2505a85abc617134298966a36f8ec320d4e3 --- /dev/null +++ b/core/modules/migrate/src/Hook/MigrateHooks.php @@ -0,0 +1,28 @@ +<?php + +namespace Drupal\migrate\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for migrate. + */ +class MigrateHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.migrate': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>'; + $output .= t('The Migrate module provides a framework for migrating data, usually from an external source into your site. It does not provide a user interface. For more information, see the <a href=":migrate">online documentation for the Migrate module</a>.', [':migrate' => 'https://www.drupal.org/documentation/modules/migrate']); + $output .= '</p>'; + return $output; + } + } + +} diff --git a/core/modules/migrate/src/Plugin/Migration.php b/core/modules/migrate/src/Plugin/Migration.php index a03ce579e3d82e55b65cf28ebf519c62eb15610a..8f4deb920eba2e803d0820bc18529838b2c17bdd 100644 --- a/core/modules/migrate/src/Plugin/Migration.php +++ b/core/modules/migrate/src/Plugin/Migration.php @@ -206,7 +206,7 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $migration_tags = []; /** @@ -241,7 +241,7 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $migration_dependencies = []; /** diff --git a/core/modules/migrate/src/Plugin/MigrationInterface.php b/core/modules/migrate/src/Plugin/MigrationInterface.php index 488cc9f02b2d20cdc9591d388545ea342bfaeb5d..cc6bb0c15b75c8c19ee124555ef10a89d92d8176 100644 --- a/core/modules/migrate/src/Plugin/MigrationInterface.php +++ b/core/modules/migrate/src/Plugin/MigrationInterface.php @@ -89,7 +89,7 @@ interface MigrationInterface extends PluginInspectionInterface, DerivativeInspec * An alias for getPluginId() for backwards compatibility reasons. * * @return string - * The plugin_id of the plugin instance. + * The plugin ID of the plugin instance. * * @see \Drupal\migrate\Plugin\MigrationInterface::getPluginId() */ diff --git a/core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php b/core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php index da285b9dfd67a07075972fc6ebc7d94f888f2d8c..e14ca62f27ce99b3b2045136ecbf32644c1138ce 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php @@ -35,7 +35,7 @@ abstract class ComponentEntityDisplayBase extends DestinationBase implements Con * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Config.php b/core/modules/migrate/src/Plugin/migrate/destination/Config.php index e2648685bd65cf40a8273cff51f863be1e1b7369..c77de935a521ecb8d7ba8c25bfd4a3fcc503d9df 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Config.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Config.php @@ -84,7 +84,7 @@ class Config extends DestinationBase implements ContainerFactoryPluginInterface, * * @var \Drupal\Core\Language\LanguageManagerInterface */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $language_manager; /** diff --git a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php index 5712613e218bdd8353ff336deed264ce12ddc22e..e3be436e811f5947be75fd3651c07f6e3d4f02c8 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php @@ -55,7 +55,7 @@ abstract class DestinationBase extends PluginBase implements MigrateDestinationI * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php index 28f26ff35aa30f3174a90a308fe152f064a6d0e6..b41fe489ce365a35739f1edc946082ba15032e45 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php @@ -94,7 +94,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php index 85b274e862ba64d493e8fb2a80f964c71ac105bd..0dc0b7e8d5aa97a5f9f1a9cbb45cd43a26ce8611 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php @@ -84,7 +84,7 @@ class EntityConfigBase extends Entity { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php b/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php index 0bddcd07e73064e3e4611afac5c24f553a36cb7b..5716790cd7dd15e463238f4278d18ccd25ac5106 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php +++ b/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php @@ -92,7 +92,7 @@ class MenuLinkParent extends ProcessPluginBase implements ContainerFactoryPlugin * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\MigrateLookupInterface $migrate_lookup diff --git a/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php b/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php index 5c4554caede01dc6945a64f6a8c7463ea0cd709c..ca53b6d32861b9bbfaf57d1d3e71915ef5f9d940 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php +++ b/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php @@ -152,7 +152,7 @@ class MigrationLookup extends ProcessPluginBase implements ContainerFactoryPlugi * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/migrate/src/Plugin/migrate/process/SubProcess.php b/core/modules/migrate/src/Plugin/migrate/process/SubProcess.php index ee58a51879a01e10aeb7dc268d3a8cc10cd73686..c691b2da57ca126092af983a3a103cd208bc8e0e 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/SubProcess.php +++ b/core/modules/migrate/src/Plugin/migrate/process/SubProcess.php @@ -180,7 +180,7 @@ class SubProcess extends ProcessPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/modules/migrate/tests/modules/migrate_entity_test/src/Entity/StringIdEntityTest.php b/core/modules/migrate/tests/modules/migrate_entity_test/src/Entity/StringIdEntityTest.php index 8523c8ea4da940dd310c5db10433f83011583f56..3fd96f44bccf5302d31657b567e26ea454419cd0 100644 --- a/core/modules/migrate/tests/modules/migrate_entity_test/src/Entity/StringIdEntityTest.php +++ b/core/modules/migrate/tests/modules/migrate_entity_test/src/Entity/StringIdEntityTest.php @@ -4,22 +4,23 @@ namespace Drupal\migrate_entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; /** * Defines a content entity type that has a string ID. - * - * @ContentEntityType( - * id = "migrate_string_id_entity_test", - * label = @Translation("String id entity test"), - * base_table = "migrate_entity_test_string_id", - * entity_keys = { - * "id" = "id", - * } - * ) */ +#[ContentEntityType( + id: 'migrate_string_id_entity_test', + label: new TranslatableMarkup('String id entity test'), + entity_keys: [ + 'id' => 'id', + ], + base_table: 'migrate_entity_test_string_id', +)] class StringIdEntityTest extends ContentEntityBase { /** diff --git a/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module b/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module deleted file mode 100644 index 6c1bbe49752d7cda18aa157e111c0deabc9254c1..0000000000000000000000000000000000000000 --- a/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @file - * Tests the migration source plugin prepareRow() exception handling. - */ - -declare(strict_types=1); - -use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\migrate\MigrateSkipRowException; -use Drupal\migrate\Plugin\MigrateSourceInterface; -use Drupal\migrate\Row; - -/** - * Implements hook_migrate_prepare_row(). - */ -function migrate_prepare_row_test_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) { - // Test both options for save_to_map. - $data = $row->getSourceProperty('data'); - if ($data == 'skip_and_record') { - // Record mapping but don't record a message. - throw new MigrateSkipRowException('', TRUE); - } - elseif ($data == 'skip_and_do_not_record') { - // Don't record mapping but record a message. - throw new MigrateSkipRowException('skip_and_do_not_record message', FALSE); - } -} diff --git a/core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Hook/MigratePrepareRowTestHooks.php b/core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Hook/MigratePrepareRowTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5e8838e89f507e0ca2685c4b75457f4df72671f7 --- /dev/null +++ b/core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Hook/MigratePrepareRowTestHooks.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\migrate_prepare_row_test\Hook; + +use Drupal\migrate\MigrateSkipRowException; +use Drupal\migrate\Plugin\MigrationInterface; +use Drupal\migrate\Plugin\MigrateSourceInterface; +use Drupal\migrate\Row; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for migrate_prepare_row_test. + */ +class MigratePrepareRowTestHooks { + + /** + * Implements hook_migrate_prepare_row(). + */ + #[Hook('migrate_prepare_row')] + public function migratePrepareRow(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) { + // Test both options for save_to_map. + $data = $row->getSourceProperty('data'); + if ($data == 'skip_and_record') { + // Record mapping but don't record a message. + throw new MigrateSkipRowException('', TRUE); + } + elseif ($data == 'skip_and_do_not_record') { + // Don't record mapping but record a message. + throw new MigrateSkipRowException('skip_and_do_not_record message', FALSE); + } + } + +} diff --git a/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module b/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module deleted file mode 100644 index ec33718e95ea424dc8e1f9ebb38c69d3a62cd5a6..0000000000000000000000000000000000000000 --- a/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Tests the migration source plugin prepareRow() exception. - */ - -declare(strict_types=1); - -use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\migrate\MigrateSkipRowException; -use Drupal\migrate\Plugin\MigrateSourceInterface; -use Drupal\migrate\Row; - -/** - * Implements hook_migrate_prepare_row(). - */ -function migrate_skip_all_rows_test_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) { - if (\Drupal::state()->get('migrate_skip_all_rows_test_migrate_prepare_row')) { - throw new MigrateSkipRowException(); - } -} diff --git a/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/src/Hook/MigrateSkipAllRowsTestHooks.php b/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/src/Hook/MigrateSkipAllRowsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c20100048d3b1607d2c6a90558665b97493fe158 --- /dev/null +++ b/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/src/Hook/MigrateSkipAllRowsTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\migrate_skip_all_rows_test\Hook; + +use Drupal\migrate\MigrateSkipRowException; +use Drupal\migrate\Plugin\MigrationInterface; +use Drupal\migrate\Plugin\MigrateSourceInterface; +use Drupal\migrate\Row; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for migrate_skip_all_rows_test. + */ +class MigrateSkipAllRowsTestHooks { + + /** + * Implements hook_migrate_prepare_row(). + */ + #[Hook('migrate_prepare_row')] + public function migratePrepareRow(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) { + if (\Drupal::state()->get('migrate_skip_all_rows_test_migrate_prepare_row')) { + throw new MigrateSkipRowException(); + } + } + +} diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php index 2c27c9a56972411071643f4a6ae689db2a1cb829..a21bca9c8682529bd69f96f5e298e02e06239c04 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php @@ -90,7 +90,7 @@ protected function assertTranslations(int $id, string $default, array $others = * @param array $configuration * The plugin configuration. */ - protected function createDestination(array $configuration) { + protected function createDestination(array $configuration): void { $this->destination = new EntityContentBase( $configuration, 'fake_plugin_id', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php index 719f9bf8d1d121d8bb1023cc8f6260769d0e3d40..bd2db2b8a2044703985bc6b2984de4fbea55e551 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php @@ -253,7 +253,7 @@ public function testEntityOwnerValidation(): void { * @param \Drupal\migrate\Event\MigrateIdMapMessageEvent $event * The migration event. */ - public function mapMessageRecorder(MigrateIdMapMessageEvent $event) { + public function mapMessageRecorder(MigrateIdMapMessageEvent $event): void { $this->messages[] = implode(',', $event->getSourceIdValues()) . ': ' . $event->getMessage(); } @@ -266,7 +266,7 @@ public function mapMessageRecorder(MigrateIdMapMessageEvent $event) { * @throws \Exception * @throws \Drupal\migrate\MigrateException */ - protected function runImport(array $definition) { + protected function runImport(array $definition): void { // Reset the list of messages from a previous migration. $this->messages = []; diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php index 973fb51b470207d70b324ce377d44f6e62bcbd80..754c27dc7283fca156d0485788388afe1fb2fb70 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php @@ -127,7 +127,7 @@ public function testMigrateEvents(): void { * @param string $name * The event name. */ - public function mapSaveEventRecorder(MigrateMapSaveEvent $event, $name) { + public function mapSaveEventRecorder(MigrateMapSaveEvent $event, $name): void { $this->state->set('migrate_events_test.map_save_event', [ 'event_name' => $name, 'map' => $event->getMap(), @@ -143,7 +143,7 @@ public function mapSaveEventRecorder(MigrateMapSaveEvent $event, $name) { * @param string $name * The event name. */ - public function mapDeleteEventRecorder(MigrateMapDeleteEvent $event, $name) { + public function mapDeleteEventRecorder(MigrateMapDeleteEvent $event, $name): void { $this->state->set('migrate_events_test.map_delete_event', [ 'event_name' => $name, 'map' => $event->getMap(), @@ -159,7 +159,7 @@ public function mapDeleteEventRecorder(MigrateMapDeleteEvent $event, $name) { * @param string $name * The event name. */ - public function preImportEventRecorder(MigrateImportEvent $event, $name) { + public function preImportEventRecorder(MigrateImportEvent $event, $name): void { $this->state->set('migrate_events_test.pre_import_event', [ 'event_name' => $name, 'migration' => $event->getMigration(), @@ -174,7 +174,7 @@ public function preImportEventRecorder(MigrateImportEvent $event, $name) { * @param string $name * The event name. */ - public function postImportEventRecorder(MigrateImportEvent $event, $name) { + public function postImportEventRecorder(MigrateImportEvent $event, $name): void { $this->state->set('migrate_events_test.post_import_event', [ 'event_name' => $name, 'migration' => $event->getMigration(), @@ -189,7 +189,7 @@ public function postImportEventRecorder(MigrateImportEvent $event, $name) { * @param string $name * The event name. */ - public function preRowSaveEventRecorder(MigratePreRowSaveEvent $event, $name) { + public function preRowSaveEventRecorder(MigratePreRowSaveEvent $event, $name): void { $this->state->set('migrate_events_test.pre_row_save_event', [ 'event_name' => $name, 'migration' => $event->getMigration(), @@ -205,7 +205,7 @@ public function preRowSaveEventRecorder(MigratePreRowSaveEvent $event, $name) { * @param string $name * The event name. */ - public function postRowSaveEventRecorder(MigratePostRowSaveEvent $event, $name) { + public function postRowSaveEventRecorder(MigratePostRowSaveEvent $event, $name): void { $this->state->set('migrate_events_test.post_row_save_event', [ 'event_name' => $name, 'migration' => $event->getMigration(), diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php index c42db1e980917bc38e48b629e7f606d7417391df..bd7f1ae688a7fc64e292b13ac6e4ee0bc9d8bdcc 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php @@ -13,6 +13,9 @@ */ class MigrateExecutableTest extends MigrateTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'entity_test', 'user', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php index 46900d12a1738d46a84aed3385f417109441e7b9..91eee48c891f9311a352a9688ebbbe0cab918ac9 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php @@ -74,7 +74,7 @@ public function testMigrateEvents(): void { * @param string $name * The event name. */ - public function postRowSaveEventRecorder(MigratePostRowSaveEvent $event, $name) { + public function postRowSaveEventRecorder(MigratePostRowSaveEvent $event, $name): void { $event->getMigration()->interruptMigration(MigrationInterface::RESULT_INCOMPLETE); } diff --git a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php index 71abac1327a81b025268d2b44ef5be1ea3edc60a..48e6f06a917ee576bb4063cc74120b518177e500 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php @@ -132,7 +132,7 @@ public function testGetMessages(): void { * @param string $name * The event name. */ - public function mapMessageRecorder(MigrateIdMapMessageEvent $event, $name) { + public function mapMessageRecorder(MigrateIdMapMessageEvent $event, $name): void { if ($event->getLevel() == MigrationInterface::MESSAGE_NOTICE || $event->getLevel() == MigrationInterface::MESSAGE_INFORMATIONAL) { $type = 'status'; @@ -147,7 +147,7 @@ public function mapMessageRecorder(MigrateIdMapMessageEvent $event, $name) { /** * {@inheritdoc} */ - public function display($message, $type = 'status') { + public function display($message, $type = 'status'): void { $this->messages[] = $message; } diff --git a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php index 53717f98be2fc4fc74a0b26046574f457e2a3797..a9049f59ec9bf624fa13eda7893f6790ff550905 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php @@ -148,7 +148,7 @@ public function testSubProcessErrorMessage(): void { /** * Prepares and sets the prophesized plugin managers. */ - protected function setPluginManagers() { + protected function setPluginManagers(): void { $error_plugin_prophecy = $this->prophesize(MigrateProcessInterface::class); $error_plugin_prophecy->getPluginDefinition()->willReturn(['plugin_id' => 'test_error']); $error_plugin_prophecy->getPluginId()->willReturn('test_error'); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php index e3546cc2690acab2ae025027872424278ce91e03..e3bc8fe28989632d91b5cacc6a8a8c8eca50590d 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php @@ -60,6 +60,9 @@ abstract class MigrateTestBase extends KernelTestBase implements MigrateMessageI */ protected $logger; + /** + * {@inheritdoc} + */ protected static $modules = ['migrate']; /** @@ -248,7 +251,7 @@ protected function mockFailure($migration, array $row, $status = MigrateIdMapInt /** * Gets the migration plugin. * - * @param $plugin_id + * @param string $plugin_id * The plugin ID of the migration to get. * * @return \Drupal\migrate\Plugin\Migration diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php index 151931e8f3efc735a8d4a913631f05375fab471b..0f38812cccfd5213d686802664b6be823aec2110 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php @@ -49,7 +49,7 @@ public function testProvidersExist(): void { /** * Enable all available modules. */ - protected function enableAllModules() { + protected function enableAllModules(): void { // Install all available modules. $module_handler = $this->container->get('module_handler'); $modules = $this->coreModuleListDataProvider(); diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php index 436c181c00d2c43ac7d7bfc824bd6ecdf104c042..55e930b2cd1208c884a6b9325ba5ce244db5bd86 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php @@ -35,7 +35,7 @@ protected function setUp(): void { } /** - * Tests that counts for the same plugin_id are not crossed. + * Tests that counts for the same plugin ID are not crossed. */ public function testCacheCountsNotContaminated(): void { $migration_1_definition = [ diff --git a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php index 24cf0e760f3d93b2dea2c33a849c6f7515196684..ad1b0f0eeb9be3ab934f306fb7afad2aaca30d5b 100644 --- a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php +++ b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php @@ -240,7 +240,7 @@ public function getDatabase() { * @param array $config * The config array. */ - public function setConfiguration($config) { + public function setConfiguration($config): void { $this->configuration = $config; } @@ -271,7 +271,7 @@ public function query() { * @param \Drupal\Core\Database\Query\SelectInterface $query * The query to execute. */ - public function setQuery(SelectInterface $query) { + public function setQuery(SelectInterface $query): void { $this->query = $query; } diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php index 57e1622fadb07f551b0f8c63c75c7a11df68b78d..d3aaaaf3e1c2419acce83aecf1502ef23be42649 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php @@ -77,7 +77,7 @@ protected function setUp(): void { * @param int|null $memory_limit * (optional) The memory limit. Defaults to NULL. */ - protected function runMemoryExceededTest($message, $memory_exceeded, $memory_usage_first = NULL, $memory_usage_second = NULL, $memory_limit = NULL) { + protected function runMemoryExceededTest($message, $memory_exceeded, $memory_usage_first = NULL, $memory_usage_second = NULL, $memory_limit = NULL): void { $this->executable->setMemoryLimit($memory_limit ?: $this->memoryLimit); $this->executable->setMemoryUsage($memory_usage_first ?: $this->memoryLimit, $memory_usage_second ?: $this->memoryLimit); $this->executable->setMemoryThreshold(0.85); diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index 8325f96bb6e5ee6f7986c93b7666988fd9c6140f..b924f4325347c848be6460b963f44ae05cb069d0 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -109,10 +109,6 @@ public function testImportWithFailingRewind(): void { public function testImportWithValidRow(): void { $source = $this->getMockSource(); - $row = $this->getMockBuilder('Drupal\migrate\Row') - ->disableOriginalConstructor() - ->getMock(); - $this->executable->setSource($source); $this->migration->expects($this->once()) @@ -134,10 +130,6 @@ public function testImportWithValidRow(): void { public function testImportWithValidRowWithoutDestinationId(): void { $source = $this->getMockSource(); - $row = $this->getMockBuilder('Drupal\migrate\Row') - ->disableOriginalConstructor() - ->getMock(); - $this->executable->setSource($source); $this->migration->expects($this->once()) @@ -162,10 +154,6 @@ public function testImportWithValidRowWithoutDestinationId(): void { public function testImportWithValidRowNoDestinationValues(): void { $source = $this->getMockSource(); - $row = $this->getMockBuilder('Drupal\migrate\Row') - ->disableOriginalConstructor() - ->getMock(); - $this->executable->setSource($source); $this->migration->expects($this->once()) @@ -187,13 +175,8 @@ public function testImportWithValidRowNoDestinationValues(): void { * The MigrationException in this case is being thrown from the destination. */ public function testImportWithValidRowWithDestinationMigrateException(): void { - $exception_message = $this->getRandomGenerator()->string(); $source = $this->getMockSource(); - $row = $this->getMockBuilder('Drupal\migrate\Row') - ->disableOriginalConstructor() - ->getMock(); - $this->executable->setSource($source); $this->migration->expects($this->once()) @@ -261,13 +244,8 @@ public function testImportWithValidRowWithProcesMigrateException(): void { * Tests the import method with a regular Exception being thrown. */ public function testImportWithValidRowWithException(): void { - $exception_message = $this->getRandomGenerator()->string(); $source = $this->getMockSource(); - $row = $this->getMockBuilder('Drupal\migrate\Row') - ->disableOriginalConstructor() - ->getMock(); - $this->executable->setSource($source); $this->migration->expects($this->once()) diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php index ded0535364e6ffd3d51865b492469a83fcc30dd5..c41fd6f7bb4490c2a05e314c0656d1355a9e481e 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php @@ -166,7 +166,7 @@ public function testEnsureTablesExist(): void { * ensureTables() which in turn calls this object and the expectations on * it are the actual test and there are no additional asserts added. */ - protected function runEnsureTablesTest($schema) { + protected function runEnsureTablesTest($schema): void { $database = $this->getMockBuilder('Drupal\Core\Database\Connection') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php index 7b326fe9125dd4860a17dad3facab6f5058b90c3..e8fc47637ea71ee9202e8afe7224a259abb77402 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php @@ -70,7 +70,7 @@ protected function setUp(): void { * @param array $map * The row to save. */ - protected function saveMap(array $map) { + protected function saveMap(array $map): void { $table = 'migrate_map_sql_idmap_test'; $schema = $this->database->schema(); diff --git a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php index fae8849d8c7986840f5b64a4389bb353d3967861..d9ec7dd0e5e237aced1dadb1f1b67c52d58962b3 100644 --- a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php @@ -236,7 +236,7 @@ public function getMigrationDependencies() { /** * {@inheritdoc} */ - public function set($prop, $value) { + public function set($prop, $value): void { $this->set[] = func_get_args(); } diff --git a/core/modules/migrate/tests/src/Unit/MigrationTest.php b/core/modules/migrate/tests/src/Unit/MigrationTest.php index 700986fe87dc4d2132b1aae7a86d430e4690f5b6..f99f85afa052cf9b9ac19c744a7538fd5d5cf7c9 100644 --- a/core/modules/migrate/tests/src/Unit/MigrationTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrationTest.php @@ -267,9 +267,9 @@ public function __construct() { * Sets the migration ID (machine name). * * @param string $plugin_id - * The plugin_id of the plugin instance. + * The plugin ID of the plugin instance. */ - public function setPluginId($plugin_id) { + public function setPluginId($plugin_id): void { $this->pluginId = $plugin_id; } @@ -279,7 +279,7 @@ public function setPluginId($plugin_id) { * @param array $requirements * The array of requirement values. */ - public function setRequirements(array $requirements) { + public function setRequirements(array $requirements): void { $this->requirements = $requirements; } @@ -289,7 +289,7 @@ public function setRequirements(array $requirements) { * @param \Drupal\migrate\Plugin\MigrateSourceInterface $source_plugin * The source Plugin. */ - public function setSourcePlugin(MigrateSourceInterface $source_plugin) { + public function setSourcePlugin(MigrateSourceInterface $source_plugin): void { $this->sourcePlugin = $source_plugin; } @@ -299,7 +299,7 @@ public function setSourcePlugin(MigrateSourceInterface $source_plugin) { * @param \Drupal\migrate\Plugin\MigrateDestinationInterface $destination_plugin * The destination Plugin. */ - public function setDestinationPlugin(MigrateDestinationInterface $destination_plugin) { + public function setDestinationPlugin(MigrateDestinationInterface $destination_plugin): void { $this->destinationPlugin = $destination_plugin; } @@ -309,7 +309,7 @@ public function setDestinationPlugin(MigrateDestinationInterface $destination_pl * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager * The plugin manager service. */ - public function setMigrationPluginManager(MigrationPluginManagerInterface $plugin_manager) { + public function setMigrationPluginManager(MigrationPluginManagerInterface $plugin_manager): void { $this->migrationPluginManager = $plugin_manager; } diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php index 8d98c309b682d4be4241cf77d74d3c1b2b5e1992..bb1368a1344fef45f9da1dfb0328c17c9af17028 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php @@ -113,7 +113,7 @@ class EntityTestDestination extends EntityContentBase { private $entity = NULL; - public function setEntity($entity) { + public function setEntity($entity): void { $this->entity = $entity; } diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php index 3b721eb6f67f0ff0b668b8d19b5243280765d473..7216dd895fd9d46b141715af05ea51496fce0cf9 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php @@ -102,7 +102,7 @@ class EntityRevisionTestDestination extends EntityRevision { private $entity = NULL; - public function setEntity($entity) { + public function setEntity($entity): void { $this->entity = $entity; } diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php index 814566e985438ca0ff537c1fcfc98a7686079b29..22f9e63efebf70bbb1c1bc57c81c97605f0b7198 100644 --- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php @@ -169,7 +169,7 @@ public function __construct() {} * @param mixed $database * The database mock object. */ - public function setDatabase($database) { + public function setDatabase($database): void { $this->database = $database; } @@ -186,7 +186,7 @@ public function getDatabase() { * @param mixed $migration * The migration mock. */ - public function setMigration($migration) { + public function setMigration($migration): void { $this->migration = $migration; } @@ -210,7 +210,7 @@ public function getIds() { * @param array $ids * An array of identifiers. */ - public function setIds($ids) { + public function setIds($ids): void { $this->ids = $ids; } diff --git a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php index a2fc0bc4b85529231b911973ae9b46a0667accef..9dc36ebc10b01c0078429afe5bc5a79aab2d461d 100644 --- a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php +++ b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php @@ -5,14 +5,19 @@ namespace Drupal\Tests\migrate\Unit\destination; use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\EntityFieldManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\RevisionableInterface; +use Drupal\Core\Entity\RevisionableStorageInterface; +use Drupal\Core\Field\FieldTypePluginManagerInterface; use Drupal\Core\Session\AccountSwitcherInterface; -use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\migrate\destination\EntityRevision as RealEntityRevision; +use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\Tests\UnitTestCase; use Prophecy\Argument; +use Prophecy\Prophecy\ObjectProphecy; /** * Tests entity revision destination. @@ -25,29 +30,27 @@ class EntityRevisionTest extends UnitTestCase { /** * @var \Drupal\migrate\Plugin\MigrationInterface */ - protected $migration; + protected MigrationInterface $migration; /** - * @var \Drupal\Core\Entity\RevisionableStorageInterface + * @var \Prophecy\Prophecy\ObjectProphecy */ - protected $storage; + protected ObjectProphecy $storage; /** * @var \Drupal\Core\Entity\EntityFieldManagerInterface */ - protected $entityFieldManager; + protected EntityFieldManagerInterface $entityFieldManager; /** * @var \Drupal\Core\Field\FieldTypePluginManagerInterface */ - protected $fieldTypeManager; + protected FieldTypePluginManagerInterface $fieldTypeManager; /** - * A mock account switcher. - * - * @var \Prophecy\Prophecy\ObjectProphecy|\Drupal\Core\Session\AccountSwitcherInterface + * @var \Drupal\Core\Session\AccountSwitcherInterface */ - protected $accountSwitcher; + protected AccountSwitcherInterface $accountSwitcher; /** * {@inheritdoc} @@ -56,17 +59,19 @@ protected function setUp(): void { parent::setUp(); // Setup mocks to be used when creating a revision destination. - $this->migration = $this->prophesize(MigrationInterface::class); - $this->storage = $this->prophesize('\Drupal\Core\Entity\RevisionableStorageInterface'); + $this->migration = $this->prophesize(MigrationInterface::class)->reveal(); + $this->storage = $this->prophesize(RevisionableStorageInterface::class); $entity_type = $this->prophesize(EntityTypeInterface::class); $entity_type->getSingularLabel()->willReturn('crazy'); $entity_type->getPluralLabel()->willReturn('craziness'); + $entity_type->getKey('id')->willReturn('nid'); + $entity_type->getKey('revision')->willReturn('vid'); $this->storage->getEntityType()->willReturn($entity_type->reveal()); - $this->entityFieldManager = $this->prophesize('\Drupal\Core\Entity\EntityFieldManagerInterface'); - $this->fieldTypeManager = $this->prophesize('\Drupal\Core\Field\FieldTypePluginManagerInterface'); - $this->accountSwitcher = $this->prophesize(AccountSwitcherInterface::class); + $this->entityFieldManager = $this->prophesize(EntityFieldManagerInterface::class)->reveal(); + $this->fieldTypeManager = $this->prophesize(FieldTypePluginManagerInterface::class)->reveal(); + $this->accountSwitcher = $this->prophesize(AccountSwitcherInterface::class)->reveal(); } /** @@ -77,7 +82,7 @@ protected function setUp(): void { public function testGetEntityDestinationValues(): void { $destination = $this->getEntityRevisionDestination([]); // Return a dummy because we don't care what gets called. - $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface'); + $entity = $this->prophesize(RevisionableInterface::class); // Assert that the first ID from the destination values is used to load the // entity. $this->storage->loadRevision(12) @@ -94,12 +99,7 @@ public function testGetEntityDestinationValues(): void { */ public function testGetEntityUpdateRevision(): void { $destination = $this->getEntityRevisionDestination([]); - $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface'); - - $entity_type = $this->prophesize('\Drupal\Core\Entity\EntityTypeInterface'); - $entity_type->getKey('id')->willReturn('nid'); - $entity_type->getKey('revision')->willReturn('vid'); - $this->storage->getEntityType()->willReturn($entity_type->reveal()); + $entity = $this->prophesize(RevisionableInterface::class); // Assert we load the correct revision. $this->storage->loadRevision(2) @@ -121,12 +121,7 @@ public function testGetEntityUpdateRevision(): void { */ public function testGetEntityNewRevision(): void { $destination = $this->getEntityRevisionDestination([]); - $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface'); - - $entity_type = $this->prophesize('\Drupal\Core\Entity\EntityTypeInterface'); - $entity_type->getKey('id')->willReturn('nid'); - $entity_type->getKey('revision')->willReturn('vid'); - $this->storage->getEntityType()->willReturn($entity_type->reveal()); + $entity = $this->prophesize(RevisionableInterface::class); // Enforce is new should be disabled. $entity->enforceIsNew(FALSE)->shouldBeCalled(); @@ -152,11 +147,6 @@ public function testGetEntityNewRevision(): void { public function testGetEntityLoadFailure(): void { $destination = $this->getEntityRevisionDestination([]); - $entity_type = $this->prophesize('\Drupal\Core\Entity\EntityTypeInterface'); - $entity_type->getKey('id')->willReturn('nid'); - $entity_type->getKey('revision')->willReturn('vid'); - $this->storage->getEntityType()->willReturn($entity_type->reveal()); - // Return a failed load and make sure we don't fail and we return FALSE. $this->storage->load(1) ->shouldBeCalled() @@ -173,7 +163,7 @@ public function testGetEntityLoadFailure(): void { * @covers ::save */ public function testSave(): void { - $entity = $this->prophesize('\Drupal\Core\Entity\ContentEntityInterface'); + $entity = $this->prophesize(ContentEntityInterface::class); $entity->save() ->shouldBeCalled(); // Syncing should be set once. @@ -191,7 +181,7 @@ public function testSave(): void { * * @see \Drupal\Tests\migrate\Unit\Destination\EntityRevision * - * @param $configuration + * @param array $configuration * Configuration for the destination. * @param string $plugin_id * The plugin id. @@ -203,12 +193,12 @@ public function testSave(): void { */ protected function getEntityRevisionDestination(array $configuration = [], $plugin_id = 'entity_revision', array $plugin_definition = []) { return new EntityRevision($configuration, $plugin_id, $plugin_definition, - $this->migration->reveal(), + $this->migration, $this->storage->reveal(), [], - $this->entityFieldManager->reveal(), - $this->fieldTypeManager->reveal(), - $this->accountSwitcher->reveal() + $this->entityFieldManager, + $this->fieldTypeManager, + $this->accountSwitcher, ); } diff --git a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php index b4afe33f9e10929097aff74f2ebdcdd0a522488c..d32d4391f9b8635f08b96c1a61d7a574d07bb916 100644 --- a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php @@ -60,7 +60,7 @@ public function __construct() { * @param string $delimiter * The new delimiter. */ - public function setDelimiter($delimiter) { + public function setDelimiter($delimiter): void { $this->configuration['delimiter'] = $delimiter; } diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php index 15e19c6c693b6cf70b2a650047f63523ef3fead5..af83e589145e0e4ece2357c670b253b916445c33 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php @@ -47,7 +47,7 @@ public function testExtractInvalid($value): void { */ public function testExtractFail(): void { $this->expectException(MigrateException::class); - $this->expectExceptionMessage("Array index missing, extraction failed for 'array(\n 'bar' => 'foo',\n)'. Consider adding a `default` key to the configuration."); + $this->expectExceptionMessage("Array index missing, extraction failed for '[\n 'bar' => 'foo',\n]'. Consider adding a `default` key to the configuration."); $this->plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destination_property'); } diff --git a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php index b23b6026b692fece506bba6315eccf202b398a0a..830edec70fc9526042066119136647af12a2aaef 100644 --- a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php @@ -26,10 +26,10 @@ class FileCopyTest extends MigrateProcessTestCase { * * @param array $configuration * The plugin configuration. - * @param $expected + * @param \Drupal\Core\File\FileExists $expected * The expected value of the plugin configuration. */ - public function testFileProcessBaseConstructor($configuration, $expected): void { + public function testFileProcessBaseConstructor(array $configuration, FileExists $expected): void { $this->assertPlugin($configuration, $expected); } diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php index 0f0408aaa50dd6129f0c1fde09cde16cae8adf2c..23d0dfb494d75d83a5df05a07446fdb2b3af0d69 100644 --- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php @@ -83,11 +83,11 @@ public function testMigrateExceptionUnexpectedValue(): void { * * @dataProvider datesDataProvider * - * @param $configuration + * @param array $configuration * The configuration of the migration process plugin. - * @param $value + * @param string $value * The source value for the migration process plugin. - * @param $expected + * @param string $expected * The expected value of the migration process plugin. */ public function testTransform($configuration, $value, $expected): void { diff --git a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php index 831e5474eef8795a3dcc1a6f7770733911fbc7a5..314a1bd6603cb2f476b3f471ad51f7efee815c36 100644 --- a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php @@ -161,7 +161,7 @@ public static function providerTestMakeUniqueEntityField() { * @param int $count * The number of unique values to be set up. */ - protected function entityQueryExpects($count) { + protected function entityQueryExpects($count): void { $this->entityQuery->expects($this->exactly($count + 1)) ->method('condition') ->willReturn($this->entityQuery); diff --git a/core/modules/migrate_drupal/migrate_drupal.install b/core/modules/migrate_drupal/migrate_drupal.install index f5de03a7aca0306ef5468087bef7adc2965a2ed5..2a0a9c2d3942cb084b75d739bddfbbb3637e9f1b 100644 --- a/core/modules/migrate_drupal/migrate_drupal.install +++ b/core/modules/migrate_drupal/migrate_drupal.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function migrate_drupal_update_last_removed() { +function migrate_drupal_update_last_removed(): int { return 8901; } diff --git a/core/modules/migrate_drupal/migrate_drupal.module b/core/modules/migrate_drupal/migrate_drupal.module deleted file mode 100644 index d85af9d97b3d84b74cfada4c1989b53dc645b21c..0000000000000000000000000000000000000000 --- a/core/modules/migrate_drupal/migrate_drupal.module +++ /dev/null @@ -1,141 +0,0 @@ -<?php - -/** - * @file - * Provides migration from other Drupal sites. - */ - -use Drupal\Core\Database\DatabaseExceptionWrapper; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; -use Drupal\migrate\Exception\RequirementsException; -use Drupal\migrate\MigrateExecutable; -use Drupal\migrate\Plugin\RequirementsInterface; -use Drupal\migrate_drupal\NodeMigrateType; - -/** - * Implements hook_help(). - */ -function migrate_drupal_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.migrate_drupal': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Migrate Drupal module provides a framework based on the <a href=":migrate">Migrate module</a> to facilitate migration from a Drupal (6, 7, or 8) site to your website. It does not provide a user interface. For more information, see the <a href=":migrate_drupal">online documentation for the Migrate Drupal module</a>.', [':migrate' => Url::fromRoute('help.page', ['name' => 'migrate'])->toString(), ':migrate_drupal' => 'https://www.drupal.org/documentation/modules/migrate_drupal']) . '</p>'; - return $output; - } -} - -/** - * Implements hook_migration_plugins_alter(). - */ -function migrate_drupal_migration_plugins_alter(array &$definitions) { - $module_handler = \Drupal::service('module_handler'); - $migration_plugin_manager = \Drupal::service('plugin.manager.migration'); - - // This is why the deriver can't do this: the 'd6_taxonomy_vocabulary' - // definition is not available to the deriver as it is running inside - // getDefinitions(). - if (isset($definitions['d6_taxonomy_vocabulary'])) { - $vocabulary_migration_definition = [ - 'source' => [ - 'ignore_map' => TRUE, - 'plugin' => 'd6_taxonomy_vocabulary', - ], - 'destination' => [ - 'plugin' => 'null', - ], - 'idMap' => [ - 'plugin' => 'null', - ], - ]; - $vocabulary_migration = $migration_plugin_manager->createStubMigration($vocabulary_migration_definition); - $translation_active = $module_handler->moduleExists('content_translation'); - - try { - $source_plugin = $vocabulary_migration->getSourcePlugin(); - if ($source_plugin instanceof RequirementsInterface) { - $source_plugin->checkRequirements(); - } - $executable = new MigrateExecutable($vocabulary_migration); - $process = ['vid' => $definitions['d6_taxonomy_vocabulary']['process']['vid']]; - foreach ($source_plugin as $row) { - $executable->processRow($row, $process); - $source_vid = $row->getSourceProperty('vid'); - $plugin_ids = [ - 'd6_term_node:' . $source_vid, - 'd6_term_node_revision:' . $source_vid, - ]; - if ($translation_active) { - $plugin_ids[] = 'd6_term_node_translation:' . $source_vid; - } - foreach (array_intersect($plugin_ids, array_keys($definitions)) as $plugin_id) { - // Match the field name derivation in d6_vocabulary_field.yml. - $field_name = substr('field_' . $row->getDestinationProperty('vid'), 0, 32); - - // The Forum module is expecting 'taxonomy_forums' as the field name - // for the forum nodes. The 'forum_vocabulary' source property is - // evaluated in Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary - // and is set to true if the vocabulary vid being migrated is the - // same as the one in the 'forum_nav_vocabulary' variable on the - // source site. - $destination_vid = $row->getSourceProperty('forum_vocabulary') ? 'taxonomy_forums' : $field_name; - $definitions[$plugin_id]['process'][$destination_vid] = 'tid'; - } - } - } - catch (RequirementsException $e) { - // This code currently runs whenever the definitions are being loaded and - // if you have a Drupal 7 source site then the requirements will not be - // met for the d6_taxonomy_vocabulary migration. - } - catch (DatabaseExceptionWrapper $e) { - // When the definitions are loaded it is possible the tables will not - // exist. - } - } - - if (!$module_handler->moduleExists('node')) { - return; - } - - $connection = \Drupal::database(); - // We need to get the version of the source database in order to check - // if the classic or complete node tables have been used in a migration. - if (isset($definitions['system_site'])) { - // Use the source plugin of the system_site migration to get the - // database connection. - $migration = $definitions['system_site']; - /** @var \Drupal\migrate\Plugin\migrate\source\SqlBase $source_plugin */ - $source_plugin = $migration_plugin_manager->createStubMigration($migration) - ->getSourcePlugin(); - - try { - $source_connection = $source_plugin->getDatabase(); - $version = NodeMigrateType::getLegacyDrupalVersion($source_connection); - } - catch (\Exception $e) { - \Drupal::messenger() - ->addError(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', ['%error' => $e->getMessage()])); - } - } - // If this is a complete node migration then for all migrations, except the - // classic node migrations, replace any dependency on a classic node migration - // with a dependency on the complete node migration. - if (NodeMigrateType::getNodeMigrateType($connection, $version ?? FALSE) === NodeMigrateType::NODE_MIGRATE_TYPE_COMPLETE) { - $classic_migration_match = '/d([67])_(node|node_translation|node_revision|node_entity_translation)($|:.*)/'; - $replace_with_complete_migration = function (&$value, $key, $classic_migration_match) { - if (is_string($value)) { - $value = preg_replace($classic_migration_match, 'd$1_node_complete$3', $value); - } - }; - - foreach ($definitions as &$definition) { - $is_node_classic_migration = preg_match($classic_migration_match, $definition['id']); - if (!$is_node_classic_migration && isset($definition['migration_dependencies'])) { - array_walk_recursive($definition['migration_dependencies'], $replace_with_complete_migration, $classic_migration_match); - } - } - } - -} diff --git a/core/modules/migrate_drupal/migrate_drupal.post_update.php b/core/modules/migrate_drupal/migrate_drupal.post_update.php index cce66db3a805595358f4bfc5541e4b4f72c86cd7..9acb888abc83b42d7085a89251535c269ce4c2fb 100644 --- a/core/modules/migrate_drupal/migrate_drupal.post_update.php +++ b/core/modules/migrate_drupal/migrate_drupal.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function migrate_drupal_removed_post_updates() { +function migrate_drupal_removed_post_updates(): array { return [ 'migrate_drupal_post_update_uninstall_multilingual' => '10.0.0', ]; diff --git a/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php b/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0fa17f286588b9fc0ad1062dd0e6c028463a3d1c --- /dev/null +++ b/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php @@ -0,0 +1,140 @@ +<?php + +namespace Drupal\migrate_drupal\Hook; + +use Drupal\migrate_drupal\NodeMigrateType; +use Drupal\Core\Database\DatabaseExceptionWrapper; +use Drupal\migrate\Exception\RequirementsException; +use Drupal\migrate\MigrateExecutable; +use Drupal\migrate\Plugin\RequirementsInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for migrate_drupal. + */ +class MigrateDrupalHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.migrate_drupal': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Migrate Drupal module provides a framework based on the <a href=":migrate">Migrate module</a> to facilitate migration from a Drupal (6, 7, or 8) site to your website. It does not provide a user interface. For more information, see the <a href=":migrate_drupal">online documentation for the Migrate Drupal module</a>.', [ + ':migrate' => Url::fromRoute('help.page', [ + 'name' => 'migrate', + ])->toString(), + ':migrate_drupal' => 'https://www.drupal.org/documentation/modules/migrate_drupal', + ]) . '</p>'; + return $output; + } + } + + /** + * Implements hook_migration_plugins_alter(). + */ + #[Hook('migration_plugins_alter')] + public function migrationPluginsAlter(array &$definitions) { + $module_handler = \Drupal::service('module_handler'); + $migration_plugin_manager = \Drupal::service('plugin.manager.migration'); + // This is why the deriver can't do this: the 'd6_taxonomy_vocabulary' + // definition is not available to the deriver as it is running inside + // getDefinitions(). + if (isset($definitions['d6_taxonomy_vocabulary'])) { + $vocabulary_migration_definition = [ + 'source' => [ + 'ignore_map' => TRUE, + 'plugin' => 'd6_taxonomy_vocabulary', + ], + 'destination' => [ + 'plugin' => 'null', + ], + 'idMap' => [ + 'plugin' => 'null', + ], + ]; + $vocabulary_migration = $migration_plugin_manager->createStubMigration($vocabulary_migration_definition); + $translation_active = $module_handler->moduleExists('content_translation'); + try { + $source_plugin = $vocabulary_migration->getSourcePlugin(); + if ($source_plugin instanceof RequirementsInterface) { + $source_plugin->checkRequirements(); + } + $executable = new MigrateExecutable($vocabulary_migration); + $process = ['vid' => $definitions['d6_taxonomy_vocabulary']['process']['vid']]; + foreach ($source_plugin as $row) { + $executable->processRow($row, $process); + $source_vid = $row->getSourceProperty('vid'); + $plugin_ids = ['d6_term_node:' . $source_vid, 'd6_term_node_revision:' . $source_vid]; + if ($translation_active) { + $plugin_ids[] = 'd6_term_node_translation:' . $source_vid; + } + foreach (array_intersect($plugin_ids, array_keys($definitions)) as $plugin_id) { + // Match the field name derivation in d6_vocabulary_field.yml. + $field_name = substr('field_' . $row->getDestinationProperty('vid'), 0, 32); + // The Forum module is expecting 'taxonomy_forums' as the field name + // for the forum nodes. The 'forum_vocabulary' source property is + // evaluated in Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary + // and is set to true if the vocabulary vid being migrated is the + // same as the one in the 'forum_nav_vocabulary' variable on the + // source site. + $destination_vid = $row->getSourceProperty('forum_vocabulary') ? 'taxonomy_forums' : $field_name; + $definitions[$plugin_id]['process'][$destination_vid] = 'tid'; + } + } + } + catch (RequirementsException $e) { + // This code currently runs whenever the definitions are being loaded and + // if you have a Drupal 7 source site then the requirements will not be + // met for the d6_taxonomy_vocabulary migration. + } + catch (DatabaseExceptionWrapper $e) { + // When the definitions are loaded it is possible the tables will not + // exist. + } + } + if (!$module_handler->moduleExists('node')) { + return; + } + $connection = \Drupal::database(); + // We need to get the version of the source database in order to check + // if the classic or complete node tables have been used in a migration. + if (isset($definitions['system_site'])) { + // Use the source plugin of the system_site migration to get the + // database connection. + $migration = $definitions['system_site']; + /** @var \Drupal\migrate\Plugin\migrate\source\SqlBase $source_plugin */ + $source_plugin = $migration_plugin_manager->createStubMigration($migration)->getSourcePlugin(); + try { + $source_connection = $source_plugin->getDatabase(); + $version = NodeMigrateType::getLegacyDrupalVersion($source_connection); + } + catch (\Exception $e) { + \Drupal::messenger()->addError(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', ['%error' => $e->getMessage()])); + } + } + // If this is a complete node migration then for all migrations, except the + // classic node migrations, replace any dependency on a classic node migration + // with a dependency on the complete node migration. + if (NodeMigrateType::getNodeMigrateType($connection, $version ?? FALSE) === NodeMigrateType::NODE_MIGRATE_TYPE_COMPLETE) { + $classic_migration_match = '/d([67])_(node|node_translation|node_revision|node_entity_translation)($|:.*)/'; + $replace_with_complete_migration = function (&$value, $key, $classic_migration_match) { + if (is_string($value)) { + $value = preg_replace($classic_migration_match, 'd$1_node_complete$3', $value); + } + }; + foreach ($definitions as &$definition) { + $is_node_classic_migration = preg_match($classic_migration_match, $definition['id']); + if (!$is_node_classic_migration && isset($definition['migration_dependencies'])) { + array_walk_recursive($definition['migration_dependencies'], $replace_with_complete_migration, $classic_migration_match); + } + } + } + } + +} diff --git a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php index ceba413d05b1f6d9da75057e646efe7d2ae4d480..291f59f6b42912b68a2ca07f8074f136e22fc9da 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php @@ -7,6 +7,7 @@ use Drupal\migrate_drupal\NodeMigrateType; use Drupal\Tests\migrate\Kernel\MigrateTestBase; use Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait; +use Drupal\migrate_drupal\Hook\MigrateDrupalHooks; /** * Tests the assignment of the node migration type in migrations_plugin_alter. @@ -46,7 +47,8 @@ protected function setUp(): void { */ public function testMigrationPluginAlter($type, array $migration_definitions, array $expected): void { $this->makeNodeMigrateMapTable($type, '7'); - migrate_drupal_migration_plugins_alter($migration_definitions); + $migrateDrupalMigrationPluginsAlter = new MigrateDrupalHooks(); + $migrateDrupalMigrationPluginsAlter->migrationPluginsAlter($migration_definitions); $this->assertSame($expected, $migration_definitions); } @@ -123,7 +125,7 @@ public static function providerMigrationPluginAlter() { /** * Creates data in the source database. */ - protected function setupDb() { + protected function setupDb(): void { $this->sourceDatabase->schema()->createTable('system', [ 'fields' => [ 'name' => [ diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php index 0dc1bfe1819e98593bb44abae35d506c6f50a3a8..ff1ba94e6530ab8a92d34686350f352559760954 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php @@ -287,7 +287,7 @@ public function testGetAllFields(): void { $this->assertSame(['employee', 'page', 'story', 'test_page', 'test_planet'], $actual_node_types); $this->assertCount(25, $actual_fields['node']['story']); foreach ($actual_fields['node'] as $bundle => $fields) { - foreach ($fields as $field_name => $field_info) { + foreach ($fields as $field_info) { $this->assertArrayHasKey('type', $field_info); $this->assertCount(22, $field_info); $this->assertEquals($bundle, $field_info['type_name']); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php index dfd50dbf6d48426994ca201fcac721e792dd1af1..1f54f94848ec03b39b9df2ae530ffcb94733866b 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php @@ -334,7 +334,7 @@ public function testGetAllFields(): void { $this->assertCount(23, $actual_fields['node']['test_content_type']); foreach ($actual_fields as $entity_type_id => $bundles) { foreach ($bundles as $bundle => $fields) { - foreach ($fields as $field_name => $field_info) { + foreach ($fields as $field_info) { $this->assertArrayHasKey('field_definition', $field_info); $this->assertEquals($entity_type_id, $field_info['entity_type']); $this->assertEquals($bundle, $field_info['bundle']); diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php index 7415ed3b6010650627635619057029a6259fe501..ac2c7df9a57c68ffa05fb71a3399d94c38f363b2 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php @@ -202,7 +202,7 @@ public function query() { * * @see \Drupal\Tests\migrate\Unit\MigrateSourceSqlTestCase */ - public function setDatabase(Connection $database) { + public function setDatabase(Connection $database): void { $this->database = $database; } diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php index c2d15033102f7d14944a717f7eef2a9df6067363..7c5407721fa2a87c1f94c06de24f4622d49a4e4e 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php @@ -180,7 +180,7 @@ public function query() { * * @see \Drupal\Tests\migrate\Unit\MigrateSqlTestCase */ - public function setDatabase(Connection $database) { + public function setDatabase(Connection $database): void { $this->database = $database; } @@ -192,7 +192,7 @@ public function setDatabase(Connection $database) { * * @see \Drupal\Tests\migrate\Unit\MigrateSqlTestCase */ - public function setModuleHandler(ModuleHandlerInterface $module_handler) { + public function setModuleHandler(ModuleHandlerInterface $module_handler): void { $this->moduleHandler = $module_handler; } diff --git a/core/modules/migrate_drupal_ui/migrate_drupal_ui.install b/core/modules/migrate_drupal_ui/migrate_drupal_ui.install index 5962ee1f8786672bd6ede86baff685eb404a039b..e993c64205d258e83a40594af47ebc9ca23e8709 100644 --- a/core/modules/migrate_drupal_ui/migrate_drupal_ui.install +++ b/core/modules/migrate_drupal_ui/migrate_drupal_ui.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function migrate_drupal_ui_install() { +function migrate_drupal_ui_install(): void { $url = Url::fromRoute('migrate_drupal_ui.upgrade')->toString(); \Drupal::messenger()->addStatus(t('The Migrate Drupal UI module has been enabled. Proceed to the <a href=":url">upgrade form</a>.', [':url' => $url])); } diff --git a/core/modules/migrate_drupal_ui/migrate_drupal_ui.module b/core/modules/migrate_drupal_ui/migrate_drupal_ui.module deleted file mode 100644 index 98d10330400544169f2003b48b3b7524cc5cc619..0000000000000000000000000000000000000000 --- a/core/modules/migrate_drupal_ui/migrate_drupal_ui.module +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @file - * Alert administrators before starting the import process. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function migrate_drupal_ui_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.migrate_drupal_ui': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Migrate Drupal UI module provides a simple user interface to perform an upgrade from an earlier version of Drupal. For more information, see the <a href=":migrate">online documentation for the Migrate Drupal UI module</a>.', - [':migrate' => 'https://www.drupal.org/upgrade/migrate']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Preparing the site') . '</dt>'; - $output .= '<dd>' . t('You need to install all modules on this site that are installed on the previous site. For example, if you have used the Book module on the previous site then you must install the Book module on this site for that data to be available on this site.') . '</dd>'; - $output .= '<dt>' . t('Performing the upgrade') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":upgrade">Upgrade</a> page, you are guided through performing the upgrade in several steps.', - [':upgrade' => Url::fromRoute('migrate_drupal_ui.upgrade')->toString()]) . '</dd>'; - $output .= '<dd><ol><li>' . t('If an upgrade has been performed on this site, you will be informed.') . '</li>'; - $output .= '<li>' . t('You need to enter the database credentials of the Drupal site that you want to upgrade. You can also include its files directory in the upgrade. For example local files, /var/www/docroot, or remote files http://www.example.com.') . '</li>'; - $output .= '<li>' . t('If there is existing content on the site that may be overwritten by this upgrade, you will be informed.') . '</li>'; - $output .= '<li>' . t('The next page provides an overview of the modules that will be upgraded and those that will not be upgraded, before you proceed to perform the upgrade.') . '</li>'; - $output .= '<li>' . t('Finally, a message is displayed about the number of upgrade tasks that were successful or failed.') . '</li></ol></dd>'; - $output .= '<dt>' . t('Reviewing the upgrade log') . '</dt>'; - $output .= '<dd>' . t('You can review a <a href=":log">log of upgrade messages</a> by clicking the link in the message provided after the upgrade or by filtering the messages for the type <em>migrate_drupal_ui</em> on the <a href=":messages">Recent log messages</a> page.', - [':log' => Url::fromRoute('migrate_drupal_ui.log')->toString(), ':messages' => Url::fromRoute('dblog.overview')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Rolling back an upgrade') . '</dt>'; - $output .= '<dd>' . t('Rolling back an upgrade is not yet supported through the user interface.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} diff --git a/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php b/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..48b045806d7e7618aff66735ed43f1b35128a7ae --- /dev/null +++ b/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php @@ -0,0 +1,49 @@ +<?php + +namespace Drupal\migrate_drupal_ui\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for migrate_drupal_ui. + */ +class MigrateDrupalUiHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.migrate_drupal_ui': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Migrate Drupal UI module provides a simple user interface to perform an upgrade from an earlier version of Drupal. For more information, see the <a href=":migrate">online documentation for the Migrate Drupal UI module</a>.', [':migrate' => 'https://www.drupal.org/upgrade/migrate']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Preparing the site') . '</dt>'; + $output .= '<dd>' . t('You need to install all modules on this site that are installed on the previous site. For example, if you have used the Book module on the previous site then you must install the Book module on this site for that data to be available on this site.') . '</dd>'; + $output .= '<dt>' . t('Performing the upgrade') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":upgrade">Upgrade</a> page, you are guided through performing the upgrade in several steps.', [ + ':upgrade' => Url::fromRoute('migrate_drupal_ui.upgrade')->toString(), + ]) . '</dd>'; + $output .= '<dd><ol><li>' . t('If an upgrade has been performed on this site, you will be informed.') . '</li>'; + $output .= '<li>' . t('You need to enter the database credentials of the Drupal site that you want to upgrade. You can also include its files directory in the upgrade. For example local files, /var/www/docroot, or remote files http://www.example.com.') . '</li>'; + $output .= '<li>' . t('If there is existing content on the site that may be overwritten by this upgrade, you will be informed.') . '</li>'; + $output .= '<li>' . t('The next page provides an overview of the modules that will be upgraded and those that will not be upgraded, before you proceed to perform the upgrade.') . '</li>'; + $output .= '<li>' . t('Finally, a message is displayed about the number of upgrade tasks that were successful or failed.') . '</li></ol></dd>'; + $output .= '<dt>' . t('Reviewing the upgrade log') . '</dt>'; + $output .= '<dd>' . t('You can review a <a href=":log">log of upgrade messages</a> by clicking the link in the message provided after the upgrade or by filtering the messages for the type <em>migrate_drupal_ui</em> on the <a href=":messages">Recent log messages</a> page.', [ + ':log' => Url::fromRoute('migrate_drupal_ui.log')->toString(), + ':messages' => Url::fromRoute('dblog.overview')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Rolling back an upgrade') . '</dt>'; + $output .= '<dd>' . t('Rolling back an upgrade is not yet supported through the user interface.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php index 0ddc3c46d91e024cf6f45520fd94d649ab316e81..7c221bfad92be3c4f1706e4a18bfd68059a2cab7 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php @@ -222,7 +222,7 @@ public static function providerTestFilePath() { * * The resulting directory is /bar/sites/default/files/foo.txt. */ - protected function makeFiles() { + protected function makeFiles(): void { // Get file information from the source database. foreach ($this->getManagedFiles() as $file) { $this->assertSame(1, preg_match('/^(private|public|temporary):/', $file['uri'], $matches)); diff --git a/core/modules/mysql/mysql.module b/core/modules/mysql/mysql.module deleted file mode 100644 index 746647d032edd3f5082d60009c9bb638b6f1c0d8..0000000000000000000000000000000000000000 --- a/core/modules/mysql/mysql.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * The MySQL module provides the connection between Drupal and a MySQL, MariaDB or equivalent database. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function mysql_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.mysql': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The MySQL module provides the connection between Drupal and a MySQL, MariaDB or equivalent database. For more information, see the <a href=":mysql">online documentation for the MySQL module</a>.', [':mysql' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/mysql-module']) . '</p>'; - return $output; - - } -} diff --git a/core/modules/mysql/src/Driver/Database/mysql/Connection.php b/core/modules/mysql/src/Driver/Database/mysql/Connection.php index 09f3d4980b9ce6d784ca6b1e89a1672f2055293f..acc087419128b2ca9848d5290b23b97e9da75cec 100644 --- a/core/modules/mysql/src/Driver/Database/mysql/Connection.php +++ b/core/modules/mysql/src/Driver/Database/mysql/Connection.php @@ -152,7 +152,7 @@ public static function open(array &$connection_options = []) { // Show message for socket connection via 'host' option. $message = 'Drupal was attempting to connect to the database server via a socket, but the socket file could not be found.'; $message .= ' A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost.'; - $message .= ' To connect via TPC/IP use an IP address (127.0.0.1 for IPv4) instead of "localhost".'; + $message .= ' To connect via TCP/IP use an IP address (127.0.0.1 for IPv4) instead of "localhost".'; $message .= ' This message normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name when trying to connect to the server.'; throw new DatabaseConnectionRefusedException($e->getMessage() . ' [Tip: ' . $message . '] ', $e->getCode(), $e); } diff --git a/core/modules/mysql/src/Hook/MysqlHooks.php b/core/modules/mysql/src/Hook/MysqlHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4b7e2db531cc0f76e65986de319477d3adb5ed6a --- /dev/null +++ b/core/modules/mysql/src/Hook/MysqlHooks.php @@ -0,0 +1,29 @@ +<?php + +namespace Drupal\mysql\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for mysql. + */ +class MysqlHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.mysql': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The MySQL module provides the connection between Drupal and a MySQL, MariaDB or equivalent database. For more information, see the <a href=":mysql">online documentation for the MySQL module</a>.', [ + ':mysql' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/mysql-module', + ]) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php index c69477688cefeacc4d726b2f5defc9e69fea704b..579fc1f345d4f6e364365b29b8e5ee68559997d4 100644 --- a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php +++ b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php @@ -17,7 +17,7 @@ class InstallerIsolationLevelExistingSettingsTest extends InstallerExistingSetti /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $connection_info = Database::getConnectionInfo(); diff --git a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php index 274833e3970d5dc5303855a628240c2470fc6ab5..7927862adadaba4ed8e55c73b0c5774e8d23095a 100644 --- a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php +++ b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php @@ -22,7 +22,7 @@ class InstallerIsolationLevelNoDatabaseSettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // The isolation_level option is only available for MySQL. diff --git a/core/modules/mysql/tests/src/Functional/RequirementsTest.php b/core/modules/mysql/tests/src/Functional/RequirementsTest.php index 00cb54351cba8268a26c2e4287364e1d54bd0dff..5d054334b6962732f448a34e9cca80a9dc302829 100644 --- a/core/modules/mysql/tests/src/Functional/RequirementsTest.php +++ b/core/modules/mysql/tests/src/Functional/RequirementsTest.php @@ -112,7 +112,7 @@ public function testIsolationLevelWarningNotDisplaying(): void { * @param string $isolation_level * The isolation level. */ - private function writeIsolationLevelSettings(string $isolation_level) { + private function writeIsolationLevelSettings(string $isolation_level): void { $settings['databases']['default']['default']['init_commands'] = (object) [ 'value' => [ 'isolation_level' => "SET SESSION TRANSACTION ISOLATION LEVEL {$isolation_level}", diff --git a/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php b/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php index a94d9bd32679841d3e4898cb6ae27c4e64465882..28e77e422637f9ff59c462746da9487e64b85048 100644 --- a/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php +++ b/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php @@ -30,7 +30,7 @@ public function testPrepareStatementFailOnPreparation(): void { Database::addConnectionInfo('default', 'foo', $connection_info['default']); $foo_connection = Database::getConnection('foo', 'default'); $this->expectException(DatabaseExceptionWrapper::class); - $stmt = $foo_connection->prepareStatement('bananas', []); + $foo_connection->prepareStatement('bananas', []); } /** diff --git a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php index 73e200b8952d57565005fe9214eef9fd26e91e72..f5b3a0b267b83b920deac61a614d694ad234c747 100644 --- a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php +++ b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php @@ -74,7 +74,7 @@ class DbDumpTest extends DriverSpecificKernelTestBase { * * Register a database cache backend rather than memory-based. */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory') ->addArgument(new Reference('database')) diff --git a/core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php b/core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php index 19aaaf1cafe177cd8c776b21d2f00ec7ed9ca2cf..a2329309c2c2b558df3009982d95f65dca9ebac8 100644 --- a/core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php +++ b/core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php @@ -183,9 +183,7 @@ public function testIndexLength(): void { // Count the number of columns defined in the indexes. $column_count = 0; foreach ($table_specification_with_new_index['indexes'] as $index) { - foreach ($index as $field) { - $column_count++; - } + $column_count += count($index); } $test_count = 0; foreach ($results as $result) { diff --git a/core/modules/navigation/assets/icons/basic.svg b/core/modules/navigation/assets/icons/basic.svg deleted file mode 100644 index b591f737b59cfde3413242d123f5a243aa78bbbe..0000000000000000000000000000000000000000 --- a/core/modules/navigation/assets/icons/basic.svg +++ /dev/null @@ -1,3 +0,0 @@ -<svg width="24" height="24" viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path d="M19.5 3H4.5C4.10218 3 3.72064 3.15804 3.43934 3.43934C3.15804 3.72064 3 4.10218 3 4.5V19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72064 20.842 4.10218 21 4.5 21H19.5C19.8978 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5V4.5C21 4.10218 20.842 3.72064 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3ZM4.5 19.5V5.56031L18.4397 19.5H4.5ZM5.56031 4.5H19.5V18.4406L5.56031 4.5Z" fill="currentColor"/> -</svg> diff --git a/core/modules/navigation/assets/icons/toggle-left.svg b/core/modules/navigation/assets/icons/toggle-left.svg deleted file mode 100644 index 60eb31d5b0531df826b275774c79f7785f929a0a..0000000000000000000000000000000000000000 --- a/core/modules/navigation/assets/icons/toggle-left.svg +++ /dev/null @@ -1,3 +0,0 @@ -<svg class="sidebar-toggle__icon sidebar-toggle__icon--left" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.75H20.25C20.6478 3.75 21.0294 3.90804 21.3107 4.18934C21.592 4.47064 21.75 4.85218 21.75 5.25V18.75C21.75 19.1478 21.592 19.5294 21.3107 19.8107C21.0294 20.092 20.6478 20.25 20.25 20.25H3.75C3.35218 20.25 2.97064 20.092 2.68934 19.8107C2.40804 19.5294 2.25 19.1478 2.25 18.75V5.25C2.25 4.85218 2.40804 4.47064 2.68934 4.18934C2.97064 3.90804 3.35218 3.75 3.75 3.75ZM7.5 5.25H3.75V18.75H7.5V5.25ZM9 18.75H20.25V5.25H9V18.75ZM18.2505 12.0006C18.2505 12.1995 18.1715 12.3902 18.0308 12.5309C17.8902 12.6715 17.6994 12.7506 17.5005 12.7506H13.8108L15.5311 14.4699C15.6718 14.6107 15.7509 14.8015 15.7509 15.0006C15.7509 15.1996 15.6718 15.3905 15.5311 15.5312C15.3904 15.6719 15.1995 15.751 15.0005 15.751C14.8015 15.751 14.6106 15.6719 14.4699 15.5312L11.4699 12.5312C11.4001 12.4615 11.3448 12.3788 11.3071 12.2878C11.2693 12.1967 11.2499 12.0991 11.2499 12.0006C11.2499 11.902 11.2693 11.8044 11.3071 11.7134C11.3448 11.6223 11.4001 11.5396 11.4699 11.4699L14.4699 8.46993C14.6106 8.3292 14.8015 8.25014 15.0005 8.25014C15.1995 8.25014 15.3904 8.3292 15.5311 8.46993C15.6718 8.61066 15.7509 8.80154 15.7509 9.00056C15.7509 9.19958 15.6718 9.39045 15.5311 9.53119L13.8108 11.2506H17.5005C17.6994 11.2506 17.8902 11.3296 18.0308 11.4702C18.1715 11.6109 18.2505 11.8016 18.2505 12.0006Z" fill="currentColor"/> -</svg> diff --git a/core/modules/navigation/assets/icons/toggle-right.svg b/core/modules/navigation/assets/icons/toggle-right.svg deleted file mode 100644 index 9b4f2029308035cadfeab7cb0e3533e51f4eb363..0000000000000000000000000000000000000000 --- a/core/modules/navigation/assets/icons/toggle-right.svg +++ /dev/null @@ -1,3 +0,0 @@ -<svg class="sidebar-toggle__icon sidebar-toggle__icon--right" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.75H20.25C20.6478 3.75 21.0294 3.90804 21.3107 4.18934C21.592 4.47064 21.75 4.85218 21.75 5.25V18.75C21.75 19.1478 21.592 19.5294 21.3107 19.8107C21.0294 20.092 20.6478 20.25 20.25 20.25H3.75C3.35218 20.25 2.97064 20.092 2.68934 19.8107C2.40804 19.5294 2.25 19.1478 2.25 18.75V5.25C2.25 4.85218 2.40804 4.47064 2.68934 4.18934C2.97064 3.90804 3.35218 3.75 3.75 3.75ZM7.5 5.25H3.75V18.75H7.5V5.25ZM9 18.75H20.25V5.25H9V18.75ZM11.25 12.0004C11.25 11.8015 11.329 11.6107 11.4697 11.4701C11.6103 11.3294 11.8011 11.2504 12 11.2504H15.6897L13.9694 9.53104C13.8286 9.39031 13.7496 9.19944 13.7496 9.00042C13.7496 8.80139 13.8286 8.61052 13.9694 8.46979C14.1101 8.32906 14.301 8.25 14.5 8.25C14.699 8.25 14.8899 8.32906 15.0306 8.46979L18.0306 11.4698C18.1004 11.5394 18.1557 11.6222 18.1934 11.7132C18.2312 11.8043 18.2506 11.9019 18.2506 12.0004C18.2506 12.099 18.2312 12.1966 18.1934 12.2876C18.1557 12.3787 18.1004 12.4614 18.0306 12.531L15.0306 15.531C14.8899 15.6718 14.699 15.7508 14.5 15.7508C14.301 15.7508 14.1101 15.6718 13.9694 15.531C13.8286 15.3903 13.7496 15.1994 13.7496 15.0004C13.7496 14.8014 13.8286 14.6105 13.9694 14.4698L15.6897 12.7504H12C11.8011 12.7504 11.6103 12.6714 11.4697 12.5307C11.329 12.3901 11.25 12.1993 11.25 12.0004Z" fill="currentColor"/> -</svg> diff --git a/core/modules/navigation/assets/icons/announcement.svg b/core/modules/navigation/components/toolbar-button/assets/announcement.svg similarity index 100% rename from core/modules/navigation/assets/icons/announcement.svg rename to core/modules/navigation/components/toolbar-button/assets/announcement.svg diff --git a/core/modules/navigation/assets/icons/appearance.svg b/core/modules/navigation/components/toolbar-button/assets/appearance.svg similarity index 100% rename from core/modules/navigation/assets/icons/appearance.svg rename to core/modules/navigation/components/toolbar-button/assets/appearance.svg diff --git a/core/modules/navigation/assets/icons/arrow-left.svg b/core/modules/navigation/components/toolbar-button/assets/arrow-left.svg similarity index 100% rename from core/modules/navigation/assets/icons/arrow-left.svg rename to core/modules/navigation/components/toolbar-button/assets/arrow-left.svg diff --git a/core/modules/navigation/assets/icons/blocks.svg b/core/modules/navigation/components/toolbar-button/assets/blocks.svg similarity index 100% rename from core/modules/navigation/assets/icons/blocks.svg rename to core/modules/navigation/components/toolbar-button/assets/blocks.svg diff --git a/core/modules/navigation/assets/icons/burger.svg b/core/modules/navigation/components/toolbar-button/assets/burger.svg similarity index 100% rename from core/modules/navigation/assets/icons/burger.svg rename to core/modules/navigation/components/toolbar-button/assets/burger.svg diff --git a/core/modules/navigation/components/toolbar-button/assets/chevron.svg b/core/modules/navigation/components/toolbar-button/assets/chevron.svg new file mode 100644 index 0000000000000000000000000000000000000000..cb8bea84e1db6832eee566838ecd32e13938b740 --- /dev/null +++ b/core/modules/navigation/components/toolbar-button/assets/chevron.svg @@ -0,0 +1,3 @@ +<svg viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"> + <path d="M5.7653 4.2653L3.2653 6.7653C3.19485 6.83575 3.0993 6.87532 2.99967 6.87532C2.90005 6.87532 2.8045 6.83575 2.73405 6.7653C2.6636 6.69485 2.62402 6.5993 2.62402 6.49967C2.62402 6.40005 2.6636 6.3045 2.73405 6.23405L4.96874 3.99999L2.73467 1.7653C2.69979 1.73042 2.67212 1.68901 2.65324 1.64343C2.63436 1.59785 2.62465 1.54901 2.62465 1.49967C2.62465 1.45034 2.63436 1.40149 2.65324 1.35592C2.67212 1.31034 2.69979 1.26893 2.73467 1.23405C2.76956 1.19917 2.81097 1.1715 2.85654 1.15262C2.90212 1.13374 2.95097 1.12402 3.0003 1.12402C3.04963 1.12402 3.09848 1.13374 3.14405 1.15262C3.18963 1.1715 3.23104 1.19917 3.26592 1.23405L5.76592 3.73405C5.80084 3.76893 5.82853 3.81036 5.84741 3.85596C5.86628 3.90157 5.87597 3.95045 5.87591 3.9998C5.87585 4.04916 5.86605 4.09802 5.84707 4.14358C5.82809 4.18914 5.8003 4.2305 5.7653 4.2653Z"/> +</svg> diff --git a/core/modules/navigation/assets/icons/config.svg b/core/modules/navigation/components/toolbar-button/assets/config.svg similarity index 100% rename from core/modules/navigation/assets/icons/config.svg rename to core/modules/navigation/components/toolbar-button/assets/config.svg diff --git a/core/modules/navigation/assets/icons/content.svg b/core/modules/navigation/components/toolbar-button/assets/content.svg similarity index 100% rename from core/modules/navigation/assets/icons/content.svg rename to core/modules/navigation/components/toolbar-button/assets/content.svg diff --git a/core/modules/navigation/assets/icons/create.svg b/core/modules/navigation/components/toolbar-button/assets/create.svg similarity index 100% rename from core/modules/navigation/assets/icons/create.svg rename to core/modules/navigation/components/toolbar-button/assets/create.svg diff --git a/core/modules/navigation/assets/icons/cross.svg b/core/modules/navigation/components/toolbar-button/assets/cross.svg similarity index 100% rename from core/modules/navigation/assets/icons/cross.svg rename to core/modules/navigation/components/toolbar-button/assets/cross.svg diff --git a/core/modules/navigation/assets/icons/extend.svg b/core/modules/navigation/components/toolbar-button/assets/extend.svg similarity index 100% rename from core/modules/navigation/assets/icons/extend.svg rename to core/modules/navigation/components/toolbar-button/assets/extend.svg diff --git a/core/modules/navigation/assets/icons/eye.svg b/core/modules/navigation/components/toolbar-button/assets/eye.svg similarity index 100% rename from core/modules/navigation/assets/icons/eye.svg rename to core/modules/navigation/components/toolbar-button/assets/eye.svg diff --git a/core/modules/navigation/assets/icons/files.svg b/core/modules/navigation/components/toolbar-button/assets/files.svg similarity index 100% rename from core/modules/navigation/assets/icons/files.svg rename to core/modules/navigation/components/toolbar-button/assets/files.svg diff --git a/core/modules/navigation/assets/icons/help.svg b/core/modules/navigation/components/toolbar-button/assets/help.svg similarity index 100% rename from core/modules/navigation/assets/icons/help.svg rename to core/modules/navigation/components/toolbar-button/assets/help.svg diff --git a/core/modules/navigation/assets/icons/media.svg b/core/modules/navigation/components/toolbar-button/assets/media.svg similarity index 100% rename from core/modules/navigation/assets/icons/media.svg rename to core/modules/navigation/components/toolbar-button/assets/media.svg diff --git a/core/modules/navigation/assets/icons/pencil.svg b/core/modules/navigation/components/toolbar-button/assets/pencil.svg similarity index 100% rename from core/modules/navigation/assets/icons/pencil.svg rename to core/modules/navigation/components/toolbar-button/assets/pencil.svg diff --git a/core/modules/navigation/assets/icons/people.svg b/core/modules/navigation/components/toolbar-button/assets/people.svg similarity index 100% rename from core/modules/navigation/assets/icons/people.svg rename to core/modules/navigation/components/toolbar-button/assets/people.svg diff --git a/core/modules/navigation/assets/icons/reports.svg b/core/modules/navigation/components/toolbar-button/assets/reports.svg similarity index 100% rename from core/modules/navigation/assets/icons/reports.svg rename to core/modules/navigation/components/toolbar-button/assets/reports.svg diff --git a/core/modules/navigation/assets/icons/return-left.svg b/core/modules/navigation/components/toolbar-button/assets/return-left.svg similarity index 100% rename from core/modules/navigation/assets/icons/return-left.svg rename to core/modules/navigation/components/toolbar-button/assets/return-left.svg diff --git a/core/modules/navigation/assets/icons/shortcuts.svg b/core/modules/navigation/components/toolbar-button/assets/shortcuts.svg similarity index 100% rename from core/modules/navigation/assets/icons/shortcuts.svg rename to core/modules/navigation/components/toolbar-button/assets/shortcuts.svg diff --git a/core/modules/navigation/assets/icons/structure.svg b/core/modules/navigation/components/toolbar-button/assets/structure.svg similarity index 100% rename from core/modules/navigation/assets/icons/structure.svg rename to core/modules/navigation/components/toolbar-button/assets/structure.svg diff --git a/core/modules/navigation/assets/icons/user.svg b/core/modules/navigation/components/toolbar-button/assets/user.svg similarity index 100% rename from core/modules/navigation/assets/icons/user.svg rename to core/modules/navigation/components/toolbar-button/assets/user.svg diff --git a/core/modules/navigation/components/toolbar-button/toolbar-button.component.yml b/core/modules/navigation/components/toolbar-button/toolbar-button.component.yml new file mode 100644 index 0000000000000000000000000000000000000000..827a40fe27101c2e6660ec63715d2a75145beb36 --- /dev/null +++ b/core/modules/navigation/components/toolbar-button/toolbar-button.component.yml @@ -0,0 +1,67 @@ +# This is so your IDE knows about the syntax for fixes and autocomplete. +$schema: https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json + +# The human readable name. +name: Toolbar button + +# Status can be: "experimental", "stable", "deprecated", "obsolete". +status: experimental + +# Schema for the props. We support www.json-schema.org. Learn more about the +# syntax there. +props: + # Props are always an object with keys. Each key is a variable in your + # component template. + type: object + + properties: + action: + type: string + title: Action + description: Hidden button action text. + modifiers: + type: array + title: Modifier classes. + description: + Button modifiers. + https://en.bem.info/methodology/css/#modifiers + items: + type: string + enum: + - collapsible + - dark + - expand--down + - expand--side + - large + - non-interactive + - small-offset + - weight--400 + extra_classes: + type: array + title: Extra classes. + description: + External modifiers added from the placement context. + https://en.bem.info/methodology/css/#mixes + items: + type: string + html_tag: + type: string + title: HTML tag + # Limit the available options by using enums. + enum: + - a + - button + - span + # Provide a default value + default: button + icon: + title: Icon + type: string + text: + title: Text + description: Text of button. + type: string +slots: + content: + title: Content + description: Content of button. diff --git a/core/modules/navigation/css/components/toolbar-button.css b/core/modules/navigation/components/toolbar-button/toolbar-button.css similarity index 95% rename from core/modules/navigation/css/components/toolbar-button.css rename to core/modules/navigation/components/toolbar-button/toolbar-button.css index 3e1c149066d6923bd96976f128fc1cdd844f2478..b914f63fb065f8b400b146e72fb827edac861c8b 100644 --- a/core/modules/navigation/css/components/toolbar-button.css +++ b/core/modules/navigation/components/toolbar-button/toolbar-button.css @@ -12,20 +12,12 @@ :root { --toolbar-button-outline-offset: 0; } -/* In top bar mobile we need small outline offset. */ -:where(.top-bar) { - --toolbar-button-outline-offset: calc(-1 * var(--admin-toolbar-space-4)); -} -@media (min-width: 64rem) { - :where(.top-bar) { - --toolbar-button-outline-offset: 0px; - } -} .toolbar-button { z-index: 1; align-items: center; padding-inline: var(--admin-toolbar-space-16); - padding-block: calc(0.75 * var(--admin-toolbar-rem)); + padding-block: var(--admin-toolbar-space-10); + min-height: var(--admin-toolbar-space-40); cursor: pointer; text-align: start; -webkit-text-decoration: none; @@ -56,24 +48,20 @@ color: var(--admin-toolbar-color-blue-700); outline: 2px solid var(--admin-toolbar-color-focus); outline-offset: var(--toolbar-button-outline-offset); - background-color: transparent; -} -.toolbar-button:hover:focus { - background-color: var(--admin-toolbar-color-gray-050); } .toolbar-button.current { color: var(--admin-toolbar-color-blue-700); background-color: var(--admin-toolbar-color-gray-050); } +/* Dark color modifier for submenus title */ +.toolbar-button--dark { + color: var(--admin-toolbar-color-gray-990); +} .toolbar-button--large { padding: var(--admin-toolbar-space-8) var(--admin-toolbar-space-16); font-size: var(--admin-toolbar-font-size-info-lg); line-height: var(--admin-toolbar-line-height-info-lg); } -/* Dark color modifier for submenus title */ -.toolbar-button--dark { - color: var(--admin-toolbar-color-gray-990); -} .toolbar-button--non-interactive:hover, .toolbar-button--non-interactive:focus, .toolbar-button--non-interactive:hover:focus { @@ -83,9 +71,12 @@ outline: 0; background-color: transparent; } +.toolbar-button--small-offset { + --toolbar-button-outline-offset: calc(-1 * var(--admin-toolbar-space-4)); +} /* Class starts with `toolbar-button--icon` */ [class*="toolbar-button--icon"] { - padding-inline: calc(0.75 * var(--admin-toolbar-rem)); + padding-inline: var(--admin-toolbar-space-10); } [class*="toolbar-button--icon"]::before { display: flex; @@ -122,22 +113,6 @@ background: linktext; } } -.toolbar-button--primary { - color: white; - background-color: var(--admin-toolbar-color-blue-450); -} -.toolbar-button--primary:hover, -.toolbar-button--primary:focus { - color: white; - background-color: var(--admin-toolbar-color-blue-650); -} -.toolbar-button--secondary--expanded[aria-expanded="true"] { - color: white; - background-color: var(--admin-toolbar-color-gray-900); -} -.toolbar-button--tertiary--expanded[aria-expanded="true"] { - background-color: var(--admin-toolbar-color-gray-050); -} .toolbar-button--weight--400 { font-variation-settings: "wght" 400; } @@ -163,7 +138,7 @@ -webkit-mask-image: url("data:image/svg+xml,%3csvg viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5.7653 4.2653L3.2653 6.7653C3.19485 6.83575 3.0993 6.87532 2.99967 6.87532C2.90005 6.87532 2.8045 6.83575 2.73405 6.7653C2.6636 6.69485 2.62402 6.5993 2.62402 6.49967C2.62402 6.40005 2.6636 6.3045 2.73405 6.23405L4.96874 3.99999L2.73467 1.7653C2.69979 1.73042 2.67212 1.68901 2.65324 1.64343C2.63436 1.59785 2.62465 1.54901 2.62465 1.49967C2.62465 1.45034 2.63436 1.40149 2.65324 1.35592C2.67212 1.31034 2.69979 1.26893 2.73467 1.23405C2.76956 1.19917 2.81097 1.1715 2.85654 1.15262C2.90212 1.13374 2.95097 1.12402 3.0003 1.12402C3.04963 1.12402 3.09848 1.13374 3.14405 1.15262C3.18963 1.1715 3.23104 1.19917 3.26592 1.23405L5.76592 3.73405C5.80084 3.76893 5.82853 3.81036 5.84741 3.85596C5.86628 3.90157 5.87597 3.95045 5.87591 3.9998C5.87585 4.04916 5.86605 4.09802 5.84707 4.14358C5.82809 4.18914 5.8003 4.2305 5.7653 4.2653Z'/%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5.7653 4.2653L3.2653 6.7653C3.19485 6.83575 3.0993 6.87532 2.99967 6.87532C2.90005 6.87532 2.8045 6.83575 2.73405 6.7653C2.6636 6.69485 2.62402 6.5993 2.62402 6.49967C2.62402 6.40005 2.6636 6.3045 2.73405 6.23405L4.96874 3.99999L2.73467 1.7653C2.69979 1.73042 2.67212 1.68901 2.65324 1.64343C2.63436 1.59785 2.62465 1.54901 2.62465 1.49967C2.62465 1.45034 2.63436 1.40149 2.65324 1.35592C2.67212 1.31034 2.69979 1.26893 2.73467 1.23405C2.76956 1.19917 2.81097 1.1715 2.85654 1.15262C2.90212 1.13374 2.95097 1.12402 3.0003 1.12402C3.04963 1.12402 3.09848 1.13374 3.14405 1.15262C3.18963 1.1715 3.23104 1.19917 3.26592 1.23405L5.76592 3.73405C5.80084 3.76893 5.82853 3.81036 5.84741 3.85596C5.86628 3.90157 5.87597 3.95045 5.87591 3.9998C5.87585 4.04916 5.86605 4.09802 5.84707 4.14358C5.82809 4.18914 5.8003 4.2305 5.7653 4.2653Z'/%3e%3c/svg%3e"); } -[dir="rtl"] [class*="toolbar-button--expand"]::after { +:where([dir="rtl"]) [class*="toolbar-button--expand"]::after { transform: rotate(180deg); } @media (forced-colors: active) { @@ -171,24 +146,30 @@ background: canvastext; } } -:is(.toolbar-button--expand--down, [dir="rtl"] .toolbar-button--expand--down)::after { +.toolbar-button--expand--down::after { transform: rotate(90deg); } @media (forced-colors: active) { - :is(.toolbar-button--expand--down, [dir="rtl"] .toolbar-button--expand--down)::after { + .toolbar-button--expand--down::after { background: canvastext; } } -[aria-expanded="true"]:is(.toolbar-button--expand--down, [dir="rtl"] .toolbar-button--expand--down)::after { +.toolbar-button--expand--down[aria-expanded="true"]::after { transform: rotate(-90deg); } -[aria-expanded="true"]:is(.toolbar-button--expand--down, [dir="rtl"] .toolbar-button--expand--down):focus, -[aria-expanded="true"]:is(.toolbar-button--expand--down, [dir="rtl"] .toolbar-button--expand--down):hover { +.toolbar-button--expand--down[aria-expanded="true"]:focus, +.toolbar-button--expand--down[aria-expanded="true"]:hover { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } -.toolbar-button--arrow-first::after { - order: -1; +.toolbar-button--icon--announcements-feed-announcement { + --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e %3cpath fill='none' d='M0 0h256v256H0z'/%3e %3cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16' d='M160 80v120.67a8 8 0 0 0 3.56 6.65l11 7.33a8 8 0 0 0 12.2-4.72L200 160'/%3e %3cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16' d='M40 200a8 8 0 0 0 13.15 6.12C105.55 162.16 160 160 160 160h40a40 40 0 0 0 0-80h-40s-54.45-2.16-106.85-46.11A8 8 0 0 0 40 40Z'/%3e%3c/svg%3e"); +} +.toolbar-button--icon--announcements-feed-announcement::before { + transform: scaleX(-1); +} +[dir="rtl"] .toolbar-button--icon--announcements-feed-announcement::before { + transform: scaleX(1); } .toolbar-button--icon--back { --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e %3cpath d='M14.2501 7.99994c0 .19892-.079.38968-.2197.53033-.1406.14066-.3314.21967-.5303.21967H4.3126l3.22 3.21936c.1409.1409.22005.332.22005.5313 0 .1992-.07915.3903-.22005.5312-.14089.1409-.33199.2201-.53125.2201-.19925 0-.39035-.0792-.53125-.2201l-4.5-4.49998c-.06992-.06968-.12539-.15247-.16325-.24364-.03785-.09116-.05734-.1889-.05734-.28761 0-.09871.01949-.19645.05734-.28762.03786-.09116.09333-.17395.16325-.24363l4.5-4.5c.06977-.06977.15259-.12511.24374-.16286.09115-.03776.18885-.05719.28751-.05719.09867 0 .19636.01943.28751.05719.09116.03775.17398.09309.24374.16286.06977.06976.12511.15259.16286.24374.03776.09115.05719.18885.05719.28751s-.01943.19636-.05719.28751c-.03775.09115-.09309.17397-.16286.24374l-3.22 3.21812h9.1875c.1989 0 .3897.07902.5303.21967.1407.14066.2197.33142.2197.53033Z'/%3e%3c/svg%3e"); @@ -199,33 +180,24 @@ .toolbar-button--icon--cross { --icon: url("data:image/svg+xml,%3csvg role='img' xmlns='http://www.w3.org/2000/svg' fill='none' viewbox='0 0 20 20'%3e %3cpath fill='%2355565B' d='M16.2883 14.9617c.1761.1762.275.415.275.6641 0 .2491-.0989.4879-.275.6641-.1761.1761-.415.275-.6641.275-.2491 0-.4879-.0989-.664-.275L10 11.3281l-4.96172 4.9602c-.17612.1761-.41499.2751-.66406.2751-.24908 0-.48795-.099-.66407-.2751-.17612-.1761-.27506-.415-.27506-.6641 0-.249.09894-.4879.27506-.664L8.67187 10 3.71172 5.0383c-.17613-.17612-.27507-.41499-.27507-.66407 0-.24907.09894-.48794.27507-.66406.17612-.17612.41499-.27506.66406-.27506.24907 0 .48794.09894.66406.27506L10 8.67189l4.9617-4.9625c.1761-.17612.415-.27506.6641-.27506.249 0 .4879.09894.664.27506.1762.17612.2751.41499.2751.66406 0 .24907-.0989.48794-.2751.66407L11.3281 10l4.9602 4.9617Z'%3e %3c/path%3e%3c/svg%3e"); } -.toolbar-button--icon--system-themes-page { - --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M21.75 3C21.75 2.80109 21.6709 2.61032 21.5303 2.46967C21.3896 2.32902 21.1989 2.25 21 2.25C16.8675 2.25 12.6271 6.91031 10.2721 9.99656C9.43109 9.73898 8.54134 9.68224 7.67437 9.83089C6.8074 9.97954 5.98738 10.3294 5.28017 10.8525C4.57295 11.3755 3.99826 12.0571 3.60225 12.8426C3.20624 13.628 2.99996 14.4954 2.99996 15.375C2.99996 18.27 1.16808 19.5684 1.0809 19.6284C0.947855 19.7183 0.847149 19.8484 0.793587 19.9998C0.740026 20.1511 0.736435 20.3156 0.783343 20.4692C0.830251 20.6227 0.925182 20.7571 1.05418 20.8527C1.18317 20.9482 1.33943 20.9999 1.49996 21H8.62496C9.50458 21 10.3719 20.7937 11.1574 20.3977C11.9428 20.0017 12.6244 19.427 13.1475 18.7198C13.6705 18.0126 14.0204 17.1926 14.1691 16.3256C14.3177 15.4586 14.261 14.5689 14.0034 13.7278C17.0906 11.3728 21.75 7.1325 21.75 3ZM8.62496 19.5H3.24652C3.87933 18.6009 4.49996 17.2425 4.49996 15.375C4.49996 14.5592 4.74189 13.7616 5.19515 13.0833C5.64841 12.4049 6.29264 11.8762 7.04639 11.564C7.80013 11.2518 8.62953 11.1701 9.42971 11.3293C10.2299 11.4884 10.9649 11.8813 11.5418 12.4582C12.1187 13.0351 12.5115 13.7701 12.6707 14.5703C12.8299 15.3704 12.7482 16.1998 12.436 16.9536C12.1237 17.7073 11.595 18.3516 10.9167 18.8048C10.2383 19.2581 9.44081 19.5 8.62496 19.5ZM11.6643 10.6453C11.9856 10.2291 12.3009 9.83688 12.6103 9.46875C13.3675 9.98035 14.0196 10.6324 14.5312 11.3897C14.1625 11.6984 13.7703 12.0138 13.3546 12.3356C12.9176 11.6586 12.3414 11.0824 11.6643 10.6453ZM15.6675 10.3941C15.1012 9.59512 14.4039 8.89778 13.605 8.33156C16.5843 5.09438 18.8315 4.11281 20.1581 3.84C19.8909 5.1675 18.9046 7.41469 15.6675 10.3941Z' fill='currentColor'/%3e%3c/svg%3e"); +.toolbar-button--icon--entity-user-collection { + --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M10.9922 14.805C11.9974 14.1358 12.7606 13.1609 13.1688 12.0244C13.5771 10.8879 13.6088 9.65024 13.2592 8.49437C12.9096 7.3385 12.1974 6.32581 11.2278 5.60605C10.2581 4.88629 9.08262 4.49768 7.87505 4.49768C6.66747 4.49768 5.49196 4.88629 4.52233 5.60605C3.55271 6.32581 2.84045 7.3385 2.49088 8.49437C2.14132 9.65024 2.17301 10.8879 2.58126 12.0244C2.98952 13.1609 3.75267 14.1358 4.75786 14.805C2.93957 15.4751 1.38671 16.7152 0.330984 18.3403C0.275499 18.4227 0.236959 18.5154 0.217604 18.6129C0.198249 18.7104 0.198466 18.8108 0.218241 18.9082C0.238017 19.0056 0.276957 19.0981 0.332798 19.1803C0.388639 19.2625 0.460266 19.3328 0.543518 19.3871C0.626769 19.4414 0.719983 19.4786 0.817742 19.4966C0.9155 19.5146 1.01585 19.5129 1.11297 19.4917C1.21008 19.4706 1.30202 19.4303 1.38344 19.3733C1.46486 19.3163 1.53413 19.2437 1.58723 19.1597C2.26822 18.1123 3.20007 17.2516 4.29814 16.6558C5.39622 16.0599 6.62574 15.7479 7.87505 15.7479C9.12435 15.7479 10.3539 16.0599 11.4519 16.6558C12.55 17.2516 13.4819 18.1123 14.1629 19.1597C14.2729 19.3231 14.4428 19.4368 14.6359 19.476C14.829 19.5152 15.0298 19.4768 15.1949 19.3692C15.3599 19.2615 15.476 19.0932 15.5179 18.9007C15.5599 18.7082 15.5244 18.5068 15.4191 18.3403C14.3634 16.7152 12.8105 15.4751 10.9922 14.805ZM3.75005 10.125C3.75005 9.30912 3.99197 8.51159 4.44523 7.83324C4.8985 7.15488 5.54273 6.62617 6.29648 6.31396C7.05022 6.00175 7.87962 5.92006 8.67979 6.07922C9.47997 6.23839 10.215 6.63126 10.7919 7.20815C11.3688 7.78504 11.7616 8.52004 11.9208 9.32022C12.0799 10.1204 11.9983 10.9498 11.686 11.7035C11.3738 12.4573 10.8451 13.1015 10.1668 13.5548C9.48842 14.008 8.69089 14.25 7.87505 14.25C6.78141 14.2487 5.73292 13.8137 4.9596 13.0404C4.18628 12.2671 3.75129 11.2186 3.75005 10.125ZM23.4507 19.3781C23.2841 19.4867 23.0812 19.5247 22.8865 19.4838C22.6919 19.4428 22.5215 19.3262 22.4129 19.1597C21.7327 18.1116 20.801 17.2506 19.7027 16.655C18.6044 16.0594 17.3744 15.7483 16.125 15.75C15.9261 15.75 15.7354 15.6709 15.5947 15.5303C15.4541 15.3896 15.375 15.1989 15.375 15C15.375 14.8011 15.4541 14.6103 15.5947 14.4696C15.7354 14.329 15.9261 14.25 16.125 14.25C16.7325 14.2494 17.3324 14.1147 17.8817 13.8554C18.4311 13.5961 18.9164 13.2187 19.303 12.7501C19.6896 12.2815 19.9679 11.7334 20.1181 11.1448C20.2683 10.5561 20.2866 9.94162 20.1718 9.3451C20.0569 8.74859 19.8117 8.1848 19.4537 7.69402C19.0958 7.20325 18.6338 6.7976 18.1008 6.50606C17.5679 6.21452 16.9771 6.04429 16.3708 6.00752C15.7644 5.97076 15.1574 6.06838 14.5932 6.2934C14.5012 6.33317 14.4021 6.3541 14.3019 6.35495C14.2017 6.35579 14.1023 6.33654 14.0096 6.29833C13.917 6.26012 13.8329 6.20373 13.7624 6.13248C13.6919 6.06123 13.6364 5.97658 13.5992 5.88352C13.562 5.79046 13.5438 5.69088 13.5457 5.59067C13.5476 5.49046 13.5696 5.39165 13.6103 5.30007C13.6511 5.2085 13.7098 5.12602 13.7829 5.05752C13.8561 4.98901 13.9422 4.93586 14.0363 4.90121C15.3277 4.3862 16.764 4.36767 18.0682 4.84919C19.3725 5.33071 20.4522 6.27817 21.099 7.50879C21.7459 8.73941 21.9141 10.166 21.5713 11.5133C21.2284 12.8607 20.3987 14.0333 19.2422 14.805C21.0605 15.4751 22.6134 16.7152 23.6691 18.3403C23.7777 18.5069 23.8158 18.7098 23.7748 18.9044C23.7338 19.099 23.6172 19.2694 23.4507 19.3781Z' fill='currentColor'/%3e%3c/svg%3e"); +} +.toolbar-button--icon--help { + --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M13.125 16.875C13.125 17.0975 13.059 17.315 12.9354 17.5C12.8118 17.685 12.6361 17.8292 12.4305 17.9144C12.225 17.9995 11.9988 18.0218 11.7805 17.9784C11.5623 17.935 11.3618 17.8278 11.2045 17.6705C11.0472 17.5132 10.94 17.3127 10.8966 17.0945C10.8532 16.8762 10.8755 16.65 10.9606 16.4445C11.0458 16.2389 11.19 16.0632 11.375 15.9396C11.56 15.816 11.7775 15.75 12 15.75C12.2984 15.75 12.5845 15.8685 12.7955 16.0795C13.0065 16.2905 13.125 16.5766 13.125 16.875ZM12 6.75C9.93188 6.75 8.25 8.26406 8.25 10.125V10.5C8.25 10.6989 8.32902 10.8897 8.46967 11.0303C8.61033 11.171 8.80109 11.25 9 11.25C9.19892 11.25 9.38968 11.171 9.53033 11.0303C9.67099 10.8897 9.75 10.6989 9.75 10.5V10.125C9.75 9.09375 10.7597 8.25 12 8.25C13.2403 8.25 14.25 9.09375 14.25 10.125C14.25 11.1562 13.2403 12 12 12C11.8011 12 11.6103 12.079 11.4697 12.2197C11.329 12.3603 11.25 12.5511 11.25 12.75V13.5C11.25 13.6989 11.329 13.8897 11.4697 14.0303C11.6103 14.171 11.8011 14.25 12 14.25C12.1989 14.25 12.3897 14.171 12.5303 14.0303C12.671 13.8897 12.75 13.6989 12.75 13.5V13.4325C14.46 13.1184 15.75 11.7544 15.75 10.125C15.75 8.26406 14.0681 6.75 12 6.75ZM21.75 12C21.75 13.9284 21.1782 15.8134 20.1068 17.4168C19.0355 19.0202 17.5127 20.2699 15.7312 21.0078C13.9496 21.7458 11.9892 21.9389 10.0979 21.5627C8.20656 21.1865 6.46928 20.2579 5.10571 18.8943C3.74215 17.5307 2.81355 15.7934 2.43735 13.9021C2.06114 12.0108 2.25422 10.0504 2.99218 8.26884C3.73013 6.48726 4.97982 4.96452 6.58319 3.89317C8.18657 2.82183 10.0716 2.25 12 2.25C14.585 2.25273 17.0634 3.28084 18.8913 5.10872C20.7192 6.93661 21.7473 9.41498 21.75 12ZM20.25 12C20.25 10.3683 19.7662 8.77325 18.8596 7.41655C17.9531 6.05984 16.6646 5.00242 15.1571 4.37799C13.6497 3.75357 11.9909 3.59019 10.3905 3.90852C8.79017 4.22685 7.32016 5.01259 6.16637 6.16637C5.01259 7.32015 4.22685 8.79016 3.90853 10.3905C3.5902 11.9908 3.75358 13.6496 4.378 15.1571C5.00242 16.6646 6.05984 17.9531 7.41655 18.8596C8.77326 19.7661 10.3683 20.25 12 20.25C14.1873 20.2475 16.2843 19.3775 17.8309 17.8309C19.3775 16.2843 20.2475 14.1873 20.25 12Z' fill='currentColor'/%3e%3c/svg%3e"); } .toolbar-button--icon--navigation-blocks { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M9.75 3.75H5.25C4.85218 3.75 4.47064 3.90804 4.18934 4.18934C3.90804 4.47064 3.75 4.85218 3.75 5.25V9.75C3.75 10.1478 3.90804 10.5294 4.18934 10.8107C4.47064 11.092 4.85218 11.25 5.25 11.25H9.75C10.1478 11.25 10.5294 11.092 10.8107 10.8107C11.092 10.5294 11.25 10.1478 11.25 9.75V5.25C11.25 4.85218 11.092 4.47064 10.8107 4.18934C10.5294 3.90804 10.1478 3.75 9.75 3.75ZM9.75 9.75H5.25V5.25H9.75V9.75ZM18.75 3.75H14.25C13.8522 3.75 13.4706 3.90804 13.1893 4.18934C12.908 4.47064 12.75 4.85218 12.75 5.25V9.75C12.75 10.1478 12.908 10.5294 13.1893 10.8107C13.4706 11.092 13.8522 11.25 14.25 11.25H18.75C19.1478 11.25 19.5294 11.092 19.8107 10.8107C20.092 10.5294 20.25 10.1478 20.25 9.75V5.25C20.25 4.85218 20.092 4.47064 19.8107 4.18934C19.5294 3.90804 19.1478 3.75 18.75 3.75ZM18.75 9.75H14.25V5.25H18.75V9.75ZM9.75 12.75H5.25C4.85218 12.75 4.47064 12.908 4.18934 13.1893C3.90804 13.4706 3.75 13.8522 3.75 14.25V18.75C3.75 19.1478 3.90804 19.5294 4.18934 19.8107C4.47064 20.092 4.85218 20.25 5.25 20.25H9.75C10.1478 20.25 10.5294 20.092 10.8107 19.8107C11.092 19.5294 11.25 19.1478 11.25 18.75V14.25C11.25 13.8522 11.092 13.4706 10.8107 13.1893C10.5294 12.908 10.1478 12.75 9.75 12.75ZM9.75 18.75H5.25V14.25H9.75V18.75ZM18.75 12.75H14.25C13.8522 12.75 13.4706 12.908 13.1893 13.1893C12.908 13.4706 12.75 13.8522 12.75 14.25V18.75C12.75 19.1478 12.908 19.5294 13.1893 19.8107C13.4706 20.092 13.8522 20.25 14.25 20.25H18.75C19.1478 20.25 19.5294 20.092 19.8107 19.8107C20.092 19.5294 20.25 19.1478 20.25 18.75V14.25C20.25 13.8522 20.092 13.4706 19.8107 13.1893C19.5294 12.908 19.1478 12.75 18.75 12.75ZM18.75 18.75H14.25V14.25H18.75V18.75Z' fill='currentColor'/%3e%3c/svg%3e"); } -.toolbar-button--icon--shortcuts { - --icon: url("data:image/svg+xml,%3csvg width='22' height='21' viewBox='0 0 22 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M21.4251 8.121C21.3342 7.84104 21.1631 7.594 20.9328 7.41063C20.7026 7.22726 20.4236 7.11566 20.1304 7.08975L14.5626 6.60974L12.3801 1.41974C12.2664 1.14742 12.0748 0.914795 11.8292 0.751174C11.5836 0.587552 11.2952 0.500244 11.0001 0.500244C10.705 0.500244 10.4165 0.587552 10.1709 0.751174C9.92537 0.914795 9.7337 1.14742 9.62007 1.41974L7.44413 6.60974L1.86976 7.09256C1.57542 7.11729 1.29493 7.22838 1.06347 7.41188C0.832008 7.59539 0.65988 7.84315 0.568668 8.1241C0.477457 8.40504 0.471222 8.70666 0.550747 8.99113C0.630272 9.2756 0.792015 9.53027 1.01569 9.72318L5.24476 13.4188L3.97726 18.9069C3.91023 19.1941 3.92936 19.4947 4.03224 19.7711C4.13512 20.0475 4.31719 20.2874 4.55569 20.4609C4.79419 20.6344 5.07853 20.7337 5.37317 20.7464C5.66781 20.7592 5.95967 20.6848 6.21226 20.5326L10.9935 17.6263L15.7851 20.5326C16.0377 20.6848 16.3295 20.7592 16.6242 20.7464C16.9188 20.7337 17.2031 20.6344 17.4416 20.4609C17.6801 20.2874 17.8622 20.0475 17.9651 19.7711C18.068 19.4947 18.0871 19.1941 18.0201 18.9069L16.7535 13.4132L20.9816 9.72318C21.2053 9.5296 21.3667 9.27421 21.4456 8.98914C21.5245 8.70406 21.5174 8.40202 21.4251 8.121ZM19.9982 8.58975L15.7701 12.2797C15.5643 12.4587 15.4112 12.6905 15.3273 12.95C15.2434 13.2095 15.2318 13.487 15.2938 13.7526L16.5641 19.2501L11.7763 16.3438C11.5427 16.2016 11.2745 16.1263 11.001 16.1263C10.7275 16.1263 10.4593 16.2016 10.2257 16.3438L5.44444 19.2501L6.70632 13.7563C6.76834 13.4907 6.75676 13.2132 6.67285 12.9537C6.58893 12.6942 6.43585 12.4625 6.23007 12.2835L2.00007 8.59537C1.99973 8.59257 1.99973 8.58973 2.00007 8.58693L7.57257 8.10506C7.84463 8.08108 8.10499 7.98327 8.32555 7.82219C8.54611 7.6611 8.7185 7.44286 8.82413 7.191L11.0001 2.00756L13.1751 7.191C13.2807 7.44286 13.4531 7.6611 13.6737 7.82219C13.8942 7.98327 14.1546 8.08108 14.4266 8.10506L20.0001 8.58693C20.0001 8.58693 20.0001 8.59256 20.0001 8.59349L19.9982 8.58975Z' fill='currentColor'/%3e%3c/svg%3e"); -} -.toolbar-button--icon--system-admin-config { - --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M6.00002 9.84375V3.75C6.00002 3.55109 5.92101 3.36032 5.78035 3.21967C5.6397 3.07902 5.44894 3 5.25002 3C5.05111 3 4.86035 3.07902 4.71969 3.21967C4.57904 3.36032 4.50002 3.55109 4.50002 3.75V9.84375C3.85471 10.009 3.28274 10.3843 2.87429 10.9105C2.46584 11.4367 2.24414 12.0839 2.24414 12.75C2.24414 13.4161 2.46584 14.0633 2.87429 14.5895C3.28274 15.1157 3.85471 15.491 4.50002 15.6562V20.25C4.50002 20.4489 4.57904 20.6397 4.71969 20.7803C4.86035 20.921 5.05111 21 5.25002 21C5.44894 21 5.6397 20.921 5.78035 20.7803C5.92101 20.6397 6.00002 20.4489 6.00002 20.25V15.6562C6.64533 15.491 7.2173 15.1157 7.62575 14.5895C8.0342 14.0633 8.25591 13.4161 8.25591 12.75C8.25591 12.0839 8.0342 11.4367 7.62575 10.9105C7.2173 10.3843 6.64533 10.009 6.00002 9.84375ZM5.25002 14.25C4.95335 14.25 4.66334 14.162 4.41667 13.9972C4.16999 13.8324 3.97774 13.5981 3.8642 13.324C3.75067 13.0499 3.72097 12.7483 3.77885 12.4574C3.83672 12.1664 3.97958 11.8991 4.18936 11.6893C4.39914 11.4796 4.66642 11.3367 4.95739 11.2788C5.24836 11.2209 5.54996 11.2506 5.82405 11.3642C6.09814 11.4777 6.33241 11.67 6.49723 11.9166C6.66205 12.1633 6.75002 12.4533 6.75002 12.75C6.75002 13.1478 6.59199 13.5294 6.31068 13.8107C6.02938 14.092 5.64785 14.25 5.25002 14.25ZM12.75 5.34375V3.75C12.75 3.55109 12.671 3.36032 12.5304 3.21967C12.3897 3.07902 12.1989 3 12 3C11.8011 3 11.6103 3.07902 11.4697 3.21967C11.329 3.36032 11.25 3.55109 11.25 3.75V5.34375C10.6047 5.50898 10.0327 5.88428 9.62429 6.41048C9.21584 6.93669 8.99414 7.58387 8.99414 8.25C8.99414 8.91613 9.21584 9.56331 9.62429 10.0895C10.0327 10.6157 10.6047 10.991 11.25 11.1562V20.25C11.25 20.4489 11.329 20.6397 11.4697 20.7803C11.6103 20.921 11.8011 21 12 21C12.1989 21 12.3897 20.921 12.5304 20.7803C12.671 20.6397 12.75 20.4489 12.75 20.25V11.1562C13.3953 10.991 13.9673 10.6157 14.3758 10.0895C14.7842 9.56331 15.0059 8.91613 15.0059 8.25C15.0059 7.58387 14.7842 6.93669 14.3758 6.41048C13.9673 5.88428 13.3953 5.50898 12.75 5.34375ZM12 9.75C11.7034 9.75 11.4133 9.66203 11.1667 9.4972C10.92 9.33238 10.7277 9.09811 10.6142 8.82402C10.5007 8.54994 10.471 8.24834 10.5288 7.95736C10.5867 7.66639 10.7296 7.39912 10.9394 7.18934C11.1491 6.97956 11.4164 6.8367 11.7074 6.77882C11.9984 6.72094 12.3 6.75065 12.574 6.86418C12.8481 6.97771 13.0824 7.16997 13.2472 7.41664C13.412 7.66332 13.5 7.95333 13.5 8.25C13.5 8.64782 13.342 9.02936 13.0607 9.31066C12.7794 9.59196 12.3978 9.75 12 9.75ZM21.75 15.75C21.7494 15.0849 21.5282 14.4388 21.121 13.9129C20.7139 13.387 20.1438 13.011 19.5 12.8438V3.75C19.5 3.55109 19.421 3.36032 19.2804 3.21967C19.1397 3.07902 18.9489 3 18.75 3C18.5511 3 18.3603 3.07902 18.2197 3.21967C18.079 3.36032 18 3.55109 18 3.75V12.8438C17.3547 13.009 16.7827 13.3843 16.3743 13.9105C15.9658 14.4367 15.7441 15.0839 15.7441 15.75C15.7441 16.4161 15.9658 17.0633 16.3743 17.5895C16.7827 18.1157 17.3547 18.491 18 18.6562V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21C18.9489 21 19.1397 20.921 19.2804 20.7803C19.421 20.6397 19.5 20.4489 19.5 20.25V18.6562C20.1438 18.489 20.7139 18.113 21.121 17.5871C21.5282 17.0612 21.7494 16.4151 21.75 15.75ZM18.75 17.25C18.4534 17.25 18.1633 17.162 17.9167 16.9972C17.67 16.8324 17.4777 16.5981 17.3642 16.324C17.2507 16.0499 17.221 15.7483 17.2788 15.4574C17.3367 15.1664 17.4796 14.8991 17.6894 14.6893C17.8991 14.4796 18.1664 14.3367 18.4574 14.2788C18.7484 14.2209 19.05 14.2506 19.324 14.3642C19.5981 14.4777 19.8324 14.67 19.9972 14.9166C20.162 15.1633 20.25 15.4533 20.25 15.75C20.25 16.1478 20.092 16.5294 19.8107 16.8107C19.5294 17.092 19.1478 17.25 18.75 17.25Z' fill='currentColor'/%3e%3c/svg%3e"); -} .toolbar-button--icon--navigation-content { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M20.25 3.75H3.75C3.35218 3.75 2.97064 3.90804 2.68934 4.18934C2.40804 4.47064 2.25 4.85218 2.25 5.25V18.75C2.25 19.1478 2.40804 19.5294 2.68934 19.8107C2.97064 20.092 3.35218 20.25 3.75 20.25H20.25C20.6478 20.25 21.0294 20.092 21.3107 19.8107C21.592 19.5294 21.75 19.1478 21.75 18.75V5.25C21.75 4.85218 21.592 4.47064 21.3107 4.18934C21.0294 3.90804 20.6478 3.75 20.25 3.75ZM20.25 18.75H3.75V5.25H20.25V18.75ZM17.25 9C17.25 9.19891 17.171 9.38968 17.0303 9.53033C16.8897 9.67098 16.6989 9.75 16.5 9.75H7.5C7.30109 9.75 7.11032 9.67098 6.96967 9.53033C6.82902 9.38968 6.75 9.19891 6.75 9C6.75 8.80109 6.82902 8.61032 6.96967 8.46967C7.11032 8.32902 7.30109 8.25 7.5 8.25H16.5C16.6989 8.25 16.8897 8.32902 17.0303 8.46967C17.171 8.61032 17.25 8.80109 17.25 9ZM17.25 12C17.25 12.1989 17.171 12.3897 17.0303 12.5303C16.8897 12.671 16.6989 12.75 16.5 12.75H7.5C7.30109 12.75 7.11032 12.671 6.96967 12.5303C6.82902 12.3897 6.75 12.1989 6.75 12C6.75 11.8011 6.82902 11.6103 6.96967 11.4697C7.11032 11.329 7.30109 11.25 7.5 11.25H16.5C16.6989 11.25 16.8897 11.329 17.0303 11.4697C17.171 11.6103 17.25 11.8011 17.25 12ZM17.25 15C17.25 15.1989 17.171 15.3897 17.0303 15.5303C16.8897 15.671 16.6989 15.75 16.5 15.75H7.5C7.30109 15.75 7.11032 15.671 6.96967 15.5303C6.82902 15.3897 6.75 15.1989 6.75 15C6.75 14.8011 6.82902 14.6103 6.96967 14.4697C7.11032 14.329 7.30109 14.25 7.5 14.25H16.5C16.6989 14.25 16.8897 14.329 17.0303 14.4697C17.171 14.6103 17.25 14.8011 17.25 15Z' fill='currentColor'/%3e%3c/svg%3e"); } .toolbar-button--icon--navigation-create { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M12 2.25C10.0716 2.25 8.18657 2.82183 6.58319 3.89317C4.97982 4.96452 3.73013 6.48726 2.99218 8.26884C2.25422 10.0504 2.06114 12.0108 2.43735 13.9021C2.81355 15.7934 3.74215 17.5307 5.10571 18.8943C6.46928 20.2579 8.20656 21.1865 10.0979 21.5627C11.9892 21.9389 13.9496 21.7458 15.7312 21.0078C17.5127 20.2699 19.0355 19.0202 20.1068 17.4168C21.1782 15.8134 21.75 13.9284 21.75 12C21.7473 9.41498 20.7192 6.93661 18.8913 5.10872C17.0634 3.28084 14.585 2.25273 12 2.25ZM12 20.25C10.3683 20.25 8.77326 19.7661 7.41655 18.8596C6.05984 17.9531 5.00242 16.6646 4.378 15.1571C3.75358 13.6496 3.5902 11.9908 3.90853 10.3905C4.22685 8.79016 5.01259 7.32015 6.16637 6.16637C7.32016 5.01259 8.79017 4.22685 10.3905 3.90852C11.9909 3.59019 13.6497 3.75357 15.1571 4.37799C16.6646 5.00242 17.9531 6.05984 18.8596 7.41655C19.7662 8.77325 20.25 10.3683 20.25 12C20.2475 14.1873 19.3775 16.2843 17.8309 17.8309C16.2843 19.3775 14.1873 20.2475 12 20.25ZM16.5 12C16.5 12.1989 16.421 12.3897 16.2803 12.5303C16.1397 12.671 15.9489 12.75 15.75 12.75H12.75V15.75C12.75 15.9489 12.671 16.1397 12.5303 16.2803C12.3897 16.421 12.1989 16.5 12 16.5C11.8011 16.5 11.6103 16.421 11.4697 16.2803C11.329 16.1397 11.25 15.9489 11.25 15.75V12.75H8.25C8.05109 12.75 7.86033 12.671 7.71967 12.5303C7.57902 12.3897 7.5 12.1989 7.5 12C7.5 11.8011 7.57902 11.6103 7.71967 11.4697C7.86033 11.329 8.05109 11.25 8.25 11.25H11.25V8.25C11.25 8.05109 11.329 7.86032 11.4697 7.71967C11.6103 7.57902 11.8011 7.5 12 7.5C12.1989 7.5 12.3897 7.57902 12.5303 7.71967C12.671 7.86032 12.75 8.05109 12.75 8.25V11.25H15.75C15.9489 11.25 16.1397 11.329 16.2803 11.4697C16.421 11.6103 16.5 11.8011 16.5 12Z' fill='currentColor'/%3e%3c/svg%3e"); } -.toolbar-button--icon--system-modules-list { - --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M20.6503 14.8631C20.5434 14.7957 20.4212 14.7564 20.2949 14.7488C20.1687 14.7413 20.0427 14.7658 19.9285 14.82C19.6427 14.9552 19.3274 15.0159 19.0118 14.9965C18.6963 14.9771 18.3908 14.8782 18.1237 14.7091C17.8566 14.54 17.6366 14.3061 17.4842 14.0291C17.3318 13.7521 17.2518 13.4411 17.2518 13.125C17.2518 12.8089 17.3318 12.4979 17.4842 12.2209C17.6366 11.944 17.8566 11.7101 18.1237 11.5409C18.3908 11.3718 18.6963 11.2729 19.0118 11.2535C19.3274 11.2342 19.6427 11.2949 19.9285 11.43C20.0428 11.4843 20.169 11.5087 20.2953 11.5011C20.4217 11.4934 20.544 11.4539 20.651 11.3863C20.7579 11.3186 20.846 11.225 20.9071 11.1141C20.9681 11.0033 21.0001 10.8788 21 10.7522V6.75002C21 6.35219 20.842 5.97066 20.5607 5.68936C20.2794 5.40805 19.8979 5.25002 19.5 5.25002H16.1044C16.1184 5.12551 16.1252 5.00031 16.125 4.87502C16.1243 4.41407 16.0295 3.95812 15.8464 3.53511C15.6633 3.1121 15.3957 2.73095 15.06 2.41502C14.5953 1.97853 14.0164 1.68261 13.3904 1.56154C12.7644 1.44046 12.117 1.49918 11.523 1.73089C10.929 1.9626 10.4128 2.35782 10.0341 2.87079C9.65549 3.38376 9.42989 3.9935 9.38347 4.62939C9.36906 4.83624 9.37345 5.04396 9.39659 5.25002H6.00003C5.60221 5.25002 5.22067 5.40805 4.93937 5.68936C4.65807 5.97066 4.50003 6.35219 4.50003 6.75002V9.77064C4.37552 9.75669 4.25032 9.7498 4.12503 9.75002C3.66409 9.75076 3.20816 9.8456 2.78516 10.0287C2.36216 10.2119 1.981 10.4794 1.66503 10.815C1.34679 11.1512 1.10175 11.5497 0.945386 11.9854C0.789021 12.4211 0.724736 12.8845 0.756593 13.3463C0.810338 14.1594 1.15585 14.9259 1.7296 15.5046C2.30334 16.0833 3.06674 16.4355 3.87941 16.4963C4.08624 16.5111 4.29401 16.5067 4.50003 16.4831V19.5C4.50003 19.8978 4.65807 20.2794 4.93937 20.5607C5.22067 20.842 5.60221 21 6.00003 21H19.5C19.8979 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5V15.4978C21.0001 15.3711 20.9681 15.2464 20.9069 15.1355C20.8458 15.0245 20.7575 14.9308 20.6503 14.8631ZM19.5 19.5H6.00003V15.4978C6.00007 15.3713 5.96809 15.2468 5.90705 15.1359C5.84602 15.025 5.75792 14.9314 5.65096 14.8637C5.54401 14.7961 5.42167 14.7566 5.29534 14.749C5.16901 14.7413 5.0428 14.7658 4.92847 14.82C4.64269 14.9552 4.32737 15.0159 4.01183 14.9965C3.6963 14.9771 3.39079 14.8782 3.1237 14.7091C2.85662 14.54 2.63664 14.3061 2.48421 14.0291C2.33178 13.7521 2.25184 13.4411 2.25184 13.125C2.25184 12.8089 2.33178 12.4979 2.48421 12.2209C2.63664 11.944 2.85662 11.7101 3.1237 11.5409C3.39079 11.3718 3.6963 11.2729 4.01183 11.2535C4.32737 11.2342 4.64269 11.2949 4.92847 11.43C5.0428 11.4843 5.16901 11.5087 5.29534 11.5011C5.42167 11.4934 5.54401 11.4539 5.65096 11.3863C5.75792 11.3186 5.84602 11.225 5.90705 11.1141C5.96809 11.0033 6.00007 10.8788 6.00003 10.7522V6.75002H10.3772C10.5038 6.75006 10.6283 6.71807 10.7392 6.65704C10.85 6.596 10.9436 6.50791 11.0113 6.40095C11.079 6.29399 11.1184 6.17165 11.1261 6.04533C11.1337 5.919 11.1093 5.79279 11.055 5.67845C10.9199 5.39267 10.8592 5.07736 10.8786 4.76182C10.898 4.44628 10.9968 4.14077 11.1659 3.87369C11.3351 3.60661 11.569 3.38663 11.8459 3.23419C12.1229 3.08176 12.4339 3.00183 12.75 3.00183C13.0662 3.00183 13.3772 3.08176 13.6541 3.23419C13.9311 3.38663 14.165 3.60661 14.3341 3.87369C14.5033 4.14077 14.6021 4.44628 14.6215 4.76182C14.6409 5.07736 14.5802 5.39267 14.445 5.67845C14.3908 5.79279 14.3663 5.919 14.374 6.04533C14.3816 6.17165 14.4211 6.29399 14.4888 6.40095C14.5564 6.50791 14.65 6.596 14.7609 6.65704C14.8718 6.71807 14.9963 6.75006 15.1228 6.75002H19.5V9.77158C19.294 9.74798 19.0862 9.74358 18.8794 9.75845C18.0065 9.82026 17.1917 10.2187 16.607 10.8697C16.0222 11.5207 15.7132 12.3734 15.745 13.2479C15.7769 14.1224 16.1472 14.9503 16.7778 15.5571C17.4084 16.1638 18.25 16.5019 19.125 16.5C19.2503 16.5002 19.3755 16.4933 19.5 16.4794V19.5Z' fill='currentColor'/%3e%3c/svg%3e"); -} .toolbar-button--icon--navigation-files { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M20.0306 6.21938L16.2806 2.46938C16.2109 2.39975 16.1282 2.34454 16.0371 2.3069C15.9461 2.26926 15.8485 2.24992 15.75 2.25H8.25C7.85218 2.25 7.47064 2.40804 7.18934 2.68934C6.90804 2.97064 6.75 3.35218 6.75 3.75V5.25H5.25C4.85218 5.25 4.47064 5.40804 4.18934 5.68934C3.90804 5.97064 3.75 6.35218 3.75 6.75V20.25C3.75 20.6478 3.90804 21.0294 4.18934 21.3107C4.47064 21.592 4.85218 21.75 5.25 21.75H15.75C16.1478 21.75 16.5294 21.592 16.8107 21.3107C17.092 21.0294 17.25 20.6478 17.25 20.25V18.75H18.75C19.1478 18.75 19.5294 18.592 19.8107 18.3107C20.092 18.0294 20.25 17.6478 20.25 17.25V6.75C20.2501 6.65148 20.2307 6.55391 20.1931 6.46286C20.1555 6.37182 20.1003 6.28908 20.0306 6.21938ZM15.75 20.25H5.25V6.75H12.4397L15.75 10.0603V17.985C15.75 17.9906 15.75 17.9953 15.75 18C15.75 18.0047 15.75 18.0094 15.75 18.015V20.25ZM18.75 17.25H17.25V9.75C17.2501 9.65148 17.2307 9.55391 17.1931 9.46286C17.1555 9.37182 17.1003 9.28908 17.0306 9.21937L13.2806 5.46938C13.2109 5.39975 13.1282 5.34454 13.0371 5.3069C12.9461 5.26926 12.8485 5.24992 12.75 5.25H8.25V3.75H15.4397L18.75 7.06031V17.25ZM13.5 14.25C13.5 14.4489 13.421 14.6397 13.2803 14.7803C13.1397 14.921 12.9489 15 12.75 15H8.25C8.05109 15 7.86032 14.921 7.71967 14.7803C7.57902 14.6397 7.5 14.4489 7.5 14.25C7.5 14.0511 7.57902 13.8603 7.71967 13.7197C7.86032 13.579 8.05109 13.5 8.25 13.5H12.75C12.9489 13.5 13.1397 13.579 13.2803 13.7197C13.421 13.8603 13.5 14.0511 13.5 14.25ZM13.5 17.25C13.5 17.4489 13.421 17.6397 13.2803 17.7803C13.1397 17.921 12.9489 18 12.75 18H8.25C8.05109 18 7.86032 17.921 7.71967 17.7803C7.57902 17.6397 7.5 17.4489 7.5 17.25C7.5 17.0511 7.57902 16.8603 7.71967 16.7197C7.86032 16.579 8.05109 16.5 8.25 16.5H12.75C12.9489 16.5 13.1397 16.579 13.2803 16.7197C13.421 16.8603 13.5 17.0511 13.5 17.25Z' fill='currentColor'/%3e%3c/svg%3e"); } -.toolbar-button--icon--help { - --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M13.125 16.875C13.125 17.0975 13.059 17.315 12.9354 17.5C12.8118 17.685 12.6361 17.8292 12.4305 17.9144C12.225 17.9995 11.9988 18.0218 11.7805 17.9784C11.5623 17.935 11.3618 17.8278 11.2045 17.6705C11.0472 17.5132 10.94 17.3127 10.8966 17.0945C10.8532 16.8762 10.8755 16.65 10.9606 16.4445C11.0458 16.2389 11.19 16.0632 11.375 15.9396C11.56 15.816 11.7775 15.75 12 15.75C12.2984 15.75 12.5845 15.8685 12.7955 16.0795C13.0065 16.2905 13.125 16.5766 13.125 16.875ZM12 6.75C9.93188 6.75 8.25 8.26406 8.25 10.125V10.5C8.25 10.6989 8.32902 10.8897 8.46967 11.0303C8.61033 11.171 8.80109 11.25 9 11.25C9.19892 11.25 9.38968 11.171 9.53033 11.0303C9.67099 10.8897 9.75 10.6989 9.75 10.5V10.125C9.75 9.09375 10.7597 8.25 12 8.25C13.2403 8.25 14.25 9.09375 14.25 10.125C14.25 11.1562 13.2403 12 12 12C11.8011 12 11.6103 12.079 11.4697 12.2197C11.329 12.3603 11.25 12.5511 11.25 12.75V13.5C11.25 13.6989 11.329 13.8897 11.4697 14.0303C11.6103 14.171 11.8011 14.25 12 14.25C12.1989 14.25 12.3897 14.171 12.5303 14.0303C12.671 13.8897 12.75 13.6989 12.75 13.5V13.4325C14.46 13.1184 15.75 11.7544 15.75 10.125C15.75 8.26406 14.0681 6.75 12 6.75ZM21.75 12C21.75 13.9284 21.1782 15.8134 20.1068 17.4168C19.0355 19.0202 17.5127 20.2699 15.7312 21.0078C13.9496 21.7458 11.9892 21.9389 10.0979 21.5627C8.20656 21.1865 6.46928 20.2579 5.10571 18.8943C3.74215 17.5307 2.81355 15.7934 2.43735 13.9021C2.06114 12.0108 2.25422 10.0504 2.99218 8.26884C3.73013 6.48726 4.97982 4.96452 6.58319 3.89317C8.18657 2.82183 10.0716 2.25 12 2.25C14.585 2.25273 17.0634 3.28084 18.8913 5.10872C20.7192 6.93661 21.7473 9.41498 21.75 12ZM20.25 12C20.25 10.3683 19.7662 8.77325 18.8596 7.41655C17.9531 6.05984 16.6646 5.00242 15.1571 4.37799C13.6497 3.75357 11.9909 3.59019 10.3905 3.90852C8.79017 4.22685 7.32016 5.01259 6.16637 6.16637C5.01259 7.32015 4.22685 8.79016 3.90853 10.3905C3.5902 11.9908 3.75358 13.6496 4.378 15.1571C5.00242 16.6646 6.05984 17.9531 7.41655 18.8596C8.77326 19.7661 10.3683 20.25 12 20.25C14.1873 20.2475 16.2843 19.3775 17.8309 17.8309C19.3775 16.2843 20.2475 14.1873 20.25 12Z' fill='currentColor'/%3e%3c/svg%3e"); -} .toolbar-button--icon--navigation-media { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M19.5 3H7.5C7.10218 3 6.72064 3.15804 6.43934 3.43934C6.15804 3.72064 6 4.10218 6 4.5V6H4.5C4.10218 6 3.72064 6.15804 3.43934 6.43934C3.15804 6.72064 3 7.10218 3 7.5V19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72064 20.842 4.10218 21 4.5 21H16.5C16.8978 21 17.2794 20.842 17.5607 20.5607C17.842 20.2794 18 19.8978 18 19.5V18H19.5C19.8978 18 20.2794 17.842 20.5607 17.5607C20.842 17.2794 21 16.8978 21 16.5V4.5C21 4.10218 20.842 3.72064 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3ZM7.5 4.5H19.5V11.0044L17.9344 9.43875C17.6531 9.15766 17.2717 8.99976 16.8741 8.99976C16.4764 8.99976 16.095 9.15766 15.8137 9.43875L8.75344 16.5H7.5V4.5ZM16.5 19.5H4.5V7.5H6V16.5C6 16.8978 6.15804 17.2794 6.43934 17.5607C6.72064 17.842 7.10218 18 7.5 18H16.5V19.5ZM19.5 16.5H10.875L16.875 10.5L19.5 13.125V16.5ZM11.25 10.5C11.695 10.5 12.13 10.368 12.5 10.1208C12.87 9.87357 13.1584 9.52217 13.3287 9.11104C13.499 8.6999 13.5436 8.2475 13.4568 7.81105C13.37 7.37459 13.1557 6.97368 12.841 6.65901C12.5263 6.34434 12.1254 6.13005 11.689 6.04323C11.2525 5.95642 10.8001 6.00097 10.389 6.17127C9.97783 6.34157 9.62643 6.62996 9.37919 6.99997C9.13196 7.36998 9 7.80499 9 8.25C9 8.84674 9.23705 9.41903 9.65901 9.84099C10.081 10.2629 10.6533 10.5 11.25 10.5ZM11.25 7.5C11.3983 7.5 11.5433 7.54399 11.6667 7.6264C11.79 7.70881 11.8861 7.82594 11.9429 7.96299C11.9997 8.10003 12.0145 8.25083 11.9856 8.39632C11.9567 8.5418 11.8852 8.67544 11.7803 8.78033C11.6754 8.88522 11.5418 8.95665 11.3963 8.98559C11.2508 9.01453 11.1 8.99968 10.963 8.94291C10.8259 8.88614 10.7088 8.79001 10.6264 8.66668C10.544 8.54334 10.5 8.39834 10.5 8.25C10.5 8.05109 10.579 7.86032 10.7197 7.71967C10.8603 7.57902 11.0511 7.5 11.25 7.5Z' fill='currentColor'/%3e%3c/svg%3e"); } @@ -235,8 +207,11 @@ .toolbar-button--icon--preview { --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e %3cpath fill='%2355565B' d='M19.3211 9.74688c-.0274-.06172-.6891-1.52969-2.1602-3.00079C15.2008 4.78594 12.725 3.75 9.99999 3.75c-2.725 0-5.20078 1.03594-7.16094 2.99609C1.36796 8.21719.703118 9.6875.678899 9.74688.643362 9.82681.625 9.91331.625 10.0008c0 .0875.018362.174.053899.2539.027344.0617.689061 1.5289 2.160151 3C4.79921 15.2141 7.27499 16.25 9.99999 16.25c2.72501 0 5.20081-1.0359 7.16091-2.9953 1.4711-1.4711 2.1328-2.9383 2.1602-3 .0355-.0799.0539-.1664.0539-.2539 0-.08749-.0184-.17399-.0539-.25392ZM9.99999 15c-2.40469 0-4.50547-.8742-6.24453-2.5977C3.0419 11.6927 2.43483 10.8836 1.95312 10c.48158-.88364 1.08867-1.69283 1.80234-2.40234C5.49452 5.87422 7.5953 5 9.99999 5c2.40471 0 4.50551.87422 6.24451 2.59766.715.70934 1.3234 1.51853 1.8063 2.40234-.5633 1.0516-3.0172 5-8.05081 5Zm0-8.75c-.74168 0-1.4667.21993-2.08339.63199-.61668.41205-1.09733.99772-1.38116 1.68295-.28382.68522-.35809 1.43926-.21339 2.16666.14469.7274.50184 1.3956 1.02629 1.9201.52445.5244 1.19263.8816 1.92006 1.0262.72743.1447 1.4814.0705 2.1667-.2134.6852-.2838 1.2708-.7644 1.6829-1.3811.4121-.6167.632-1.3417.632-2.0834-.001-.99424-.3965-1.94747-1.0995-2.65051-.703-.70304-1.6563-1.09846-2.65051-1.09949Zm0 6.25c-.49445 0-.9778-.1466-1.38892-.4213-.41113-.2747-.73156-.6652-.92078-1.122-.18922-.4568-.23872-.95947-.14226-1.44443.09646-.48495.33456-.93041.68419-1.28004.34964-.34963.79509-.58773 1.28005-.68419.48495-.09647.98763-.04696 1.44443.14226.4568.18922.8473.50965 1.122.92077.2747.41113.4213.89448.4213 1.38893 0 .663-.2634 1.2989-.7322 1.7678-.4689.4688-1.1048.7322-1.76781.7322Z'/%3e%3c/svg%3e"); } -.toolbar-button--icon--entity-user-collection { - --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M10.9922 14.805C11.9974 14.1358 12.7606 13.1609 13.1688 12.0244C13.5771 10.8879 13.6088 9.65024 13.2592 8.49437C12.9096 7.3385 12.1974 6.32581 11.2278 5.60605C10.2581 4.88629 9.08262 4.49768 7.87505 4.49768C6.66747 4.49768 5.49196 4.88629 4.52233 5.60605C3.55271 6.32581 2.84045 7.3385 2.49088 8.49437C2.14132 9.65024 2.17301 10.8879 2.58126 12.0244C2.98952 13.1609 3.75267 14.1358 4.75786 14.805C2.93957 15.4751 1.38671 16.7152 0.330984 18.3403C0.275499 18.4227 0.236959 18.5154 0.217604 18.6129C0.198249 18.7104 0.198466 18.8108 0.218241 18.9082C0.238017 19.0056 0.276957 19.0981 0.332798 19.1803C0.388639 19.2625 0.460266 19.3328 0.543518 19.3871C0.626769 19.4414 0.719983 19.4786 0.817742 19.4966C0.9155 19.5146 1.01585 19.5129 1.11297 19.4917C1.21008 19.4706 1.30202 19.4303 1.38344 19.3733C1.46486 19.3163 1.53413 19.2437 1.58723 19.1597C2.26822 18.1123 3.20007 17.2516 4.29814 16.6558C5.39622 16.0599 6.62574 15.7479 7.87505 15.7479C9.12435 15.7479 10.3539 16.0599 11.4519 16.6558C12.55 17.2516 13.4819 18.1123 14.1629 19.1597C14.2729 19.3231 14.4428 19.4368 14.6359 19.476C14.829 19.5152 15.0298 19.4768 15.1949 19.3692C15.3599 19.2615 15.476 19.0932 15.5179 18.9007C15.5599 18.7082 15.5244 18.5068 15.4191 18.3403C14.3634 16.7152 12.8105 15.4751 10.9922 14.805ZM3.75005 10.125C3.75005 9.30912 3.99197 8.51159 4.44523 7.83324C4.8985 7.15488 5.54273 6.62617 6.29648 6.31396C7.05022 6.00175 7.87962 5.92006 8.67979 6.07922C9.47997 6.23839 10.215 6.63126 10.7919 7.20815C11.3688 7.78504 11.7616 8.52004 11.9208 9.32022C12.0799 10.1204 11.9983 10.9498 11.686 11.7035C11.3738 12.4573 10.8451 13.1015 10.1668 13.5548C9.48842 14.008 8.69089 14.25 7.87505 14.25C6.78141 14.2487 5.73292 13.8137 4.9596 13.0404C4.18628 12.2671 3.75129 11.2186 3.75005 10.125ZM23.4507 19.3781C23.2841 19.4867 23.0812 19.5247 22.8865 19.4838C22.6919 19.4428 22.5215 19.3262 22.4129 19.1597C21.7327 18.1116 20.801 17.2506 19.7027 16.655C18.6044 16.0594 17.3744 15.7483 16.125 15.75C15.9261 15.75 15.7354 15.6709 15.5947 15.5303C15.4541 15.3896 15.375 15.1989 15.375 15C15.375 14.8011 15.4541 14.6103 15.5947 14.4696C15.7354 14.329 15.9261 14.25 16.125 14.25C16.7325 14.2494 17.3324 14.1147 17.8817 13.8554C18.4311 13.5961 18.9164 13.2187 19.303 12.7501C19.6896 12.2815 19.9679 11.7334 20.1181 11.1448C20.2683 10.5561 20.2866 9.94162 20.1718 9.3451C20.0569 8.74859 19.8117 8.1848 19.4537 7.69402C19.0958 7.20325 18.6338 6.7976 18.1008 6.50606C17.5679 6.21452 16.9771 6.04429 16.3708 6.00752C15.7644 5.97076 15.1574 6.06838 14.5932 6.2934C14.5012 6.33317 14.4021 6.3541 14.3019 6.35495C14.2017 6.35579 14.1023 6.33654 14.0096 6.29833C13.917 6.26012 13.8329 6.20373 13.7624 6.13248C13.6919 6.06123 13.6364 5.97658 13.5992 5.88352C13.562 5.79046 13.5438 5.69088 13.5457 5.59067C13.5476 5.49046 13.5696 5.39165 13.6103 5.30007C13.6511 5.2085 13.7098 5.12602 13.7829 5.05752C13.8561 4.98901 13.9422 4.93586 14.0363 4.90121C15.3277 4.3862 16.764 4.36767 18.0682 4.84919C19.3725 5.33071 20.4522 6.27817 21.099 7.50879C21.7459 8.73941 21.9141 10.166 21.5713 11.5133C21.2284 12.8607 20.3987 14.0333 19.2422 14.805C21.0605 15.4751 22.6134 16.7152 23.6691 18.3403C23.7777 18.5069 23.8158 18.7098 23.7748 18.9044C23.7338 19.099 23.6172 19.2694 23.4507 19.3781Z' fill='currentColor'/%3e%3c/svg%3e"); +.toolbar-button--icon--shortcuts { + --icon: url("data:image/svg+xml,%3csvg width='22' height='21' viewBox='0 0 22 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M21.4251 8.121C21.3342 7.84104 21.1631 7.594 20.9328 7.41063C20.7026 7.22726 20.4236 7.11566 20.1304 7.08975L14.5626 6.60974L12.3801 1.41974C12.2664 1.14742 12.0748 0.914795 11.8292 0.751174C11.5836 0.587552 11.2952 0.500244 11.0001 0.500244C10.705 0.500244 10.4165 0.587552 10.1709 0.751174C9.92537 0.914795 9.7337 1.14742 9.62007 1.41974L7.44413 6.60974L1.86976 7.09256C1.57542 7.11729 1.29493 7.22838 1.06347 7.41188C0.832008 7.59539 0.65988 7.84315 0.568668 8.1241C0.477457 8.40504 0.471222 8.70666 0.550747 8.99113C0.630272 9.2756 0.792015 9.53027 1.01569 9.72318L5.24476 13.4188L3.97726 18.9069C3.91023 19.1941 3.92936 19.4947 4.03224 19.7711C4.13512 20.0475 4.31719 20.2874 4.55569 20.4609C4.79419 20.6344 5.07853 20.7337 5.37317 20.7464C5.66781 20.7592 5.95967 20.6848 6.21226 20.5326L10.9935 17.6263L15.7851 20.5326C16.0377 20.6848 16.3295 20.7592 16.6242 20.7464C16.9188 20.7337 17.2031 20.6344 17.4416 20.4609C17.6801 20.2874 17.8622 20.0475 17.9651 19.7711C18.068 19.4947 18.0871 19.1941 18.0201 18.9069L16.7535 13.4132L20.9816 9.72318C21.2053 9.5296 21.3667 9.27421 21.4456 8.98914C21.5245 8.70406 21.5174 8.40202 21.4251 8.121ZM19.9982 8.58975L15.7701 12.2797C15.5643 12.4587 15.4112 12.6905 15.3273 12.95C15.2434 13.2095 15.2318 13.487 15.2938 13.7526L16.5641 19.2501L11.7763 16.3438C11.5427 16.2016 11.2745 16.1263 11.001 16.1263C10.7275 16.1263 10.4593 16.2016 10.2257 16.3438L5.44444 19.2501L6.70632 13.7563C6.76834 13.4907 6.75676 13.2132 6.67285 12.9537C6.58893 12.6942 6.43585 12.4625 6.23007 12.2835L2.00007 8.59537C1.99973 8.59257 1.99973 8.58973 2.00007 8.58693L7.57257 8.10506C7.84463 8.08108 8.10499 7.98327 8.32555 7.82219C8.54611 7.6611 8.7185 7.44286 8.82413 7.191L11.0001 2.00756L13.1751 7.191C13.2807 7.44286 13.4531 7.6611 13.6737 7.82219C13.8942 7.98327 14.1546 8.08108 14.4266 8.10506L20.0001 8.58693C20.0001 8.58693 20.0001 8.59256 20.0001 8.59349L19.9982 8.58975Z' fill='currentColor'/%3e%3c/svg%3e"); +} +.toolbar-button--icon--system-admin-config { + --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M6.00002 9.84375V3.75C6.00002 3.55109 5.92101 3.36032 5.78035 3.21967C5.6397 3.07902 5.44894 3 5.25002 3C5.05111 3 4.86035 3.07902 4.71969 3.21967C4.57904 3.36032 4.50002 3.55109 4.50002 3.75V9.84375C3.85471 10.009 3.28274 10.3843 2.87429 10.9105C2.46584 11.4367 2.24414 12.0839 2.24414 12.75C2.24414 13.4161 2.46584 14.0633 2.87429 14.5895C3.28274 15.1157 3.85471 15.491 4.50002 15.6562V20.25C4.50002 20.4489 4.57904 20.6397 4.71969 20.7803C4.86035 20.921 5.05111 21 5.25002 21C5.44894 21 5.6397 20.921 5.78035 20.7803C5.92101 20.6397 6.00002 20.4489 6.00002 20.25V15.6562C6.64533 15.491 7.2173 15.1157 7.62575 14.5895C8.0342 14.0633 8.25591 13.4161 8.25591 12.75C8.25591 12.0839 8.0342 11.4367 7.62575 10.9105C7.2173 10.3843 6.64533 10.009 6.00002 9.84375ZM5.25002 14.25C4.95335 14.25 4.66334 14.162 4.41667 13.9972C4.16999 13.8324 3.97774 13.5981 3.8642 13.324C3.75067 13.0499 3.72097 12.7483 3.77885 12.4574C3.83672 12.1664 3.97958 11.8991 4.18936 11.6893C4.39914 11.4796 4.66642 11.3367 4.95739 11.2788C5.24836 11.2209 5.54996 11.2506 5.82405 11.3642C6.09814 11.4777 6.33241 11.67 6.49723 11.9166C6.66205 12.1633 6.75002 12.4533 6.75002 12.75C6.75002 13.1478 6.59199 13.5294 6.31068 13.8107C6.02938 14.092 5.64785 14.25 5.25002 14.25ZM12.75 5.34375V3.75C12.75 3.55109 12.671 3.36032 12.5304 3.21967C12.3897 3.07902 12.1989 3 12 3C11.8011 3 11.6103 3.07902 11.4697 3.21967C11.329 3.36032 11.25 3.55109 11.25 3.75V5.34375C10.6047 5.50898 10.0327 5.88428 9.62429 6.41048C9.21584 6.93669 8.99414 7.58387 8.99414 8.25C8.99414 8.91613 9.21584 9.56331 9.62429 10.0895C10.0327 10.6157 10.6047 10.991 11.25 11.1562V20.25C11.25 20.4489 11.329 20.6397 11.4697 20.7803C11.6103 20.921 11.8011 21 12 21C12.1989 21 12.3897 20.921 12.5304 20.7803C12.671 20.6397 12.75 20.4489 12.75 20.25V11.1562C13.3953 10.991 13.9673 10.6157 14.3758 10.0895C14.7842 9.56331 15.0059 8.91613 15.0059 8.25C15.0059 7.58387 14.7842 6.93669 14.3758 6.41048C13.9673 5.88428 13.3953 5.50898 12.75 5.34375ZM12 9.75C11.7034 9.75 11.4133 9.66203 11.1667 9.4972C10.92 9.33238 10.7277 9.09811 10.6142 8.82402C10.5007 8.54994 10.471 8.24834 10.5288 7.95736C10.5867 7.66639 10.7296 7.39912 10.9394 7.18934C11.1491 6.97956 11.4164 6.8367 11.7074 6.77882C11.9984 6.72094 12.3 6.75065 12.574 6.86418C12.8481 6.97771 13.0824 7.16997 13.2472 7.41664C13.412 7.66332 13.5 7.95333 13.5 8.25C13.5 8.64782 13.342 9.02936 13.0607 9.31066C12.7794 9.59196 12.3978 9.75 12 9.75ZM21.75 15.75C21.7494 15.0849 21.5282 14.4388 21.121 13.9129C20.7139 13.387 20.1438 13.011 19.5 12.8438V3.75C19.5 3.55109 19.421 3.36032 19.2804 3.21967C19.1397 3.07902 18.9489 3 18.75 3C18.5511 3 18.3603 3.07902 18.2197 3.21967C18.079 3.36032 18 3.55109 18 3.75V12.8438C17.3547 13.009 16.7827 13.3843 16.3743 13.9105C15.9658 14.4367 15.7441 15.0839 15.7441 15.75C15.7441 16.4161 15.9658 17.0633 16.3743 17.5895C16.7827 18.1157 17.3547 18.491 18 18.6562V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21C18.9489 21 19.1397 20.921 19.2804 20.7803C19.421 20.6397 19.5 20.4489 19.5 20.25V18.6562C20.1438 18.489 20.7139 18.113 21.121 17.5871C21.5282 17.0612 21.7494 16.4151 21.75 15.75ZM18.75 17.25C18.4534 17.25 18.1633 17.162 17.9167 16.9972C17.67 16.8324 17.4777 16.5981 17.3642 16.324C17.2507 16.0499 17.221 15.7483 17.2788 15.4574C17.3367 15.1664 17.4796 14.8991 17.6894 14.6893C17.8991 14.4796 18.1664 14.3367 18.4574 14.2788C18.7484 14.2209 19.05 14.2506 19.324 14.3642C19.5981 14.4777 19.8324 14.67 19.9972 14.9166C20.162 15.1633 20.25 15.4533 20.25 15.75C20.25 16.1478 20.092 16.5294 19.8107 16.8107C19.5294 17.092 19.1478 17.25 18.75 17.25Z' fill='currentColor'/%3e%3c/svg%3e"); } .toolbar-button--icon--system-admin-reports { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M12 2.25C10.0716 2.25 8.18657 2.82183 6.58319 3.89317C4.97982 4.96452 3.73013 6.48726 2.99218 8.26884C2.25422 10.0504 2.06114 12.0108 2.43735 13.9021C2.81355 15.7934 3.74215 17.5307 5.10571 18.8943C6.46928 20.2579 8.20656 21.1865 10.0979 21.5627C11.9892 21.9389 13.9496 21.7458 15.7312 21.0078C17.5127 20.2699 19.0355 19.0202 20.1068 17.4168C21.1782 15.8134 21.75 13.9284 21.75 12C21.7473 9.41498 20.7192 6.93661 18.8913 5.10872C17.0634 3.28084 14.585 2.25273 12 2.25ZM18.7378 7.24406L12.75 10.7006V3.78469C13.9389 3.89369 15.0901 4.25945 16.1239 4.85672C17.1577 5.45398 18.0495 6.26851 18.7378 7.24406ZM11.25 3.78469V11.5659L4.51032 15.4566C3.95704 14.2574 3.69975 12.9428 3.76008 11.6235C3.82041 10.3042 4.19659 9.01868 4.85701 7.87497C5.51742 6.73126 6.44276 5.76281 7.55523 5.05104C8.66771 4.33927 9.93481 3.90498 11.25 3.78469ZM12 20.25C10.6792 20.2495 9.37792 19.9318 8.20543 19.3238C7.03295 18.7158 6.02358 17.8351 5.26219 16.7559L19.4897 8.5425C20.0699 9.79946 20.3244 11.1822 20.2299 12.5634C20.1354 13.9445 19.6948 15.2797 18.9487 16.4459C18.2027 17.6121 17.1752 18.5717 15.9608 19.2365C14.7465 19.9013 13.3844 20.2499 12 20.25Z' fill='currentColor'/%3e%3c/svg%3e"); @@ -244,23 +219,19 @@ .toolbar-button--icon--system-admin-structure { --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M15.75 10.5H20.25C20.6478 10.5 21.0294 10.342 21.3107 10.0607C21.592 9.77936 21.75 9.39782 21.75 9V4.5C21.75 4.10218 21.592 3.72064 21.3107 3.43934C21.0294 3.15804 20.6478 3 20.25 3H15.75C15.3522 3 14.9706 3.15804 14.6893 3.43934C14.408 3.72064 14.25 4.10218 14.25 4.5V6H13.5C12.7044 6 11.9413 6.31607 11.3787 6.87868C10.8161 7.44129 10.5 8.20435 10.5 9V11.25H7.5V10.5C7.5 10.1022 7.34196 9.72064 7.06066 9.43934C6.77936 9.15804 6.39782 9 6 9H3C2.60218 9 2.22064 9.15804 1.93934 9.43934C1.65804 9.72064 1.5 10.1022 1.5 10.5V13.5C1.5 13.8978 1.65804 14.2794 1.93934 14.5607C2.22064 14.842 2.60218 15 3 15H6C6.39782 15 6.77936 14.842 7.06066 14.5607C7.34196 14.2794 7.5 13.8978 7.5 13.5V12.75H10.5V15C10.5 15.7956 10.8161 16.5587 11.3787 17.1213C11.9413 17.6839 12.7044 18 13.5 18H14.25V19.5C14.25 19.8978 14.408 20.2794 14.6893 20.5607C14.9706 20.842 15.3522 21 15.75 21H20.25C20.6478 21 21.0294 20.842 21.3107 20.5607C21.592 20.2794 21.75 19.8978 21.75 19.5V15C21.75 14.6022 21.592 14.2206 21.3107 13.9393C21.0294 13.658 20.6478 13.5 20.25 13.5H15.75C15.3522 13.5 14.9706 13.658 14.6893 13.9393C14.408 14.2206 14.25 14.6022 14.25 15V16.5H13.5C13.1022 16.5 12.7206 16.342 12.4393 16.0607C12.158 15.7794 12 15.3978 12 15V9C12 8.60218 12.158 8.22064 12.4393 7.93934C12.7206 7.65804 13.1022 7.5 13.5 7.5H14.25V9C14.25 9.39782 14.408 9.77936 14.6893 10.0607C14.9706 10.342 15.3522 10.5 15.75 10.5ZM6 13.5H3V10.5H6V13.5ZM15.75 15H20.25V19.5H15.75V15ZM15.75 4.5H20.25V9H15.75V4.5Z' fill='currentColor'/%3e%3c/svg%3e"); } -.toolbar-button--icon--user { - --icon: url("data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M10 1.875C8.39303 1.875 6.82214 2.35152 5.486 3.24431C4.14985 4.1371 3.10844 5.40605 2.49348 6.8907C1.87852 8.37535 1.71762 10.009 2.03112 11.5851C2.34463 13.1612 3.11846 14.6089 4.25476 15.7452C5.39106 16.8815 6.8388 17.6554 8.4149 17.9689C9.99099 18.2824 11.6247 18.1215 13.1093 17.5065C14.594 16.8916 15.8629 15.8502 16.7557 14.514C17.6485 13.1779 18.125 11.607 18.125 10C18.1227 7.84581 17.266 5.78051 15.7427 4.25727C14.2195 2.73403 12.1542 1.87727 10 1.875ZM5.7875 15.4297C6.23964 14.7226 6.86251 14.1406 7.59869 13.7375C8.33488 13.3345 9.16069 13.1232 10 13.1232C10.8393 13.1232 11.6651 13.3345 12.4013 13.7375C13.1375 14.1406 13.7604 14.7226 14.2125 15.4297C13.0081 16.3664 11.5258 16.8749 10 16.8749C8.4742 16.8749 6.99193 16.3664 5.7875 15.4297ZM7.5 9.375C7.5 8.88055 7.64663 8.3972 7.92133 7.98607C8.19603 7.57495 8.58648 7.25452 9.04329 7.0653C9.50011 6.87608 10.0028 6.82657 10.4877 6.92304C10.9727 7.0195 11.4181 7.2576 11.7678 7.60723C12.1174 7.95686 12.3555 8.40232 12.452 8.88727C12.5484 9.37223 12.4989 9.87489 12.3097 10.3317C12.1205 10.7885 11.8001 11.179 11.3889 11.4537C10.9778 11.7284 10.4945 11.875 10 11.875C9.33696 11.875 8.70108 11.6116 8.23224 11.1428C7.7634 10.6739 7.5 10.038 7.5 9.375ZM15.1375 14.5633C14.4404 13.5532 13.4603 12.7717 12.3203 12.3172C12.9327 11.8349 13.3795 11.1737 13.5987 10.4257C13.8179 9.67766 13.7985 8.87992 13.5433 8.1434C13.2881 7.40687 12.8097 6.76819 12.1746 6.31616C11.5396 5.86414 10.7795 5.62123 10 5.62123C9.22052 5.62123 8.4604 5.86414 7.82536 6.31616C7.19033 6.76819 6.71193 7.40687 6.45671 8.1434C6.20149 8.87992 6.18212 9.67766 6.40131 10.4257C6.62049 11.1737 7.06734 11.8349 7.67969 12.3172C6.5397 12.7717 5.55956 13.5532 4.8625 14.5633C3.9817 13.5728 3.406 12.3488 3.20473 11.0387C3.00346 9.72856 3.1852 8.3882 3.72806 7.17898C4.27093 5.96977 5.15178 4.94326 6.26454 4.22308C7.3773 3.50289 8.67452 3.11972 10 3.11972C11.3255 3.11972 12.6227 3.50289 13.7355 4.22308C14.8482 4.94326 15.7291 5.96977 16.2719 7.17898C16.8148 8.3882 16.9966 9.72856 16.7953 11.0387C16.594 12.3488 16.0183 13.5728 15.1375 14.5633Z' fill='currentColor'/%3e%3c/svg%3e"); -} -.toolbar-button--icon--announcements-feed-announcement { - --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e %3cpath fill='none' d='M0 0h256v256H0z'/%3e %3cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16' d='M160 80v120.67a8 8 0 0 0 3.56 6.65l11 7.33a8 8 0 0 0 12.2-4.72L200 160'/%3e %3cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16' d='M40 200a8 8 0 0 0 13.15 6.12C105.55 162.16 160 160 160 160h40a40 40 0 0 0 0-80h-40s-54.45-2.16-106.85-46.11A8 8 0 0 0 40 40Z'/%3e%3c/svg%3e"); +.toolbar-button--icon--system-modules-list { + --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M20.6503 14.8631C20.5434 14.7957 20.4212 14.7564 20.2949 14.7488C20.1687 14.7413 20.0427 14.7658 19.9285 14.82C19.6427 14.9552 19.3274 15.0159 19.0118 14.9965C18.6963 14.9771 18.3908 14.8782 18.1237 14.7091C17.8566 14.54 17.6366 14.3061 17.4842 14.0291C17.3318 13.7521 17.2518 13.4411 17.2518 13.125C17.2518 12.8089 17.3318 12.4979 17.4842 12.2209C17.6366 11.944 17.8566 11.7101 18.1237 11.5409C18.3908 11.3718 18.6963 11.2729 19.0118 11.2535C19.3274 11.2342 19.6427 11.2949 19.9285 11.43C20.0428 11.4843 20.169 11.5087 20.2953 11.5011C20.4217 11.4934 20.544 11.4539 20.651 11.3863C20.7579 11.3186 20.846 11.225 20.9071 11.1141C20.9681 11.0033 21.0001 10.8788 21 10.7522V6.75002C21 6.35219 20.842 5.97066 20.5607 5.68936C20.2794 5.40805 19.8979 5.25002 19.5 5.25002H16.1044C16.1184 5.12551 16.1252 5.00031 16.125 4.87502C16.1243 4.41407 16.0295 3.95812 15.8464 3.53511C15.6633 3.1121 15.3957 2.73095 15.06 2.41502C14.5953 1.97853 14.0164 1.68261 13.3904 1.56154C12.7644 1.44046 12.117 1.49918 11.523 1.73089C10.929 1.9626 10.4128 2.35782 10.0341 2.87079C9.65549 3.38376 9.42989 3.9935 9.38347 4.62939C9.36906 4.83624 9.37345 5.04396 9.39659 5.25002H6.00003C5.60221 5.25002 5.22067 5.40805 4.93937 5.68936C4.65807 5.97066 4.50003 6.35219 4.50003 6.75002V9.77064C4.37552 9.75669 4.25032 9.7498 4.12503 9.75002C3.66409 9.75076 3.20816 9.8456 2.78516 10.0287C2.36216 10.2119 1.981 10.4794 1.66503 10.815C1.34679 11.1512 1.10175 11.5497 0.945386 11.9854C0.789021 12.4211 0.724736 12.8845 0.756593 13.3463C0.810338 14.1594 1.15585 14.9259 1.7296 15.5046C2.30334 16.0833 3.06674 16.4355 3.87941 16.4963C4.08624 16.5111 4.29401 16.5067 4.50003 16.4831V19.5C4.50003 19.8978 4.65807 20.2794 4.93937 20.5607C5.22067 20.842 5.60221 21 6.00003 21H19.5C19.8979 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5V15.4978C21.0001 15.3711 20.9681 15.2464 20.9069 15.1355C20.8458 15.0245 20.7575 14.9308 20.6503 14.8631ZM19.5 19.5H6.00003V15.4978C6.00007 15.3713 5.96809 15.2468 5.90705 15.1359C5.84602 15.025 5.75792 14.9314 5.65096 14.8637C5.54401 14.7961 5.42167 14.7566 5.29534 14.749C5.16901 14.7413 5.0428 14.7658 4.92847 14.82C4.64269 14.9552 4.32737 15.0159 4.01183 14.9965C3.6963 14.9771 3.39079 14.8782 3.1237 14.7091C2.85662 14.54 2.63664 14.3061 2.48421 14.0291C2.33178 13.7521 2.25184 13.4411 2.25184 13.125C2.25184 12.8089 2.33178 12.4979 2.48421 12.2209C2.63664 11.944 2.85662 11.7101 3.1237 11.5409C3.39079 11.3718 3.6963 11.2729 4.01183 11.2535C4.32737 11.2342 4.64269 11.2949 4.92847 11.43C5.0428 11.4843 5.16901 11.5087 5.29534 11.5011C5.42167 11.4934 5.54401 11.4539 5.65096 11.3863C5.75792 11.3186 5.84602 11.225 5.90705 11.1141C5.96809 11.0033 6.00007 10.8788 6.00003 10.7522V6.75002H10.3772C10.5038 6.75006 10.6283 6.71807 10.7392 6.65704C10.85 6.596 10.9436 6.50791 11.0113 6.40095C11.079 6.29399 11.1184 6.17165 11.1261 6.04533C11.1337 5.919 11.1093 5.79279 11.055 5.67845C10.9199 5.39267 10.8592 5.07736 10.8786 4.76182C10.898 4.44628 10.9968 4.14077 11.1659 3.87369C11.3351 3.60661 11.569 3.38663 11.8459 3.23419C12.1229 3.08176 12.4339 3.00183 12.75 3.00183C13.0662 3.00183 13.3772 3.08176 13.6541 3.23419C13.9311 3.38663 14.165 3.60661 14.3341 3.87369C14.5033 4.14077 14.6021 4.44628 14.6215 4.76182C14.6409 5.07736 14.5802 5.39267 14.445 5.67845C14.3908 5.79279 14.3663 5.919 14.374 6.04533C14.3816 6.17165 14.4211 6.29399 14.4888 6.40095C14.5564 6.50791 14.65 6.596 14.7609 6.65704C14.8718 6.71807 14.9963 6.75006 15.1228 6.75002H19.5V9.77158C19.294 9.74798 19.0862 9.74358 18.8794 9.75845C18.0065 9.82026 17.1917 10.2187 16.607 10.8697C16.0222 11.5207 15.7132 12.3734 15.745 13.2479C15.7769 14.1224 16.1472 14.9503 16.7778 15.5571C17.4084 16.1638 18.25 16.5019 19.125 16.5C19.2503 16.5002 19.3755 16.4933 19.5 16.4794V19.5Z' fill='currentColor'/%3e%3c/svg%3e"); } -.toolbar-button--icon--announcements-feed-announcement::before { - transform: scaleX(-1); +.toolbar-button--icon--system-themes-page { + --icon: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M21.75 3C21.75 2.80109 21.6709 2.61032 21.5303 2.46967C21.3896 2.32902 21.1989 2.25 21 2.25C16.8675 2.25 12.6271 6.91031 10.2721 9.99656C9.43109 9.73898 8.54134 9.68224 7.67437 9.83089C6.8074 9.97954 5.98738 10.3294 5.28017 10.8525C4.57295 11.3755 3.99826 12.0571 3.60225 12.8426C3.20624 13.628 2.99996 14.4954 2.99996 15.375C2.99996 18.27 1.16808 19.5684 1.0809 19.6284C0.947855 19.7183 0.847149 19.8484 0.793587 19.9998C0.740026 20.1511 0.736435 20.3156 0.783343 20.4692C0.830251 20.6227 0.925182 20.7571 1.05418 20.8527C1.18317 20.9482 1.33943 20.9999 1.49996 21H8.62496C9.50458 21 10.3719 20.7937 11.1574 20.3977C11.9428 20.0017 12.6244 19.427 13.1475 18.7198C13.6705 18.0126 14.0204 17.1926 14.1691 16.3256C14.3177 15.4586 14.261 14.5689 14.0034 13.7278C17.0906 11.3728 21.75 7.1325 21.75 3ZM8.62496 19.5H3.24652C3.87933 18.6009 4.49996 17.2425 4.49996 15.375C4.49996 14.5592 4.74189 13.7616 5.19515 13.0833C5.64841 12.4049 6.29264 11.8762 7.04639 11.564C7.80013 11.2518 8.62953 11.1701 9.42971 11.3293C10.2299 11.4884 10.9649 11.8813 11.5418 12.4582C12.1187 13.0351 12.5115 13.7701 12.6707 14.5703C12.8299 15.3704 12.7482 16.1998 12.436 16.9536C12.1237 17.7073 11.595 18.3516 10.9167 18.8048C10.2383 19.2581 9.44081 19.5 8.62496 19.5ZM11.6643 10.6453C11.9856 10.2291 12.3009 9.83688 12.6103 9.46875C13.3675 9.98035 14.0196 10.6324 14.5312 11.3897C14.1625 11.6984 13.7703 12.0138 13.3546 12.3356C12.9176 11.6586 12.3414 11.0824 11.6643 10.6453ZM15.6675 10.3941C15.1012 9.59512 14.4039 8.89778 13.605 8.33156C16.5843 5.09438 18.8315 4.11281 20.1581 3.84C19.8909 5.1675 18.9046 7.41469 15.6675 10.3941Z' fill='currentColor'/%3e%3c/svg%3e"); } -[dir="rtl"] .toolbar-button--icon--announcements-feed-announcement::before { - transform: scaleX(1); +.toolbar-button--icon--user { + --icon: url("data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M10 1.875C8.39303 1.875 6.82214 2.35152 5.486 3.24431C4.14985 4.1371 3.10844 5.40605 2.49348 6.8907C1.87852 8.37535 1.71762 10.009 2.03112 11.5851C2.34463 13.1612 3.11846 14.6089 4.25476 15.7452C5.39106 16.8815 6.8388 17.6554 8.4149 17.9689C9.99099 18.2824 11.6247 18.1215 13.1093 17.5065C14.594 16.8916 15.8629 15.8502 16.7557 14.514C17.6485 13.1779 18.125 11.607 18.125 10C18.1227 7.84581 17.266 5.78051 15.7427 4.25727C14.2195 2.73403 12.1542 1.87727 10 1.875ZM5.7875 15.4297C6.23964 14.7226 6.86251 14.1406 7.59869 13.7375C8.33488 13.3345 9.16069 13.1232 10 13.1232C10.8393 13.1232 11.6651 13.3345 12.4013 13.7375C13.1375 14.1406 13.7604 14.7226 14.2125 15.4297C13.0081 16.3664 11.5258 16.8749 10 16.8749C8.4742 16.8749 6.99193 16.3664 5.7875 15.4297ZM7.5 9.375C7.5 8.88055 7.64663 8.3972 7.92133 7.98607C8.19603 7.57495 8.58648 7.25452 9.04329 7.0653C9.50011 6.87608 10.0028 6.82657 10.4877 6.92304C10.9727 7.0195 11.4181 7.2576 11.7678 7.60723C12.1174 7.95686 12.3555 8.40232 12.452 8.88727C12.5484 9.37223 12.4989 9.87489 12.3097 10.3317C12.1205 10.7885 11.8001 11.179 11.3889 11.4537C10.9778 11.7284 10.4945 11.875 10 11.875C9.33696 11.875 8.70108 11.6116 8.23224 11.1428C7.7634 10.6739 7.5 10.038 7.5 9.375ZM15.1375 14.5633C14.4404 13.5532 13.4603 12.7717 12.3203 12.3172C12.9327 11.8349 13.3795 11.1737 13.5987 10.4257C13.8179 9.67766 13.7985 8.87992 13.5433 8.1434C13.2881 7.40687 12.8097 6.76819 12.1746 6.31616C11.5396 5.86414 10.7795 5.62123 10 5.62123C9.22052 5.62123 8.4604 5.86414 7.82536 6.31616C7.19033 6.76819 6.71193 7.40687 6.45671 8.1434C6.20149 8.87992 6.18212 9.67766 6.40131 10.4257C6.62049 11.1737 7.06734 11.8349 7.67969 12.3172C6.5397 12.7717 5.55956 13.5532 4.8625 14.5633C3.9817 13.5728 3.406 12.3488 3.20473 11.0387C3.00346 9.72856 3.1852 8.3882 3.72806 7.17898C4.27093 5.96977 5.15178 4.94326 6.26454 4.22308C7.3773 3.50289 8.67452 3.11972 10 3.11972C11.3255 3.11972 12.6227 3.50289 13.7355 4.22308C14.8482 4.94326 15.7291 5.96977 16.2719 7.17898C16.8148 8.3882 16.9966 9.72856 16.7953 11.0387C16.594 12.3488 16.0183 13.5728 15.1375 14.5633Z' fill='currentColor'/%3e%3c/svg%3e"); } -html:not([data-admin-toolbar="expanded"]) .toolbar-button--collapsible::after { +.toolbar-button--collapsible::after { display: none; } -/* Visually-hidden labels when collapsed. */ -html:not([data-admin-toolbar="expanded"]) .toolbar-button--collapsible .toolbar-button__label { +.toolbar-button--collapsible .toolbar-button__label { position: absolute; overflow: hidden; clip: rect(0 0 0 0); @@ -270,7 +241,18 @@ html:not([data-admin-toolbar="expanded"]) .toolbar-button--collapsible .toolbar- clip-path: inset(50%); opacity: 0; } -/* Hides button's label while transitioning. */ -html[data-admin-toolbar-animating][data-admin-toolbar="expanded"] .toolbar-button--collapsible .toolbar-button__label { +[data-admin-toolbar="expanded"] .toolbar-button--collapsible::after { + display: block; +} +[data-admin-toolbar="expanded"] .toolbar-button--collapsible .toolbar-button__label { + position: relative; + clip: revert; + width: auto; + height: auto; + white-space: wrap; + clip-path: none; + opacity: 1; +} +[data-admin-toolbar-animating] .toolbar-button--collapsible .toolbar-button__label { display: none; } diff --git a/core/modules/navigation/css/components/toolbar-button.pcss.css b/core/modules/navigation/components/toolbar-button/toolbar-button.pcss.css similarity index 69% rename from core/modules/navigation/css/components/toolbar-button.pcss.css rename to core/modules/navigation/components/toolbar-button/toolbar-button.pcss.css index b5fd86a9b693558c523f1d9aeeebcc53f43f3fdc..3254c69160d3437215d47ce54f967201458bf80f 100644 --- a/core/modules/navigation/css/components/toolbar-button.pcss.css +++ b/core/modules/navigation/components/toolbar-button/toolbar-button.pcss.css @@ -4,26 +4,18 @@ * Toolbar button styles. */ -@import "../base/media-queries.pcss.css"; +@import "../../css/base/media-queries.pcss.css"; :root { --toolbar-button-outline-offset: 0; } -/* In top bar mobile we need small outline offset. */ -:where(.top-bar) { - --toolbar-button-outline-offset: calc(-1 * var(--admin-toolbar-space-4)); - - @media (--admin-toolbar-desktop) { - --toolbar-button-outline-offset: 0px; - } -} - .toolbar-button { z-index: 1; align-items: center; padding-inline: var(--admin-toolbar-space-16); - padding-block: calc(0.75 * var(--admin-toolbar-rem)); + padding-block: var(--admin-toolbar-space-10); + min-height: var(--admin-toolbar-space-40); cursor: pointer; text-align: start; text-decoration: none; @@ -55,11 +47,6 @@ color: var(--admin-toolbar-color-blue-700); outline: 2px solid var(--admin-toolbar-color-focus); outline-offset: var(--toolbar-button-outline-offset); - background-color: transparent; - } - - &:hover:focus { - background-color: var(--admin-toolbar-color-gray-050); } &.current { @@ -68,15 +55,16 @@ } } +/* Dark color modifier for submenus title */ +.toolbar-button--dark { + color: var(--admin-toolbar-color-gray-990); +} + .toolbar-button--large { padding: var(--admin-toolbar-space-8) var(--admin-toolbar-space-16); font-size: var(--admin-toolbar-font-size-info-lg); line-height: var(--admin-toolbar-line-height-info-lg); } -/* Dark color modifier for submenus title */ -.toolbar-button--dark { - color: var(--admin-toolbar-color-gray-990); -} .toolbar-button--non-interactive { &:hover, @@ -90,9 +78,13 @@ } } +.toolbar-button--small-offset { + --toolbar-button-outline-offset: calc(-1 * var(--admin-toolbar-space-4)); +} + /* Class starts with `toolbar-button--icon` */ [class*="toolbar-button--icon"] { - padding-inline: calc(0.75 * var(--admin-toolbar-rem)); + padding-inline: var(--admin-toolbar-space-10); &::before { display: flex; @@ -133,26 +125,6 @@ } } -.toolbar-button--primary { - color: white; - background-color: var(--admin-toolbar-color-blue-450); - - &:hover, - &:focus { - color: white; - background-color: var(--admin-toolbar-color-blue-650); - } -} - -.toolbar-button--secondary--expanded[aria-expanded="true"] { - color: white; - background-color: var(--admin-toolbar-color-gray-900); -} - -.toolbar-button--tertiary--expanded[aria-expanded="true"] { - background-color: var(--admin-toolbar-color-gray-050); -} - .toolbar-button--weight--400 { font-variation-settings: "wght" 400; } @@ -175,9 +147,9 @@ mask-size: var(--admin-toolbar-space-16); mask-repeat: no-repeat; mask-position: center center; - mask-image: url(../../assets/icons/chevron.svg); + mask-image: url(./assets/chevron.svg); - [dir="rtl"] & { + :where([dir="rtl"]) & { transform: rotate(180deg); } @@ -187,8 +159,7 @@ } } -.toolbar-button--expand--down, -[dir="rtl"] .toolbar-button--expand--down { +.toolbar-button--expand--down { &::after { transform: rotate(90deg); @@ -209,108 +180,101 @@ } } -.toolbar-button--arrow-first { - &::after { - order: -1; +.toolbar-button--icon--announcements-feed-announcement { + --icon: url(./assets/announcement.svg); + &::before { + transform: scaleX(-1); + } + + [dir="rtl"] & { + &::before { + transform: scaleX(1); + } } } .toolbar-button--icon--back { - --icon: url(../../assets/icons/arrow-left.svg); + --icon: url(./assets/arrow-left.svg); } .toolbar-button--icon--burger { - --icon: url(../../assets/icons/burger.svg); + --icon: url(./assets/burger.svg); } .toolbar-button--icon--cross { - --icon: url(../../assets/icons/cross.svg); -} - -.toolbar-button--icon--system-themes-page { - --icon: url(../../assets/icons/appearance.svg); + --icon: url(./assets/cross.svg); } -.toolbar-button--icon--navigation-blocks { - --icon: url(../../assets/icons/blocks.svg); +.toolbar-button--icon--entity-user-collection { + --icon: url(./assets/people.svg); } -.toolbar-button--icon--shortcuts { - --icon: url(../../assets/icons/shortcuts.svg); +.toolbar-button--icon--help { + --icon: url(./assets/help.svg); } -.toolbar-button--icon--system-admin-config { - --icon: url(../../assets/icons/config.svg); +.toolbar-button--icon--navigation-blocks { + --icon: url(./assets/blocks.svg); } .toolbar-button--icon--navigation-content { - --icon: url(../../assets/icons/content.svg); + --icon: url(./assets/content.svg); } .toolbar-button--icon--navigation-create { - --icon: url(../../assets/icons/create.svg); -} - -.toolbar-button--icon--system-modules-list { - --icon: url(../../assets/icons/extend.svg); + --icon: url(./assets/create.svg); } .toolbar-button--icon--navigation-files { - --icon: url(../../assets/icons/files.svg); -} - -.toolbar-button--icon--help { - --icon: url(../../assets/icons/help.svg); + --icon: url(./assets/files.svg); } .toolbar-button--icon--navigation-media { - --icon: url(../../assets/icons/media.svg); + --icon: url(./assets/media.svg); } .toolbar-button--icon--pencil { - --icon: url(../../assets/icons/pencil.svg); + --icon: url(./assets/pencil.svg); } .toolbar-button--icon--preview { - --icon: url(../../assets/icons/eye.svg); + --icon: url(./assets/eye.svg); } -.toolbar-button--icon--entity-user-collection { - --icon: url(../../assets/icons/people.svg); +.toolbar-button--icon--shortcuts { + --icon: url(./assets/shortcuts.svg); +} + +.toolbar-button--icon--system-admin-config { + --icon: url(./assets/config.svg); } .toolbar-button--icon--system-admin-reports { - --icon: url(../../assets/icons/reports.svg); + --icon: url(./assets/reports.svg); } .toolbar-button--icon--system-admin-structure { - --icon: url(../../assets/icons/structure.svg); + --icon: url(./assets/structure.svg); } -.toolbar-button--icon--user { - --icon: url(../../assets/icons/user.svg); +.toolbar-button--icon--system-modules-list { + --icon: url(./assets/extend.svg); } -.toolbar-button--icon--announcements-feed-announcement { - --icon: url(../../assets/icons/announcement.svg); - &::before { - transform: scaleX(-1); - } +.toolbar-button--icon--system-themes-page { + --icon: url(./assets/appearance.svg); +} - [dir="rtl"] & { - &::before { - transform: scaleX(1); - } - } +.toolbar-button--icon--user { + --icon: url(./assets/user.svg); } -html:not([data-admin-toolbar="expanded"]) { - .toolbar-button--collapsible::after { +.toolbar-button--collapsible { + &::after { display: none; } - /* Visually-hidden labels when collapsed. */ - .toolbar-button--collapsible .toolbar-button__label { + & .toolbar-button__label { position: absolute; overflow: hidden; clip: rect(0 0 0 0); @@ -320,9 +284,26 @@ html:not([data-admin-toolbar="expanded"]) { clip-path: inset(50%); opacity: 0; } -} -/* Hides button's label while transitioning. */ -html[data-admin-toolbar-animating][data-admin-toolbar="expanded"] .toolbar-button--collapsible .toolbar-button__label { - display: none; + [data-admin-toolbar="expanded"] & { + &::after { + display: block; + } + + & .toolbar-button__label { + position: relative; + clip: revert; + width: auto; + height: auto; + white-space: wrap; + clip-path: none; + opacity: 1; + } + } + + [data-admin-toolbar-animating] & { + & .toolbar-button__label { + display: none; + } + } } diff --git a/core/modules/navigation/components/toolbar-button/toolbar-button.twig b/core/modules/navigation/components/toolbar-button/toolbar-button.twig new file mode 100644 index 0000000000000000000000000000000000000000..853986b23521590c640b7a6973741adbf3c2f7d8 --- /dev/null +++ b/core/modules/navigation/components/toolbar-button/toolbar-button.twig @@ -0,0 +1,35 @@ +{# Extra classes variable added to be sure that modifiers will +appear after main classes #} +{% + set classes = [ + 'toolbar-button', + icon ? 'toolbar-button--icon--' ~ icon : '', + ] +%} + +{% if modifiers is iterable %} + {% set classes = classes|merge(modifiers|map(modifier => "toolbar-button--#{modifier}")) %} +{% endif %} + +{% if extra_classes is iterable %} + {% set classes = classes|merge(extra_classes) %} +{% endif %} + +{% if text and text|length > 1 %} + {# We take the first two letters of the button text to use as a fallback when + the toolbar button does not have a pre-assigned icon. #} + {% set icon_text = text|slice(0, 2)|join('') %} + {% set attributes = attributes.setAttribute('data-index-text', text|first|lower).setAttribute('data-icon-text', icon_text) %} +{% endif %} + +<{{ html_tag|default('button') }} {{ attributes.addClass(classes) }}> + {% if action %} + <span data-toolbar-action class="visually-hidden">{{ action }}</span> + {% endif %} + {% block content %} + {% if text %} + <span class="toolbar-button__label" data-toolbar-text>{{~ text ~}}</span> + {% endif %} + {% endblock %} + +</{{ html_tag|default('button') }}> diff --git a/core/modules/navigation/config/install/navigation.block_layout.yml b/core/modules/navigation/config/install/navigation.block_layout.yml index 571062db7676958acae56b6c1d2b5827a8e26599..818d34df7e7b5444ef2a008e6a803ddc63ac3371 100644 --- a/core/modules/navigation/config/install/navigation.block_layout.yml +++ b/core/modules/navigation/config/install/navigation.block_layout.yml @@ -48,4 +48,18 @@ sections: provider: navigation weight: 0 additional: { } + 6d7080a7-abab-4bad-b960-2459ca892a54: + uuid: 6d7080a7-abab-4bad-b960-2459ca892a54 + region: footer + configuration: + id: navigation_link + label: Help + label_display: '0' + provider: navigation + context_mapping: { } + title: Help + uri: 'internal:/admin/help' + icon_class: help + weight: -2 + additional: { } third_party_settings: { } diff --git a/core/modules/navigation/config/install/navigation.settings.yml b/core/modules/navigation/config/install/navigation.settings.yml index ffa4ff79c88d111c47443bc2d9866f7f551f57ea..4dd462c26f856fe00e5b8ea4798ae5c2cb98616f 100644 --- a/core/modules/navigation/config/install/navigation.settings.yml +++ b/core/modules/navigation/config/install/navigation.settings.yml @@ -1,6 +1,6 @@ logo: provider: default - managed: null + path: '' max: filesize: 1048576 height: 40 diff --git a/core/modules/navigation/config/schema/navigation.schema.yml b/core/modules/navigation/config/schema/navigation.schema.yml index 0d898740431d2c8c3773b7ecffdc24da068ac391..ee31849202a077c94decea16323edd29486393cf 100644 --- a/core/modules/navigation/config/schema/navigation.schema.yml +++ b/core/modules/navigation/config/schema/navigation.schema.yml @@ -18,13 +18,11 @@ navigation.settings: - default - hide - custom - managed: - type: integer - label: 'Custom logo' - nullable: true + path: + type: string + label: 'Path' constraints: - Range: - min: 0 + NotNull: [ ] max: type: mapping label: 'Logo maximum settings' @@ -73,3 +71,23 @@ block.settings.navigation_menu:*: depth: type: integer label: 'Maximum number of levels' + +block.settings.navigation_link: + type: block_settings + label: 'Link block' + mapping: + title: + type: label + label: 'Link title' + uri: + type: string + label: 'URL' + icon_class: + type: string + label: 'Icon CSS Class' + constraints: + Regex: + pattern: '/^[a-z0-9_-]+$/' + message: "The %value icon CSS class is not valid." + constraints: + FullyValidatable: ~ diff --git a/core/modules/navigation/css/base/layout-builder.css b/core/modules/navigation/css/base/layout-builder.css index f345c22fe9ad3ff0e9ccb98e14c1a4cc094f488e..9d79be57072d173c9bfbc767809678d411b388b6 100644 --- a/core/modules/navigation/css/base/layout-builder.css +++ b/core/modules/navigation/css/base/layout-builder.css @@ -12,3 +12,10 @@ #navigation-layout .layout-builder { border: none; } + +/* Label when "content preview" is disabled. */ + +.navigation-layout .layout-builder-block__content-preview-placeholder-label { + font-size: 0.79rem; + overflow-wrap: anywhere; +} diff --git a/core/modules/navigation/css/base/layout-builder.pcss.css b/core/modules/navigation/css/base/layout-builder.pcss.css index bed6fede0f78090079ee5e993614b6d91758465d..4cd61aca79ea09c4b24ec5bd268e054a6dc55f8a 100644 --- a/core/modules/navigation/css/base/layout-builder.pcss.css +++ b/core/modules/navigation/css/base/layout-builder.pcss.css @@ -5,3 +5,9 @@ #navigation-layout .layout-builder { border: none; } + +/* Label when "content preview" is disabled. */ +.navigation-layout .layout-builder-block__content-preview-placeholder-label { + font-size: 0.79rem; + overflow-wrap: anywhere; +} diff --git a/core/modules/navigation/css/base/variables.css b/core/modules/navigation/css/base/variables.css index e9b918ebe3be566774698f3967c33ed688ebf630..51f0d72f24f1d40059e83bcdee1045f7c3621356 100644 --- a/core/modules/navigation/css/base/variables.css +++ b/core/modules/navigation/css/base/variables.css @@ -88,6 +88,7 @@ We need it root to calculate the size of the displace in .dialog-off-canvas-main */ --admin-toolbar-space-4: var(--drupal-admin-space-4, calc(0.25 * var(--admin-toolbar-rem))); /* 0.25 * 16px = 4px */ --admin-toolbar-space-8: var(--drupal-admin-space-8, calc(0.5 * var(--admin-toolbar-rem))); /* 0.5 * 16px = 8px */ + --admin-toolbar-space-10: var(--drupal-admin-space-10, calc(0.625 * var(--admin-toolbar-rem))); /* 0.625 * 16px = 10px */ --admin-toolbar-space-12: var(--drupal-admin-space-12, calc(0.75 * var(--admin-toolbar-rem))); /* 0.75 * 16px = 12px */ --admin-toolbar-space-16: var(--drupal-admin-space-16, var(--admin-toolbar-rem)); /* 16px = 16px */ --admin-toolbar-space-20: var(--drupal-admin-space-20, calc(1.25 * var(--admin-toolbar-rem))); /* 1.25 * 16px = 20px */ diff --git a/core/modules/navigation/css/base/variables.pcss.css b/core/modules/navigation/css/base/variables.pcss.css index adc9cb2fc12723e547bd4b23eeabc823d45d2097..0681604e6fc0c911474cba6e6be96bdc57857511 100644 --- a/core/modules/navigation/css/base/variables.pcss.css +++ b/core/modules/navigation/css/base/variables.pcss.css @@ -85,6 +85,7 @@ We need it root to calculate the size of the displace in .dialog-off-canvas-main */ --admin-toolbar-space-4: var(--drupal-admin-space-4, calc(0.25 * var(--admin-toolbar-rem))); /* 0.25 * 16px = 4px */ --admin-toolbar-space-8: var(--drupal-admin-space-8, calc(0.5 * var(--admin-toolbar-rem))); /* 0.5 * 16px = 8px */ + --admin-toolbar-space-10: var(--drupal-admin-space-10, calc(0.625 * var(--admin-toolbar-rem))); /* 0.625 * 16px = 10px */ --admin-toolbar-space-12: var(--drupal-admin-space-12, calc(0.75 * var(--admin-toolbar-rem))); /* 0.75 * 16px = 12px */ --admin-toolbar-space-16: var(--drupal-admin-space-16, var(--admin-toolbar-rem)); /* 16px = 16px */ --admin-toolbar-space-20: var(--drupal-admin-space-20, calc(1.25 * var(--admin-toolbar-rem))); /* 1.25 * 16px = 20px */ diff --git a/core/modules/navigation/css/components/admin-toolbar.css b/core/modules/navigation/css/components/admin-toolbar.css index a91ae746c6349a9a1a55825260620f6dd1dd3ea6..14388c04e42e48b95ab0b694392c7aca6b06c6d5 100644 --- a/core/modules/navigation/css/components/admin-toolbar.css +++ b/core/modules/navigation/css/components/admin-toolbar.css @@ -301,12 +301,15 @@ body { .admin-toolbar__footer { z-index: var(--admin-toolbar-z-index-footer); display: grid; - gap: var(--admin-toolbar-space-16); + gap: var(--admin-toolbar-space-4); margin-block-start: auto; padding: var(--admin-toolbar-space-16); border-block-start: 1px solid var(--admin-toolbar-color-gray-200); border-inline-end: 1px solid var(--admin-toolbar-color-gray-100); } +.admin-toolbar__footer > .toolbar-block:last-of-type { + margin-block-end: var(--admin-toolbar-space-12); +} @media (min-width: 64rem) { .admin-toolbar__footer { --admin-toolbar-z-index-footer: -1; diff --git a/core/modules/navigation/css/components/admin-toolbar.pcss.css b/core/modules/navigation/css/components/admin-toolbar.pcss.css index 6257fa74b326ca5c30320e1701c74193b82559e3..9d9a447b2908ae799ee54a8fed8d3c180475783f 100644 --- a/core/modules/navigation/css/components/admin-toolbar.pcss.css +++ b/core/modules/navigation/css/components/admin-toolbar.pcss.css @@ -313,12 +313,18 @@ body { .admin-toolbar__footer { z-index: var(--admin-toolbar-z-index-footer); display: grid; - gap: var(--admin-toolbar-space-16); + gap: var(--admin-toolbar-space-4); margin-block-start: auto; padding: var(--admin-toolbar-space-16); border-block-start: 1px solid var(--admin-toolbar-color-gray-200); border-inline-end: 1px solid var(--admin-toolbar-color-gray-100); + & > .toolbar-block { + &:last-of-type { + margin-block-end: var(--admin-toolbar-space-12); + } + } + @media (--admin-toolbar-desktop) { --admin-toolbar-z-index-footer: -1; diff --git a/core/modules/navigation/css/components/safe-triangle.css b/core/modules/navigation/css/components/safe-triangle.css new file mode 100644 index 0000000000000000000000000000000000000000..f49d9ab275ced619eba2c4e6d0cef7edbb5d67ab --- /dev/null +++ b/core/modules/navigation/css/components/safe-triangle.css @@ -0,0 +1,28 @@ +/* + * DO NOT EDIT THIS FILE. + * See the following change record for more information, + * https://www.drupal.org/node/3084859 + * @preserve + */ + +[data-has-safe-triangle] { + --safe-triangle-cursor-y: 6.25rem; + --safe-triangle-cursor-x: 6.25rem; + --safe-triangle-submenu-start-x: var(--admin-toolbar-sidebar-width); + --safe-triangle-submenu-start-y: 5vh; + --safe-triangle-submenu-end-x: var(--admin-toolbar-sidebar-width); + /* TODO: Replace with calculated value of popover content height. */ + --safe-triangle-submenu-end-y: 66vh; +} + +[data-has-safe-triangle]:hover [data-safe-triangle] { + display: block; +} + +[data-safe-triangle] { + position: fixed; + display: none; + content: ""; + inset: 0; + clip-path: polygon(var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0), var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0), var(--safe-triangle-submenu-end-x, 0) max(var(--safe-triangle-submenu-end-y, 0), var(--safe-triangle-cursor-y, 0), 66vh)); +} diff --git a/core/modules/navigation/css/components/safe-triangle.pcss.css b/core/modules/navigation/css/components/safe-triangle.pcss.css new file mode 100644 index 0000000000000000000000000000000000000000..bde396bbc88befa51cd7ff0e66393e4e4244ba59 --- /dev/null +++ b/core/modules/navigation/css/components/safe-triangle.pcss.css @@ -0,0 +1,23 @@ +[data-has-safe-triangle] { + --safe-triangle-cursor-y: 100px; + --safe-triangle-cursor-x: 100px; + --safe-triangle-submenu-start-x: var(--admin-toolbar-sidebar-width); + --safe-triangle-submenu-start-y: 5vh; + --safe-triangle-submenu-end-x: var(--admin-toolbar-sidebar-width); + /* TODO: Replace with calculated value of popover content height. */ + --safe-triangle-submenu-end-y: 66vh; + + &:hover { + [data-safe-triangle] { + display: block; + } + } +} + +[data-safe-triangle] { + position: fixed; + display: none; + content: ""; + inset: 0; + clip-path: polygon(var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0), var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0), var(--safe-triangle-submenu-end-x, 0) max(var(--safe-triangle-submenu-end-y, 0), var(--safe-triangle-cursor-y, 0), 66vh)); +} diff --git a/core/modules/navigation/css/components/toolbar-popover.css b/core/modules/navigation/css/components/toolbar-popover.css index deb1e7fcaba34fa1f8f5ed7a3435c48645034530..c1e795b1cac9b3ba37bdce164e904b491a42e053 100644 --- a/core/modules/navigation/css/components/toolbar-popover.css +++ b/core/modules/navigation/css/components/toolbar-popover.css @@ -5,14 +5,6 @@ * @preserve */ .toolbar-popover { - --safe-triangle-cursor-y: 6.25rem; - --safe-triangle-cursor-x: 6.25rem; - --safe-triangle-submenu-start-x: var(--admin-toolbar-sidebar-width); - --safe-triangle-submenu-start-y: 5vh; - --safe-triangle-submenu-end-x: var(--admin-toolbar-sidebar-width); - /* TODO: Replace with calculated value of popover content height. */ - --safe-triangle-submenu-end-y: 66vh; - border-radius: var(--admin-toolbar-space-8); } .toolbar-popover--expanded { @@ -21,9 +13,6 @@ .toolbar-popover__control { inline-size: 100%; } -.toolbar-popover__control:hover [data-toolbar-popover-safe-triangle] { - display: block; -} [data-toolbar-popover-wrapper] { position: fixed; z-index: var(--admin-toolbar-z-index-popover); @@ -66,13 +55,6 @@ inset-inline-start: 1px; } } -[data-toolbar-popover-safe-triangle] { - position: fixed; - display: none; - content: ""; - inset: 0; - clip-path: polygon(var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0), var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0), var(--safe-triangle-submenu-end-x, 0) max(var(--safe-triangle-submenu-end-y, 0), var(--safe-triangle-cursor-y, 0), 66vh)); -} [data-toolbar-popover-control][aria-expanded="true"] + [data-toolbar-popover-wrapper] { transform: translateX(0); opacity: 1; diff --git a/core/modules/navigation/css/components/toolbar-popover.pcss.css b/core/modules/navigation/css/components/toolbar-popover.pcss.css index d8f177823ffb588f4d3b79389652f090790591bb..ffdc04fa4e5fa4a48c5f8612ae003ce8f34fd3c4 100644 --- a/core/modules/navigation/css/components/toolbar-popover.pcss.css +++ b/core/modules/navigation/css/components/toolbar-popover.pcss.css @@ -1,14 +1,6 @@ @import "../base/media-queries.pcss.css"; .toolbar-popover { - --safe-triangle-cursor-y: 100px; - --safe-triangle-cursor-x: 100px; - --safe-triangle-submenu-start-x: var(--admin-toolbar-sidebar-width); - --safe-triangle-submenu-start-y: 5vh; - --safe-triangle-submenu-end-x: var(--admin-toolbar-sidebar-width); - /* TODO: Replace with calculated value of popover content height. */ - --safe-triangle-submenu-end-y: 66vh; - border-radius: var(--admin-toolbar-space-8); } @@ -18,12 +10,6 @@ .toolbar-popover__control { inline-size: 100%; - - &:hover { - [data-toolbar-popover-safe-triangle] { - display: block; - } - } } [data-toolbar-popover-wrapper] { @@ -69,14 +55,6 @@ } } -[data-toolbar-popover-safe-triangle] { - position: fixed; - display: none; - content: ""; - inset: 0; - clip-path: polygon(var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0), var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0), var(--safe-triangle-submenu-end-x, 0) max(var(--safe-triangle-submenu-end-y, 0), var(--safe-triangle-cursor-y, 0), 66vh)); -} - [data-toolbar-popover-control][aria-expanded="true"] + [data-toolbar-popover-wrapper] { transform: translateX(0); opacity: 1; diff --git a/core/modules/navigation/js/admin-toolbar-wrapper.js b/core/modules/navigation/js/admin-toolbar-wrapper.js index 72df62384469a140f854fb95a749414a672d94e0..028e74ac7deb31c7b499b903e0587b3827ceca8c 100644 --- a/core/modules/navigation/js/admin-toolbar-wrapper.js +++ b/core/modules/navigation/js/admin-toolbar-wrapper.js @@ -134,7 +134,9 @@ const toggleTriggers = (toState) => { triggers.forEach((trigger) => { trigger.setAttribute('aria-expanded', toState); - const text = trigger.querySelector('[data-text]'); + const text = + trigger.querySelector('[data-toolbar-text]') || + trigger.querySelector('[data-toolbar-action]'); if (text) { text.textContent = toState ? Drupal.t('Collapse sidebar') diff --git a/core/modules/navigation/js/safe-triangle.js b/core/modules/navigation/js/safe-triangle.js new file mode 100644 index 0000000000000000000000000000000000000000..d506ce1c9467f0825e723b3cee819d73d77ef591 --- /dev/null +++ b/core/modules/navigation/js/safe-triangle.js @@ -0,0 +1,57 @@ +/** + * @file + * + * Element that improves sub-menu UX by implementing the Safe Triangle strategy. + * @see https://www.smashingmagazine.com/2023/08/better-context-menus-safe-triangles + */ + +((Drupal, once) => { + /** + * Update CSS variables values for positioning the safe triangle element. + * + * @param {CSSStyleDeclaration} style + * Style property of the parent button. + * @param {number} clientX + * Horizontal position relative to the element. + * @param {number} clientY + * Vertical position relative to the element. + */ + function handleMouseMove({ currentTarget: { style }, clientX, clientY }) { + style.setProperty('--safe-triangle-cursor-x', `${clientX}px`); + style.setProperty('--safe-triangle-cursor-y', `${clientY}px`); + } + + /** + * Attaches the safe triangle behavior to all required triggers. + * + * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches the safe triangle behavior. + * @prop {Drupal~behaviorDetach} detach + * Removes the safe triangle element. + */ + Drupal.behaviors.safeTriangleInit = { + attach: (context) => { + once('safe-triangle', '[data-has-safe-triangle]', context).forEach( + (button) => { + button.insertAdjacentHTML( + 'beforeend', + '<div data-safe-triangle></div>', + ); + button.addEventListener('mousemove', handleMouseMove); + }, + ); + }, + detach: (context, settings, trigger) => { + if (trigger === 'unload') { + once + .remove('safe-triangle', '[data-has-safe-triangle]', context) + .forEach((button) => { + button.querySelector('[data-safe-triangle]')?.remove(); + button.removeEventListener('mousemove', handleMouseMove); + }); + } + }, + }; +})(Drupal, once); diff --git a/core/modules/navigation/js/toolbar-menu.js b/core/modules/navigation/js/toolbar-menu.js index 17b5322146a241e24315bcd8e46bdb2ae91264cf..17b7db8f04ffcf2cc98f08e606c2dad0fea80e5e 100644 --- a/core/modules/navigation/js/toolbar-menu.js +++ b/core/modules/navigation/js/toolbar-menu.js @@ -43,7 +43,7 @@ * * @type {HTMLElement} */ - const text = button.querySelector('.toolbar-menu__link-action'); + const text = button.querySelector('[data-toolbar-action]'); /** * Toggles the button's aria-expanded attribute and updates its text. diff --git a/core/modules/navigation/js/toolbar-popover.js b/core/modules/navigation/js/toolbar-popover.js index 50fa58180ecd253e0386701bcffd9f37bdc91370..e79bc3fb8ec216af61e3a433f2e264c03c06ba7c 100644 --- a/core/modules/navigation/js/toolbar-popover.js +++ b/core/modules/navigation/js/toolbar-popover.js @@ -30,17 +30,6 @@ const POPOVER_NO_CLICK_DELAY = 500; if (!button || !tooltip) return; - const handleMouseMove = (event) => { - button.style.setProperty( - '--safe-triangle-cursor-x', - `${event.clientX}px`, - ); - button.style.setProperty( - '--safe-triangle-cursor-y', - `${event.clientY}px`, - ); - }; - const expandPopover = () => { popover.classList.add('toolbar-popover--expanded'); button.dataset.drupalNoClick = 'true'; @@ -112,8 +101,6 @@ const POPOVER_NO_CLICK_DELAY = 500; }); }; - button.addEventListener('mousemove', handleMouseMove); - button.addEventListener('mouseover', () => { // This is not needed because no hover on mobile. // @todo test is after. diff --git a/core/modules/navigation/layouts/navigation.html.twig b/core/modules/navigation/layouts/navigation.html.twig index 01509dda4d45606b314ca6e60d2bb65596438521..afe5152a713a717f247b1e9041a95746e9a4ca7e 100644 --- a/core/modules/navigation/layouts/navigation.html.twig +++ b/core/modules/navigation/layouts/navigation.html.twig @@ -20,11 +20,14 @@ <div {{ control_bar_attributes.addClass('admin-toolbar-control-bar').setAttribute('data-drupal-admin-styles', '').setAttribute('data-offset-top', '') }}> <div class="admin-toolbar-control-bar__content"> - {% include '@navigation/toolbar-button.html.twig' with { + {% include 'navigation:toolbar-button' with { attributes: create_attribute({'aria-expanded': 'false', 'aria-controls': 'admin-toolbar', 'type': 'button'}), icon: 'burger', text: 'Expand sidebar'|t, - extra_classes: 'admin-toolbar-control-bar__burger', + modifiers: ['small-offset'], + extra_classes: [ + 'admin-toolbar-control-bar__burger', + ], } only %} </div> </div> @@ -53,18 +56,17 @@ {% endif %} </a> {% endif %} - {% include '@navigation/toolbar-button.html.twig' with { + {% include 'navigation:toolbar-button' with { attributes: create_attribute({ 'data-toolbar-back-control': true, 'tabindex': '-1' }), - extra_classes: 'admin-toolbar__back-button', + extra_classes: ['admin-toolbar__back-button'], icon: 'back', text: 'Back'|t, } only %} - {% include '@navigation/toolbar-button.html.twig' with { - attributes: create_attribute({ 'aria-controls': 'admin-toolbar', 'tabindex': '-1', 'type': 'button' }), - extra_classes: 'admin-toolbar__close-button', + {% include 'navigation:toolbar-button' with { + action: 'Collapse sidebar'|t, + attributes: create_attribute({ 'aria-controls': 'admin-toolbar', 'tabindex': '-1', 'type': 'button' }), + extra_classes: ['admin-toolbar__close-button'], icon: 'cross', - label_classes: 'visually-hidden', - text: 'Collapse sidebar'|t, } only %} </div> @@ -76,7 +78,7 @@ <h3 id="{{ title_menu_footer }}" class="visually-hidden">{{ 'Administrative toolbar footer'|t }}</h3> {{ content.footer }} <button aria-controls="admin-toolbar" class="admin-toolbar__expand-button" type="button"> - <span class="visually-hidden" data-text>{{ 'Collapse sidebar'|t }}</span> + <span class="visually-hidden" data-toolbar-text>{{ 'Collapse sidebar'|t }}</span> </button> </nav> </div> diff --git a/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.info.yml b/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.info.yml index adca10fb31f31ce9a92f3077b3fc2b6b9e35fb00..edaabb1e223cd755dba3cf07fc2aa400cc7a8d07 100644 --- a/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.info.yml +++ b/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.info.yml @@ -6,3 +6,4 @@ lifecycle: experimental version: VERSION dependencies: - navigation:navigation +hidden: true diff --git a/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.module b/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.module deleted file mode 100644 index aa9b39d8dd2c87e932e79286be30cc3da38be495..0000000000000000000000000000000000000000 --- a/core/modules/navigation/modules/navigation_top_bar/navigation_top_bar.module +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * @file - * Primary module hooks for navigation top bar module. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function navigation_top_bar_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.navigation_top_bar': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Navigation Top Bar module is a Feature Flag module which, when enabled, renders the experimental navigation top bar.') . '</p>'; - $output .= '<p>' . t('The top bar provides relevant administrative information and tasks for the current page. It is not feature complete nor fully functional.') . '</p>'; - $output .= '<p>' . t('Leaving this module enabled can affect both admin and front-end pages layouts and blocks like Primary admin actions, whose content might be moved to te top bar.') . '</p>'; - $output .= '<p>' . t('It is recommended to leave this module off while it is under active development and experimental phase.') . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":docs">online documentation for the Navigation Top Bar module</a>.', [ - ':docs' => 'https://www.drupal.org/project/navigation', - ]) . '</p>'; - return $output; - } -} diff --git a/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php b/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2d7f10f03dd62211ec80f6cb56482a7f0ce2cc35 --- /dev/null +++ b/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php @@ -0,0 +1,30 @@ +<?php + +namespace Drupal\navigation_top_bar\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for navigation_top_bar. + */ +class NavigationTopBarHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.navigation_top_bar': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Navigation Top Bar module is a Feature Flag module which, when enabled, renders the experimental navigation top bar.') . '</p>'; + $output .= '<p>' . t('The top bar provides relevant administrative information and tasks for the current page. It is not feature complete nor fully functional.') . '</p>'; + $output .= '<p>' . t('Leaving this module enabled can affect both admin and front-end pages layouts and blocks like Primary admin actions, whose content might be moved to te top bar.') . '</p>'; + $output .= '<p>' . t('It is recommended to leave this module off while it is under active development and experimental phase.') . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":docs">online documentation for the Navigation Top Bar module</a>.', [':docs' => 'https://www.drupal.org/project/navigation']) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/navigation/navigation.install b/core/modules/navigation/navigation.install index 4b39baad172aa5990ad9380aa58e56d27d94065d..72b843b23a2860f6cd0114215eb20570ee793c72 100644 --- a/core/modules/navigation/navigation.install +++ b/core/modules/navigation/navigation.install @@ -32,13 +32,34 @@ function navigation_update_11001(array &$sandbox): void { $settings->setData([ 'logo' => [ 'provider' => $settings->get('logo_provider'), - 'managed' => $settings->get('logo_managed'), + 'managed' => is_array($settings->get('logo_managed')) ? current($settings->get('logo_managed')) : $settings->get('logo_managed'), 'max' => [ 'filesize' => $settings->get('logo_max_filesize'), - 'height' => $settings->get('logo_height'), - 'width' => $settings->get('logo_width'), + 'height' => $settings->get('logo_height') ?? 40, + 'width' => $settings->get('logo_width') ?? 40, ], ], ]); $settings->save(TRUE); } + +/** + * Update for navigation logo to store the file path instead of ID. + */ +function navigation_update_11002(array &$sandbox): void { + $settings = \Drupal::configFactory()->getEditable('navigation.settings'); + $logo_path = ''; + if (!empty($settings->get('logo.managed'))) { + $logo_fid = $settings->get('logo.managed'); + $file = \Drupal::entityTypeManager()->getStorage('file')->load($logo_fid); + if (isset($file)) { + $logo_path = $file->getFileUri(); + // Delete file usage reference because they are not being used anymore. + \Drupal::service('file.usage')->delete($file, 'navigation'); + } + } + + $settings->set('logo.path', $logo_path); + $settings->clear('logo.managed'); + $settings->save(); +} diff --git a/core/modules/navigation/navigation.libraries.yml b/core/modules/navigation/navigation.libraries.yml index 7c0b513199f59f7c673a12ba63395cefdbb38001..babe8c85440a5c0f088bd012dda6e478010374b7 100644 --- a/core/modules/navigation/navigation.libraries.yml +++ b/core/modules/navigation/navigation.libraries.yml @@ -12,7 +12,6 @@ internal.navigation: theme: css/base/fonts.css: {} css/base/variables.css: {} - css/components/toolbar-button.css: {} css/components/admin-toolbar.css: {} css/components/top-bar.css: {} css/components/admin-toolbar-control-bar.css: {} @@ -27,6 +26,7 @@ internal.navigation: - navigation/internal.dropdown - navigation/internal.tooltip - navigation/internal.popover + - navigation/internal.safe-triangle admin-reset-styles: css: @@ -82,3 +82,15 @@ navigation.layoutBuilder: css: base: css/base/layout-builder.css: {} + +internal.safe-triangle: + # Internal library. Do not depend on it outside core nor add core usage + # beyond the Navigation module. + js: + js/safe-triangle.js: {} + css: + base: + css/components/safe-triangle.css: {} + dependencies: + - core/drupal + - core/once diff --git a/core/modules/navigation/navigation.module b/core/modules/navigation/navigation.module index 1c2f8ed4c46dfa8d6226e3f049557024f1ab409d..74a136250832983e1ac97319154b9efb9179a7fd 100644 --- a/core/modules/navigation/navigation.module +++ b/core/modules/navigation/navigation.module @@ -2,73 +2,8 @@ /** * @file - * Primary module hooks for navigation module. */ -use Drupal\Component\Plugin\PluginBase; -use Drupal\Core\Block\BlockPluginInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\navigation\NavigationContentLinks; -use Drupal\navigation\NavigationRenderer; -use Drupal\navigation\Plugin\SectionStorage\NavigationSectionStorage; -use Drupal\navigation\RenderCallbacks; - -/** - * Implements hook_help(). - */ -function navigation_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.navigation': - $output = ''; - $output .= '<h3>' . t('About') . '</h3>'; - $output .= '<p>' . t('The Navigation module provides a left-aligned, collapsible, vertical sidebar navigation.') . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":docs">online documentation for the Navigation module</a>.', [ - ':docs' => 'https://www.drupal.org/project/navigation', - ]) . '</p>'; - return $output; - } - $configuration_route = 'layout_builder.navigation.'; - if (!$route_match->getRouteObject()->getOption('_layout_builder') || !str_starts_with($route_name, $configuration_route)) { - return layout_builder_help($route_name, $route_match); - } - if (str_starts_with($route_name, $configuration_route)) { - $output = '<p>' . t('This layout builder tool allows you to configure the blocks in the navigation toolbar.') . '</p>'; - $output .= '<p>' . t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_page_top(). - */ -function navigation_page_top(array &$page_top) { - if (!\Drupal::currentUser()->hasPermission('access navigation')) { - return; - } - - $navigation_renderer = \Drupal::service('navigation.renderer'); - assert($navigation_renderer instanceof NavigationRenderer); - $navigation_renderer->removeToolbar($page_top); - if (\Drupal::routeMatch()->getRouteName() !== 'layout_builder.navigation.view') { - // Don't render the admin toolbar if in layout edit mode. - $navigation_renderer->buildNavigation($page_top); - $navigation_renderer->buildTopBar($page_top); - return; - } - // But if in layout mode, add an empty element to leave space. We need to use - // an empty .admin-toolbar element because the css uses the adjacent sibling - // selector. The actual rendering of the navigation blocks/layout occurs in - // the layout form. - $page_top['navigation'] = [ - '#type' => 'html_tag', - '#tag' => 'aside', - '#attributes' => [ - 'class' => 'admin-toolbar', - ], - ]; - $navigation_renderer->buildTopBar($page_top); -} - /** * Implements hook_module_implements_alter(). */ @@ -83,136 +18,3 @@ function navigation_module_implements_alter(&$implementations, $hook) { unset($implementations['layout_builder']); } } - -/** - * Implements hook_theme(). - */ -function navigation_theme($existing, $type, $theme, $path) { - $items['top_bar'] = [ - 'variables' => [ - 'local_tasks' => [], - ], - ]; - - $items['top_bar_local_tasks'] = [ - 'variables' => [ - 'local_tasks' => [], - ], - ]; - - $items['top_bar_local_task'] = [ - 'variables' => [ - 'link' => [], - ], - ]; - - $items['big_pipe_interface_preview__navigation_shortcut_lazy_builder_lazyLinks__Shortcuts'] = [ - 'variables' => [ - 'callback' => NULL, - 'arguments' => NULL, - 'preview' => NULL, - ], - 'base hook' => 'big_pipe_interface_preview', - ]; - - $items['block__navigation'] = [ - 'render element' => 'elements', - 'base hook' => 'block', - ]; - - $items['navigation_menu'] = [ - 'base hook' => 'menu', - 'variables' => [ - 'menu_name' => NULL, - 'title' => NULL, - 'items' => [], - 'attributes' => [], - ], - ]; - - $items['menu_region__footer'] = [ - 'variables' => [ - 'help' => NULL, - 'items' => [], - 'title' => NULL, - 'menu_name' => NULL, - ], - ]; - - return $items; -} - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function navigation_menu_links_discovered_alter(&$links) { - $navigation_links = \Drupal::classResolver(NavigationContentLinks::class); - assert($navigation_links instanceof NavigationContentLinks); - $navigation_links->addMenuLinks($links); - $navigation_links->removeAdminContentLink($links); - $navigation_links->removeHelpLink($links); -} - -/** - * Implements hook_block_build_BASE_BLOCK_ID_alter(). - */ -function navigation_block_build_local_tasks_block_alter(array &$build, BlockPluginInterface $block) { - $navigation_renderer = \Drupal::service('navigation.renderer'); - assert($navigation_renderer instanceof NavigationRenderer); - $navigation_renderer->removeLocalTasks($build, $block); -} - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - * - * Curate the blocks available in the Layout Builder "Add Block" UI. - */ -function navigation_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) { - if (($extra['section_storage'] ?? NULL) instanceof NavigationSectionStorage) { - // Remove all blocks other than the ones we support. - $navigation_safe = [ - 'navigation_user', - 'navigation_shortcuts', - 'navigation_menu', - ]; - $definitions = array_filter($definitions, static function (array $definition, string $plugin_id) use ($navigation_safe): bool { - [$base_plugin_id] = explode(PluginBase::DERIVATIVE_SEPARATOR, $plugin_id); - return in_array($base_plugin_id, $navigation_safe, TRUE); - }, ARRAY_FILTER_USE_BOTH); - } -} - -/** - * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). - */ -function navigation_plugin_filter_layout__layout_builder_alter(array &$definitions, array $extra) { - if (($extra['section_storage'] ?? NULL) instanceof NavigationSectionStorage) { - // We don't allow adding a new section. - $definitions = []; - } -} - -/** - * Implements hook_block_alter(). - */ -function navigation_block_alter(&$definitions): void { - $hidden = [ - 'navigation_user', - 'navigation_shortcuts', - 'navigation_menu', - ]; - foreach ($hidden as $block_id) { - if (isset($definitions[$block_id])) { - $definitions[$block_id]['_block_ui_hidden'] = TRUE; - } - } -} - -/** - * Implements hook_element_info_alter(). - */ -function navigation_element_info_alter(array &$info) { - if (array_key_exists('layout_builder', $info)) { - $info['layout_builder']['#pre_render'][] = [RenderCallbacks::class, 'alterLayoutBuilder']; - } -} diff --git a/core/modules/navigation/navigation.post_update.php b/core/modules/navigation/navigation.post_update.php index 90e63c6afb2e8089f98c09c3c928fbbff0b6827a..5c3a0dbf650af98c313ae788381976c5cd11a190 100644 --- a/core/modules/navigation/navigation.post_update.php +++ b/core/modules/navigation/navigation.post_update.php @@ -31,11 +31,5 @@ function navigation_post_update_update_permissions(array &$sandbox) { * Defines the values for the default logo dimensions. */ function navigation_post_update_set_logo_dimensions_default(array &$sandbox) { - $settings = \Drupal::configFactory()->getEditable('navigation.settings'); - $settings->set('logo_height', 40) - ->set('logo_width', 40); - if (is_array($settings->get('logo_managed'))) { - $settings->set('logo_managed', current($settings->get('logo_managed'))); - } - $settings->save(); + // Empty post_update hook. } diff --git a/core/modules/navigation/navigation.services.yml b/core/modules/navigation/navigation.services.yml index 6c5ca8462d9e8cbf78f719c1c71f8add82c18f14..5413372b557b0ea7e99750a4e7debc9595b6cd73 100644 --- a/core/modules/navigation/navigation.services.yml +++ b/core/modules/navigation/navigation.services.yml @@ -31,5 +31,5 @@ services: navigation.user_lazy_builder: class: Drupal\navigation\UserLazyBuilder - arguments: ['@module_handler', '@current_user'] + arguments: ['@current_user'] Drupal\navigation\UserLazyBuilders: '@navigation.user_lazy_builder' diff --git a/core/modules/navigation/src/Form/SettingsForm.php b/core/modules/navigation/src/Form/SettingsForm.php index 4f0cda9273aabd0e3b5675a880a9a75c19fe7bfe..7d8ec3c1d21788f2718ec50a454b5570d571725d 100644 --- a/core/modules/navigation/src/Form/SettingsForm.php +++ b/core/modules/navigation/src/Form/SettingsForm.php @@ -7,15 +7,16 @@ use Drupal\Component\Utility\Environment; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\TypedConfigManagerInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\File\Exception\FileException; use Drupal\Core\File\FileSystemInterface; -use Drupal\Core\File\FileUrlGeneratorInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Image\ImageFactory; use Drupal\Core\Render\RendererInterface; +use Drupal\Core\StreamWrapper\PublicStream; +use Drupal\Core\StreamWrapper\StreamWrapperManager; +use Drupal\Core\Theme\ThemeManagerInterface; use Drupal\file\Entity\File; -use Drupal\file\FileUsage\FileUsageInterface; use Drupal\navigation\NavigationRenderer; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -35,26 +36,20 @@ final class SettingsForm extends ConfigFormBase { * The typed config manager. * @param \Drupal\Core\File\FileSystemInterface $fileSystem * The file system. - * @param \Drupal\Core\File\FileUrlGeneratorInterface $fileUrlGenerator - * The file URL generator. - * @param \Drupal\file\FileUsage\FileUsageInterface $fileUsage - * The File Usage service. * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer service. - * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager - * The entity type manager. * @param \Drupal\Core\Image\ImageFactory $imageFactory * The image factory. + * @param \Drupal\Core\Theme\ThemeManagerInterface $themeManager + * The theme manager. */ public function __construct( ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, protected FileSystemInterface $fileSystem, - protected FileUrlGeneratorInterface $fileUrlGenerator, - protected FileUsageInterface $fileUsage, protected RendererInterface $renderer, - protected EntityTypeManagerInterface $entityTypeManager, protected ImageFactory $imageFactory, + protected ThemeManagerInterface $themeManager, ) { parent::__construct($config_factory, $typed_config_manager); } @@ -67,11 +62,9 @@ public static function create(ContainerInterface $container) { $container->get('config.factory'), $container->get('config.typed'), $container->get('file_system'), - $container->get('file_url_generator'), - $container->get('file.usage'), $container->get('renderer'), - $container->get('entity_type.manager'), - $container->get('image.factory') + $container->get('image.factory'), + $container->get('theme.manager') ); } @@ -110,7 +103,8 @@ public function buildForm(array $form, FormStateInterface $form_state): array { ], '#config_target' => 'navigation.settings:logo.provider', ]; - $form['logo']['image'] = [ + + $form['logo']['custom'] = [ '#type' => 'container', '#states' => [ 'visible' => [ @@ -118,8 +112,34 @@ public function buildForm(array $form, FormStateInterface $form_state): array { ], ], ]; + + // If path is a public:// URI, display the path relative to the files + // directory; stream wrappers are not end-user friendly. + $original_path = $config->get('logo.path') ?? ''; + $friendly_path = NULL; + $default_path = $original_path; + $default = 'logo.png'; + + if (StreamWrapperManager::getScheme($original_path) === 'public') { + $friendly_path = StreamWrapperManager::getTarget($original_path); + $default_path = $friendly_path; + } + + // Prepare local file path for description. + if ($original_path && isset($friendly_path)) { + $local_file = strtr($original_path, ['public:/' => PublicStream::basePath()]); + } + else { + $local_file = $this->themeManager->getActiveTheme()->getPath() . '/' . $default; + } + + $description = $this->t('Examples: <code>@implicit-public-file</code> (for a file in the public filesystem), <code>@explicit-file</code>, or <code>@local-file</code>.', [ + '@implicit-public-file' => $friendly_path ?? $default, + '@explicit-file' => StreamWrapperManager::getScheme($original_path) !== FALSE ? $original_path : 'public://' . $default, + '@local-file' => $local_file, + ]); + $allowed = 'png jpg jpeg'; - $current_logo_managed_fid = $config->get('logo.managed') ? [$config->get('logo.managed')] : NULL; $max_navigation_allowed = $config->get('logo.max.filesize'); $max_system_allowed = Environment::getUploadMaxSize(); $max_allowed = $max_navigation_allowed < $max_system_allowed ? $max_navigation_allowed : $max_system_allowed; @@ -129,19 +149,27 @@ public function buildForm(array $form, FormStateInterface $form_state): array { ]; $file_upload_help = [ '#theme' => 'file_upload_help', - '#description' => $this->t('Recommended image dimension 40 x 40 pixels.'), + '#description' => $this->t("If you don't have direct file access to the server, use this field to upload your logo. Recommended image dimension %width x %height pixels.", [ + '%width' => $config->get('logo.max.width'), + '%height' => $config->get('logo.max.height'), + ]), '#upload_validators' => $upload_validators, '#cardinality' => 1, ]; - $form['logo']['image']['logo_managed'] = [ - '#type' => 'managed_file', - '#title' => t('Choose custom logo'), - '#upload_validators' => $upload_validators, - '#upload_location' => 'public://navigation-logo', + $form['logo']['custom']['logo_path'] = [ + '#type' => 'textfield', + '#title' => $this->t('Path to custom logo'), + '#default_value' => $default_path, + '#description' => $description, + '#config_target' => 'navigation.settings:logo.path', + ]; + $form['logo']['custom']['logo_upload'] = [ + '#type' => 'file', + '#title' => $this->t('Upload logo image'), '#description' => $this->renderer->renderInIsolation($file_upload_help), - '#default_value' => $current_logo_managed_fid, - '#multiple' => FALSE, + '#upload_validators' => $upload_validators, ]; + return parent::buildForm($form, $form_state); } @@ -149,90 +177,83 @@ public function buildForm(array $form, FormStateInterface $form_state): array { * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state): void { - $logo_managed = $form_state->getValue('logo_managed'); - if ($form_state->getValue('logo_provider') === NavigationRenderer::LOGO_PROVIDER_CUSTOM && empty($logo_managed)) { - $form_state->setErrorByName('logo_managed', 'An image file is required with the current logo handling option.'); + // If the upload element is not empty, try to adjust the image dimensions + // if needed. + if ($form_state->getValue('logo_path')) { + $path = $this->validateLogoPath($form_state->getValue('logo_path')); + if (!$path) { + $form_state->setErrorByName('logo_path', $this->t('The custom logo path is invalid.')); + } + } + + if ($form_state->getValue('logo_provider') !== NavigationRenderer::LOGO_PROVIDER_CUSTOM) { + $form_state->setValue('logo_upload', ''); + $form_state->setValue('logo_path', ''); } + else { + $file = _file_save_upload_from_form($form['logo']['custom']['logo_upload'], $form_state, 0); + if ($file) { + $logo_dimensions = $this->adjustLogoDimensions($file); + if (!$logo_dimensions) { + $config = $this->config('navigation.settings'); + $width = $config->get('logo.width'); + $height = $config->get('logo.height'); + $form_state->setErrorByName('logo_upload', $this->t('Image dimensions are bigger than the expected %widthx%height pixels and cannot be used as the navigation logo.', + [ + '%width' => $width, + '%height' => $height, + ])); + } + // Put the temporary file in form_values so we can save it on submit. + $form_state->setValue('logo_upload', $file); + $form_state->setValue('logo_path', $file->getFileUri()); + $form_state->setValue('logo_dimensions', $logo_dimensions); + } - // If the upload element is not empty and the image is new, try to adjust - // the image dimensions. - $this->validateLogoManaged($form, $form_state); + if (empty($form_state->getValue('logo_path'))) { + $form_state->setErrorByName('logo_path', 'An image file is required with the current logo handling option.'); + } + } + parent::validateForm($form, $form_state); } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state): void { - $config = $this->config('navigation.settings'); - - // Get the previous config settings. - $previous_logo_provider = $config->get('logo.provider'); - $previous_logo_fid = $config->get('logo.managed'); + // If the user uploaded a new logo, save it to a permanent location + // and use it in place of the default navigation-provided file. + $default_scheme = $this->config('system.file')->get('default_scheme'); + $values = $form_state->getValues(); + try { + if (!empty($values['logo_upload'])) { + $filename = $this->fileSystem->copy($values['logo_upload']->getFileUri(), $default_scheme . '://'); + $values['logo_path'] = $filename; + if ($values['logo_dimensions']['resize']) { + $config = $this->config('navigation.settings'); + $this->messenger()->addStatus($this->t('The image was resized to fit within the navigation logo expected dimensions of %widthx%height pixels. The new dimensions of the resized image are %new_widthx%new_height pixels.', + [ + '%width' => $config->get('logo.max.width'), + '%height' => $config->get('logo.max.height'), + '%new_width' => $values['logo_dimensions']['width'], + '%new_height' => $values['logo_dimensions']['height'], + ])); + } - // Get new values from the form. - $new_logo_provider = $form_state->getValue('logo_provider'); - $logo = $form_state->getValue('logo_managed'); - $new_logo_fid = !empty($logo) ? reset($logo) : NULL; - - // Pre-load files if any for FileUsageInterface. - $previous_logo_managed = $previous_logo_fid ? File::load($previous_logo_fid) : NULL; - $new_logo_managed = $new_logo_fid ? File::load($new_logo_fid) : NULL; - - // Decrement if previous logo_provider was 'custom' and has changed to a - // different fid and there's a change in the logo fid. - if ($previous_logo_provider === NavigationRenderer::LOGO_PROVIDER_CUSTOM - && ($new_logo_provider !== NavigationRenderer::LOGO_PROVIDER_CUSTOM || $previous_logo_fid !== $new_logo_fid) - && $previous_logo_managed - ) { - $this->fileUsage->delete($previous_logo_managed, 'navigation', 'logo', 1); - } - - // Increment usage if different from the previous one. - if ($new_logo_managed && $new_logo_fid !== $previous_logo_fid) { - $new_logo_managed->setPermanent(); - $new_logo_managed->save(); - $this->fileUsage->add($new_logo_managed, 'navigation', 'logo', 1); + } } - - $config - ->set('logo.managed', $new_logo_fid) - ->save(); - parent::submitForm($form, $form_state); - } - - /** - * Validate the Logo Managed image element. - * - * @param array $form - * An associative array containing the structure of the form. - * @param \Drupal\Core\Form\FormStateInterface $form_state - * The current state of the form. - */ - protected function validateLogoManaged(array $form, FormStateInterface $form_state): void { - $logo_managed = $form_state->getValue('logo_managed'); - $config = $this->config('navigation.settings'); - if (empty($logo_managed)) { + catch (FileException) { + $this->messenger()->addError($this->t('The file %file could not be copied to the permanent destination. Contact the site administrator if the problem persists.', ['%file' => $values['logo_upload']->getFilename()])); return; } - $width = $config->get('logo.max.width'); - $height = $config->get('logo.max.height'); - - // Skip if the fid has not been modified. - $fid = reset($logo_managed); - if ($fid == $config->get('logo.managed')) { - return; + // If the user entered a path relative to the system files directory for + // the logo, store a public:// URI so the theme system can handle it. + if (!empty($values['logo_path'])) { + $form_state->setValue('logo_path', $this->validateLogoPath($values['logo_path'])); } - $file = $this->entityTypeManager->getStorage('file') - ->load($fid); - if ($fid && !$this->adjustLogoDimensions($file)) { - $form_state->setErrorByName('logo_managed', $this->t('Image dimensions are bigger than the expected %widthx%height pixels and cannot be used as the navigation logo.', - [ - '%width' => $width, - '%height' => $height, - ])); - } + parent::submitForm($form, $form_state); } /** @@ -241,36 +262,70 @@ protected function validateLogoManaged(array $form, FormStateInterface $form_sta * @param \Drupal\file\Entity\File $file * The file entity that contains the image. * - * @return bool - * TRUE if the logo image dimensions are properly adjusted. FALSE otherwise. + * @return array|null + * Array containing the logo dimensions properly adjusted. NULL if fails. */ - protected function adjustLogoDimensions(File $file): bool { + protected function adjustLogoDimensions(File $file): ?array { $config = $this->config('navigation.settings'); $image = $this->imageFactory->get($file->getFileUri()); if (!$image->isValid()) { - return FALSE; + return NULL; } $width = $config->get('logo.max.width'); $height = $config->get('logo.max.height'); if ($image->getWidth() <= $width && $image->getHeight() <= $height) { - return TRUE; + return [ + 'width' => $width, + 'height' => $width, + 'resize' => FALSE, + ]; } if ($image->scale($width, $height) && $image->save()) { - $this->messenger()->addStatus($this->t('The image was resized to fit within the navigation logo expected dimensions of %widthx%height pixels. The new dimensions of the resized image are %new_widthx%new_height pixels.', - [ - '%width' => $width, - '%height' => $height, - '%new_width' => $image->getWidth(), - '%new_height' => $image->getHeight(), - ])); - - return TRUE; + return [ + 'width' => $image->getWidth(), + 'height' => $image->getHeight(), + 'resize' => TRUE, + ]; } - return FALSE; + return NULL; + } + + /** + * Helper function for the navigation settings form. + * + * Attempts to validate normal system paths, paths relative to the public + * files directory, or stream wrapper URIs. If the given path is any of the + * above, returns a valid path or URI that the theme system can display. + * + * @param string $path + * A path relative to the Drupal root or to the public files directory, or + * a stream wrapper URI. + * + * @return string|null + * A valid path that can be displayed through the theme system, or NULL if + * the path could not be validated. + */ + protected function validateLogoPath(string $path): ?string { + // Absolute local file paths are invalid. + if ($this->fileSystem->realpath($path) == $path) { + return NULL; + } + // A path relative to the Drupal root or a fully qualified URI is valid. + if (is_file($path)) { + return $path; + } + // Prepend 'public://' for relative file paths within public filesystem. + if (StreamWrapperManager::getScheme($path) === FALSE) { + $path = 'public://' . $path; + } + if (is_file($path)) { + return $path; + } + return NULL; } } diff --git a/core/modules/navigation/src/Hook/NavigationHooks.php b/core/modules/navigation/src/Hook/NavigationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..3f93bb9832bfe521a546ce85db314d1f3c307aa7 --- /dev/null +++ b/core/modules/navigation/src/Hook/NavigationHooks.php @@ -0,0 +1,177 @@ +<?php + +namespace Drupal\navigation\Hook; + +use Drupal\navigation\RenderCallbacks; +use Drupal\Component\Plugin\PluginBase; +use Drupal\navigation\Plugin\SectionStorage\NavigationSectionStorage; +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\navigation\NavigationContentLinks; +use Drupal\navigation\NavigationRenderer; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for navigation. + */ +class NavigationHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.navigation': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('The Navigation module provides a left-aligned, collapsible, vertical sidebar navigation.') . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":docs">online documentation for the Navigation module</a>.', [':docs' => 'https://www.drupal.org/project/navigation']) . '</p>'; + return $output; + } + $configuration_route = 'layout_builder.navigation.'; + if (!$route_match->getRouteObject()->getOption('_layout_builder') || !str_starts_with($route_name, $configuration_route)) { + return \Drupal::moduleHandler()->invoke('layout_builder', 'help', [$route_name, $route_match]); + } + if (str_starts_with($route_name, $configuration_route)) { + $output = '<p>' . t('This layout builder tool allows you to configure the blocks in the navigation toolbar.') . '</p>'; + $output .= '<p>' . t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + if (!\Drupal::currentUser()->hasPermission('access navigation')) { + return; + } + $navigation_renderer = \Drupal::service('navigation.renderer'); + assert($navigation_renderer instanceof NavigationRenderer); + $navigation_renderer->removeToolbar($page_top); + if (\Drupal::routeMatch()->getRouteName() !== 'layout_builder.navigation.view') { + // Don't render the admin toolbar if in layout edit mode. + $navigation_renderer->buildNavigation($page_top); + $navigation_renderer->buildTopBar($page_top); + return; + } + // But if in layout mode, add an empty element to leave space. We need to use + // an empty .admin-toolbar element because the css uses the adjacent sibling + // selector. The actual rendering of the navigation blocks/layout occurs in + // the layout form. + $page_top['navigation'] = [ + '#type' => 'html_tag', + '#tag' => 'aside', + '#attributes' => [ + 'class' => 'admin-toolbar', + ], + ]; + $navigation_renderer->buildTopBar($page_top); + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + $items['top_bar'] = ['variables' => ['local_tasks' => []]]; + $items['top_bar_local_tasks'] = ['variables' => ['local_tasks' => []]]; + $items['top_bar_local_task'] = ['variables' => ['link' => []]]; + $items['big_pipe_interface_preview__navigation_shortcut_lazy_builder_lazyLinks__Shortcuts'] = [ + 'variables' => [ + 'callback' => NULL, + 'arguments' => NULL, + 'preview' => NULL, + ], + 'base hook' => 'big_pipe_interface_preview', + ]; + $items['block__navigation'] = ['render element' => 'elements', 'base hook' => 'block']; + $items['navigation_menu'] = [ + 'base hook' => 'menu', + 'variables' => [ + 'menu_name' => NULL, + 'title' => NULL, + 'items' => [], + 'attributes' => [], + ], + ]; + $items['menu_region__footer'] = ['variables' => ['items' => [], 'title' => NULL, 'menu_name' => NULL]]; + return $items; + } + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(&$links) { + $navigation_links = \Drupal::classResolver(NavigationContentLinks::class); + assert($navigation_links instanceof NavigationContentLinks); + $navigation_links->addMenuLinks($links); + $navigation_links->removeAdminContentLink($links); + $navigation_links->removeHelpLink($links); + } + + /** + * Implements hook_block_build_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_build_local_tasks_block_alter')] + public function blockBuildLocalTasksBlockAlter(array &$build, BlockPluginInterface $block) { + $navigation_renderer = \Drupal::service('navigation.renderer'); + assert($navigation_renderer instanceof NavigationRenderer); + $navigation_renderer->removeLocalTasks($build, $block); + } + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + * + * Curate the blocks available in the Layout Builder "Add Block" UI. + */ + #[Hook('plugin_filter_block__layout_builder_alter')] + public function pluginFilterBlockLayoutBuilderAlter(array &$definitions, array $extra) { + if (($extra['section_storage'] ?? NULL) instanceof NavigationSectionStorage) { + // Remove all blocks other than the ones we support. + $navigation_safe = ['navigation_user', 'navigation_shortcuts', 'navigation_menu']; + $definitions = array_filter($definitions, static function (array $definition, string $plugin_id) use ($navigation_safe) : bool { + [$base_plugin_id] = explode(PluginBase::DERIVATIVE_SEPARATOR, $plugin_id); + return in_array($base_plugin_id, $navigation_safe, TRUE); + }, ARRAY_FILTER_USE_BOTH); + } + } + + /** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ + #[Hook('plugin_filter_layout__layout_builder_alter')] + public function pluginFilterLayoutLayoutBuilderAlter(array &$definitions, array $extra) { + if (($extra['section_storage'] ?? NULL) instanceof NavigationSectionStorage) { + // We don't allow adding a new section. + $definitions = []; + } + } + + /** + * Implements hook_block_alter(). + */ + #[Hook('block_alter')] + public function blockAlter(&$definitions) : void { + $hidden = ['navigation_user', 'navigation_shortcuts', 'navigation_menu', 'navigation_link']; + foreach ($hidden as $block_id) { + if (isset($definitions[$block_id])) { + $definitions[$block_id]['_block_ui_hidden'] = TRUE; + } + } + } + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(array &$info) { + if (array_key_exists('layout_builder', $info)) { + $info['layout_builder']['#pre_render'][] = [RenderCallbacks::class, 'alterLayoutBuilder']; + } + } + +} diff --git a/core/modules/navigation/src/NavigationRenderer.php b/core/modules/navigation/src/NavigationRenderer.php index 8613174787b52bb2a558ee8f812d848031632c33..4aa5bece02dec85f835464dd8cd7e0396cade1cc 100644 --- a/core/modules/navigation/src/NavigationRenderer.php +++ b/core/modules/navigation/src/NavigationRenderer.php @@ -18,8 +18,6 @@ use Drupal\Core\Plugin\Context\Context; use Drupal\Core\Plugin\Context\ContextDefinition; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\file\Entity\File; -use Drupal\file\FileInterface; use Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface; use Symfony\Component\HttpFoundation\RequestStack; @@ -144,12 +142,11 @@ public function buildNavigation(array &$page_top): void { $page_top['navigation'] = $build; if ($logo_provider === self::LOGO_PROVIDER_CUSTOM) { - $logo_managed = File::load($logo_settings->get('logo.managed')); - if ($logo_managed instanceof FileInterface) { - $logo_managed_uri = $logo_managed->getFileUri(); - $logo_managed_url = $this->fileUrlGenerator->generateAbsoluteString($logo_managed_uri); + $logo_path = $logo_settings->get('logo.path'); + if (!empty($logo_path) && is_file($logo_path)) { + $logo_managed_url = $this->fileUrlGenerator->generateAbsoluteString($logo_path); + $image = $this->imageFactory->get($logo_path); $page_top['navigation'][0]['settings']['logo_path'] = $logo_managed_url; - $image = $this->imageFactory->get($logo_managed_uri); if ($image->isValid()) { $page_top['navigation'][0]['settings']['logo_width'] = $image->getWidth(); $page_top['navigation'][0]['settings']['logo_height'] = $image->getHeight(); diff --git a/core/modules/navigation/src/Plugin/Block/NavigationLinkBlock.php b/core/modules/navigation/src/Plugin/Block/NavigationLinkBlock.php new file mode 100644 index 0000000000000000000000000000000000000000..0043e54d5dd9a469b21598c7ef3199f0c014ee8e --- /dev/null +++ b/core/modules/navigation/src/Plugin/Block/NavigationLinkBlock.php @@ -0,0 +1,277 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\navigation\Plugin\Block; + +use Drupal\Core\Block\Attribute\Block; +use Drupal\Core\Block\BlockBase; +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Entity\Element\EntityAutocomplete; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Url; + +/** + * Defines a link navigation block. + * + * @internal + */ +#[Block( + id: 'navigation_link', + admin_label: new TranslatableMarkup('Link'), +)] +final class NavigationLinkBlock extends BlockBase { + + /** + * {@inheritdoc} + */ + public function defaultConfiguration(): array { + return [ + 'title' => '', + 'uri' => '', + 'icon_class' => '', + ]; + } + + /** + * {@inheritdoc} + */ + public function blockForm($form, FormStateInterface $form_state): array { + $config = $this->configuration; + + $display_uri = NULL; + if (!empty($config['uri'])) { + try { + // The current field value could have been entered by a different user. + // However, if it is inaccessible to the current user, do not display it + // to them. + $url = Url::fromUri($config['uri']); + if (\Drupal::currentUser()->hasPermission('link to any page') || $url->access()) { + $display_uri = static::getUriAsDisplayableString($config['uri']); + } + } + catch (\InvalidArgumentException) { + // If $item->uri is invalid, show value as is, so the user can see what + // to edit. + $display_uri = $config['uri']; + } + } + + // @todo Logic related to the uri component has been borrowed from + // Drupal\link\Plugin\Field\FieldWidget\LinkWidget. + // Will be fixed in https://www.drupal.org/project/drupal/issues/3450518. + $form['uri'] = [ + '#type' => 'entity_autocomplete', + '#title' => $this->t('URL'), + '#default_value' => $display_uri, + '#element_validate' => [[static::class, 'validateUriElement']], + '#attributes' => [ + 'data-autocomplete-first-character-blacklist' => '/#?', + ], + // @todo The user should be able to select an entity type. Will be fixed + // in https://www.drupal.org/node/2423093. + '#target_type' => 'node', + '#maxlength' => 2048, + '#required' => TRUE, + '#process_default_value' => FALSE, + ]; + + $form['title'] = [ + '#type' => 'textfield', + '#title' => $this->t('Link text'), + '#default_value' => $config['title'], + '#required' => TRUE, + '#maxlength' => 255, + ]; + + $form['icon_class'] = [ + '#type' => 'textfield', + '#title' => $this->t('Icon CSS class'), + '#default_value' => $config['icon_class'], + '#element_validate' => [[static::class, 'validateIconClassElement']], + '#required' => TRUE, + '#maxlength' => 64, + ]; + + return $form; + } + + /** + * Form element validation handler for the 'icon_class' element. + * + * Disallows saving invalid class values. + */ + public static function validateIconClassElement(array $element, FormStateInterface $form_state, array $form): void { + $icon = $element['#value']; + + if (!preg_match('/^[a-z0-9_-]+$/', $icon)) { + $form_state->setError($element, t('The machine-readable name must contain only lowercase letters, numbers, underscores and hyphens.')); + } + } + + /** + * Form element validation handler for the 'uri' element. + * + * Disallows saving inaccessible or untrusted URLs. + */ + public static function validateUriElement($element, FormStateInterface $form_state, $form): void { + $uri = static::getUserEnteredStringAsUri($element['#value']); + $form_state->setValueForElement($element, $uri); + + // If getUserEnteredStringAsUri() mapped the entered value to an 'internal:' + // URI , ensure the raw value begins with '/', '?' or '#'. + // @todo '<front>' is valid input for BC reasons, may be removed by + // https://www.drupal.org/node/2421941 + if (parse_url($uri, PHP_URL_SCHEME) === 'internal' && !in_array($element['#value'][0], ['/', '?', '#'], TRUE) && !str_starts_with($element['#value'], '<front>')) { + $form_state->setError($element, new TranslatableMarkup('Manually entered paths should start with one of the following characters: / ? #')); + return; + } + } + + /** + * Gets the user-entered string as a URI. + * + * The following two forms of input are mapped to URIs: + * - entity autocomplete ("label (entity id)") strings: to 'entity:' URIs; + * - strings without a detectable scheme: to 'internal:' URIs. + * + * This method is the inverse of ::getUriAsDisplayableString(). + * + * @param string $string + * The user-entered string. + * + * @return string + * The URI, if a non-empty $uri was passed. + * + * @see static::getUriAsDisplayableString() + */ + protected static function getUserEnteredStringAsUri($string):string { + // By default, assume the entered string is a URI. + $uri = trim($string); + + // Detect entity autocomplete string, map to 'entity:' URI. + $entity_id = EntityAutocomplete::extractEntityIdFromAutocompleteInput($string); + if ($entity_id !== NULL) { + // @todo Support entity types other than 'node'. Will be fixed in + // https://www.drupal.org/node/2423093. + $uri = 'entity:node/' . $entity_id; + } + // Support linking to nothing. + elseif (in_array($string, ['<nolink>', '<none>', '<button>'], TRUE)) { + $uri = 'route:' . $string; + } + // Detect a schemeless string, map to 'internal:' URI. + elseif (!empty($string) && parse_url($string, PHP_URL_SCHEME) === NULL) { + // @todo '<front>' is valid input for BC reasons, may be removed by + // https://www.drupal.org/node/2421941 + // - '<front>' -> '/' + // - '<front>#foo' -> '/#foo' + if (str_starts_with($string, '<front>')) { + $string = '/' . substr($string, strlen('<front>')); + } + $uri = 'internal:' . $string; + } + + return $uri; + } + + /** + * Gets the URI without the 'internal:' or 'entity:' scheme. + * + * The following two forms of URIs are transformed: + * - 'entity:' URIs: to entity autocomplete ("label (entity id)") strings; + * - 'internal:' URIs: the scheme is stripped. + * + * This method is the inverse of ::getUserEnteredStringAsUri(). + * + * @param string $uri + * The URI to get the displayable string for. + * + * @return string + * + * @see static::getUserEnteredStringAsUri() + */ + protected static function getUriAsDisplayableString($uri): string { + $scheme = parse_url($uri, PHP_URL_SCHEME); + + // By default, the displayable string is the URI. + $displayable_string = $uri; + + // A different displayable string may be chosen in case of the 'internal:' + // or 'entity:' built-in schemes. + if ($scheme === 'internal') { + $uri_reference = explode(':', $uri, 2)[1]; + + // @todo '<front>' is valid input for BC reasons, may be removed by + // https://www.drupal.org/node/2421941 + $path = parse_url($uri, PHP_URL_PATH); + if ($path === '/') { + $uri_reference = '<front>' . substr($uri_reference, 1); + } + + $displayable_string = $uri_reference; + } + elseif ($scheme === 'entity') { + [$entity_type, $entity_id] = explode('/', substr($uri, 7), 2); + // Show the 'entity:' URI as the entity autocomplete would. + // @todo Support entity types other than 'node'. Will be fixed in + // https://www.drupal.org/node/2423093. + if ($entity_type == 'node' && $entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($entity_id)) { + $displayable_string = EntityAutocomplete::getEntityLabels([$entity]); + } + } + elseif ($scheme === 'route') { + $displayable_string = ltrim($displayable_string, 'route:'); + } + + return $displayable_string; + } + + /** + * {@inheritdoc} + */ + public function blockSubmit($form, FormStateInterface $form_state): void { + $this->configuration['uri'] = $form_state->getValue('uri'); + $this->configuration['title'] = $form_state->getValue('title'); + $this->configuration['icon_class'] = $form_state->getValue('icon_class'); + } + + /** + * {@inheritdoc} + */ + public function build(): array { + $config = $this->configuration; + $build = []; + // Ensure that user has access to link before rendering it. + try { + $url = Url::fromUri($config['uri']); + $access = $url->access(NULL, TRUE); + if (!$access->isAllowed()) { + // Cacheable dependency is explicitly added when access is not granted. + // It is bubbled when the link is rendered. + $cacheable_metadata = new CacheableMetadata(); + $cacheable_metadata->addCacheableDependency($access); + $cacheable_metadata->applyTo($build); + return $build; + } + } + catch (\InvalidArgumentException) { + return $build; + } + + return $build + [ + '#title' => $config['label'], + '#theme' => 'navigation_menu', + '#menu_name' => 'link', + '#items' => [ + [ + 'title' => $config['title'], + 'class' => $config['icon_class'], + 'url' => $url, + ], + ], + ]; + } + +} diff --git a/core/modules/navigation/src/Plugin/Block/NavigationShortcutsBlock.php b/core/modules/navigation/src/Plugin/Block/NavigationShortcutsBlock.php index 07e3ba3baa2166794750ba9ffa70344beaf0ef0d..2ec0b1424adb4b9c7d75af9e49feb699b4d09789 100644 --- a/core/modules/navigation/src/Plugin/Block/NavigationShortcutsBlock.php +++ b/core/modules/navigation/src/Plugin/Block/NavigationShortcutsBlock.php @@ -33,7 +33,7 @@ final class NavigationShortcutsBlock extends BlockBase implements ContainerFacto * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler diff --git a/core/modules/navigation/src/UserLazyBuilder.php b/core/modules/navigation/src/UserLazyBuilder.php index 6b0bd83cbbcb9fa7dbf095bb95fedecbd3cbf8d8..d9b34eba3d33934de100db41e1ea398d93e85215 100644 --- a/core/modules/navigation/src/UserLazyBuilder.php +++ b/core/modules/navigation/src/UserLazyBuilder.php @@ -4,7 +4,6 @@ namespace Drupal\navigation; -use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Security\TrustedCallbackInterface; use Drupal\Core\Session\AccountProxyInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; @@ -22,13 +21,10 @@ final class UserLazyBuilder implements TrustedCallbackInterface { /** * Constructs an UserLazyBuilder object. * - * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler - * The module handler. * @param \Drupal\Core\Session\AccountProxyInterface $account * The current user. */ public function __construct( - protected readonly ModuleHandlerInterface $moduleHandler, protected readonly AccountProxyInterface $account, ) {} @@ -40,7 +36,6 @@ public function __construct( */ public function renderNavigationLinks() { return [ - '#help' => $this->moduleHandler->moduleExists('help'), '#theme' => 'menu_region__footer', '#items' => $this->userOperationLinks(), '#menu_name' => 'user', diff --git a/core/modules/navigation/templates/big-pipe-interface-preview--navigation-shortcut-lazy-builder-lazyLinks--Shortcuts.html.twig b/core/modules/navigation/templates/big-pipe-interface-preview--navigation-shortcut-lazy-builder-lazyLinks--Shortcuts.html.twig index 91a276e9a73139194f57b8d8deb6a868223821a8..2994e7d32809370165c6a214af5f52e2b6bab8b5 100644 --- a/core/modules/navigation/templates/big-pipe-interface-preview--navigation-shortcut-lazy-builder-lazyLinks--Shortcuts.html.twig +++ b/core/modules/navigation/templates/big-pipe-interface-preview--navigation-shortcut-lazy-builder-lazyLinks--Shortcuts.html.twig @@ -6,9 +6,16 @@ */ #} -{% include '@navigation/toolbar-button.html.twig' with { +{% include 'navigation:toolbar-button' with { attributes: create_attribute(), - extra_classes: 'invisible toolbar-button--icon--shortcuts toolbar-button--expand--side toolbar-button--collapsible toolbar-popover__control', + modifiers: [ + 'expand--side', + 'collapsible', + ], + extra_classes: [ + 'invisible', + 'toolbar-popover__control', + ], icon: 'shortcuts', text: 'Shortcuts'|t, } only %} diff --git a/core/modules/navigation/templates/menu-region--footer.html.twig b/core/modules/navigation/templates/menu-region--footer.html.twig index 2478f793ccb7c0ea9c8a6fb1317ce0a94b19f603..c25c0563786da93d3ebb3a400c6d295bac1679fa 100644 --- a/core/modules/navigation/templates/menu-region--footer.html.twig +++ b/core/modules/navigation/templates/menu-region--footer.html.twig @@ -5,7 +5,6 @@ * * Available variables: * - menu_name: The machine name of the user menu. - * - help: TRUE if "Help" module is enabled. * - title: A name of account. * - items: A nested list of menu items. Each menu item contains: * - attributes: HTML attributes for the menu item. @@ -26,35 +25,47 @@ {# @todo id & aria-labelledby will be brought back via JS in https://www.drupal.org/project/drupal/issues/3452724 #} <h4 class="visually-hidden focusable">{{ title }}</h4> <ul class="toolbar-block__list"> - {% if help %} - <li class="toolbar-block__list-item"> - {% include '@navigation/toolbar-button.html.twig' with { - attributes: create_attribute({ 'href': path('help.main'), 'data-drupal-tooltip': 'Help'|t, 'data-drupal-tooltip-class': 'admin-toolbar__tooltip' }), - icon: 'help', - html_tag: 'a', - text: 'Help'|t, - extra_classes: 'toolbar-button--collapsible', - } only %} - </li> - {% endif %} <li id="admin-toolbar-user-menu" class="toolbar-block__list-item toolbar-block__list-item--user toolbar-popover" data-toolbar-popover> - {% include '@navigation/toolbar-button.html.twig' with { - action: true, - attributes: create_attribute({'aria-expanded': 'false', 'aria-controls': 'admin-toolbar-user-menu', 'data-toolbar-popover-control': true}), + {% include 'navigation:toolbar-button' with { + action: 'Extend'|t, + attributes: create_attribute({ + 'aria-expanded': 'false', + 'aria-controls': 'admin-toolbar-user-menu', + 'data-toolbar-popover-control': true, + 'data-has-safe-triangle': true, + }), icon: menu_name|clean_class, text: title, - extra_classes: 'toolbar-button--expand--side toolbar-button--collapsible toolbar-popover__control', - has_safe_triangle: TRUE, + modifiers: [ + 'expand--side', + 'collapsible', + ], + extra_classes: [ + 'toolbar-popover__control', + ], } only %} <div class="toolbar-popover__wrapper" data-toolbar-popover-wrapper> - <span class="toolbar-popover__header toolbar-button toolbar-button--large toolbar-button--dark toolbar-button--non-interactive">{{ title }}</span> + {% include 'navigation:toolbar-button' with { + attributes: create_attribute(), + modifiers: [ + 'large', + 'dark', + 'non-interactive', + ], + extra_classes: [ + 'toolbar-popover__header', + ], + html_tag: 'span', + text: title, + } only %} <ul class="toolbar-menu toolbar-popover__menu"> {% for item in items %} <li class="toolbar-menu__item toolbar-menu__item--level-1"> - <a - href="{{ item.url }}" - class="toolbar-button" - >{{ item.title }}</a> + {% include 'navigation:toolbar-button' with { + attributes: create_attribute({ 'href': item.url|render }), + html_tag: 'a', + text: item.title, + } only %} </li> {% endfor %} </ul> diff --git a/core/modules/navigation/templates/navigation-menu.html.twig b/core/modules/navigation/templates/navigation-menu.html.twig index 7e9ec356e9a6d1629c10c616be4c6a093b11b6e2..32f43b28345d46472076058b8dd88787383f2159 100644 --- a/core/modules/navigation/templates/navigation-menu.html.twig +++ b/core/modules/navigation/templates/navigation-menu.html.twig @@ -29,29 +29,65 @@ {% if menu_level == 0 %} {% if item.below is empty %} <li id="{{ item_id }}" class="toolbar-block__list-item"> - {% include '@navigation/toolbar-button.html.twig' with { + {% include 'navigation:toolbar-button' with { attributes: item_link_attributes.setAttribute('href', item.url|render|default(null)).setAttribute('data-drupal-tooltip', item.title).setAttribute('data-drupal-tooltip-class', 'admin-toolbar__tooltip'), icon: item.class|clean_class, html_tag: item_link_tag, text: item.title, - extra_classes: 'toolbar-button--collapsible ' ~ (item_link_tag == 'span' ? 'toolbar-button--non-interactive'), + modifiers: [ + 'collapsible', + item_link_tag == 'span' ? 'non-interactive' : null + ]|filter(v => v is not null), } only %} </li> {% else %} <li id="{{ item_id }}" class="toolbar-block__list-item toolbar-popover" data-toolbar-popover> - {% include '@navigation/toolbar-button.html.twig' with { - action: true, - attributes: create_attribute({'aria-expanded': 'false', 'aria-controls': item_id, 'data-toolbar-popover-control': true}), + {% include 'navigation:toolbar-button' with { + action: 'Extend'|t, + attributes: create_attribute({ + 'aria-expanded': 'false', + 'aria-controls': item_id, + 'data-toolbar-popover-control': true, + 'data-has-safe-triangle': true, + }), icon: item.class|clean_class, text: item.title, - extra_classes: 'toolbar-button--expand--side toolbar-button--collapsible toolbar-popover__control', - has_safe_triangle: TRUE, + modifiers: [ + 'expand--side', + 'collapsible', + ], + extra_classes: [ + 'toolbar-popover__control', + ], } only %} <div class="toolbar-popover__wrapper" data-toolbar-popover-wrapper inert> {% if item.url %} - {{ link(item.title, item.url, item_link_attributes.addClass(['toolbar-popover__header', 'toolbar-button', 'toolbar-button--large', 'toolbar-button--dark'])) }} + {% include 'navigation:toolbar-button' with { + attributes: item_link_attributes.setAttribute('href', item.url|render), + html_tag: item_link_tag, + text: item.title, + modifiers: [ + 'large', + 'dark', + ], + extra_classes: [ + 'toolbar-popover__header', + ], + } only %} {% else %} - <span class="toolbar-popover__header toolbar-button toolbar-button--large toolbar-button--dark toolbar-button--non-interactive">{{ item.title }}</span> + {% include 'navigation:toolbar-button' with { + attributes: create_attribute(), + modifiers: [ + 'large', + 'dark', + 'non-interactive', + ], + extra_classes: [ + 'toolbar-popover__header', + ], + html_tag: 'span', + text: item.title, + } only %} {% endif %} <ul class="toolbar-menu toolbar-popover__menu"> {{ menus.menu_items(item.below, attributes, 1) }} @@ -63,22 +99,23 @@ {% elseif menu_level == 1 %} <li class="toolbar-menu__item toolbar-menu__item--level-{{ menu_level }}"> {% if item.below is empty %} - {% include '@navigation/toolbar-button.html.twig' with { + {% include 'navigation:toolbar-button' with { attributes: item_link_attributes.setAttribute('href', item.url|render|default(null)), text: item.title, html_tag: item_link_tag, - extra_classes: item_link_tag == 'span' ? 'toolbar-button--non-interactive', + extra_classes: [ + item_link_tag == 'span' ? 'toolbar-button--non-interactive' + ], } only %} {% else %} - <button - class="toolbar-button toolbar-button--expand--down" - data-toolbar-menu-trigger="{{ menu_level }}" - aria-expanded="false" - data-index-text="{{ item.title|first|lower }}" - > - <span class="toolbar-menu__link-action visually-hidden">{{ 'Extend'|t }}</span> - <span class="toolbar-menu__link-title">{{ item.title }}</span> - </button> + {% include 'navigation:toolbar-button' with { + attributes: create_attribute({ + 'aria-expanded': 'false', + 'data-toolbar-menu-trigger': menu_level, + }), + text: item.title, + modifiers: ['expand--down'], + } only %} <ul class="toolbar-menu toolbar-menu--level-{{ menu_level + 1 }}" inert> {{ menus.menu_items(item.below, attributes, menu_level + 1) }} </ul> @@ -101,7 +138,7 @@ aria-expanded="false" data-index-text="{{ item.title|first|lower }}" > - <span class="toolbar-menu__link-action visually-hidden">{{ 'Extend'|t }}</span> + <span data-toolbar-action class="toolbar-menu__link-action visually-hidden">{{ 'Extend'|t }}</span> <span class="toolbar-menu__link-title">{{ item.title }}</span> </button> <ul class="toolbar-menu toolbar-menu--level-{{ menu_level + 1 }}" inert> diff --git a/core/modules/navigation/templates/toolbar-button.html.twig b/core/modules/navigation/templates/toolbar-button.html.twig deleted file mode 100644 index a209398068c9caf72cf3437d3e3c7f19a19db88d..0000000000000000000000000000000000000000 --- a/core/modules/navigation/templates/toolbar-button.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{# Extra classes variable added to be sure that modifiers will -appear after main classes #} -{% - set classes = [ - 'toolbar-button', - icon ? 'toolbar-button--icon--' ~ icon : '', - extra_classes, - ] -%} -<{{html_tag|default('button')}} - {{ attributes.addClass(classes) }} - data-index-text="{{ text|first|lower }}" - data-icon-text="{{- text|render|trim|slice(0, 2)|join('') -}}" -> - {% if avatar %} - <span class="toolbar-button__avatar">{{~ avatar ~}}</span> - {% endif %} - {% if action %} - <span data-toolbar-action class="visually-hidden">{{ 'Extend'|t }}</span> - {% endif %} - {% block content %} - {% if text %} - <span class="toolbar-button__label {{ label_classes }}" data-text>{{~ text ~}}</span> - {% endif %} - {% endblock %} - - {# Element that improves sub-menu UX by implementing the Safe Triangle strategy. -More info at https://www.smashingmagazine.com/2023/08/better-context-menus-safe-triangles #} - {% if has_safe_triangle %} - <div data-toolbar-popover-safe-triangle></div> - {% endif %} - -</{{html_tag|default('button')}}> diff --git a/core/modules/navigation/templates/top-bar-local-tasks.html.twig b/core/modules/navigation/templates/top-bar-local-tasks.html.twig index 50ae88bbe8f82ccc21afc2d08d39f845de214ebd..94dd8845e88eb2a7c78e2a6bf98525fd6e5a1696 100644 --- a/core/modules/navigation/templates/top-bar-local-tasks.html.twig +++ b/core/modules/navigation/templates/top-bar-local-tasks.html.twig @@ -8,7 +8,7 @@ */ #} {% set dropdown_id = 'admin-local-tasks'|clean_unique_id %} -{% include '@navigation/toolbar-button.html.twig' with { +{% include 'navigation:toolbar-button' with { attributes: create_attribute( { 'aria-expanded': 'false', @@ -17,7 +17,11 @@ } ), text: 'More actions'|t, - extra_classes: 'toolbar-button--expand--down toolbar-button--weight--400 toolbar-button--tertiary--expanded toolbar-button--actions', + modifiers: [ + 'expand--down', + 'weight--400', + 'small-offset', + ], } only %} <div class="toolbar-dropdown__menu" id={{ dropdown_id }}> <ul class="toolbar-dropdown__list"> diff --git a/core/modules/navigation/tests/assets/image_test_files/test-logo.png b/core/modules/navigation/tests/assets/image_test_files/test-logo.png deleted file mode 100644 index 853fde8e32e4af45036bc19826bf49674d56e3de..0000000000000000000000000000000000000000 --- a/core/modules/navigation/tests/assets/image_test_files/test-logo.png +++ /dev/null @@ -1,44 +0,0 @@ -‰PNG - -��� IHDR���(���(���Œþ¸m��µiTXtXML:com.adobe.xmp�����<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> -<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0"> - <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> - <rdf:Description rdf:about="" - xmlns:exif="http://ns.adobe.com/exif/1.0/" - xmlns:tiff="http://ns.adobe.com/tiff/1.0/" - xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" - xmlns:xmp="http://ns.adobe.com/xap/1.0/" - xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" - xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" - exif:PixelXDimension="40" - exif:PixelYDimension="40" - exif:ColorSpace="1" - tiff:ImageWidth="40" - tiff:ImageLength="40" - tiff:ResolutionUnit="2" - tiff:XResolution="72/1" - tiff:YResolution="72/1" - photoshop:ColorMode="3" - photoshop:ICCProfile="sRGB IEC61966-2.1" - xmp:ModifyDate="2024-05-27T13:36:14-04:00" - xmp:MetadataDate="2024-05-27T13:36:14-04:00"> - <xmpMM:History> - <rdf:Seq> - <rdf:li - stEvt:action="produced" - stEvt:softwareAgent="Affinity Publisher 2 2.4.2" - stEvt:when="2024-05-27T13:36:14-04:00"/> - </rdf:Seq> - </xmpMM:History> - </rdf:Description> - </rdf:RDF> -</x:xmpmeta> -<?xpacket end="r"?>ÖÂù��iCCPsRGB IEC61966-2.1��(‘u‘Ï+DQÇ?fL#Fˆ…b1iX ùQb£Œ4”¤1Ê`3ó¼™QóÆë½'ÉVÙNQbãׂ¿€²VŠHÉzÖĆé9Ϩ™dÎíÜó¹ß{ÏéÞsÁÍ(šYÝZÖ2"á>¶à÷æñÐFÅS™™¢¢}<PåÄ»n§VåsÿZݲj*PU#<¢è†%<!<µnéï -·(éø²ð¹pÐ -ß;z¢Èy‡SEþr؈FÆÀÕ(ìO•q¢Œ•´¡ ËË h™5å÷>ÎK|jvnVb‡x;&„ð3É8cÒǰ̃tÓO¬¨ßû“?ͪä*2ël`°BŠ4AQפº*1)º*#ÆÓÿ¿}5“ýÅê¾x^lû¼;PÈÙöç±mNÀýWÙRþ꽋ž+iChØ‚‹ë’–؃Ëmh}ÒãFüGr‹»’Ix=ƒú4ßBíb±g¿ûœ>BtS¾êö KÎ7,}® hhLv��� pHYs�����šœ��^IDATX…Í™[LUÇgX(!¥”^@ÛFc* Ø%*Ul -jÁ¤U£¡%ôÁxK³V+Þ"DטÔFKÚÄãC Û´‰1¶’>Ð4^¨1VSdEbHZ.+(m.—=>œag·)»;,ü“ÉžóoÎùí™ó}3sF0ƒìµ>P -›�;°z&ß(ät hu§6y«“˜.øÚ€Š¥t JwjíF? ½Ö�>bËæ—¨ëNm -ÀÐø&ðéBPh pÀg`Ì qY3ƒ¼ÀºSkF@üBì×ÜíÔi¨h]lp 2H©f,‘¦©ÃBÙ5Tž³DO@y¾U½°É†E—71^* ¡ñ¢ä愽R¨aÑâÕm‚ŒÈH…WÉÿ‘jµ%+¦jT<lÖwAåf+z†¨wÙaßöÐs”vZ°x¢ÜºÞ)3á\Íðn¶¿[&غ!š¢�ÌÉ‚Ožh_}39+9xFòóßFçBùädÅ03 êvãU½ó_8zVàóÁûßHÚ{T[b<ÔUÖ,‹`jÙ#XžlÚ֥ò¥f}lö—tªúò;àh¥ 5)€ŽÁúªÜÑö@‚MÍhRÀCÚÐ8ê%WGU}ý -x½$üô`f”wŠñI¨ùV²ß%¹<�¹w¡ñq¦ÿåAx㸙´wäCVÚ<î)Äg|Ñ$éºWGa_½dà<t|´Ë€¶npWå8 *7‡7‹aæÝ¥~'¦à䯦½wH�lÏ…êÁ§[%>Cl\ßÜ…À¿ö. ¨hÖÞGàÑûà¿ëêx¶^.6!=ÃðÇ%U^—ÞÏœ]Ó’ñ§•ÁÓ^œ ¯mŒxÁá’8\’/¼ø<ÿ é7½6l°2e�‡FàÆMUÎÍRfg‚óÁ¤ªOH:=Ðé·NH&¦àÀ“‚'6ªsV¥ªß±qè¿>€RÂ_}ªœ”�ï•>¯PÉÚÕ-]¦¯Þ¥î,BÀ‡;ŽAº1kžàåa €»×,—@FŠÿþ‚ñm0l*rñG¶»'œÃl¸ ¿åÝlú¯…úö_ƒQo°mr -~ý3–v]/Ï°t ”ä…ú–橶@}õƒZ§óP.vÛª¶òò[þZe”»Žýîh ìµ¾ðæõÀPý”¡Óêô�î]lojƒƒg$ã‘öá{Iq¶Šæ´ä™Û‡GXS[$½ÐgCí*•Erö97üØ!¹{%ÜŸÙ™´÷JܽðO¿ -Œ(¤ÛPûsLùð'èSa¯–Û©UCí,VéЈºÌ‹M-@ãbÞ~+К[0¶]k–)HèNÍ Á‰ú0ð6Š~¡äªºiÃl›èÇ°p[nŽjöꉨ€ÏvÌÏk,êÃü¡3Ëgˆÿj’Q óÞo����IEND®B`‚ \ No newline at end of file diff --git a/core/modules/navigation/tests/src/Functional/NavigationLinkBlockTest.php b/core/modules/navigation/tests/src/Functional/NavigationLinkBlockTest.php new file mode 100644 index 0000000000000000000000000000000000000000..58388edf450e723cc208b93851ca3559ba9d29dd --- /dev/null +++ b/core/modules/navigation/tests/src/Functional/NavigationLinkBlockTest.php @@ -0,0 +1,125 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\navigation\Functional; + +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Plugin\Context\Context; +use Drupal\Core\Plugin\Context\ContextDefinition; +use Drupal\Core\Url; +use Drupal\layout_builder\SectionComponent; +use Drupal\Tests\system\Functional\Cache\PageCacheTagsTestBase; + +/** + * Tests for \Drupal\navigation\Plugin\Block\NavigationLinkBlockTest. + * + * @group navigation + */ +class NavigationLinkBlockTest extends PageCacheTagsTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = ['navigation', 'test_page_test', 'block']; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * User with permission to administer navigation blocks and access navigation. + * + * @var \Drupal\user\UserInterface + */ + protected $adminUser; + + /** + * An authenticated user to test navigation block caching. + * + * @var \Drupal\user\UserInterface + */ + protected $normalUser; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + // Create an admin user, log in and enable test navigation blocks. + $this->adminUser = $this->drupalCreateUser([ + 'access administration pages', + 'administer site configuration', + 'access navigation', + ]); + + // Create additional users to test caching modes. + $this->normalUser = $this->drupalCreateUser([ + 'access navigation', + ]); + + // Add programmatically a link block to the navigation. + $section_storage_manager = \Drupal::service('plugin.manager.layout_builder.section_storage'); + $cacheability = new CacheableMetadata(); + $contexts = [ + 'navigation' => new Context(ContextDefinition::create('string'), 'navigation'), + ]; + /** @var \Drupal\layout_builder\SectionListInterface $section_list */ + $section_list = $section_storage_manager->findByContext($contexts, $cacheability); + $section = $section_list->getSection(0); + + $section->appendComponent(new SectionComponent(\Drupal::service('uuid')->generate(), 'content', [ + 'id' => 'navigation_link', + 'label' => 'Admin Main Page', + 'label_display' => '0', + 'provider' => 'navigation', + 'context_mapping' => [], + 'title' => 'Navigation Settings', + 'uri' => 'internal:/admin/config/user-interface/navigation/settings', + 'icon_class' => 'admin-link', + ])); + + $section_list->save(); + } + + /** + * Test output of the link navigation with regards to caching and contents. + */ + public function testNavigationLinkBlock(): void { + + // Verify some basic cacheability metadata. Ensures that we're not doing + // anything so egregious as to upset expected caching behavior. In this + // case, as an anonymous user, we should have zero effect on the page. + $test_page_url = Url::fromRoute('test_page_test.test_page'); + $this->verifyPageCache($test_page_url, 'MISS'); + $this->verifyPageCache($test_page_url, 'HIT'); + + // Login as a limited access user, and verify that the dynamic page cache + // is working as expected. + $this->drupalLogin($this->normalUser); + $this->verifyDynamicPageCache($test_page_url, 'MISS'); + $this->verifyDynamicPageCache($test_page_url, 'HIT'); + // We should not see the admin page link in the page. + $link_selector = '.admin-toolbar__item .toolbar-button--icon--admin-link'; + $this->assertSession()->elementNotExists('css', $link_selector); + + // Login as a different user, UI should update. + $this->drupalLogin($this->adminUser); + $this->verifyDynamicPageCache($test_page_url, 'MISS'); + $this->verifyDynamicPageCache($test_page_url, 'HIT'); + $this->drupalGet(Url::fromRoute('navigation.settings')); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->elementExists('css', $link_selector); + $this->assertSession() + ->elementTextContains('css', $link_selector, 'Navigation Settings'); + // The link should link to the admin page. + $link = $this->getSession()->getPage()->find('named', [ + 'link', + 'Navigation Settings', + ]); + $this->assertStringContainsString('/admin/config/user-interface/navigation/settings', $link->getAttribute('href')); + } + +} diff --git a/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php b/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php index f0f65cf471d1bfead241e5c58fb5008ce338b5f2..377134f07b6ab70819fa01c1ca9664ebd591283c 100644 --- a/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php +++ b/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php @@ -4,9 +4,9 @@ namespace Drupal\Tests\navigation\Functional; -use Drupal\Core\Entity\EntityStorageException; use Drupal\file\Entity\File; use Drupal\Tests\BrowserTestBase; +use Drupal\Tests\TestFileCreationTrait; /** * Tests for \Drupal\navigation\Form\SettingsForm. @@ -15,6 +15,8 @@ */ class NavigationLogoTest extends BrowserTestBase { + use TestFileCreationTrait; + /** * The file system service. * @@ -22,13 +24,6 @@ class NavigationLogoTest extends BrowserTestBase { */ protected $fileSystem; - /** - * The config factory. - * - * @var \Drupal\Core\Config\ConfigFactoryInterface - */ - protected $configFactory; - /** * A user with administrative permissions. * @@ -54,9 +49,8 @@ class NavigationLogoTest extends BrowserTestBase { protected function setUp(): void { parent::setUp(); - // Inject the file_system and config.factory services. + // Inject the file_system service. $this->fileSystem = $this->container->get('file_system'); - $this->configFactory = $this->container->get('config.factory'); // Create and log in an administrative user. $this->adminUser = $this->drupalCreateUser([ @@ -70,6 +64,7 @@ protected function setUp(): void { * Tests Navigation logo configuration base options. */ public function testSettingsLogoOptionsForm(): void { + $test_files = $this->getTestFiles('image'); // Navigate to the settings form. $this->drupalGet('/admin/config/user-interface/navigation/settings'); $this->assertSession()->statusCodeEquals(200); @@ -87,51 +82,44 @@ public function testSettingsLogoOptionsForm(): void { $this->assertSession()->elementNotExists('css', 'a.admin-toolbar__logo'); // Option 3: Set the logo provider to custom and upload a logo. - $logo_file = $this->createFile(); + $file = reset($test_files); + $logo_file = File::create((array) $file + ['status' => 1]); + $logo_file->save(); $this->assertNotEmpty($logo_file, 'File entity is not empty.'); - // Preset the configuration to verify a custom image is being seen. - $config = $this->configFactory->getEditable('navigation.settings'); - $config->set('logo.provider', 'custom'); - $config->set('logo.managed', $logo_file->id()); - $config->save(); + $edit = [ + 'logo_provider' => 'custom', + 'logo_path' => $logo_file->getFileUri(), + ]; + $this->submitForm($edit, t('Save configuration')); // Refresh the page to verify custom logo is placed. $this->drupalGet('/admin/config/user-interface/navigation/settings'); $this->assertSession()->elementExists('css', 'a.admin-toolbar__logo > img'); $this->assertSession()->elementAttributeContains('css', 'a.admin-toolbar__logo > img', 'src', $logo_file->getFilename()); - } - /** - * Helper function to create a file entity. - * - * @return \Drupal\file\FileInterface - * The file entity. - * - * @throws \Drupal\Core\Entity\EntityStorageException - */ - protected function createFile() { - // Define the file URI and path. - $file_name = 'test-logo.png'; - $temp_dir = $this->fileSystem->getTempDirectory(); - $file_uri = 'public://' . $file_name; - $logo_path = __DIR__ . '/../../assets/image_test_files/' . $file_name; - $file_contents = file_get_contents($logo_path); - file_put_contents($temp_dir . '/' . $file_name, $file_contents); - - // Create a file entity for testing. - $file = File::create([ - 'uri' => $file_uri, - ]); - - try { - $file->setPermanent(); - $file->save(); - } - catch (EntityStorageException $e) { - $this->fail(sprintf('Failed to create file entity: %s', $e->getMessage())); - } + // Option 4: Set the custom logo to an image in the source code. + $edit = [ + 'logo_provider' => 'custom', + 'logo_path' => 'core/misc/logo/drupal-logo.svg', + ]; + $this->submitForm($edit, t('Save configuration')); + // Refresh the page to verify custom logo is placed. + $this->drupalGet('/admin/config/user-interface/navigation/settings'); + $this->assertSession()->elementExists('css', 'a.admin-toolbar__logo > img'); + $this->assertSession()->elementAttributeContains('css', 'a.admin-toolbar__logo > img', 'src', 'drupal-logo.svg'); - return $file; + // Option 5: Upload custom logo. + $file = end($test_files); + $edit = [ + 'logo_provider' => 'custom', + 'files[logo_upload]' => $this->fileSystem->realpath($file->uri), + ]; + $this->submitForm($edit, t('Save configuration')); + $this->assertSession()->statusMessageContains('The image was resized to fit within the navigation logo expected dimensions of 40x40 pixels. The new dimensions of the resized image are 40x27 pixels.'); + // Refresh the page to verify custom logo is placed. + $this->drupalGet('/admin/config/user-interface/navigation/settings'); + $this->assertSession()->elementExists('css', 'a.admin-toolbar__logo > img'); + $this->assertSession()->elementAttributeContains('css', 'a.admin-toolbar__logo > img', 'src', $file->name); } } diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php index 7058d8d687cdae0e558a283ed2cd6cd74fd8e31e..97628a0bd60d5b9f33fea85fd40042b9c8748eed 100644 --- a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php +++ b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php @@ -165,7 +165,7 @@ public function testNavigationBlockAdminUiPage(): void { * @todo move this from into a trait from * \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest */ - private function openAddBlockForm($block_title) { + private function openAddBlockForm($block_title): void { $this->assertSession()->linkExists('Add block'); $this->clickLink('Add block'); $this->assertSession()->assertWaitOnAjaxRequest(); diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationSettingsFormTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationSettingsFormTest.php deleted file mode 100644 index 746ec4a4be7d4919b695d7a519c11eac28b60741..0000000000000000000000000000000000000000 --- a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationSettingsFormTest.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Drupal\Tests\navigation\FunctionalJavascript; - -use Drupal\file\Entity\File; -use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\Tests\TestFileCreationTrait; - -/** - * Tests that theme form settings works correctly. - * - * @group navigation - */ -class NavigationSettingsFormTest extends WebDriverTestBase { - - use TestFileCreationTrait; - - /** - * {@inheritdoc} - */ - protected static $modules = ['navigation']; - - /** - * {@inheritdoc} - */ - protected $defaultTheme = 'stark'; - - /** - * {@inheritdoc} - */ - protected function setUp(): void { - parent::setUp(); - - $admin = $this->drupalCreateUser(['administer site configuration']); - $this->drupalLogin($admin); - - // Set expected logo dimensions smaller than core provided test images. - \Drupal::configFactory()->getEditable('navigation.settings') - ->set('logo.max.height', 10) - ->set('logo.max.width', 10) - ->save(); - } - - /** - * Tests that submission handler works correctly. - */ - public function testFormSettingsSubmissionHandler() { - $page = $this->getSession()->getPage(); - $assert_session = $this->assertSession(); - - $this->drupalGet("/admin/config/user-interface/navigation/settings"); - - // Add a new managed file. - $file = current($this->getTestFiles('image')); - $image_file_path = \Drupal::service('file_system')->realpath($file->uri); - $page->attachFileToField('files[logo_managed]', $image_file_path); - $assert_session->waitForButton('logo_managed_remove_button'); - - // Assert the new file is uploaded as temporary. This file should not be - // saved as permanent if settings are not submitted. - $image_field = $this->assertSession()->hiddenFieldExists('logo_managed[fids]'); - $file = File::load($image_field->getValue()); - $this->assertFalse($file->isPermanent()); - - $page->pressButton('Save configuration'); - \Drupal::entityTypeManager()->getStorage('file')->resetCache(); - - $this->drupalGet("/admin/config/user-interface/navigation/settings"); - - // Assert the uploaded file is saved as permanent. - $image_field = $this->assertSession()->hiddenFieldExists('logo_managed[fids]'); - $file = File::load($image_field->getValue()); - $this->assertTrue($file->isPermanent()); - - // Ensure that the image has been resized to fit in the expected container. - $image = \Drupal::service('image.factory')->get($file->getFileUri()); - $this->assertLessThanOrEqual(10, $image->getHeight()); - $this->assertLessThanOrEqual(10, $image->getWidth()); - } - -} diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index ff5f8331907b9431146d28e10e1609e8f1f738e4..61bd54f1e74713d75e1c009547e59023840669b5 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Content administration and module settings user interface. */ use Drupal\Core\Batch\BatchBuilder; diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index 793170dc220961476da1208b77a1d50ce0307da2..0c78f7d8c727930404a0cde95f79dc7e62cc61df 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -5,6 +5,7 @@ * Hooks specific to the Node module. */ +use Drupal\Core\Session\AccountInterface; use Drupal\node\NodeInterface; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Xss; @@ -73,7 +74,7 @@ * @see node_access_rebuild() * @ingroup node_access */ -function hook_node_grants(\Drupal\Core\Session\AccountInterface $account, $operation) { +function hook_node_grants(AccountInterface $account, $operation) { if ($account->hasPermission('access private content')) { $grants['example'] = [1]; } @@ -148,7 +149,7 @@ function hook_node_grants(\Drupal\Core\Session\AccountInterface $account, $opera * @see hook_node_access_records_alter() * @ingroup node_access */ -function hook_node_access_records(\Drupal\node\NodeInterface $node) { +function hook_node_access_records(NodeInterface $node) { // We only care about the node if it has been marked private. If not, it is // treated just like any other node and we completely ignore it. if ($node->private->value) { @@ -216,7 +217,7 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) { * @see hook_node_grants_alter() * @ingroup node_access */ -function hook_node_access_records_alter(&$grants, \Drupal\node\NodeInterface $node) { +function hook_node_access_records_alter(&$grants, NodeInterface $node) { // Our module allows editors to mark specific articles with the 'is_preview' // field. If the node being saved has a TRUE value for that field, then only // our grants are retained, and other grants are removed. Doing so ensures @@ -261,7 +262,7 @@ function hook_node_access_records_alter(&$grants, \Drupal\node\NodeInterface $no * @see hook_node_access_records_alter() * @ingroup node_access */ -function hook_node_grants_alter(&$grants, \Drupal\Core\Session\AccountInterface $account, $operation) { +function hook_node_grants_alter(&$grants, AccountInterface $account, $operation) { // Our sample module never allows certain roles to edit or delete // content. Since some other node access modules might allow this // permission, we expressly remove it by returning an empty $grants @@ -300,7 +301,7 @@ function hook_node_grants_alter(&$grants, \Drupal\Core\Session\AccountInterface * * @ingroup entity_crud */ -function hook_node_search_result(\Drupal\node\NodeInterface $node) { +function hook_node_search_result(NodeInterface $node) { $rating = \Drupal::database()->query('SELECT SUM([points]) FROM {my_rating} WHERE [nid] = :nid', ['nid' => $node->id()])->fetchField(); return ['rating' => \Drupal::translation()->formatPlural($rating, '1 point', '@count points')]; } @@ -319,7 +320,7 @@ function hook_node_search_result(\Drupal\node\NodeInterface $node) { * * @ingroup entity_crud */ -function hook_node_update_index(\Drupal\node\NodeInterface $node) { +function hook_node_update_index(NodeInterface $node) { $text = ''; $ratings = \Drupal::database()->query('SELECT [title], [description] FROM {my_ratings} WHERE [nid] = :nid', [':nid' => $node->id()]); foreach ($ratings as $rating) { diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 154ae4d9ded9395691b43b9e29d25acf41b88456..d4bc1c5b717ff2c55b2cec5dc8061f44ee0ecea5 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -120,7 +120,7 @@ function node_schema() { /** * Implements hook_install(). */ -function node_install() { +function node_install(): void { // Enable default permissions for system roles. // IMPORTANT: Modules SHOULD NOT automatically grant any user role access // permissions in hook_install(). @@ -149,7 +149,7 @@ function node_install() { /** * Implements hook_uninstall(). */ -function node_uninstall() { +function node_uninstall(): void { // Delete remaining general module variables. \Drupal::state()->delete('node.node_access_needs_rebuild'); } @@ -157,6 +157,6 @@ function node_uninstall() { /** * Implements hook_update_last_removed(). */ -function node_update_last_removed() { +function node_update_last_removed(): int { return 8700; } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 95c014d146cf7c302b307f626ffc45f78d3f2a4e..e1516c529154f84ac51a37ecdab0f09f749560bc 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -2,150 +2,24 @@ /** * @file - * The core module that allows content to be submitted to the site. - * - * Modules and scripts may programmatically submit nodes using the usual form - * API pattern. */ use Drupal\Component\Utility\Environment; -use Drupal\Component\Utility\Xss; -use Drupal\Core\Access\AccessResult; use Drupal\Core\Batch\BatchBuilder; use Drupal\Core\Cache\Cache; -use Drupal\Core\Database\Query\AlterableInterface; -use Drupal\Core\Database\Query\SelectInterface; use Drupal\Core\Database\StatementInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Link; use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; -use Drupal\language\ConfigurableLanguageInterface; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\node\NodeInterface; use Drupal\node\NodeTypeInterface; -use Drupal\user\UserInterface; -use Drupal\node\Form\NodePreviewForm; - -/** - * Implements hook_help(). - */ -function node_help($route_name, RouteMatchInterface $route_match) { - // Remind site administrators about the {node_access} table being flagged - // for rebuild. We don't need to issue the message on the confirm form, or - // while the rebuild is being processed. - if ($route_name != 'node.configure_rebuild_confirm' && $route_name != 'system.batch_page.html' && $route_name != 'help.page.node' && $route_name != 'help.main' - && \Drupal::currentUser()->hasPermission('administer nodes') && node_access_needs_rebuild()) { - if ($route_name == 'system.status') { - $message = t('The content access permissions need to be rebuilt.'); - } - else { - $message = t('The content access permissions need to be rebuilt. <a href=":node_access_rebuild">Rebuild permissions</a>.', [':node_access_rebuild' => Url::fromRoute('node.configure_rebuild_confirm')->toString()]); - } - \Drupal::messenger()->addError($message); - } - - switch ($route_name) { - case 'help.page.node': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the <a href=":field">Field module</a>). For more information, see the <a href=":node">online documentation for the Node module</a>.', [':node' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/node-module', ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating content') . '</dt>'; - $output .= '<dd>' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the <a href=":content-type">Content type</a>. It also manages the <em>publishing options</em>, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each <a href=":content-type">type of content</a> on your site.', [':content-type' => Url::fromRoute('entity.node_type.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Creating custom content types') . '</dt>'; - $output .= '<dd>' . t('The Node module gives users with the <em>Administer content types</em> permission the ability to <a href=":content-new">create new content types</a> in addition to the default ones already configured. Creating custom content types gives you the flexibility to add <a href=":field">fields</a> and configure default settings that suit the differing needs of various site content.', [':content-new' => Url::fromRoute('node.type_add')->toString(), ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Administering content') . '</dt>'; - $output .= '<dd>' . t('The <a href=":content">Content</a> page lists your content, allowing you add new content, filter, edit or delete existing content, or perform bulk operations on existing content.', [':content' => Url::fromRoute('system.admin_content')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Creating revisions') . '</dt>'; - $output .= '<dd>' . t('The Node module also enables you to create multiple versions of any content, and revert to older versions using the <em>Revision information</em> settings.') . '</dd>'; - $output .= '<dt>' . t('User permissions') . '</dt>'; - $output .= '<dd>' . t('The Node module makes a number of permissions available for each content type, which can be set by role on the <a href=":permissions">permissions page</a>.', [':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'node'])->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'node.type_add': - return '<p>' . t('Individual content types can have different fields, behaviors, and permissions assigned to them.') . '</p>'; - - case 'entity.entity_form_display.node.default': - case 'entity.entity_form_display.node.form_mode': - $type = $route_match->getParameter('node_type'); - return '<p>' . t('Content items can be edited using different form modes. Here, you can define which fields are shown and hidden when %type content is edited in each form mode, and define how the field form widgets are displayed in each form mode.', ['%type' => $type->label()]) . '</p>'; - - case 'entity.entity_view_display.node.default': - case 'entity.entity_view_display.node.view_mode': - $type = $route_match->getParameter('node_type'); - return '<p>' . t('Content items can be displayed using different view modes: Teaser, Full content, Print, RSS, etc. <em>Teaser</em> is a short format that is typically used in lists of multiple content items. <em>Full content</em> is typically used when the content is displayed on its own page.') . '</p>' . - '<p>' . t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', ['%type' => $type->label()]) . '</p>'; - - case 'entity.node.version_history': - return '<p>' . t('Revisions allow you to track differences between multiple versions of your content, and revert to older versions.') . '</p>'; - - case 'entity.node.edit_form': - $node = $route_match->getParameter('node'); - $type = NodeType::load($node->getType()); - $help = $type->getHelp(); - return (!empty($help) ? Xss::filterAdmin($help) : ''); - - case 'node.add': - $type = $route_match->getParameter('node_type'); - $help = $type->getHelp(); - return (!empty($help) ? Xss::filterAdmin($help) : ''); - } -} - -/** - * Implements hook_theme(). - */ -function node_theme() { - return [ - 'node' => [ - 'render element' => 'elements', - ], - 'node_add_list' => [ - 'variables' => ['content' => NULL], - ], - 'node_edit_form' => [ - 'render element' => 'form', - ], - // @todo Delete the next three entries as part of - // https://www.drupal.org/node/3015623 - 'field__node__title' => [ - 'base hook' => 'field', - ], - 'field__node__uid' => [ - 'base hook' => 'field', - ], - 'field__node__created' => [ - 'base hook' => 'field', - ], - ]; -} - -/** - * Implements hook_entity_view_display_alter(). - */ -function node_entity_view_display_alter(EntityViewDisplayInterface $display, $context) { - if ($context['entity_type'] == 'node') { - // Hide field labels in search index. - if ($context['view_mode'] == 'search_index') { - foreach ($display->getComponents() as $name => $options) { - if (isset($options['label'])) { - $options['label'] = 'hidden'; - $display->setComponent($name, $options); - } - } - } - } -} /** * Gathers a listing of links to nodes. @@ -178,17 +52,6 @@ function node_title_list(StatementInterface $result, $title = NULL) { return $num_rows ? ['#theme' => 'item_list__node', '#items' => $items, '#title' => $title, '#cache' => ['tags' => Cache::mergeTags(['node_list'], Cache::buildTags('node', $nids))]] : FALSE; } -/** - * Implements hook_local_tasks_alter(). - */ -function node_local_tasks_alter(&$local_tasks): void { - // Removes 'Revisions' local task added by deriver. Local task - // 'entity.node.version_history' will be replaced by - // 'entity.version_history:node.version_history' after - // https://www.drupal.org/project/drupal/issues/3153559. - unset($local_tasks['entity.version_history:node.version_history']); -} - /** * Determines the type of marker to be displayed for a given node. * @@ -319,24 +182,6 @@ function node_add_body_field(NodeTypeInterface $type, $label = 'Body') { return $field; } -/** - * Implements hook_entity_extra_field_info(). - */ -function node_entity_extra_field_info() { - $extra = []; - $description = t('Node module element'); - foreach (NodeType::loadMultiple() as $bundle) { - $extra['node'][$bundle->id()]['display']['links'] = [ - 'label' => t('Links'), - 'description' => $description, - 'weight' => 100, - 'visible' => TRUE, - ]; - } - - return $extra; -} - /** * Checks whether the current page is the full page view of the passed-in node. * @@ -549,155 +394,6 @@ function template_preprocess_node(&$variables) { } -/** - * Implements hook_cron(). - */ -function node_cron() { - // Calculate the oldest and newest node created times, for use in search - // rankings. (Note that field aliases have to be variables passed by - // reference.) - if (\Drupal::moduleHandler()->moduleExists('search')) { - $min_alias = 'min_created'; - $max_alias = 'max_created'; - $result = \Drupal::entityQueryAggregate('node') - ->accessCheck(FALSE) - ->aggregate('created', 'MIN', NULL, $min_alias) - ->aggregate('created', 'MAX', NULL, $max_alias) - ->execute(); - if (isset($result[0])) { - // Make an array with definite keys and store it in the state system. - $array = [ - 'min_created' => $result[0][$min_alias], - 'max_created' => $result[0][$max_alias], - ]; - \Drupal::state()->set('node.min_max_update_time', $array); - } - } -} - -/** - * Implements hook_ranking(). - */ -function node_ranking() { - // Create the ranking array and add the basic ranking options. - $ranking = [ - 'relevance' => [ - 'title' => t('Keyword relevance'), - // Average relevance values hover around 0.15 - 'score' => 'i.relevance', - ], - 'sticky' => [ - 'title' => t('Content is sticky at top of lists'), - // The sticky flag is either 0 or 1, which is automatically normalized. - 'score' => 'n.sticky', - ], - 'promote' => [ - 'title' => t('Content is promoted to the front page'), - // The promote flag is either 0 or 1, which is automatically normalized. - 'score' => 'n.promote', - ], - ]; - // Add relevance based on updated date, but only if it the scale values have - // been calculated in node_cron(). - if ($node_min_max = \Drupal::state()->get('node.min_max_update_time')) { - $ranking['recent'] = [ - 'title' => t('Recently created'), - // Exponential decay with half life of 14% of the age range of nodes. - 'score' => 'EXP(-5 * (1 - (n.created - :node_oldest) / :node_range))', - 'arguments' => [ - ':node_oldest' => $node_min_max['min_created'], - ':node_range' => max($node_min_max['max_created'] - $node_min_max['min_created'], 1), - ], - ]; - } - return $ranking; -} - -/** - * Implements hook_user_cancel(). - */ -function node_user_cancel($edit, UserInterface $account, $method) { - switch ($method) { - case 'user_cancel_block_unpublish': - // Unpublish nodes (current revisions). - $nids = \Drupal::entityQuery('node') - ->accessCheck(FALSE) - ->condition('uid', $account->id()) - ->execute(); - \Drupal::moduleHandler()->loadInclude('node', 'inc', 'node.admin'); - node_mass_update($nids, ['status' => 0], NULL, TRUE); - break; - - case 'user_cancel_reassign': - // Anonymize all of the nodes for this old account. - \Drupal::moduleHandler()->loadInclude('node', 'inc', 'node.admin'); - $vids = \Drupal::entityTypeManager()->getStorage('node')->userRevisionIds($account); - node_mass_update($vids, [ - 'uid' => 0, - 'revision_uid' => 0, - ], NULL, TRUE, TRUE); - break; - } -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for user entities. - */ -function node_user_predelete($account) { - // Delete nodes (current revisions). - // @todo Introduce node_mass_delete() or make node_mass_update() more flexible. - $nids = \Drupal::entityQuery('node') - ->condition('uid', $account->id()) - ->accessCheck(FALSE) - ->execute(); - // Delete old revisions. - $storage_controller = \Drupal::entityTypeManager()->getStorage('node'); - $nodes = $storage_controller->loadMultiple($nids); - $storage_controller->delete($nodes); - $revisions = $storage_controller->userRevisionIds($account); - foreach ($revisions as $revision) { - $storage_controller->deleteRevision($revision); - } -} - -/** - * Implements hook_page_top(). - */ -function node_page_top(array &$page_top) { - // Add 'Back to content editing' link on preview page. - $route_match = \Drupal::routeMatch(); - if ($route_match->getRouteName() == 'entity.node.preview') { - $page_top['node_preview'] = [ - '#type' => 'container', - '#attributes' => [ - 'class' => ['node-preview-container', 'container-inline'], - ], - 'view_mode' => \Drupal::formBuilder()->getForm( - NodePreviewForm::class, - $route_match->getParameter('node_preview') - ), - ]; - - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - * - * Alters the theme form to use the admin theme on node editing. - * - * @see node_form_system_themes_admin_form_submit() - */ -function node_form_system_themes_admin_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $form['admin_theme']['use_admin_theme'] = [ - '#type' => 'checkbox', - '#title' => t('Use the administration theme when editing or creating content'), - '#description' => t('Control which roles can "View the administration theme" on the <a href=":permissions">Permissions page</a>.', [':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'system'])->toString()]), - '#default_value' => \Drupal::configFactory()->getEditable('node.settings')->get('use_admin_theme'), - ]; - $form['#submit'][] = 'node_form_system_themes_admin_form_submit'; -} - /** * Form submission handler for system_themes_admin_form(). * @@ -709,87 +405,6 @@ function node_form_system_themes_admin_form_submit($form, FormStateInterface $fo ->save(); } -/** - * @defgroup node_access Node access rights - * @{ - * The node access system determines who can do what to which nodes. - * - * In determining access rights for an existing node, - * \Drupal\node\NodeAccessControlHandler first checks whether the user has the - * "bypass node access" permission. Such users have unrestricted access to all - * nodes. user 1 will always pass this check. - * - * Next, all implementations of hook_ENTITY_TYPE_access() for node will - * be called. Each implementation may explicitly allow, explicitly forbid, or - * ignore the access request. If at least one module says to forbid the request, - * it will be rejected. If no modules deny the request and at least one says to - * allow it, the request will be permitted. - * - * If all modules ignore the access request, then the node_access table is used - * to determine access. All node access modules are queried using - * hook_node_grants() to assemble a list of "grant IDs" for the user. This list - * is compared against the table. If any row contains the node ID in question - * (or 0, which stands for "all nodes"), one of the grant IDs returned, and a - * value of TRUE for the operation in question, then access is granted. Note - * that this table is a list of grants; any matching row is sufficient to grant - * access to the node. - * - * In node listings (lists of nodes generated from a select query, such as the - * default home page at path 'node', an RSS feed, a recent content block, etc.), - * the process above is followed except that hook_ENTITY_TYPE_access() is not - * called on each node for performance reasons and for proper functioning of - * the pager system. When adding a node listing to your module, be sure to use - * an entity query, which will add a tag of "node_access". This will allow - * modules dealing with node access to ensure only nodes to which the user has - * access are retrieved, through the use of hook_query_TAG_alter(). See the - * @link entity_api Entity API topic @endlink for more information on entity - * queries. Tagging a query with "node_access" does not check the - * published/unpublished status of nodes, so the base query is responsible - * for ensuring that unpublished nodes are not displayed to inappropriate users. - * - * Note: Even a single module returning an AccessResultInterface object from - * hook_ENTITY_TYPE_access() whose isForbidden() method equals TRUE will block - * access to the node. Therefore, implementers should take care to not deny - * access unless they really intend to. Unless a module wishes to actively - * forbid access it should return an AccessResultInterface object whose - * isAllowed() nor isForbidden() methods return TRUE, to allow other modules or - * the node_access table to control access. - * - * Note also that access to create nodes is handled by - * hook_ENTITY_TYPE_create_access(). - * - * @see \Drupal\node\NodeAccessControlHandler - */ - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function node_node_access(NodeInterface $node, $operation, AccountInterface $account) { - $type = $node->bundle(); - - // Note create access is handled by hook_ENTITY_TYPE_create_access(). - switch ($operation) { - case 'update': - $access = AccessResult::allowedIfHasPermission($account, 'edit any ' . $type . ' content'); - if (!$access->isAllowed() && $account->hasPermission('edit own ' . $type . ' content')) { - $access = $access->orIf(AccessResult::allowedIf($account->id() == $node->getOwnerId())->cachePerUser()->addCacheableDependency($node)); - } - break; - - case 'delete': - $access = AccessResult::allowedIfHasPermission($account, 'delete any ' . $type . ' content'); - if (!$access->isAllowed() && $account->hasPermission('delete own ' . $type . ' content')) { - $access = $access->orIf(AccessResult::allowedIf($account->id() == $node->getOwnerId()))->cachePerUser()->addCacheableDependency($node); - } - break; - - default: - $access = AccessResult::neutral(); - } - - return $access; -} - /** * Fetches an array of permission IDs granted to the given user ID. * @@ -864,87 +479,6 @@ function node_access_view_all_nodes($account = NULL) { return $access[$account->id()]; } -/** - * Implements hook_query_TAG_alter(). - * - * This is the hook_query_alter() for queries tagged with 'node_access'. It adds - * node access checks for the user account given by the 'account' meta-data (or - * current user if not provided), for an operation given by the 'op' meta-data - * (or 'view' if not provided; other possible values are 'update' and 'delete'). - * - * Queries tagged with 'node_access' that are not against the {node} table - * must add the base table as metadata. For example: - * @code - * $query - * ->addTag('node_access') - * ->addMetaData('base_table', 'taxonomy_index'); - * @endcode - */ -function node_query_node_access_alter(AlterableInterface $query) { - // Read meta-data from query, if provided. - if (!$account = $query->getMetaData('account')) { - $account = \Drupal::currentUser(); - } - if (!$op = $query->getMetaData('op')) { - $op = 'view'; - } - - // If $account can bypass node access, or there are no node access modules, - // or the operation is 'view' and the $account has a global view grant - // (such as a view grant for node ID 0), we don't need to alter the query. - if ($account->hasPermission('bypass node access')) { - return; - } - if (!\Drupal::moduleHandler()->hasImplementations('node_grants')) { - return; - } - if ($op == 'view' && node_access_view_all_nodes($account)) { - return; - } - - $tables = $query->getTables(); - $base_table = $query->getMetaData('base_table'); - // If the base table is not given, default to one of the node base tables. - if (!$base_table) { - /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ - $table_mapping = \Drupal::entityTypeManager()->getStorage('node')->getTableMapping(); - $node_base_tables = $table_mapping->getTableNames(); - - foreach ($tables as $table_info) { - if (!($table_info instanceof SelectInterface)) { - $table = $table_info['table']; - // Ensure that 'node' and 'node_field_data' are always preferred over - // 'node_revision' and 'node_field_revision'. - if ($table == 'node' || $table == 'node_field_data') { - $base_table = $table; - break; - } - // If one of the node base tables are in the query, add it to the list - // of possible base tables to join against. - if (in_array($table, $node_base_tables)) { - $base_table = $table; - } - } - } - - // Bail out if the base table is missing. - if (!$base_table) { - throw new Exception('Query tagged for node access but there is no node table, specify the base_table using meta data.'); - } - } - - // Update the query for the given storage method. - \Drupal::service('node.grant_storage')->alterQuery($query, $tables, $op, $account, $base_table); - - // Bubble the 'user.node_grants:$op' cache context to the current render - // context. - $renderer = \Drupal::service('renderer'); - if ($renderer->hasRenderContext()) { - $build = ['#cache' => ['contexts' => ['user.node_grants:' . $op]]]; - $renderer->render($build); - } -} - /** * Toggles or reads the value of a flag for rebuilding the node access grants. * @@ -1128,53 +662,6 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) { } } -/** - * @} End of "defgroup node_access". - */ - -/** - * Implements hook_modules_installed(). - */ -function node_modules_installed(array $modules) { - // Check if any of the newly enabled modules require the node_access table to - // be rebuilt. - if (!node_access_needs_rebuild() && \Drupal::moduleHandler()->hasImplementations('node_grants', $modules)) { - node_access_needs_rebuild(TRUE); - } -} - -/** - * Implements hook_modules_uninstalled(). - */ -function node_modules_uninstalled($modules) { - // Check whether any of the disabled modules implemented hook_node_grants(), - // in which case the node access table needs to be rebuilt. - foreach ($modules as $module) { - // At this point, the module is already disabled, but its code is still - // loaded in memory. Module functions must no longer be called. We only - // check whether a hook implementation function exists and do not invoke it. - // Node access also needs to be rebuilt if language module is disabled to - // remove any language-specific grants. - if (!node_access_needs_rebuild() && (\Drupal::moduleHandler()->hasImplementations('node_grants', $module) || $module == 'language')) { - node_access_needs_rebuild(TRUE); - } - } - - // If there remains no more node_access module, rebuilding will be - // straightforward, we can do it right now. - if (node_access_needs_rebuild() && !\Drupal::moduleHandler()->hasImplementations('node_grants')) { - node_access_rebuild(); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. - */ -function node_configurable_language_delete(ConfigurableLanguageInterface $language) { - // On nodes with this language, unset the language. - \Drupal::entityTypeManager()->getStorage('node')->clearRevisionsLanguage($language); -} - /** * Marks a node to be re-indexed by the node_search plugin. * @@ -1187,40 +674,3 @@ function node_reindex_node_search($nid) { \Drupal::service('search.index')->markForReindex('node_search', $nid); } } - -/** - * Implements hook_ENTITY_TYPE_insert() for comment entities. - */ -function node_comment_insert($comment) { - // Reindex the node when comments are added. - if ($comment->getCommentedEntityTypeId() == 'node') { - node_reindex_node_search($comment->getCommentedEntityId()); - } -} - -/** - * Implements hook_ENTITY_TYPE_update() for comment entities. - */ -function node_comment_update($comment) { - // Reindex the node when comments are changed. - if ($comment->getCommentedEntityTypeId() == 'node') { - node_reindex_node_search($comment->getCommentedEntityId()); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for comment entities. - */ -function node_comment_delete($comment) { - // Reindex the node when comments are deleted. - if ($comment->getCommentedEntityTypeId() == 'node') { - node_reindex_node_search($comment->getCommentedEntityId()); - } -} - -/** - * Implements hook_config_translation_info_alter(). - */ -function node_config_translation_info_alter(&$info) { - $info['node_type']['class'] = 'Drupal\node\ConfigTranslation\NodeTypeMapper'; -} diff --git a/core/modules/node/node.post_update.php b/core/modules/node/node.post_update.php index 52d65c3acfddbcd029c8d1645135853262afeaf3..e10f39e9ee4b405b970a98b909daf8751d3ed5d5 100644 --- a/core/modules/node/node.post_update.php +++ b/core/modules/node/node.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function node_removed_post_updates() { +function node_removed_post_updates(): array { return [ 'node_post_update_configure_status_field_widget' => '9.0.0', 'node_post_update_node_revision_views_data' => '9.0.0', diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc deleted file mode 100644 index 5855d0ac599f887456de6883c8150e6f7fa0c272..0000000000000000000000000000000000000000 --- a/core/modules/node/node.tokens.inc +++ /dev/null @@ -1,221 +0,0 @@ -<?php - -/** - * @file - * Builds placeholder replacement tokens for node-related data. - */ - -use Drupal\Core\Datetime\Entity\DateFormat; -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Render\BubbleableMetadata; -use Drupal\user\Entity\User; - -/** - * Implements hook_token_info(). - */ -function node_token_info() { - $type = [ - 'name' => t('Nodes'), - 'description' => t('Tokens related to individual content items, or "nodes".'), - 'needs-data' => 'node', - ]; - - // Core tokens for nodes. - $node['nid'] = [ - 'name' => t("Content ID"), - 'description' => t('The unique ID of the content item, or "node".'), - ]; - $node['vid'] = [ - 'name' => t("Revision ID"), - 'description' => t("The unique ID of the node's latest revision."), - ]; - $node['type'] = [ - 'name' => t("Content type"), - ]; - $node['type-name'] = [ - 'name' => t("Content type name"), - 'description' => t("The human-readable name of the node type."), - ]; - $node['title'] = [ - 'name' => t("Title"), - ]; - $node['body'] = [ - 'name' => t("Body"), - 'description' => t("The main body text of the node."), - ]; - $node['summary'] = [ - 'name' => t("Summary"), - 'description' => t("The summary of the node's main body text."), - ]; - $node['langcode'] = [ - 'name' => t('Language code'), - 'description' => t('The language code of the language the node is written in.'), - ]; - $node['published_status'] = [ - 'name' => t('Published'), - 'description' => t('The publication status of the node ("Published" or "Unpublished").'), - ]; - $node['url'] = [ - 'name' => t("URL"), - 'description' => t("The URL of the node."), - ]; - $node['edit-url'] = [ - 'name' => t("Edit URL"), - 'description' => t("The URL of the node's edit page."), - ]; - - // Chained tokens for nodes. - $node['created'] = [ - 'name' => t("Date created"), - 'type' => 'date', - ]; - $node['changed'] = [ - 'name' => t("Date changed"), - 'description' => t("The date the node was most recently updated."), - 'type' => 'date', - ]; - $node['author'] = [ - 'name' => t("Author"), - 'type' => 'user', - ]; - - return [ - 'types' => ['node' => $type], - 'tokens' => ['node' => $node], - ]; -} - -/** - * Implements hook_tokens(). - */ -function node_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $token_service = \Drupal::token(); - - $url_options = ['absolute' => TRUE]; - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = LanguageInterface::LANGCODE_DEFAULT; - } - $replacements = []; - - if ($type == 'node' && !empty($data['node'])) { - /** @var \Drupal\node\NodeInterface $node */ - $node = $data['node']; - - foreach ($tokens as $name => $original) { - switch ($name) { - // Simple key values on the node. - case 'nid': - $replacements[$original] = $node->id(); - break; - - case 'vid': - $replacements[$original] = $node->getRevisionId(); - break; - - case 'type': - $replacements[$original] = $node->getType(); - break; - - case 'type-name': - $type_name = node_get_type_label($node); - $replacements[$original] = $type_name; - break; - - case 'title': - $replacements[$original] = $node->getTitle(); - break; - - case 'body': - case 'summary': - $translation = \Drupal::service('entity.repository')->getTranslationFromContext($node, $langcode, ['operation' => 'node_tokens']); - if ($translation->hasField('body') && ($items = $translation->get('body')) && !$items->isEmpty()) { - $item = $items[0]; - // If the summary was requested and is not empty, use it. - if ($name == 'summary' && !empty($item->summary)) { - $output = $item->summary_processed; - } - // Attempt to provide a suitable version of the 'body' field. - else { - $output = $item->processed; - // A summary was requested. - if ($name == 'summary') { - // Generate an optionally trimmed summary of the body field. - - // Get the 'trim_length' size used for the 'teaser' mode, if - // present, or use the default trim_length size. - $display_options = \Drupal::service('entity_display.repository') - ->getViewDisplay('node', $node->getType(), 'teaser') - ->getComponent('body'); - if (isset($display_options['settings']['trim_length'])) { - $length = $display_options['settings']['trim_length']; - } - else { - $settings = \Drupal::service('plugin.manager.field.formatter')->getDefaultSettings('text_summary_or_trimmed'); - $length = $settings['trim_length']; - } - - $output = text_summary($output, $item->format, $length); - } - } - // "processed" returns a \Drupal\Component\Render\MarkupInterface - // via check_markup(). - $replacements[$original] = $output; - } - break; - - case 'langcode': - $replacements[$original] = $node->language()->getId(); - break; - - case 'published_status': - $replacements[$original] = $node->isPublished() ? t('Published') : t('Unpublished'); - break; - - case 'url': - $replacements[$original] = $node->toUrl('canonical', $url_options)->toString(); - break; - - case 'edit-url': - $replacements[$original] = $node->toUrl('edit-form', $url_options)->toString(); - break; - - // Default values for the chained tokens handled below. - case 'author': - $account = $node->getOwner() ? $node->getOwner() : User::load(0); - $bubbleable_metadata->addCacheableDependency($account); - $replacements[$original] = $account->label(); - break; - - case 'created': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($node->getCreatedTime(), 'medium', '', NULL, $langcode); - break; - - case 'changed': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($node->getChangedTime(), 'medium', '', NULL, $langcode); - break; - } - } - - if ($author_tokens = $token_service->findWithPrefix($tokens, 'author')) { - $replacements += $token_service->generate('user', $author_tokens, ['user' => $node->getOwner()], $options, $bubbleable_metadata); - } - - if ($created_tokens = $token_service->findWithPrefix($tokens, 'created')) { - $replacements += $token_service->generate('date', $created_tokens, ['date' => $node->getCreatedTime()], $options, $bubbleable_metadata); - } - - if ($changed_tokens = $token_service->findWithPrefix($tokens, 'changed')) { - $replacements += $token_service->generate('date', $changed_tokens, ['date' => $node->getChangedTime()], $options, $bubbleable_metadata); - } - } - - return $replacements; -} diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc deleted file mode 100644 index 28f545271208ea1df249bee3acce718cd923cb1c..0000000000000000000000000000000000000000 --- a/core/modules/node/node.views.inc +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -/** - * @file - * Provide views data for node.module. - */ - -use Drupal\user\RoleInterface; -use Drupal\views\ViewExecutable; -use Drupal\user\Entity\Role; -use Drupal\views\Analyzer; - -/** - * Implements hook_views_analyze(). - */ -function node_views_analyze(ViewExecutable $view) { - $ret = []; - // Check for something other than the default display: - if ($view->storage->get('base_table') == 'node') { - foreach ($view->displayHandlers as $display) { - if (!$display->isDefaulted('access') || !$display->isDefaulted('filters')) { - // Check for no access control - $access = $display->getOption('access'); - if (empty($access['type']) || $access['type'] == 'none') { - $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID); - $anonymous_has_access = $anonymous_role && $anonymous_role->hasPermission('access content'); - $authenticated_role = Role::load(RoleInterface::AUTHENTICATED_ID); - $authenticated_has_access = $authenticated_role && $authenticated_role->hasPermission('access content'); - if (!$anonymous_has_access || !$authenticated_has_access) { - $ret[] = Analyzer::formatMessage(t('Some roles lack permission to access content, but display %display has no access control.', ['%display' => $display->display['display_title']]), 'warning'); - } - $filters = $display->getOption('filters'); - foreach ($filters as $filter) { - if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) { - continue 2; - } - } - $ret[] = Analyzer::formatMessage(t('Display %display has no access control but does not contain a filter for published nodes.', ['%display' => $display->display['display_title']]), 'warning'); - } - } - } - } - foreach ($view->displayHandlers as $display) { - if ($display->getPluginId() == 'page') { - if ($display->getOption('path') == 'node/%') { - $ret[] = Analyzer::formatMessage(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use Layout Builder.', ['%display' => $display->display['display_title']]), 'warning'); - } - } - } - - return $ret; -} diff --git a/core/modules/node/node.views_execution.inc b/core/modules/node/node.views_execution.inc deleted file mode 100644 index f5401b17b4a123e94c6d3c82474dd08ce710005a..0000000000000000000000000000000000000000 --- a/core/modules/node/node.views_execution.inc +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Provide views runtime hooks for node.module. - */ - -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_query_substitutions(). - */ -function node_views_query_substitutions(ViewExecutable $view) { - $account = \Drupal::currentUser(); - return [ - '***ADMINISTER_NODES***' => intval($account->hasPermission('administer nodes')), - '***VIEW_OWN_UNPUBLISHED_NODES***' => intval($account->hasPermission('view own unpublished content')), - '***BYPASS_NODE_ACCESS***' => intval($account->hasPermission('bypass node access')), - ]; -} diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php index 3f04a500ccbeeea007a2254124952a914247a55f..1c6d9d9bae87f84af21b067bb743515d64691d47 100644 --- a/core/modules/node/src/Entity/Node.php +++ b/core/modules/node/src/Entity/Node.php @@ -2,86 +2,97 @@ namespace Drupal\node\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Session\AccountInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\node\Form\DeleteMultiple; +use Drupal\node\Form\NodeDeleteForm; +use Drupal\node\NodeAccessControlHandler; +use Drupal\node\NodeForm; use Drupal\node\NodeInterface; +use Drupal\node\NodeListBuilder; +use Drupal\node\NodeStorage; +use Drupal\node\NodeStorageSchema; +use Drupal\node\NodeTranslationHandler; +use Drupal\node\NodeViewBuilder; +use Drupal\node\NodeViewsData; use Drupal\user\EntityOwnerTrait; /** * Defines the node entity class. - * - * @ContentEntityType( - * id = "node", - * label = @Translation("Content"), - * label_collection = @Translation("Content"), - * label_singular = @Translation("content item"), - * label_plural = @Translation("content items"), - * label_count = @PluralTranslation( - * singular = "@count content item", - * plural = "@count content items" - * ), - * bundle_label = @Translation("Content type"), - * handlers = { - * "storage" = "Drupal\node\NodeStorage", - * "storage_schema" = "Drupal\node\NodeStorageSchema", - * "view_builder" = "Drupal\node\NodeViewBuilder", - * "access" = "Drupal\node\NodeAccessControlHandler", - * "views_data" = "Drupal\node\NodeViewsData", - * "form" = { - * "default" = "Drupal\node\NodeForm", - * "delete" = "Drupal\node\Form\NodeDeleteForm", - * "edit" = "Drupal\node\NodeForm", - * "delete-multiple-confirm" = "Drupal\node\Form\DeleteMultiple" - * }, - * "route_provider" = { - * "html" = "Drupal\node\Entity\NodeRouteProvider", - * }, - * "list_builder" = "Drupal\node\NodeListBuilder", - * "translation" = "Drupal\node\NodeTranslationHandler" - * }, - * base_table = "node", - * data_table = "node_field_data", - * revision_table = "node_revision", - * revision_data_table = "node_field_revision", - * show_revision_ui = TRUE, - * translatable = TRUE, - * list_cache_contexts = { "user.node_grants:view" }, - * entity_keys = { - * "id" = "nid", - * "revision" = "vid", - * "bundle" = "type", - * "label" = "title", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "status" = "status", - * "published" = "status", - * "uid" = "uid", - * "owner" = "uid", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_uid", - * "revision_created" = "revision_timestamp", - * "revision_log_message" = "revision_log" - * }, - * bundle_entity_type = "node_type", - * field_ui_base_route = "entity.node_type.edit_form", - * common_reference_target = TRUE, - * permission_granularity = "bundle", - * collection_permission = "access content overview", - * links = { - * "canonical" = "/node/{node}", - * "delete-form" = "/node/{node}/delete", - * "delete-multiple-form" = "/admin/content/node/delete", - * "edit-form" = "/node/{node}/edit", - * "version-history" = "/node/{node}/revisions", - * "revision" = "/node/{node}/revisions/{node_revision}/view", - * "create" = "/node", - * } - * ) */ +#[ContentEntityType( + id: 'node', + label: new TranslatableMarkup('Content'), + label_collection: new TranslatableMarkup('Content'), + label_singular: new TranslatableMarkup('content item'), + label_plural: new TranslatableMarkup('content items'), + entity_keys: [ + 'id' => 'nid', + 'revision' => 'vid', + 'bundle' => 'type', + 'label' => 'title', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'status' => 'status', + 'published' => 'status', + 'uid' => 'uid', + 'owner' => 'uid', + ], + handlers: [ + 'storage' => NodeStorage::class, + 'storage_schema' => NodeStorageSchema::class, + 'view_builder' => NodeViewBuilder::class, + 'access' => NodeAccessControlHandler::class, + 'views_data' => NodeViewsData::class, + 'form' => [ + 'default' => NodeForm::class, + 'delete' => NodeDeleteForm::class, + 'edit' => NodeForm::class, + 'delete-multiple-confirm' => DeleteMultiple::class, + ], + 'route_provider' => [ + 'html' => NodeRouteProvider::class, + ], + 'list_builder' => NodeListBuilder::class, + 'translation' => NodeTranslationHandler::class, + ], + links: [ + 'canonical' => '/node/{node}', + 'delete-form' => '/node/{node}/delete', + 'delete-multiple-form' => '/admin/content/node/delete', + 'edit-form' => '/node/{node}/edit', + 'version-history' => '/node/{node}/revisions', + 'revision' => '/node/{node}/revisions/{node_revision}/view', + 'create' => '/node', + ], + collection_permission: 'access content overview', + permission_granularity: 'bundle', + bundle_entity_type: 'node_type', + bundle_label: new TranslatableMarkup('Content type'), + base_table: 'node', + data_table: 'node_field_data', + revision_table: 'node_revision', + revision_data_table: 'node_field_revision', + translatable: TRUE, + show_revision_ui: TRUE, + label_count: [ + 'singular' => '@count content item', + 'plural' => '@count content items', + ], + field_ui_base_route: 'entity.node_type.edit_form', + common_reference_target: TRUE, + list_cache_contexts: ['user.node_grants:view'], + revision_metadata_keys: [ + 'revision_user' => 'revision_uid', + 'revision_created' => 'revision_timestamp', + 'revision_log_message' => 'revision_log', + ], +)] class Node extends EditorialContentEntityBase implements NodeInterface { use EntityOwnerTrait; @@ -95,7 +106,7 @@ class Node extends EditorialContentEntityBase implements NodeInterface { * @var true|null * TRUE if the node is being previewed and NULL if it is not. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $in_preview = NULL; /** diff --git a/core/modules/node/src/Entity/NodeType.php b/core/modules/node/src/Entity/NodeType.php index 934b4a2c38597b3dd936d93229b695628d42cefc..949b088fe963b6cfe3a36b7f564bf04eeaf3a45d 100644 --- a/core/modules/node/src/Entity/NodeType.php +++ b/core/modules/node/src/Entity/NodeType.php @@ -4,59 +4,64 @@ use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; +use Drupal\Core\Entity\Attribute\ConfigEntityType; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\node\Form\NodeTypeDeleteConfirm; +use Drupal\node\NodeTypeAccessControlHandler; +use Drupal\node\NodeTypeForm; use Drupal\node\NodeTypeInterface; +use Drupal\node\NodeTypeListBuilder; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the Node type configuration entity. - * - * @ConfigEntityType( - * id = "node_type", - * label = @Translation("Content type"), - * label_collection = @Translation("Content types"), - * label_singular = @Translation("content type"), - * label_plural = @Translation("content types"), - * label_count = @PluralTranslation( - * singular = "@count content type", - * plural = "@count content types", - * ), - * handlers = { - * "access" = "Drupal\node\NodeTypeAccessControlHandler", - * "form" = { - * "add" = "Drupal\node\NodeTypeForm", - * "edit" = "Drupal\node\NodeTypeForm", - * "delete" = "Drupal\node\Form\NodeTypeDeleteConfirm" - * }, - * "route_provider" = { - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * }, - * "list_builder" = "Drupal\node\NodeTypeListBuilder", - * }, - * admin_permission = "administer content types", - * config_prefix = "type", - * bundle_of = "node", - * entity_keys = { - * "id" = "type", - * "label" = "name" - * }, - * links = { - * "edit-form" = "/admin/structure/types/manage/{node_type}", - * "delete-form" = "/admin/structure/types/manage/{node_type}/delete", - * "entity-permissions-form" = "/admin/structure/types/manage/{node_type}/permissions", - * "collection" = "/admin/structure/types", - * }, - * config_export = { - * "name", - * "type", - * "description", - * "help", - * "new_revision", - * "preview_mode", - * "display_submitted", - * } - * ) */ +#[ConfigEntityType( + id: 'node_type', + label: new TranslatableMarkup('Content type'), + label_collection: new TranslatableMarkup('Content types'), + label_singular: new TranslatableMarkup('content type'), + label_plural: new TranslatableMarkup('content types'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'type', + 'label' => 'name', + ], + handlers: [ + 'access' => NodeTypeAccessControlHandler::class, + 'form' => [ + 'add' => NodeTypeForm::class, + 'edit' => NodeTypeForm::class, + 'delete' => NodeTypeDeleteConfirm::class, + ], + 'route_provider' => [ + 'permissions' => EntityPermissionsRouteProvider::class, + ], + 'list_builder' => NodeTypeListBuilder::class, + ], + links: [ + 'edit-form' => '/admin/structure/types/manage/{node_type}', + 'delete-form' => '/admin/structure/types/manage/{node_type}/delete', + 'entity-permissions-form' => '/admin/structure/types/manage/{node_type}/permissions', + 'collection' => '/admin/structure/types', + ], + admin_permission: 'administer content types', + bundle_of: 'node', + label_count: [ + 'singular' => '@count content type', + 'plural' => '@count content types', + ], + config_export: [ + 'name', + 'type', + 'description', + 'help', + 'new_revision', + 'preview_mode', + 'display_submitted', + ], +)] class NodeType extends ConfigEntityBundleBase implements NodeTypeInterface { /** diff --git a/core/modules/node/src/Hook/NodeHooks.php b/core/modules/node/src/Hook/NodeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..38d3fb4e69f156b586c6998aacc7eddc548c0e0b --- /dev/null +++ b/core/modules/node/src/Hook/NodeHooks.php @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node\Hook; + +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Hook\Attribute\Hook; +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\node\NodeStorageInterface; +use Drupal\user\UserInterface; + +/** + * Hook implementations for the node module. + */ +class NodeHooks { + + /** + * The Node Storage. + * + * @var \Drupal\node\NodeStorageInterface + */ + protected NodeStorageInterface $nodeStorage; + + /** + * NodeHooks constructor. + * + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager + * The entity type manager. + * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler + * The module handler + */ + public function __construct( + EntityTypeManagerInterface $entityTypeManager, + protected ModuleHandlerInterface $moduleHandler, + ) { + $this->nodeStorage = $entityTypeManager->getStorage('node'); + } + + /** + * Implements hook_user_cancel(). + * + * Unpublish nodes (current revisions). + */ + #[Hook('user_cancel')] + public function userCancelBlockUnpublish($edit, UserInterface $account, $method): void { + if ($method === 'user_cancel_block_unpublish') { + $nids = $this->nodeStorage->getQuery() + ->accessCheck(FALSE) + ->condition('uid', $account->id()) + ->execute(); + $this->moduleHandler->invoke('node', 'mass_update', [$nids, ['status' => 0], NULL, TRUE]); + } + } + + /** + * Implements hook_user_cancel(). + * + * Anonymize all of the nodes for this old account. + */ + #[Hook('user_cancel')] + public function userCancelReassign($edit, UserInterface $account, $method): void { + if ($method === 'user_cancel_reassign') { + $vids = $this->nodeStorage->userRevisionIds($account); + $this->moduleHandler->invoke('node', 'mass_update', [$vids, ['uid' => 0, 'revision_uid' => 0], NULL, TRUE, TRUE]); + } + } + +} diff --git a/core/modules/node/src/Hook/NodeHooks1.php b/core/modules/node/src/Hook/NodeHooks1.php new file mode 100644 index 0000000000000000000000000000000000000000..5f1f885c67f7289c2b636f9cf57c0862bbcb97fe --- /dev/null +++ b/core/modules/node/src/Hook/NodeHooks1.php @@ -0,0 +1,554 @@ +<?php + +namespace Drupal\node\Hook; + +use Drupal\language\ConfigurableLanguageInterface; +use Drupal\Core\Database\Query\SelectInterface; +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\node\NodeInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\node\Form\NodePreviewForm; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Component\Utility\Xss; +use Drupal\node\Entity\NodeType; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node. + */ +class NodeHooks1 { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + // Remind site administrators about the {node_access} table being flagged + // for rebuild. We don't need to issue the message on the confirm form, or + // while the rebuild is being processed. + if ($route_name != 'node.configure_rebuild_confirm' && $route_name != 'system.batch_page.html' && $route_name != 'help.page.node' && $route_name != 'help.main' && \Drupal::currentUser()->hasPermission('administer nodes') && node_access_needs_rebuild()) { + if ($route_name == 'system.status') { + $message = t('The content access permissions need to be rebuilt.'); + } + else { + $message = t('The content access permissions need to be rebuilt. <a href=":node_access_rebuild">Rebuild permissions</a>.', [ + ':node_access_rebuild' => Url::fromRoute('node.configure_rebuild_confirm')->toString(), + ]); + } + \Drupal::messenger()->addError($message); + } + switch ($route_name) { + case 'help.page.node': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the <a href=":field">Field module</a>). For more information, see the <a href=":node">online documentation for the Node module</a>.', [ + ':node' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/node-module', + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating content') . '</dt>'; + $output .= '<dd>' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the <a href=":content-type">Content type</a>. It also manages the <em>publishing options</em>, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each <a href=":content-type">type of content</a> on your site.', [ + ':content-type' => Url::fromRoute('entity.node_type.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Creating custom content types') . '</dt>'; + $output .= '<dd>' . t('The Node module gives users with the <em>Administer content types</em> permission the ability to <a href=":content-new">create new content types</a> in addition to the default ones already configured. Creating custom content types gives you the flexibility to add <a href=":field">fields</a> and configure default settings that suit the differing needs of various site content.', [ + ':content-new' => Url::fromRoute('node.type_add')->toString(), + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Administering content') . '</dt>'; + $output .= '<dd>' . t('The <a href=":content">Content</a> page lists your content, allowing you add new content, filter, edit or delete existing content, or perform bulk operations on existing content.', [':content' => Url::fromRoute('system.admin_content')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Creating revisions') . '</dt>'; + $output .= '<dd>' . t('The Node module also enables you to create multiple versions of any content, and revert to older versions using the <em>Revision information</em> settings.') . '</dd>'; + $output .= '<dt>' . t('User permissions') . '</dt>'; + $output .= '<dd>' . t('The Node module makes a number of permissions available for each content type, which can be set by role on the <a href=":permissions">permissions page</a>.', [ + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'node', + ])->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'node.type_add': + return '<p>' . t('Individual content types can have different fields, behaviors, and permissions assigned to them.') . '</p>'; + + case 'entity.entity_form_display.node.default': + case 'entity.entity_form_display.node.form_mode': + $type = $route_match->getParameter('node_type'); + return '<p>' . t('Content items can be edited using different form modes. Here, you can define which fields are shown and hidden when %type content is edited in each form mode, and define how the field form widgets are displayed in each form mode.', ['%type' => $type->label()]) . '</p>'; + + case 'entity.entity_view_display.node.default': + case 'entity.entity_view_display.node.view_mode': + $type = $route_match->getParameter('node_type'); + return '<p>' . t('Content items can be displayed using different view modes: Teaser, Full content, Print, RSS, etc. <em>Teaser</em> is a short format that is typically used in lists of multiple content items. <em>Full content</em> is typically used when the content is displayed on its own page.') . '</p>' . '<p>' . t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', ['%type' => $type->label()]) . '</p>'; + + case 'entity.node.version_history': + return '<p>' . t('Revisions allow you to track differences between multiple versions of your content, and revert to older versions.') . '</p>'; + + case 'entity.node.edit_form': + $node = $route_match->getParameter('node'); + $type = NodeType::load($node->getType()); + $help = $type->getHelp(); + return !empty($help) ? Xss::filterAdmin($help) : ''; + + case 'node.add': + $type = $route_match->getParameter('node_type'); + $help = $type->getHelp(); + return !empty($help) ? Xss::filterAdmin($help) : ''; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'node' => [ + 'render element' => 'elements', + ], + 'node_add_list' => [ + 'variables' => [ + 'content' => NULL, + ], + ], + 'node_edit_form' => [ + 'render element' => 'form', + ], + // @todo Delete the next three entries as part of + // https://www.drupal.org/node/3015623 + 'field__node__title' => [ + 'base hook' => 'field', + ], + 'field__node__uid' => [ + 'base hook' => 'field', + ], + 'field__node__created' => [ + 'base hook' => 'field', + ], + ]; + } + + /** + * Implements hook_entity_view_display_alter(). + */ + #[Hook('entity_view_display_alter')] + public function entityViewDisplayAlter(EntityViewDisplayInterface $display, $context) { + if ($context['entity_type'] == 'node') { + // Hide field labels in search index. + if ($context['view_mode'] == 'search_index') { + foreach ($display->getComponents() as $name => $options) { + if (isset($options['label'])) { + $options['label'] = 'hidden'; + $display->setComponent($name, $options); + } + } + } + } + } + + /** + * Implements hook_local_tasks_alter(). + */ + #[Hook('local_tasks_alter')] + public function localTasksAlter(&$local_tasks) : void { + // Removes 'Revisions' local task added by deriver. Local task + // 'entity.node.version_history' will be replaced by + // 'entity.version_history:node.version_history' after + // https://www.drupal.org/project/drupal/issues/3153559. + unset($local_tasks['entity.version_history:node.version_history']); + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $extra = []; + $description = t('Node module element'); + foreach (NodeType::loadMultiple() as $bundle) { + $extra['node'][$bundle->id()]['display']['links'] = [ + 'label' => t('Links'), + 'description' => $description, + 'weight' => 100, + 'visible' => TRUE, + ]; + } + return $extra; + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + // Calculate the oldest and newest node created times, for use in search + // rankings. (Note that field aliases have to be variables passed by + // reference.) + if (\Drupal::moduleHandler()->moduleExists('search')) { + $min_alias = 'min_created'; + $max_alias = 'max_created'; + $result = \Drupal::entityQueryAggregate('node')->accessCheck(FALSE)->aggregate('created', 'MIN', NULL, $min_alias)->aggregate('created', 'MAX', NULL, $max_alias)->execute(); + if (isset($result[0])) { + // Make an array with definite keys and store it in the state system. + $array = ['min_created' => $result[0][$min_alias], 'max_created' => $result[0][$max_alias]]; + \Drupal::state()->set('node.min_max_update_time', $array); + } + } + } + + /** + * Implements hook_ranking(). + */ + #[Hook('ranking')] + public function ranking() { + // Create the ranking array and add the basic ranking options. + $ranking = [ + 'relevance' => [ + 'title' => t('Keyword relevance'), + // Average relevance values hover around 0.15 + 'score' => 'i.relevance', + ], + 'sticky' => [ + 'title' => t('Content is sticky at top of lists'), + // The sticky flag is either 0 or 1, which is automatically normalized. + 'score' => 'n.sticky', + ], + 'promote' => [ + 'title' => t('Content is promoted to the front page'), + // The promote flag is either 0 or 1, which is automatically normalized. + 'score' => 'n.promote', + ], + ]; + // Add relevance based on updated date, but only if it the scale values have + // been calculated in node_cron(). + if ($node_min_max = \Drupal::state()->get('node.min_max_update_time')) { + $ranking['recent'] = [ + 'title' => t('Recently created'), + // Exponential decay with half life of 14% of the age range of nodes. + 'score' => 'EXP(-5 * (1 - (n.created - :node_oldest) / :node_range))', + 'arguments' => [ + ':node_oldest' => $node_min_max['min_created'], + ':node_range' => max($node_min_max['max_created'] - $node_min_max['min_created'], 1), + ], + ]; + } + return $ranking; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for user entities. + */ + #[Hook('user_predelete')] + public function userPredelete($account) { + // Delete nodes (current revisions). + // @todo Introduce node_mass_delete() or make node_mass_update() more flexible. + $nids = \Drupal::entityQuery('node')->condition('uid', $account->id())->accessCheck(FALSE)->execute(); + // Delete old revisions. + $storage_controller = \Drupal::entityTypeManager()->getStorage('node'); + $nodes = $storage_controller->loadMultiple($nids); + $storage_controller->delete($nodes); + $revisions = $storage_controller->userRevisionIds($account); + foreach ($revisions as $revision) { + $storage_controller->deleteRevision($revision); + } + } + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + // Add 'Back to content editing' link on preview page. + $route_match = \Drupal::routeMatch(); + if ($route_match->getRouteName() == 'entity.node.preview') { + $page_top['node_preview'] = [ + '#type' => 'container', + '#attributes' => [ + 'class' => [ + 'node-preview-container', + 'container-inline', + ], + ], + 'view_mode' => \Drupal::formBuilder()->getForm(NodePreviewForm::class, $route_match->getParameter('node_preview')), + ]; + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + * + * Alters the theme form to use the admin theme on node editing. + * + * @see node_form_system_themes_admin_form_submit() + */ + #[Hook('form_system_themes_admin_form_alter')] + public function formSystemThemesAdminFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $form['admin_theme']['use_admin_theme'] = [ + '#type' => 'checkbox', + '#title' => t('Use the administration theme when editing or creating content'), + '#description' => t('Control which roles can "View the administration theme" on the <a href=":permissions">Permissions page</a>.', [ + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'system', + ])->toString(), + ]), + '#default_value' => \Drupal::configFactory()->getEditable('node.settings')->get('use_admin_theme'), + ]; + $form['#submit'][] = 'node_form_system_themes_admin_form_submit'; + } + + /** + * @defgroup node_access Node access rights + * @{ + * The node access system determines who can do what to which nodes. + * + * In determining access rights for an existing node, + * \Drupal\node\NodeAccessControlHandler first checks whether the user has the + * "bypass node access" permission. Such users have unrestricted access to all + * nodes. user 1 will always pass this check. + * + * Next, all implementations of hook_ENTITY_TYPE_access() for node will + * be called. Each implementation may explicitly allow, explicitly forbid, or + * ignore the access request. If at least one module says to forbid the request, + * it will be rejected. If no modules deny the request and at least one says to + * allow it, the request will be permitted. + * + * If all modules ignore the access request, then the node_access table is used + * to determine access. All node access modules are queried using + * hook_node_grants() to assemble a list of "grant IDs" for the user. This list + * is compared against the table. If any row contains the node ID in question + * (or 0, which stands for "all nodes"), one of the grant IDs returned, and a + * value of TRUE for the operation in question, then access is granted. Note + * that this table is a list of grants; any matching row is sufficient to grant + * access to the node. + * + * In node listings (lists of nodes generated from a select query, such as the + * default home page at path 'node', an RSS feed, a recent content block, etc.), + * the process above is followed except that hook_ENTITY_TYPE_access() is not + * called on each node for performance reasons and for proper functioning of + * the pager system. When adding a node listing to your module, be sure to use + * an entity query, which will add a tag of "node_access". This will allow + * modules dealing with node access to ensure only nodes to which the user has + * access are retrieved, through the use of hook_query_TAG_alter(). See the + * @link entity_api Entity API topic @endlink for more information on entity + * queries. Tagging a query with "node_access" does not check the + * published/unpublished status of nodes, so the base query is responsible + * for ensuring that unpublished nodes are not displayed to inappropriate users. + * + * Note: Even a single module returning an AccessResultInterface object from + * hook_ENTITY_TYPE_access() whose isForbidden() method equals TRUE will block + * access to the node. Therefore, implementers should take care to not deny + * access unless they really intend to. Unless a module wishes to actively + * forbid access it should return an AccessResultInterface object whose + * isAllowed() nor isForbidden() methods return TRUE, to allow other modules or + * the node_access table to control access. + * + * Note also that access to create nodes is handled by + * hook_ENTITY_TYPE_create_access(). + * + * @see \Drupal\node\NodeAccessControlHandler + */ + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('node_access')] + public function nodeAccess(NodeInterface $node, $operation, AccountInterface $account) { + $type = $node->bundle(); + // Note create access is handled by hook_ENTITY_TYPE_create_access(). + switch ($operation) { + case 'update': + $access = AccessResult::allowedIfHasPermission($account, 'edit any ' . $type . ' content'); + if (!$access->isAllowed() && $account->hasPermission('edit own ' . $type . ' content')) { + $access = $access->orIf(AccessResult::allowedIf($account->id() == $node->getOwnerId())->cachePerUser()->addCacheableDependency($node)); + } + break; + + case 'delete': + $access = AccessResult::allowedIfHasPermission($account, 'delete any ' . $type . ' content'); + if (!$access->isAllowed() && $account->hasPermission('delete own ' . $type . ' content')) { + $access = $access->orIf(AccessResult::allowedIf($account->id() == $node->getOwnerId()))->cachePerUser()->addCacheableDependency($node); + } + break; + + default: + $access = AccessResult::neutral(); + } + return $access; + } + + /** + * Implements hook_query_TAG_alter(). + * + * This is the hook_query_alter() for queries tagged with 'node_access'. It adds + * node access checks for the user account given by the 'account' meta-data (or + * current user if not provided), for an operation given by the 'op' meta-data + * (or 'view' if not provided; other possible values are 'update' and 'delete'). + * + * Queries tagged with 'node_access' that are not against the {node} table + * must add the base table as metadata. For example: + * @code + * $query + * ->addTag('node_access') + * ->addMetaData('base_table', 'taxonomy_index'); + * @endcode + */ + #[Hook('query_node_access_alter')] + public function queryNodeAccessAlter(AlterableInterface $query) { + // Read meta-data from query, if provided. + if (!($account = $query->getMetaData('account'))) { + $account = \Drupal::currentUser(); + } + if (!($op = $query->getMetaData('op'))) { + $op = 'view'; + } + // If $account can bypass node access, or there are no node access modules, + // or the operation is 'view' and the $account has a global view grant + // (such as a view grant for node ID 0), we don't need to alter the query. + if ($account->hasPermission('bypass node access')) { + return; + } + if (!\Drupal::moduleHandler()->hasImplementations('node_grants')) { + return; + } + if ($op == 'view' && node_access_view_all_nodes($account)) { + return; + } + $tables = $query->getTables(); + $base_table = $query->getMetaData('base_table'); + // If the base table is not given, default to one of the node base tables. + if (!$base_table) { + /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ + $table_mapping = \Drupal::entityTypeManager()->getStorage('node')->getTableMapping(); + $node_base_tables = $table_mapping->getTableNames(); + foreach ($tables as $table_info) { + if (!$table_info instanceof SelectInterface) { + $table = $table_info['table']; + // Ensure that 'node' and 'node_field_data' are always preferred over + // 'node_revision' and 'node_field_revision'. + if ($table == 'node' || $table == 'node_field_data') { + $base_table = $table; + break; + } + // If one of the node base tables are in the query, add it to the list + // of possible base tables to join against. + if (in_array($table, $node_base_tables)) { + $base_table = $table; + } + } + } + // Bail out if the base table is missing. + if (!$base_table) { + throw new \Exception('Query tagged for node access but there is no node table, specify the base_table using meta data.'); + } + } + // Update the query for the given storage method. + \Drupal::service('node.grant_storage')->alterQuery($query, $tables, $op, $account, $base_table); + // Bubble the 'user.node_grants:$op' cache context to the current render + // context. + $renderer = \Drupal::service('renderer'); + if ($renderer->hasRenderContext()) { + $build = ['#cache' => ['contexts' => ['user.node_grants:' . $op]]]; + $renderer->render($build); + } + } + + /** + * @} End of "defgroup node_access". + */ + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled(array $modules) { + // Check if any of the newly enabled modules require the node_access table to + // be rebuilt. + if (!node_access_needs_rebuild() && \Drupal::moduleHandler()->hasImplementations('node_grants', $modules)) { + node_access_needs_rebuild(TRUE); + } + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled($modules) { + // Check whether any of the disabled modules implemented hook_node_grants(), + // in which case the node access table needs to be rebuilt. + foreach ($modules as $module) { + // At this point, the module is already disabled, but its code is still + // loaded in memory. Module functions must no longer be called. We only + // check whether a hook implementation function exists and do not invoke it. + // Node access also needs to be rebuilt if language module is disabled to + // remove any language-specific grants. + if (!node_access_needs_rebuild() && (\Drupal::moduleHandler()->hasImplementations('node_grants', $module) || $module == 'language')) { + node_access_needs_rebuild(TRUE); + } + } + // If there remains no more node_access module, rebuilding will be + // straightforward, we can do it right now. + if (node_access_needs_rebuild() && !\Drupal::moduleHandler()->hasImplementations('node_grants')) { + node_access_rebuild(); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. + */ + #[Hook('configurable_language_delete')] + public function configurableLanguageDelete(ConfigurableLanguageInterface $language) { + // On nodes with this language, unset the language. + \Drupal::entityTypeManager()->getStorage('node')->clearRevisionsLanguage($language); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for comment entities. + */ + #[Hook('comment_insert')] + public function commentInsert($comment) { + // Reindex the node when comments are added. + if ($comment->getCommentedEntityTypeId() == 'node') { + node_reindex_node_search($comment->getCommentedEntityId()); + } + } + + /** + * Implements hook_ENTITY_TYPE_update() for comment entities. + */ + #[Hook('comment_update')] + public function commentUpdate($comment) { + // Reindex the node when comments are changed. + if ($comment->getCommentedEntityTypeId() == 'node') { + node_reindex_node_search($comment->getCommentedEntityId()); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for comment entities. + */ + #[Hook('comment_delete')] + public function commentDelete($comment) { + // Reindex the node when comments are deleted. + if ($comment->getCommentedEntityTypeId() == 'node') { + node_reindex_node_search($comment->getCommentedEntityId()); + } + } + + /** + * Implements hook_config_translation_info_alter(). + */ + #[Hook('config_translation_info_alter')] + public function configTranslationInfoAlter(&$info) { + $info['node_type']['class'] = 'Drupal\node\ConfigTranslation\NodeTypeMapper'; + } + +} diff --git a/core/modules/node/src/Hook/NodeTokensHooks.php b/core/modules/node/src/Hook/NodeTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fa3709fa157b2f99cd27d327fb4b916f9affa650 --- /dev/null +++ b/core/modules/node/src/Hook/NodeTokensHooks.php @@ -0,0 +1,199 @@ +<?php + +namespace Drupal\node\Hook; + +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\user\Entity\User; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node. + */ +class NodeTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $type = [ + 'name' => t('Nodes'), + 'description' => t('Tokens related to individual content items, or "nodes".'), + 'needs-data' => 'node', + ]; + // Core tokens for nodes. + $node['nid'] = [ + 'name' => t("Content ID"), + 'description' => t('The unique ID of the content item, or "node".'), + ]; + $node['uuid'] = [ + 'name' => t('UUID'), + 'description' => t('The UUID of the content item, or "node".'), + ]; + $node['vid'] = [ + 'name' => t("Revision ID"), + 'description' => t("The unique ID of the node's latest revision."), + ]; + $node['type'] = ['name' => t("Content type")]; + $node['type-name'] = [ + 'name' => t("Content type name"), + 'description' => t("The human-readable name of the node type."), + ]; + $node['title'] = ['name' => t("Title")]; + $node['body'] = ['name' => t("Body"), 'description' => t("The main body text of the node.")]; + $node['summary'] = [ + 'name' => t("Summary"), + 'description' => t("The summary of the node's main body text."), + ]; + $node['langcode'] = [ + 'name' => t('Language code'), + 'description' => t('The language code of the language the node is written in.'), + ]; + $node['published_status'] = [ + 'name' => t('Published'), + 'description' => t('The publication status of the node ("Published" or "Unpublished").'), + ]; + $node['url'] = ['name' => t("URL"), 'description' => t("The URL of the node.")]; + $node['edit-url'] = ['name' => t("Edit URL"), 'description' => t("The URL of the node's edit page.")]; + // Chained tokens for nodes. + $node['created'] = ['name' => t("Date created"), 'type' => 'date']; + $node['changed'] = [ + 'name' => t("Date changed"), + 'description' => t("The date the node was most recently updated."), + 'type' => 'date', + ]; + $node['author'] = ['name' => t("Author"), 'type' => 'user']; + return ['types' => ['node' => $type], 'tokens' => ['node' => $node]]; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + $url_options = ['absolute' => TRUE]; + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = LanguageInterface::LANGCODE_DEFAULT; + } + $replacements = []; + if ($type == 'node' && !empty($data['node'])) { + /** @var \Drupal\node\NodeInterface $node */ + $node = $data['node']; + foreach ($tokens as $name => $original) { + switch ($name) { + // Simple key values on the node. + case 'nid': + $replacements[$original] = $node->id(); + break; + + case 'uuid': + $replacements[$original] = $node->uuid(); + break; + + case 'vid': + $replacements[$original] = $node->getRevisionId(); + break; + + case 'type': + $replacements[$original] = $node->getType(); + break; + + case 'type-name': + $type_name = node_get_type_label($node); + $replacements[$original] = $type_name; + break; + + case 'title': + $replacements[$original] = $node->getTitle(); + break; + + case 'body': + case 'summary': + $translation = \Drupal::service('entity.repository')->getTranslationFromContext($node, $langcode, ['operation' => 'node_tokens']); + if ($translation->hasField('body') && ($items = $translation->get('body')) && !$items->isEmpty()) { + $item = $items[0]; + // If the summary was requested and is not empty, use it. + if ($name == 'summary' && !empty($item->summary)) { + $output = $item->summary_processed; + } + else { + $output = $item->processed; + // A summary was requested. + if ($name == 'summary') { + // Generate an optionally trimmed summary of the body field. + // Get the 'trim_length' size used for the 'teaser' mode, if + // present, or use the default trim_length size. + $display_options = \Drupal::service('entity_display.repository')->getViewDisplay('node', $node->getType(), 'teaser')->getComponent('body'); + if (isset($display_options['settings']['trim_length'])) { + $length = $display_options['settings']['trim_length']; + } + else { + $settings = \Drupal::service('plugin.manager.field.formatter')->getDefaultSettings('text_summary_or_trimmed'); + $length = $settings['trim_length']; + } + $output = text_summary($output, $item->format, $length); + } + } + // "processed" returns a \Drupal\Component\Render\MarkupInterface + // via check_markup(). + $replacements[$original] = $output; + } + break; + + case 'langcode': + $replacements[$original] = $node->language()->getId(); + break; + + case 'published_status': + $replacements[$original] = $node->isPublished() ? t('Published') : t('Unpublished'); + break; + + case 'url': + $replacements[$original] = $node->toUrl('canonical', $url_options)->toString(); + break; + + case 'edit-url': + $replacements[$original] = $node->toUrl('edit-form', $url_options)->toString(); + break; + + // Default values for the chained tokens handled below. + case 'author': + $account = $node->getOwner() ? $node->getOwner() : User::load(0); + $bubbleable_metadata->addCacheableDependency($account); + $replacements[$original] = $account->label(); + break; + + case 'created': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($node->getCreatedTime(), 'medium', '', NULL, $langcode); + break; + + case 'changed': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($node->getChangedTime(), 'medium', '', NULL, $langcode); + break; + } + } + if ($author_tokens = $token_service->findWithPrefix($tokens, 'author')) { + $replacements += $token_service->generate('user', $author_tokens, ['user' => $node->getOwner()], $options, $bubbleable_metadata); + } + if ($created_tokens = $token_service->findWithPrefix($tokens, 'created')) { + $replacements += $token_service->generate('date', $created_tokens, ['date' => $node->getCreatedTime()], $options, $bubbleable_metadata); + } + if ($changed_tokens = $token_service->findWithPrefix($tokens, 'changed')) { + $replacements += $token_service->generate('date', $changed_tokens, ['date' => $node->getChangedTime()], $options, $bubbleable_metadata); + } + } + return $replacements; + } + +} diff --git a/core/modules/node/src/Hook/NodeViewsExecutionHooks.php b/core/modules/node/src/Hook/NodeViewsExecutionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fad4ca5db8f52835b77b5566301456d04b77361a --- /dev/null +++ b/core/modules/node/src/Hook/NodeViewsExecutionHooks.php @@ -0,0 +1,26 @@ +<?php + +namespace Drupal\node\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node. + */ +class NodeViewsExecutionHooks { + + /** + * Implements hook_views_query_substitutions(). + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + $account = \Drupal::currentUser(); + return [ + '***ADMINISTER_NODES***' => intval($account->hasPermission('administer nodes')), + '***VIEW_OWN_UNPUBLISHED_NODES***' => intval($account->hasPermission('view own unpublished content')), + '***BYPASS_NODE_ACCESS***' => intval($account->hasPermission('bypass node access')), + ]; + } + +} diff --git a/core/modules/node/src/Hook/NodeViewsHooks.php b/core/modules/node/src/Hook/NodeViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f801756c0cb8bddd5a635788e4f69247a6a6a920 --- /dev/null +++ b/core/modules/node/src/Hook/NodeViewsHooks.php @@ -0,0 +1,57 @@ +<?php + +namespace Drupal\node\Hook; + +use Drupal\views\Analyzer; +use Drupal\user\RoleInterface; +use Drupal\user\Entity\Role; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node. + */ +class NodeViewsHooks { + + /** + * Implements hook_views_analyze(). + */ + #[Hook('views_analyze')] + public function viewsAnalyze(ViewExecutable $view) { + $ret = []; + // Check for something other than the default display: + if ($view->storage->get('base_table') == 'node') { + foreach ($view->displayHandlers as $display) { + if (!$display->isDefaulted('access') || !$display->isDefaulted('filters')) { + // Check for no access control + $access = $display->getOption('access'); + if (empty($access['type']) || $access['type'] == 'none') { + $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID); + $anonymous_has_access = $anonymous_role && $anonymous_role->hasPermission('access content'); + $authenticated_role = Role::load(RoleInterface::AUTHENTICATED_ID); + $authenticated_has_access = $authenticated_role && $authenticated_role->hasPermission('access content'); + if (!$anonymous_has_access || !$authenticated_has_access) { + $ret[] = Analyzer::formatMessage(t('Some roles lack permission to access content, but display %display has no access control.', ['%display' => $display->display['display_title']]), 'warning'); + } + $filters = $display->getOption('filters'); + foreach ($filters as $filter) { + if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) { + continue 2; + } + } + $ret[] = Analyzer::formatMessage(t('Display %display has no access control but does not contain a filter for published nodes.', ['%display' => $display->display['display_title']]), 'warning'); + } + } + } + } + foreach ($view->displayHandlers as $display) { + if ($display->getPluginId() == 'page') { + if ($display->getOption('path') == 'node/%') { + $ret[] = Analyzer::formatMessage(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use Layout Builder.', ['%display' => $display->display['display_title']]), 'warning'); + } + } + } + return $ret; + } + +} diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index bd71a44a3d945c7064d79d22ce590d923e731c75..c3893136360e925a44d1e673c83d5c7eb45a199f 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -92,6 +92,10 @@ public function form(array $form, FormStateInterface $form_state) { // parent::form(). $store = $this->tempStoreFactory->get('node_preview'); + // Because of the temp store integration, this is not cacheable. + // @todo add the correct cache contexts in https://www.drupal.org/project/drupal/issues/3397987 + $form['#cache']['max-age'] = 0; + // Attempt to load from preview when the uuid is present unless we are // rebuilding the form. $request_uuid = \Drupal::request()->query->get('uuid'); @@ -244,9 +248,9 @@ protected function actions(array $form, FormStateInterface $form_state) { /** * Form submission handler for the 'preview' action. * - * @param $form + * @param array $form * An associative array containing the structure of the form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. */ public function preview(array $form, FormStateInterface $form_state) { diff --git a/core/modules/node/src/Plugin/Block/SyndicateBlock.php b/core/modules/node/src/Plugin/Block/SyndicateBlock.php index 8dea77dc11b6b403d4803b33647a7f4f85a04295..b10c63527e5b1cd7cf567d88eef7c1cd8b5755c4 100644 --- a/core/modules/node/src/Plugin/Block/SyndicateBlock.php +++ b/core/modules/node/src/Plugin/Block/SyndicateBlock.php @@ -36,7 +36,7 @@ class SyndicateBlock extends BlockBase implements ContainerFactoryPluginInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index 8a5e29d61ad8a7c217bddbcf35b14ef5c2446c64..c7019932bd3f8527c63a086b2739b213df898a4f 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -166,7 +166,7 @@ public static function create(ContainerInterface $container, array $configuratio * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database diff --git a/core/modules/node/src/Plugin/migrate/source/d7/Node.php b/core/modules/node/src/Plugin/migrate/source/d7/Node.php index 3c4f713338fe848e6b60e72e684c7bcab21511fd..adfa0a01cc5c2ebdab522cebcfaaf87b360ff14e 100644 --- a/core/modules/node/src/Plugin/migrate/source/d7/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d7/Node.php @@ -81,7 +81,7 @@ public static function create(ContainerInterface $container, array $configuratio } /** - * The join options between the node and the node_revisions table. + * The join options between the node and the node_revision table. */ const JOIN = '[n].[vid] = [nr].[vid]'; diff --git a/core/modules/node/src/Plugin/views/argument/Type.php b/core/modules/node/src/Plugin/views/argument/Type.php index a11eb7cd057689f58d5d92f4ee693a153895ff8c..3b6c5240bd3bbf8b2523909478f2edfa929d0163 100644 --- a/core/modules/node/src/Plugin/views/argument/Type.php +++ b/core/modules/node/src/Plugin/views/argument/Type.php @@ -28,7 +28,7 @@ class Type extends StringArgument { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityStorageInterface $node_type_storage diff --git a/core/modules/node/src/Plugin/views/argument/Vid.php b/core/modules/node/src/Plugin/views/argument/Vid.php index 2f97f55cec2163b1f6ee554b3b436cb139482283..f8ca8d33c9d7cd834e6279459d03c02537f6939d 100644 --- a/core/modules/node/src/Plugin/views/argument/Vid.php +++ b/core/modules/node/src/Plugin/views/argument/Vid.php @@ -28,7 +28,7 @@ class Vid extends NumericArgument { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\node\NodeStorageInterface $node_storage diff --git a/core/modules/node/src/Plugin/views/argument_default/Node.php b/core/modules/node/src/Plugin/views/argument_default/Node.php index 687322d05c3197d6c98a4e1f28832cc6f1e14d0f..7ec756d3d56728a2613700a5b2b39ff173efaf69 100644 --- a/core/modules/node/src/Plugin/views/argument_default/Node.php +++ b/core/modules/node/src/Plugin/views/argument_default/Node.php @@ -33,7 +33,7 @@ class Node extends ArgumentDefaultPluginBase implements CacheableDependencyInter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match diff --git a/core/modules/node/src/Plugin/views/row/Rss.php b/core/modules/node/src/Plugin/views/row/Rss.php index 24622282d4a3f24a0c5daf7c4bd97f1a050cec2a..ccfa5a8438311982063ef9fd5659e579b9817596 100644 --- a/core/modules/node/src/Plugin/views/row/Rss.php +++ b/core/modules/node/src/Plugin/views/row/Rss.php @@ -25,13 +25,13 @@ class Rss extends RssPluginBase { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $base_table = 'node_field_data'; /** * The base field for this row plugin. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $base_field = 'nid'; /** diff --git a/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php b/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php index 7dcd43e7cae6a5c1c718f8a362475e11e44c3c35..9e040cf07f928f9a4b45e65098789c8658a034a8 100644 --- a/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php +++ b/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php @@ -7,15 +7,20 @@ namespace Drupal\node\ProxyClass\ParamConverter { + use Drupal\Core\ParamConverter\ParamConverterInterface; + use Drupal\Core\DependencyInjection\DependencySerializationTrait; + use Symfony\Component\DependencyInjection\ContainerInterface; + use Symfony\Component\Routing\Route; + /** * Provides a proxy class for \Drupal\node\ParamConverter\NodePreviewConverter. * * @see \Drupal\Component\ProxyBuilder */ - class NodePreviewConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface + class NodePreviewConverter implements ParamConverterInterface { - use \Drupal\Core\DependencyInjection\DependencySerializationTrait; + use DependencySerializationTrait; /** * The id of the original proxied service. @@ -46,7 +51,7 @@ class NodePreviewConverter implements \Drupal\Core\ParamConverter\ParamConverter * @param string $drupal_proxy_original_service_id * The service ID of the original service. */ - public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) + public function __construct(ContainerInterface $container, $drupal_proxy_original_service_id) { $this->container = $container; $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id; @@ -78,7 +83,7 @@ public function convert($value, $definition, $name, array $defaults) /** * {@inheritdoc} */ - public function applies($definition, $name, \Symfony\Component\Routing\Route $route) + public function applies($definition, $name, Route $route) { return $this->lazyLoadItself()->applies($definition, $name, $route); } diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module index 301da43072f24f833535761b2cc55abedd9bc42c..e6af0dbe82add2acb8d6f12add44b7edbcb79e66 100644 --- a/core/modules/node/tests/modules/node_access_test/node_access_test.module +++ b/core/modules/node/tests/modules/node_access_test/node_access_test.module @@ -21,96 +21,9 @@ declare(strict_types=1); -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Access\AccessResult; use Drupal\field\Entity\FieldStorageConfig; use Drupal\field\Entity\FieldConfig; use Drupal\node\NodeTypeInterface; -use Drupal\node\NodeInterface; - -/** - * Implements hook_node_grants(). - * - * Provides three grant realms: - * - node_access_test_author: Grants users view, update, and delete privileges - * on nodes they have authored. Users receive a group ID matching their user - * ID on this realm. - * - node_access_test: Grants users view privileges when they have the - * 'node test view' permission. Users with this permission receive two group - * IDs for the realm, 8888 and 8889. Access for both realms is identical; - * the second group is added so that the interaction of multiple groups on - * a given grant realm can be tested in NodeAccessPagerTest. - * - node_access_all: Provides grants for the user whose user ID matches the - * 'node_access_test.no_access_uid' state variable. Access control on this - * realm is not provided in this module; instead, - * NodeQueryAlterTest::testNodeQueryAlterOverride() manually writes a node - * access record defining the access control for this realm. - * - * @see \Drupal\node\Tests\NodeQueryAlterTest::testNodeQueryAlterOverride() - * @see \Drupal\node\Tests\NodeAccessPagerTest - * @see node_access_test.permissions.yml - * @see node_access_test_node_access_records() - */ -function node_access_test_node_grants($account, $operation) { - $grants = []; - $grants['node_access_test_author'] = [$account->id()]; - if ($operation == 'view' && $account->hasPermission('node test view')) { - $grants['node_access_test'] = [8888, 8889]; - } - - $no_access_uid = \Drupal::state()->get('node_access_test.no_access_uid', 0); - if ($operation == 'view' && $account->id() == $no_access_uid) { - $grants['node_access_all'] = [0]; - } - return $grants; -} - -/** - * Implements hook_node_access_records(). - * - * By default, records are written for all nodes. When the - * 'node_access_test.private' state variable is set to TRUE, records - * are only written for nodes with a "private" property set, which causes the - * Node module to write the default global view grant for nodes that are not - * marked private. - * - * @see \Drupal\node\Tests\NodeAccessBaseTableTest::setUp() - * @see node_access_test_node_grants() - * @see node_access_test.permissions.yml - */ -function node_access_test_node_access_records(NodeInterface $node) { - $grants = []; - // For NodeAccessBaseTableTestCase, only set records for private nodes. - if (!\Drupal::state()->get('node_access_test.private') || (isset($node->private) && $node->private->value)) { - // Groups 8888 and 8889 for the node_access_test realm both receive a view - // grant for all controlled nodes. See node_access_test_node_grants(). - $grants[] = [ - 'realm' => 'node_access_test', - 'gid' => 8888, - 'grant_view' => 1, - 'grant_update' => 0, - 'grant_delete' => 0, - ]; - $grants[] = [ - 'realm' => 'node_access_test', - 'gid' => 8889, - 'grant_view' => 1, - 'grant_update' => 0, - 'grant_delete' => 0, - ]; - // For the author realm, the group ID is equivalent to a user ID, which - // means there are many groups of just 1 user. - $grants[] = [ - 'realm' => 'node_access_test_author', - 'gid' => $node->getOwnerId(), - 'grant_view' => 1, - 'grant_update' => 1, - 'grant_delete' => 1, - ]; - } - - return $grants; -} /** * Adds the private field to a node type. @@ -141,23 +54,3 @@ function node_access_test_add_field(NodeTypeInterface $type) { ]) ->save(); } - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function node_access_test_node_access(NodeInterface $node, $operation, AccountInterface $account) { - $secret_catalan = \Drupal::state() - ->get('node_access_test_secret_catalan') ?: 0; - if ($secret_catalan && $node->language()->getId() == 'ca') { - // Make all Catalan content secret. - return AccessResult::forbidden()->setCacheMaxAge(0); - } - - // Grant access if a specific user is specified. - if (\Drupal::state()->get('node_access_test.allow_uid') === $account->id()) { - return AccessResult::allowed(); - } - - // No opinion. - return AccessResult::neutral()->setCacheMaxAge(0); -} diff --git a/core/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php b/core/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..40441ccbe889e84c855c1d09f171e7447003c0b0 --- /dev/null +++ b/core/modules/node/tests/modules/node_access_test/src/Hook/NodeAccessTestHooks.php @@ -0,0 +1,119 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_access_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\node\NodeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_access_test. + */ +class NodeAccessTestHooks { + + /** + * Implements hook_node_grants(). + * + * Provides three grant realms: + * - node_access_test_author: Grants users view, update, and delete privileges + * on nodes they have authored. Users receive a group ID matching their user + * ID on this realm. + * - node_access_test: Grants users view privileges when they have the + * 'node test view' permission. Users with this permission receive two group + * IDs for the realm, 8888 and 8889. Access for both realms is identical; + * the second group is added so that the interaction of multiple groups on + * a given grant realm can be tested in NodeAccessPagerTest. + * - node_access_all: Provides grants for the user whose user ID matches the + * 'node_access_test.no_access_uid' state variable. Access control on this + * realm is not provided in this module; instead, + * NodeQueryAlterTest::testNodeQueryAlterOverride() manually writes a node + * access record defining the access control for this realm. + * + * @see \Drupal\node\Tests\NodeQueryAlterTest::testNodeQueryAlterOverride() + * @see \Drupal\node\Tests\NodeAccessPagerTest + * @see node_access_test.permissions.yml + * @see node_access_test_node_access_records() + */ + #[Hook('node_grants')] + public function nodeGrants($account, $operation) { + $grants = []; + $grants['node_access_test_author'] = [$account->id()]; + if ($operation == 'view' && $account->hasPermission('node test view')) { + $grants['node_access_test'] = [8888, 8889]; + } + $no_access_uid = \Drupal::state()->get('node_access_test.no_access_uid', 0); + if ($operation == 'view' && $account->id() == $no_access_uid) { + $grants['node_access_all'] = [0]; + } + return $grants; + } + + /** + * Implements hook_node_access_records(). + * + * By default, records are written for all nodes. When the + * 'node_access_test.private' state variable is set to TRUE, records + * are only written for nodes with a "private" property set, which causes the + * Node module to write the default global view grant for nodes that are not + * marked private. + * + * @see \Drupal\node\Tests\NodeAccessBaseTableTest::setUp() + * @see node_access_test_node_grants() + * @see node_access_test.permissions.yml + */ + #[Hook('node_access_records')] + public function nodeAccessRecords(NodeInterface $node) { + $grants = []; + // For NodeAccessBaseTableTestCase, only set records for private nodes. + if (!\Drupal::state()->get('node_access_test.private') || isset($node->private) && $node->private->value) { + // Groups 8888 and 8889 for the node_access_test realm both receive a view + // grant for all controlled nodes. See node_access_test_node_grants(). + $grants[] = [ + 'realm' => 'node_access_test', + 'gid' => 8888, + 'grant_view' => 1, + 'grant_update' => 0, + 'grant_delete' => 0, + ]; + $grants[] = [ + 'realm' => 'node_access_test', + 'gid' => 8889, + 'grant_view' => 1, + 'grant_update' => 0, + 'grant_delete' => 0, + ]; + // For the author realm, the group ID is equivalent to a user ID, which + // means there are many groups of just 1 user. + $grants[] = [ + 'realm' => 'node_access_test_author', + 'gid' => $node->getOwnerId(), + 'grant_view' => 1, + 'grant_update' => 1, + 'grant_delete' => 1, + ]; + } + return $grants; + } + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('node_access')] + public function nodeAccess(NodeInterface $node, $operation, AccountInterface $account) { + $secret_catalan = \Drupal::state()->get('node_access_test_secret_catalan') ?: 0; + if ($secret_catalan && $node->language()->getId() == 'ca') { + // Make all Catalan content secret. + return AccessResult::forbidden()->setCacheMaxAge(0); + } + // Grant access if a specific user is specified. + if (\Drupal::state()->get('node_access_test.allow_uid') === $account->id()) { + return AccessResult::allowed(); + } + // No opinion. + return AccessResult::neutral()->setCacheMaxAge(0); + } + +} diff --git a/core/modules/node/tests/modules/node_access_test_empty/node_access_test_empty.module b/core/modules/node/tests/modules/node_access_test_empty/node_access_test_empty.module deleted file mode 100644 index b775aaf242781da23f0a2811050b9dffee7e204b..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_access_test_empty/node_access_test_empty.module +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Empty node access hook implementations. - */ - -declare(strict_types=1); - -use Drupal\node\NodeInterface; - -/** - * Implements hook_node_grants(). - */ -function node_access_test_empty_node_grants($account, $operation) { - return []; -} - -/** - * Implements hook_node_access_records(). - */ -function node_access_test_empty_node_access_records(NodeInterface $node) { - return []; -} diff --git a/core/modules/node/tests/modules/node_access_test_empty/src/Hook/NodeAccessTestEmptyHooks.php b/core/modules/node/tests/modules/node_access_test_empty/src/Hook/NodeAccessTestEmptyHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..31e28793abe29b5bf557c2ba8ec8a46fd25a4326 --- /dev/null +++ b/core/modules/node/tests/modules/node_access_test_empty/src/Hook/NodeAccessTestEmptyHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_access_test_empty\Hook; + +use Drupal\node\NodeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_access_test_empty. + */ +class NodeAccessTestEmptyHooks { + + /** + * Implements hook_node_grants(). + */ + #[Hook('node_grants')] + public function nodeGrants($account, $operation) { + return []; + } + + /** + * Implements hook_node_access_records(). + */ + #[Hook('node_access_records')] + public function nodeAccessRecords(NodeInterface $node) { + return []; + } + +} diff --git a/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module b/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module deleted file mode 100644 index 50cb2b4c3dbc7e8f2195a2223bc856d07dfc1952..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * @file - * Test module with a language-aware node access implementation. - * - * The module adds a 'private' field to page nodes that allows each translation - * of the node to be marked as private (viewable only by administrators). - */ - -declare(strict_types=1); - -use Drupal\node\NodeInterface; - -/** - * Implements hook_node_grants(). - * - * This module defines a single grant realm. All users belong to this group. - */ -function node_access_test_language_node_grants($account, $operation) { - $grants['node_access_language_test'] = [7888]; - return $grants; -} - -/** - * Implements hook_node_access_records(). - */ -function node_access_test_language_node_access_records(NodeInterface $node) { - $grants = []; - - // Create grants for each translation of the node. - foreach ($node->getTranslationLanguages() as $langcode => $language) { - // If the translation is not marked as private, grant access. - $translation = $node->getTranslation($langcode); - $grants[] = [ - 'realm' => 'node_access_language_test', - 'gid' => 7888, - 'grant_view' => empty($translation->field_private->value) ? 1 : 0, - 'grant_update' => 0, - 'grant_delete' => 0, - 'langcode' => $langcode, - ]; - } - return $grants; -} diff --git a/core/modules/node/tests/modules/node_access_test_language/src/Hook/NodeAccessTestLanguageHooks.php b/core/modules/node/tests/modules/node_access_test_language/src/Hook/NodeAccessTestLanguageHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..8fc24398d301b57823bfcb5cbe4c83f2940f8e38 --- /dev/null +++ b/core/modules/node/tests/modules/node_access_test_language/src/Hook/NodeAccessTestLanguageHooks.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_access_test_language\Hook; + +use Drupal\node\NodeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_access_test_language. + */ +class NodeAccessTestLanguageHooks { + + /** + * Implements hook_node_grants(). + * + * This module defines a single grant realm. All users belong to this group. + */ + #[Hook('node_grants')] + public function nodeGrants($account, $operation) { + $grants['node_access_language_test'] = [7888]; + return $grants; + } + + /** + * Implements hook_node_access_records(). + */ + #[Hook('node_access_records')] + public function nodeAccessRecords(NodeInterface $node) { + $grants = []; + // Create grants for each translation of the node. + foreach ($node->getTranslationLanguages() as $langcode => $language) { + // If the translation is not marked as private, grant access. + $translation = $node->getTranslation($langcode); + $grants[] = [ + 'realm' => 'node_access_language_test', + 'gid' => 7888, + 'grant_view' => empty($translation->field_private->value) ? 1 : 0, + 'grant_update' => 0, + 'grant_delete' => 0, + 'langcode' => $langcode, + ]; + } + return $grants; + } + +} diff --git a/core/modules/node/tests/modules/node_display_configurable_test/node_display_configurable_test.module b/core/modules/node/tests/modules/node_display_configurable_test/node_display_configurable_test.module deleted file mode 100644 index 7abd116cad8a5b4f841f9086cdbe1c238ec4c4d4..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_display_configurable_test/node_display_configurable_test.module +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @file - * A module for testing making node base fields' displays configurable. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function node_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'node') { - foreach (['created', 'uid', 'title'] as $field) { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ - $base_field_definitions[$field]->setDisplayConfigurable('view', TRUE); - } - } -} - -/** - * Implements hook_entity_type_build(). - */ -function node_display_configurable_test_entity_type_build(array &$entity_types) { - // Allow skipping of extra preprocessing for configurable display. - $entity_types['node']->set('enable_base_field_custom_preprocess_skipping', TRUE); - $entity_types['node']->set('enable_page_title_template', TRUE); -} diff --git a/core/modules/node/tests/modules/node_display_configurable_test/src/Hook/NodeDisplayConfigurableTestHooks.php b/core/modules/node/tests/modules/node_display_configurable_test/src/Hook/NodeDisplayConfigurableTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..12bff8f1c6155b485c44e28c1ab83988246598f9 --- /dev/null +++ b/core/modules/node/tests/modules/node_display_configurable_test/src/Hook/NodeDisplayConfigurableTestHooks.php @@ -0,0 +1,38 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_display_configurable_test\Hook; + +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_display_configurable_test. + */ +class NodeDisplayConfigurableTestHooks { + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$base_field_definitions, EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'node') { + foreach (['created', 'uid', 'title'] as $field) { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ + $base_field_definitions[$field]->setDisplayConfigurable('view', TRUE); + } + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + // Allow skipping of extra preprocessing for configurable display. + $entity_types['node']->set('enable_base_field_custom_preprocess_skipping', TRUE); + $entity_types['node']->set('enable_page_title_template', TRUE); + } + +} diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module deleted file mode 100644 index 356035ccfce73d4866d6de838f5fdce80d0c5b5e..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -/** - * @file - * A dummy module for testing node related hooks. - * - * This is a dummy module that implements node related hooks to test API - * interaction with the Node module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\node\NodeInterface; - -/** - * Implements hook_ENTITY_TYPE_view() for node entities. - */ -function node_test_node_view(array &$build, NodeInterface $node, EntityViewDisplayInterface $display, $view_mode) { - if ($node->isNew()) { - return; - } - if ($view_mode == 'rss') { - // Add RSS elements and namespaces when building the RSS feed. - $node->rss_elements[] = [ - 'key' => 'testElement', - 'value' => t('Value of testElement RSS element for node @nid.', ['@nid' => $node->id()]), - ]; - - // Add content that should be displayed only in the RSS feed. - $build['extra_feed_content'] = [ - '#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node @nid.', ['@nid' => $node->id()]) . '</p>', - '#weight' => 10, - ]; - } - - if ($view_mode != 'rss') { - // Add content that should NOT be displayed in the RSS feed. - $build['extra_non_feed_content'] = [ - '#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node @nid.', ['@nid' => $node->id()]) . '</p>', - ]; - } -} - -/** - * Implements hook_ENTITY_TYPE_build_defaults_alter() for node entities. - */ -function node_test_node_build_defaults_alter(array &$build, NodeInterface &$node, $view_mode = 'full') { - if ($view_mode == 'rss') { - $node->rss_namespaces['xmlns:test'] = 'http://example.com/test-namespace'; - } -} - -/** - * Implements hook_node_grants(). - */ -function node_test_node_grants(AccountInterface $account, $operation) { - // Give everyone full grants so we don't break other node tests. - // Our node access tests asserts three realms of access. - // See testGrantAlter(). - return [ - 'test_article_realm' => [1], - 'test_page_realm' => [1], - 'test_alter_realm' => [2], - ]; -} - -/** - * Implements hook_node_access_records(). - */ -function node_test_node_access_records(NodeInterface $node) { - // Return nothing when testing for empty responses. - if (!empty($node->disable_node_access)) { - return; - } - $grants = []; - if ($node->getType() == 'article') { - // Create grant in arbitrary article_realm for article nodes. - $grants[] = [ - 'realm' => 'test_article_realm', - 'gid' => 1, - 'grant_view' => 1, - 'grant_update' => 0, - 'grant_delete' => 0, - ]; - } - elseif ($node->getType() == 'page') { - // Create grant in arbitrary page_realm for page nodes. - $grants[] = [ - 'realm' => 'test_page_realm', - 'gid' => 1, - 'grant_view' => 1, - 'grant_update' => 0, - 'grant_delete' => 0, - ]; - } - return $grants; -} - -/** - * Implements hook_node_access_records_alter(). - */ -function node_test_node_access_records_alter(&$grants, NodeInterface $node) { - if (!empty($grants)) { - foreach ($grants as $key => $grant) { - // Alter grant from test_page_realm to test_alter_realm and modify the gid. - if ($grant['realm'] == 'test_page_realm' && $node->isPromoted()) { - $grants[$key]['realm'] = 'test_alter_realm'; - $grants[$key]['gid'] = 2; - } - } - } -} - -/** - * Implements hook_node_grants_alter(). - */ -function node_test_node_grants_alter(&$grants, AccountInterface $account, $operation) { - // Return an empty array of grants to prove that we can alter by reference. - $grants = []; -} - -/** - * Implements hook_ENTITY_TYPE_presave() for node entities. - */ -function node_test_node_presave(NodeInterface $node) { - if ($node->getTitle() == 'testing_node_presave') { - // Sun, 19 Nov 1978 05:00:00 GMT - $node->setCreatedTime(280299600); - // Drupal 1.0 release. - $node->changed = 979534800; - } - // Determine changes. - if (!empty($node->original) && $node->original->getTitle() == 'test_changes') { - if ($node->original->getTitle() != $node->getTitle()) { - $node->title->value .= '_presave'; - } - } -} - -/** - * Implements hook_ENTITY_TYPE_update() for node entities. - */ -function node_test_node_update(NodeInterface $node) { - // Determine changes on update. - if (!empty($node->original) && $node->original->getTitle() == 'test_changes') { - if ($node->original->getTitle() != $node->getTitle()) { - $node->title->value .= '_update'; - } - } -} - -/** - * Implements hook_entity_view_mode_alter(). - */ -function node_test_entity_view_mode_alter(&$view_mode, EntityInterface $entity) { - // Only alter the view mode if we are on the test callback. - $change_view_mode = \Drupal::state()->get('node_test_change_view_mode', ''); - if ($change_view_mode) { - $view_mode = $change_view_mode; - } -} - -/** - * Implements hook_ENTITY_TYPE_insert() for node entities. - * - * This tests saving a node on node insert. - * - * @see \Drupal\node\Tests\NodeSaveTest::testNodeSaveOnInsert() - */ -function node_test_node_insert(NodeInterface $node) { - // Set the node title to the node ID and save. - if ($node->getTitle() == 'new') { - $node->setTitle('Node ' . $node->id()); - $node->setNewRevision(FALSE); - $node->save(); - } -} - -/** - * Implements hook_form_alter(). - */ -function node_test_form_alter(&$form, FormStateInterface $form_state, $form_id) { - if (!$form_state->get('node_test_form_alter')) { - \Drupal::messenger()->addStatus('Storage is not set'); - $form_state->set('node_test_form_alter', TRUE); - } - else { - \Drupal::messenger()->addStatus('Storage is set'); - } -} diff --git a/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php b/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4d5a09f5952dbb8c6d3d34a629221e31b21d7127 --- /dev/null +++ b/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php @@ -0,0 +1,207 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\node\NodeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_test. + */ +class NodeTestHooks { + + /** + * Implements hook_ENTITY_TYPE_view() for node entities. + */ + #[Hook('node_view')] + public function nodeView(array &$build, NodeInterface $node, EntityViewDisplayInterface $display, $view_mode) { + if ($node->isNew()) { + return; + } + if ($view_mode == 'rss') { + // Add RSS elements and namespaces when building the RSS feed. + $node->rss_elements[] = [ + 'key' => 'testElement', + 'value' => t('Value of testElement RSS element for node @nid.', [ + '@nid' => $node->id(), + ]), + ]; + // Add content that should be displayed only in the RSS feed. + $build['extra_feed_content'] = [ + '#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node @nid.', [ + '@nid' => $node->id(), + ]) . '</p>', + '#weight' => 10, + ]; + } + if ($view_mode != 'rss') { + // Add content that should NOT be displayed in the RSS feed. + $build['extra_non_feed_content'] = [ + '#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node @nid.', [ + '@nid' => $node->id(), + ]) . '</p>', + ]; + } + } + + /** + * Implements hook_ENTITY_TYPE_build_defaults_alter() for node entities. + */ + #[Hook('node_build_defaults_alter')] + public function nodeBuildDefaultsAlter(array &$build, NodeInterface &$node, $view_mode = 'full') { + if ($view_mode == 'rss') { + $node->rss_namespaces['xmlns:test'] = 'http://example.com/test-namespace'; + } + } + + /** + * Implements hook_node_grants(). + */ + #[Hook('node_grants')] + public function nodeGrants(AccountInterface $account, $operation) { + // Give everyone full grants so we don't break other node tests. + // Our node access tests asserts three realms of access. + // See testGrantAlter(). + return ['test_article_realm' => [1], 'test_page_realm' => [1], 'test_alter_realm' => [2]]; + } + + /** + * Implements hook_node_access_records(). + */ + #[Hook('node_access_records')] + public function nodeAccessRecords(NodeInterface $node) { + // Return nothing when testing for empty responses. + if (!empty($node->disable_node_access)) { + return; + } + $grants = []; + if ($node->getType() == 'article') { + // Create grant in arbitrary article_realm for article nodes. + $grants[] = [ + 'realm' => 'test_article_realm', + 'gid' => 1, + 'grant_view' => 1, + 'grant_update' => 0, + 'grant_delete' => 0, + ]; + } + elseif ($node->getType() == 'page') { + // Create grant in arbitrary page_realm for page nodes. + $grants[] = [ + 'realm' => 'test_page_realm', + 'gid' => 1, + 'grant_view' => 1, + 'grant_update' => 0, + 'grant_delete' => 0, + ]; + } + return $grants; + } + + /** + * Implements hook_node_access_records_alter(). + */ + #[Hook('node_access_records_alter')] + public function nodeAccessRecordsAlter(&$grants, NodeInterface $node) { + if (!empty($grants)) { + foreach ($grants as $key => $grant) { + // Alter grant from test_page_realm to test_alter_realm and modify the gid. + if ($grant['realm'] == 'test_page_realm' && $node->isPromoted()) { + $grants[$key]['realm'] = 'test_alter_realm'; + $grants[$key]['gid'] = 2; + } + } + } + } + + /** + * Implements hook_node_grants_alter(). + */ + #[Hook('node_grants_alter')] + public function nodeGrantsAlter(&$grants, AccountInterface $account, $operation) { + // Return an empty array of grants to prove that we can alter by reference. + $grants = []; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for node entities. + */ + #[Hook('node_presave')] + public function nodePresave(NodeInterface $node) { + if ($node->getTitle() == 'testing_node_presave') { + // Sun, 19 Nov 1978 05:00:00 GMT + $node->setCreatedTime(280299600); + // Drupal 1.0 release. + $node->changed = 979534800; + } + // Determine changes. + if (!empty($node->original) && $node->original->getTitle() == 'test_changes') { + if ($node->original->getTitle() != $node->getTitle()) { + $node->title->value .= '_presave'; + } + } + } + + /** + * Implements hook_ENTITY_TYPE_update() for node entities. + */ + #[Hook('node_update')] + public function nodeUpdate(NodeInterface $node) { + // Determine changes on update. + if (!empty($node->original) && $node->original->getTitle() == 'test_changes') { + if ($node->original->getTitle() != $node->getTitle()) { + $node->title->value .= '_update'; + } + } + } + + /** + * Implements hook_entity_view_mode_alter(). + */ + #[Hook('entity_view_mode_alter')] + public function entityViewModeAlter(&$view_mode, EntityInterface $entity) { + // Only alter the view mode if we are on the test callback. + $change_view_mode = \Drupal::state()->get('node_test_change_view_mode', ''); + if ($change_view_mode) { + $view_mode = $change_view_mode; + } + } + + /** + * Implements hook_ENTITY_TYPE_insert() for node entities. + * + * This tests saving a node on node insert. + * + * @see \Drupal\node\Tests\NodeSaveTest::testNodeSaveOnInsert() + */ + #[Hook('node_insert')] + public function nodeInsert(NodeInterface $node) { + // Set the node title to the node ID and save. + if ($node->getTitle() == 'new') { + $node->setTitle('Node ' . $node->id()); + $node->setNewRevision(FALSE); + $node->save(); + } + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + if (!$form_state->get('node_test_form_alter')) { + \Drupal::messenger()->addStatus('Storage is not set'); + $form_state->set('node_test_form_alter', TRUE); + } + else { + \Drupal::messenger()->addStatus('Storage is set'); + } + } + +} diff --git a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module deleted file mode 100644 index 70858cbecc8bb894f70d8482e001ee2ef6bccfa9..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * A module implementing node related hooks to test API interaction. - */ - -declare(strict_types=1); - -use Drupal\node\NodeInterface; - -/** - * Implements hook_ENTITY_TYPE_insert() for node entities. - */ -function node_test_exception_node_insert(NodeInterface $node) { - if ($node->getTitle() == 'testing_transaction_exception') { - throw new Exception('Test exception for rollback.'); - } -} diff --git a/core/modules/node/tests/modules/node_test_exception/src/Hook/NodeTestExceptionHooks.php b/core/modules/node/tests/modules/node_test_exception/src/Hook/NodeTestExceptionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..067a965bd2f4fd86016c625e6f27e4af65813c6b --- /dev/null +++ b/core/modules/node/tests/modules/node_test_exception/src/Hook/NodeTestExceptionHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_test_exception\Hook; + +use Drupal\node\NodeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_test_exception. + */ +class NodeTestExceptionHooks { + + /** + * Implements hook_ENTITY_TYPE_insert() for node entities. + */ + #[Hook('node_insert')] + public function nodeInsert(NodeInterface $node) { + if ($node->getTitle() == 'testing_transaction_exception') { + throw new \Exception('Test exception for rollback.'); + } + } + +} diff --git a/core/modules/node/tests/modules/node_test_views/node_test_views.views.inc b/core/modules/node/tests/modules/node_test_views/node_test_views.views.inc deleted file mode 100644 index 0b9af74182528ca8124d7325b7b87b61b993b1b3..0000000000000000000000000000000000000000 --- a/core/modules/node/tests/modules/node_test_views/node_test_views.views.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Provides views data and hooks for node_test_views module. - */ - -declare(strict_types=1); - -/** - * Implements hook_views_data_alter(). - */ -function node_test_views_views_data_alter(array &$data) { - // Make node language use the basic field handler if requested. - if (\Drupal::state()->get('node_test_views.use_basic_handler')) { - $data['node_field_data']['langcode']['field']['id'] = 'language'; - } -} diff --git a/core/modules/node/tests/modules/node_test_views/src/Hook/NodeTestViewsViewsHooks.php b/core/modules/node/tests/modules/node_test_views/src/Hook/NodeTestViewsViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f01907303cbf751df889780cb42b20b6adaf7f24 --- /dev/null +++ b/core/modules/node/tests/modules/node_test_views/src/Hook/NodeTestViewsViewsHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\node_test_views\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for node_test_views. + */ +class NodeTestViewsViewsHooks { + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(array &$data) { + // Make node language use the basic field handler if requested. + if (\Drupal::state()->get('node_test_views.use_basic_handler')) { + $data['node_field_data']['langcode']['field']['id'] = 'language'; + } + } + +} diff --git a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php index 4266eb94139ea4007397609b96971e4842f3fb61..933a328f8d920e47757f3a137a27d966113f2e20 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php @@ -120,10 +120,10 @@ public function testNodeAccessLanguageFallback(): void { * @param int $count * The number of rows expected by the query (equal to the translation * count). - * @param $langcode + * @param string $langcode * The expected language code set as the fallback property. */ - public function checkRecords($count, $langcode = 'hu') { + public function checkRecords($count, $langcode = 'hu'): void { $select = \Drupal::database() ->select('node_access', 'na') ->fields('na', ['nid', 'fallback', 'langcode', 'grant_view']) diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php index 89be2bcf0708ab57c2e0c06ad54a61a893014b25..e43e0adf05a6f8e599148a29bd52c6104f6b6869 100644 --- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php +++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php @@ -266,7 +266,7 @@ public function testNodeMetaInformation(): void { * @param string $form_element_name * The name of the form element to populate. */ - protected function checkVariousAuthoredByValues(NodeInterface $node, $form_element_name) { + protected function checkVariousAuthoredByValues(NodeInterface $node, $form_element_name): void { // Try to change the 'authored by' field to an invalid user name. $edit = [ $form_element_name => 'invalid-name', diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php index dcd52e7ff0c6b82ecc1b66be2c35d7f8b859cfbc..f4059ceb87488bcd1faf18b2a340a5f1ed286efe 100644 --- a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php +++ b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php @@ -467,10 +467,10 @@ public function testRevisionTranslationRevert(): void { * * @param \Drupal\node\NodeInterface $node * The node object. - * @param $count + * @param int $count * The number of revisions to be created. */ - protected function createRevisions(NodeInterface $node, $count) { + protected function createRevisions(NodeInterface $node, $count): void { for ($i = 0; $i < $count; $i++) { $node->title = $this->randomString(); $node->untranslatable_string_field->value = $this->randomString(); diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php index d6397034aff0db0e5dee13a4233d396516ec6155..26b0a6fce74388e389085488a1dc3f7c7302dfde 100644 --- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php +++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php @@ -157,7 +157,7 @@ protected function getNewEntityValues($langcode) { /** * {@inheritdoc} */ - protected function doTestPublishedStatus() { + protected function doTestPublishedStatus(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); @@ -195,7 +195,7 @@ protected function doTestPublishedStatus() { /** * {@inheritdoc} */ - protected function doTestAuthoringInfo() { + protected function doTestAuthoringInfo(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); @@ -401,7 +401,7 @@ public function testTranslationRendering(): void { * @param array $values * The translation values to be found. */ - protected function doTestTranslations($path, array $values) { + protected function doTestTranslations($path, array $values): void { $languages = $this->container->get('language_manager')->getLanguages(); foreach ($this->langcodes as $langcode) { $this->drupalGet($path, ['language' => $languages[$langcode]]); @@ -415,7 +415,7 @@ protected function doTestTranslations($path, array $values) { * @param \Drupal\node\Entity\Node $node * The node to be tested. */ - protected function doTestAlternateHreflangLinks(Node $node) { + protected function doTestAlternateHreflangLinks(Node $node): void { $url = $node->toUrl(); $languages = $this->container->get('language_manager')->getLanguages(); $url->setAbsolute(); @@ -467,7 +467,7 @@ protected function getFormSubmitSuffix(EntityInterface $entity, $langcode): stri /** * Tests uninstalling content_translation. */ - protected function doUninstallTest() { + protected function doUninstallTest(): void { // Delete all the nodes so there is no data. $nodes = Node::loadMultiple(); foreach ($nodes as $node) { @@ -482,7 +482,7 @@ protected function doUninstallTest() { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php index be857bbb86deb6de233a0c989eb2ca86af7a18af..653d34a37d440572477597741a61a3ee90d3eb68 100644 --- a/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php +++ b/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php @@ -41,7 +41,7 @@ class NodeJsonBasicAuthTest extends NodeResourceTestBase { /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { parent::setUpAuthorization($method); $this->grantPermissionsToTestedRole(['view camelids revisions']); } diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php index a03c34b732acaf8f2a7bd58dc6801f9ffc6e1315..d6e58a950d4e092668090ecf5042313daae3fa80 100644 --- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php +++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php @@ -222,7 +222,7 @@ public function testCacheTagsWithCachePluginTime(): void { * @param bool $do_assert_views_caches * Whether to check Views' result & output caches. */ - protected function doTestFrontPageViewCacheTags($do_assert_views_caches) { + protected function doTestFrontPageViewCacheTags($do_assert_views_caches): void { $view = Views::getView('frontpage'); $view->setDisplay('page_1'); diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php index b423169c23cf67dfcf7696c0079297d0b8ce04aa..90dcb8c92a4a1361fbee4b0cec3c36cec22d9565 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php @@ -1048,7 +1048,7 @@ protected function expectedNodeFieldRevisionTable(): array { */ protected function expectedRevisionEntityData(): array { return [ - $revision_data = [ + [ // Node 1, revision 1, und. 0 => [ diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php index ee3c3571327bd19986e840cfa24f913be50d4572..2e28e7d376bc349f8b84b6fcdec0b936fefdfff3 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php @@ -12,6 +12,9 @@ */ class MigrateNodeSettingPromoteTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'text', 'menu_ui']; /** diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php index d96f6b4f0c9f9feb511f26ec05bc63e35b8421da..4e9419b0738d44e6bb5fa91b452142519b1477a0 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php @@ -12,6 +12,9 @@ */ class MigrateNodeSettingStatusTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'text', 'menu_ui']; /** diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php index 5e017b2be18272c039ec97ef912a1851d1a20911..bfc2912b85944caefc30a8aeb26cdae3b3d9d58e 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php @@ -12,6 +12,9 @@ */ class MigrateNodeSettingStickyTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'text', 'menu_ui']; /** diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php index 463371ccff48907fac96fb4899e3171aa809b384..304747081ad89ef1399ba50a37e1ffaefa7aa601 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php @@ -1006,7 +1006,7 @@ protected function expectedNodeFieldRevisionTable(): array { */ protected function expectedRevisionEntityData(): array { return [ - $revision_data = [ + [ // Node 1, revision 1, en. 0 => [ diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php index e1a2069d7065d700c0a66170a9986c976b42958b..67156fbbfe0be94f0f8fdaf39e034815d4f35072 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php @@ -14,6 +14,9 @@ */ class MigrateNodeTitleLabelTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'text', 'menu_ui']; /** diff --git a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php index c2375cccdd5c0b90e6412bc8940451dab87d4ae7..153c28cb3dd2b856b0fe1dd780de7e8a864f54b2 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php @@ -88,7 +88,7 @@ public function testNodeAccessRecords(): void { // Create a user that is allowed to access content. $web_user = $this->drupalCreateUser(['access content']); foreach ($operations as $op) { - $grants = node_test_node_grants($web_user, $op); + $grants = \Drupal::moduleHandler()->invoke('node', 'node_grants', [$web_user, $op]); $altered_grants = $grants; \Drupal::moduleHandler()->alter('node_grants', $altered_grants, $web_user, $op); $this->assertNotEquals($grants, $altered_grants, "Altered the $op grant for a user."); diff --git a/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php b/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php index d68e83c997616e44bc904b7318492c3f9c952914..88aa829efe7dd4b3039365bdc6463350a2ad211a 100644 --- a/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php +++ b/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php @@ -96,7 +96,7 @@ public function testNodeMultipleLoadCaseSensitiveFalse(): void { 'field_first' => '1234', 'field_second' => 'test_value_1', ]); - $node2 = $this->drupalCreateNode([ + $this->drupalCreateNode([ 'type' => 'page', 'field_first' => '1234', 'field_second' => 'test_value_2', @@ -106,7 +106,7 @@ public function testNodeMultipleLoadCaseSensitiveFalse(): void { 'field_first' => '5678', 'field_second' => 'test_value_1', ]); - $node4 = $this->drupalCreateNode([ + $this->drupalCreateNode([ 'type' => 'page', 'field_first' => '5678', 'field_second' => 'test_value_2', diff --git a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php index 47aae6eaa94cd2721da8d93d634554bc56b46436..8b16298c0a1279799bfa762f35f4709b4877a215 100644 --- a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php +++ b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php @@ -57,6 +57,7 @@ public function testNodeTokenReplacement(): void { // Generate and test tokens. $tests = []; $tests['[node:nid]'] = $node->id(); + $tests['[node:uuid]'] = $node->uuid(); $tests['[node:vid]'] = $node->getRevisionId(); $tests['[node:type]'] = 'article'; $tests['[node:type-name]'] = 'Article'; @@ -79,6 +80,7 @@ public function testNodeTokenReplacement(): void { $metadata_tests = []; $metadata_tests['[node:nid]'] = $base_bubbleable_metadata; + $metadata_tests['[node:uuid]'] = $base_bubbleable_metadata; $metadata_tests['[node:vid]'] = $base_bubbleable_metadata; $metadata_tests['[node:type]'] = $base_bubbleable_metadata; $metadata_tests['[node:type-name]'] = $base_bubbleable_metadata; diff --git a/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php b/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php index 3be3da3e2dcf2cd821f17ac6b33d43792bd9c17c..c93ec745fdbfcb4fb793de634891d11c748862c7 100644 --- a/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php +++ b/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php @@ -47,7 +47,6 @@ public function testNodeRevisionRelationship(): void { NodeType::create(['type' => 'page', 'name' => 'page'])->save(); $node = Node::create(['type' => 'page', 'title' => 'test1', 'uid' => 1]); $node->save(); - $first_revision_id = $node->getRevisionId(); $node->setNewRevision(); $node->setTitle('test2'); $node->save(); diff --git a/core/modules/options/options.module b/core/modules/options/options.module index c1077d66382a342669a26d0d4e46e8707b9353b1..7c648a5c8e4c6c162570e161fef871539a688a5b 100644 --- a/core/modules/options/options.module +++ b/core/modules/options/options.module @@ -2,51 +2,10 @@ /** * @file - * Defines selection, check box and radio button widgets for text and numeric fields. */ -use Drupal\Core\Url; use Drupal\Core\Entity\FieldableEntityInterface; -use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\Core\Field\FieldStorageDefinitionInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_help(). - */ -function options_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.options': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Options module allows you to create fields where data values are selected from a fixed list of options. Usually these items are entered through a select list, checkboxes, or radio buttons. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":options_do">online documentation for the Options module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':options_do' => 'https://www.drupal.org/documentation/modules/options']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying list fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the list fields can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Defining option keys and labels') . '</dt>'; - $output .= '<dd>' . t('When you define the list options you can define a key and a label for each option in the list. The label will be shown to the users while the key gets stored in the database.') . '</dd>'; - $output .= '<dt>' . t('Choosing list field type') . '</dt>'; - $output .= '<dd>' . t('There are three types of list fields, which store different types of data: <em>float</em>, <em>integer</em> or, <em>text</em>. The <em>float</em> type allows storing approximate decimal values. The <em>integer</em> type allows storing whole numbers, such as years (for example, 2012) or values (for example, 1, 2, 5, 305). The <em>text</em> list field type allows storing text values. No matter which type of list field you choose, you can define whatever labels you wish for data entry.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. - */ -function options_field_storage_config_update(FieldStorageConfigInterface $field_storage) { - drupal_static_reset('options_allowed_values'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'field_storage_config'. - */ -function options_field_storage_config_delete(FieldStorageConfigInterface $field_storage) { - drupal_static_reset('options_allowed_values'); -} /** * Returns the array of allowed values for a list field. @@ -103,21 +62,6 @@ function options_allowed_values(FieldStorageDefinitionInterface $definition, ?Fi return $allowed_values[$cache_id]; } -/** - * Implements hook_field_storage_config_update_forbid(). - */ -function options_field_storage_config_update_forbid(FieldStorageConfigInterface $field_storage, FieldStorageConfigInterface $prior_field_storage) { - if ($field_storage->getTypeProvider() == 'options' && $field_storage->hasData()) { - // Forbid any update that removes allowed values with actual data. - $allowed_values = $field_storage->getSetting('allowed_values'); - $prior_allowed_values = $prior_field_storage->getSetting('allowed_values'); - $lost_keys = array_keys(array_diff_key($prior_allowed_values, $allowed_values)); - if (_options_values_in_use($field_storage->getTargetEntityTypeId(), $field_storage->getName(), $lost_keys)) { - throw new FieldStorageDefinitionUpdateForbiddenException("A list field '{$field_storage->getName()}' with existing data cannot have its keys changed."); - } - } -} - /** * Checks if a list of values are being used in actual field values. */ diff --git a/core/modules/options/options.views.inc b/core/modules/options/options.views.inc deleted file mode 100644 index 28ece79e88f9dfe6afcf76fc6a5c986a3320b734..0000000000000000000000000000000000000000 --- a/core/modules/options/options.views.inc +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @file - * Provide Views data for options.module. - * - * @ingroup views_module_handlers - */ - -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_field_views_data(). - * - * Views integration for list fields. Have a different filter handler and - * argument handlers for list fields. This should allow to select values of - * the list. - */ -function options_field_views_data(FieldStorageConfigInterface $field) { - $data = views_field_default_views_data($field); - - foreach ($data as $table_name => $table_data) { - foreach ($table_data as $field_name => $field_data) { - if (isset($field_data['filter']) && $field_name != 'delta') { - $data[$table_name][$field_name]['filter']['id'] = 'list_field'; - } - if (isset($field_data['argument']) && $field_name != 'delta') { - if ($field->getType() == 'list_string') { - $data[$table_name][$field_name]['argument']['id'] = 'string_list_field'; - } - else { - $data[$table_name][$field_name]['argument']['id'] = 'number_list_field'; - } - } - } - } - - return $data; -} diff --git a/core/modules/options/src/Hook/OptionsHooks.php b/core/modules/options/src/Hook/OptionsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9134b4532f2f659ce303829626bfbf63be18ed5b --- /dev/null +++ b/core/modules/options/src/Hook/OptionsHooks.php @@ -0,0 +1,83 @@ +<?php + +namespace Drupal\options\Hook; + +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for options. + */ +class OptionsHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.options': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Options module allows you to create fields where data values are selected from a fixed list of options. Usually these items are entered through a select list, checkboxes, or radio buttons. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":options_do">online documentation for the Options module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':options_do' => 'https://www.drupal.org/documentation/modules/options', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying list fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the list fields can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Defining option keys and labels') . '</dt>'; + $output .= '<dd>' . t('When you define the list options you can define a key and a label for each option in the list. The label will be shown to the users while the key gets stored in the database.') . '</dd>'; + $output .= '<dt>' . t('Choosing list field type') . '</dt>'; + $output .= '<dd>' . t('There are three types of list fields, which store different types of data: <em>float</em>, <em>integer</em> or, <em>text</em>. The <em>float</em> type allows storing approximate decimal values. The <em>integer</em> type allows storing whole numbers, such as years (for example, 2012) or values (for example, 1, 2, 5, 305). The <em>text</em> list field type allows storing text values. No matter which type of list field you choose, you can define whatever labels you wish for data entry.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_storage_config'. + */ + #[Hook('field_storage_config_update')] + public function fieldStorageConfigUpdate(FieldStorageConfigInterface $field_storage) { + drupal_static_reset('options_allowed_values'); + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'field_storage_config'. + */ + #[Hook('field_storage_config_delete')] + public function fieldStorageConfigDelete(FieldStorageConfigInterface $field_storage) { + drupal_static_reset('options_allowed_values'); + } + + /** + * Implements hook_field_storage_config_update_forbid(). + */ + #[Hook('field_storage_config_update_forbid')] + public function fieldStorageConfigUpdateForbid(FieldStorageConfigInterface $field_storage, FieldStorageConfigInterface $prior_field_storage) { + if ($field_storage->getTypeProvider() == 'options' && $field_storage->hasData()) { + // Forbid any update that removes allowed values with actual data. + $allowed_values = $field_storage->getSetting('allowed_values'); + $prior_allowed_values = $prior_field_storage->getSetting('allowed_values'); + $lost_keys = array_keys(array_diff_key($prior_allowed_values, $allowed_values)); + if (_options_values_in_use($field_storage->getTargetEntityTypeId(), $field_storage->getName(), $lost_keys)) { + throw new FieldStorageDefinitionUpdateForbiddenException("A list field '{$field_storage->getName()}' with existing data cannot have its keys changed."); + } + } + } + +} diff --git a/core/modules/options/src/Hook/OptionsViewsHooks.php b/core/modules/options/src/Hook/OptionsViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6165bccc17e6ba19f7fe1a4cad5ac1aa9535eb91 --- /dev/null +++ b/core/modules/options/src/Hook/OptionsViewsHooks.php @@ -0,0 +1,41 @@ +<?php + +namespace Drupal\options\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for options. + */ +class OptionsViewsHooks { + + /** + * Implements hook_field_views_data(). + * + * Views integration for list fields. Have a different filter handler and + * argument handlers for list fields. This should allow to select values of + * the list. + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field) { + $data = views_field_default_views_data($field); + foreach ($data as $table_name => $table_data) { + foreach ($table_data as $field_name => $field_data) { + if (isset($field_data['filter']) && $field_name != 'delta') { + $data[$table_name][$field_name]['filter']['id'] = 'list_field'; + } + if (isset($field_data['argument']) && $field_name != 'delta') { + if ($field->getType() == 'list_string') { + $data[$table_name][$field_name]['argument']['id'] = 'string_list_field'; + } + else { + $data[$table_name][$field_name]['argument']['id'] = 'number_list_field'; + } + } + } + } + return $data; + } + +} diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php index 46af4ccd42cdcb71f23573661bf60a353e603bc0..47f1705481b1272b60a6a90848eb330f964386b0 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php @@ -339,7 +339,7 @@ abstract protected function allowedValuesDescription(); * @param $element * An associative array containing the properties and children of the * generic form element. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form for the form this element belongs to. * * @see \Drupal\Core\Render\Element\FormElementBase::processPattern() diff --git a/core/modules/options/tests/options_test/options_test.module b/core/modules/options/tests/options_test/options_test.module index 63e47ea87b66a13debee4539cd5bf57fdc7e327e..6138d62f005dea0978b85afc676c314dbd07f7fa 100644 --- a/core/modules/options/tests/options_test/options_test.module +++ b/core/modules/options/tests/options_test/options_test.module @@ -9,7 +9,6 @@ use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; -use Drupal\Core\Form\FormStateInterface; /** * Implements callback_allowed_values_function(). @@ -57,27 +56,3 @@ function options_test_dynamic_values_callback(FieldStorageDefinitionInterface $d // We need the values of the entity as keys. return array_combine($values, $values); } - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function options_test_form_entity_test_entity_test_form_alter(&$form, FormStateInterface $form_state, $form_id) { - if (\Drupal::state()->get('options_test.form_alter_enable', FALSE)) { - $form['card_1']['widget']['#required_error'] = t('This is custom message for required field.'); - } -} - -/** - * Implements hook_options_list_alter(). - */ -function options_test_options_list_alter(array &$options, array $context) { - if ($context['fieldDefinition']->getName() === 'card_4' && $context['widget']->getPluginId() === 'options_select') { - // Rename _none option. - $options['_none'] = '- Select something -'; - } - - if ($context['fieldDefinition']->getName() === 'card_4' && $context['entity']->bundle() === 'entity_test') { - // Remove 0 option. - unset($options[0]); - } -} diff --git a/core/modules/options/tests/options_test/src/Hook/OptionsTestHooks.php b/core/modules/options/tests/options_test/src/Hook/OptionsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9ffb20169f09cad248f29233c22aa789bfaf2915 --- /dev/null +++ b/core/modules/options/tests/options_test/src/Hook/OptionsTestHooks.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\options_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for options_test. + */ +class OptionsTestHooks { + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_entity_test_entity_test_form_alter')] + public function formEntityTestEntityTestFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + if (\Drupal::state()->get('options_test.form_alter_enable', FALSE)) { + $form['card_1']['widget']['#required_error'] = t('This is custom message for required field.'); + } + } + + /** + * Implements hook_options_list_alter(). + */ + #[Hook('options_list_alter')] + public function optionsListAlter(array &$options, array $context) { + if ($context['fieldDefinition']->getName() === 'card_4' && $context['widget']->getPluginId() === 'options_select') { + // Rename _none option. + $options['_none'] = '- Select something -'; + } + if ($context['fieldDefinition']->getName() === 'card_4' && $context['entity']->bundle() === 'entity_test') { + // Remove 0 option. + unset($options[0]); + } + } + +} diff --git a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php index 56a77d52c17cd32155fd2bf7af47ed2c463e2f44..55fce45025e2f6bf0b339ef73deb37b88dd1cbf3 100644 --- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php +++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php @@ -334,7 +334,7 @@ public function testOptionsAllowedValuesText(): void { * @param string $type * One of 'list_integer', 'list_float' or 'list_string'. */ - protected function createOptionsField($type) { + protected function createOptionsField($type): void { // Create a field. FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php index 09dde33f9bc3a0e1b48215723d60513f7232b144..d1facffccd6a81e2b09bdc60ddda4bef4fe3532d 100644 --- a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php +++ b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php @@ -127,7 +127,7 @@ public function testDefaultValueOptions(): void { * @param string $type * One of 'list_integer', 'list_float' or 'list_string'. */ - protected function createOptionsField($type) { + protected function createOptionsField($type): void { // Create a field. FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/package_manager/config/install/package_manager.settings.yml b/core/modules/package_manager/config/install/package_manager.settings.yml new file mode 100644 index 0000000000000000000000000000000000000000..edd2c6ed40a9b610d4a3b36571373880e5e67d48 --- /dev/null +++ b/core/modules/package_manager/config/install/package_manager.settings.yml @@ -0,0 +1,5 @@ +executables: + composer: ~ + rsync: ~ +additional_trusted_composer_plugins: [] +include_unknown_files_in_project_root: false diff --git a/core/modules/package_manager/config/schema/package_manager.schema.yml b/core/modules/package_manager/config/schema/package_manager.schema.yml new file mode 100644 index 0000000000000000000000000000000000000000..e048fd67a7387376c1f7210ac0f1f92fe6d866f8 --- /dev/null +++ b/core/modules/package_manager/config/schema/package_manager.schema.yml @@ -0,0 +1,33 @@ +package_name: + type: string + label: 'Package name' + constraints: + Regex: + # @see https://getcomposer.org/schema.json + pattern: '/^[a-z0-9]([_.-]?[a-z0-9]+)*\/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$/' + +package_manager.settings: + type: config_object + label: 'Package Manager settings' + mapping: + executables: + type: sequence + label: 'Absolute paths to required executables, or NULL to rely on PATH' + sequence: + type: string + label: 'Absolute path to executable, or NULL' + additional_trusted_composer_plugins: + type: sequence + label: 'Additional trusted composer plugins' + sequence: + type: package_name + label: 'Trusted composer plugin' + include_unknown_files_in_project_root: + type: boolean + label: 'Include unrecognized files and directories in the project root in staging operations' + log: + type: string + label: 'Path of a file to which Composer Stager process output should be logged' + constraints: + NotBlank: [] + requiredKey: false diff --git a/core/modules/package_manager/package_manager.api.php b/core/modules/package_manager/package_manager.api.php new file mode 100644 index 0000000000000000000000000000000000000000..28083ca7f7a419a75cc263dee39f65367ace300b --- /dev/null +++ b/core/modules/package_manager/package_manager.api.php @@ -0,0 +1,292 @@ +<?php + +/** + * @file + * Documentation related to Package Manager. + */ + +/** + * @defgroup package_manager_architecture Package Manager architecture + * @{ + * + * @section sec_overview Overview + * Package Manager is an API-only module which provides the scaffolding and + * functionality needed for Drupal to make changes to its own running code base + * via Composer. It doesn't have a user interface. + * + * @see https://getcomposer.org/ + * @see https://github.com/php-tuf/composer-stager + * + * @section sec_concepts Concepts + * At the center of Package Manager is the concept of a stage directory. A + * stage directory is a complete copy of the active Drupal code base, created + * in a temporary directory that isn't accessible over the web. The stage + * directory doesn't have any site-specific assets like settings.php, uploaded + * files, or SQLite databases. + * + * Only one stage directory can exist at any given time, and it is "owned" by + * the user or session that originally created it. Only the owner can perform + * operations on the stage directory, and only using the same class (i.e., + * \Drupal\package_manager\StageBase or a subclass) they used to create it. + * + * Package Manager can run Composer commands in the stage directory to require + * or update packages in it, and then copy those changes back into the live, + * running code base (which is referred to as the "active directory"). The + * stage directory can then be safely deleted. Four distinct operations: + * create, require, apply, and destroy. They comprise the "stage life cycle." + * + * Package Manager's \Drupal\package_manager\StageBase controls the stage life + * cycle and is an abstract class that must be subclassed. Most of the time, + * there should be little need to heavily customize a StageBase subclass; + * custom code should generally use the event system to interact with the stage. + * + * @see sec_stage_events Stage API: Events + * Events are dispatched before and after each operation in the stage life + * cycle. There are two types of events: pre-operation and post-operation. + * Pre-operation event subscribers can analyze the state of the stage directory, + * or the system at large, and flag errors if they detect any problems. If + * errors are flagged, the operation is prevented. Therefore, pre-operation + * events are helpful to ensure that the stage directory is in a valid state. + * Post-operation events are simple triggers allowing custom code to react when + * an operation is successfully completed. They cannot flag errors to block + * stage operations (although they can use the core messenger and logging + * systems as needed). + * + * All stage events extend \Drupal\package_manager\Event\StageEvent, and all + * pre-operation events extend + * \Drupal\package_manager\Event\PreOperationStageEvent. All events have a + * $stage property which allows access to the stage object itself. + * + * The stage dispatches the following events during its life cycle: + * + * - \Drupal\package_manager\Event\PreCreateEvent + * Dispatched before the stage directory is created. At this point, the + * stage will have recorded which user or session owns it, so another stage + * directory cannot be created until the current one is destroyed. If + * subscribers flag errors during this event, the stage will release its + * ownership. This is the earliest possible time to detect problems that might + * prevent the stage from completing its life cycle successfully. This event + * is dispatched only once during the stage life cycle. + * @see sec_stage_exceptions + * + * - \Drupal\package_manager\Event\PostCreateEvent + * Dispatched after the stage directory has been created, which means that the + * running Drupal code base has been copied into a separate, temporary + * location. This event is dispatched only once during the stage life cycle. + * + * - \Drupal\package_manager\Event\PreRequireEvent + * Dispatched before one or more Composer packages are required into the + * stage directory. This event may be dispatched multiple times during the + * stage life cycle, and receives a list of the packages which are about to + * be required into the stage directory. The list of packages CANNOT be + * altered by subscribers. + * + * - \Drupal\package_manager\Event\PostRequireEvent + * Dispatched after one or more Composer packages have been added to the + * stage directory. This event may be dispatched multiple times during the + * stage life cycle, and receives a list of the packages which were required + * into the stage directory. (Note that this is a list of packages which + * were specifically *asked for*, not the full list of packages and + * dependencies that was actually installed.) + * + * - \Drupal\package_manager\Event\PreApplyEvent + * Dispatched before changes in the stage directory (i.e., new and/or updated + * packages) are copied to the active directory. This is the final opportunity + * for event subscribers to flag errors before the active directory is + * modified, because once that has happened, the changes cannot be undone. + * This event may be dispatched multiple times during the stage life cycle. + * + * - \Drupal\package_manager\Event\PostApplyEvent + * Dispatched after changes in the stage directory have been copied to the + * active directory. It should only be used for cleaning up after other + * operations that happened during the stage life cycle. For example, a + * PostCreateEvent subscriber might have set a state value which is no longer + * needed once the stage has been applied to the active directory -- in such a + * case, a PostApplyEvent subscriber should delete that value. + * `drupal_flush_all_caches()` is called just before this event is dispatched, + * so subscribers shouldn't need to flush any caches or rebuild the service + * container. This event may be dispatched multiple times during the stage + * life cycle, and should *never* be used for schema changes (i.e., operations + * that should happen in `hook_update_N()` or a post-update function). + * + * @section sec_stage_api Stage API: Public methods + * The public API of any stage consists of the following methods: + * + * - \Drupal\package_manager\StageBase::create() + * Creates the stage directory, records ownership, and dispatches pre- and + * post-create events. Returns a unique token which calling code must use to + * verify stage ownership before performing operations on the stage + * directory in subsequent requests (when the stage directory is created, + * its ownership is automatically verified for the duration of the current + * request). See \Drupal\package_manager\StageBase::claim() for more + * information. + * + * - \Drupal\package_manager\StageBase::require() + * Adds and/or updates packages in the stage directory and dispatches pre- + * and post-require events. The stage must be claimed by its owner to call + * this method. + * + * - \Drupal\package_manager\StageBase::apply() + * Copies changes from the stage directory into the active directory, and + * dispatches the pre-apply event. The stage must be claimed by its owner to + * call this method. + * + * - \Drupal\package_manager\StageBase::postApply() + * Performs post-apply tasks after changes have been copied from the stage + * directory. This method should be called as soon as possible in a new + * request because the code on disk may no longer match what has been loaded + * into PHP's runtime memory. This method clears all Drupal caches, rebuilds + * the service container, and dispatches the post-apply event. The stage must + * be claimed by its owner to call this method. + * + * - \Drupal\package_manager\StageBase::destroy() + * Destroys the stage directory, and releases ownership. It is possible to + * destroy the stage without having claimed it first, but this shouldn't be + * done unless absolutely necessary. + * + * - \Drupal\package_manager\StageBase::stageDirectoryExists() + * Determines if the stage directory exists and returns a boolean accordingly. + * This allows validators to directly know if the stage directory exists + * without using \Drupal\package_manager\StageBase::getStageDirectory(), which + * throws an exception if the stage directory does not exist. + * + * - \Drupal\package_manager\StageBase::getStageDirectory() + * Returns the absolute path of the directory where changes should be staged. + * It throws an exception if the stage hasn't been created or claimed yet. + * + * - \Drupal\package_manager\StageBase::isApplying() + * Determines if the staged changes are being applied to the active directory. + * It will return FALSE if more than an hour has passed since the apply + * operation began. + * + * - \Drupal\package_manager\StageBase::isAvailable() + * Determines if a stage directory can be created. + * + * @section sec_stage_exceptions Stage life cycle exceptions + * If problems occur during any point of the stage life cycle, a + * \Drupal\package_manager\Exception\StageException is thrown. If problems are + * detected during one of the "pre" operations, a subclass of that is thrown: + * \Drupal\package_manager\Exception\StageEventException. This will contain + * \Drupal\package_manager\ValidationResult objects. + * + * Package Manager does not catch or handle these exceptions: they provide a + * framework for other modules to build user experiences for installing, + * updating, and removing packages. + * + * @section sec_validators_status_checks API: Validators and status checks + * Package Manager requires certain conditions in order to function properly. + * Event subscribers which check such conditions should ensure that they run + * before \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator, + * by using a priority higher than BaseRequirementsFulfilledValidator::PRIORITY. + * BaseRequirementsFulfilledValidator will stop event propagation if any errors + * have been flagged by the subscribers that ran before it. + * + * The following base requirements are checked by Package Manager: + * + * - Package Manager has not been explicitly disabled in the current + * environment. + * - The Composer executable is available. + * - The detected version of Composer is supported. + * - composer.json and composer.lock exist in the project root, and are valid + * according to the @code composer validate @endcode command. + * - The stage directory is not a subdirectory of the active directory. + * - There is enough free disk space to do stage operations. + * - The Drupal site root and vendor directory are writable. + * - The current site is not part of a multisite. + * - The project root and stage directory don't contain any unsupported links. + * See https://github.com/php-tuf/composer-stager/tree/develop/src/Domain/Service/Precondition#symlinks + * for information about which types of symlinks are supported. + * + * Apart from base requirements, Package Manager also enforces certain + * constraints at various points of the stage life cycle (typically + * \Drupal\package_manager\Event\PreCreateEvent and/or + * \Drupal\package_manager\Event\PreApplyEvent), to ensure that both the active + * directory and stage directory are kept in a safe, consistent state: + * + * - If the composer.lock file is changed (e.g., by installing or updating a + * package) in the active directory after a stage directory has been created, + * Package Manager will refuse to make any further changes to the stage + * directory or apply the staged changes to the active directory. + * - Composer plugins are able to perform arbitrary file system operations, and + * hence could perform actions that make it impossible for Package Manager to + * guarantee the Drupal site will continue to work correctly. For that reason, + * Package Manager will refuse to make any further changes if untrusted + * Composer plugins are installed or staged. If you know what you are doing, + * it is possible to trust additional Composer plugins by modifying + * package_manager.settings's "additional_trusted_composer_plugins" setting. + * - The Drupal site must not have any pending database updates (i.e., + * update.php needs to be run). + * - Composer must use HTTPS to download packages and metadata (i.e., Composer's + * secure-http configuration option must be enabled). This is the default + * behavior. + * + * Package Manager also assumes certain things that it does not explicitly + * enforce or check: + * + * - Only Composer operations should be performed on the stage directory. If + * other file operations were performed, any newly created files might not + * be copied back to the active site because of + * \Drupal\package_manager\PathExcluder\UnknownPathExcluder. + * + * Event subscribers which enforce these and other constraints are referred to + * as validators. + * + * \Drupal\package_manager\Event\StatusCheckEvent may be dispatched at any time + * to check the status of the Drupal site and whether Package Manager can + * function properly. Package Manager does NOT dispatch this event on its own + * because it doesn't have a UI; it is meant for modules that build on top of + * Package Manager to ensure they will work correctly before they try to do any + * stage operations, and present errors however they want in their own UIs. + * Status checks can be dispatched irrespective of whether a stage directory has + * actually been created. + * + * In general, validators should always listen to + * \Drupal\package_manager\Event\StatusCheckEvent, + * \Drupal\package_manager\Event\PreCreateEvent, and + * \Drupal\package_manager\Event\PreApplyEvent. If they detect any errors, + * they should call the event's ::addError() method to prevent the stage life + * cycle from proceeding any further. If a validator encounters an exception, + * it can use ::addErrorFromThrowable() instead of ::addError(). During status + * checks, validators can call ::addWarning() for less severe problems -- + * warnings will NOT stop the stage life cycle. All three are convenience + * methods for equivalent \Drupal\package_manager\ValidationResult constructors, + * which can then be added to the event using ::addResult(). + * + * @see \Drupal\package_manager\ValidationResult + * @see \Drupal\package_manager\Event\PreOperationStageEvent::addError() + * @see \Drupal\package_manager\Event\PreOperationStageEvent::addErrorFromThrowable() + * @see \Drupal\package_manager\Event\StatusCheckEvent::addWarning() + * @see \Drupal\package_manager\Event\PreOperationStageEvent::addResult() + * + * @section sec_excluded_paths Excluding files from stage operations + * Certain files are never copied into the stage directory because they are + * irrelevant to Composer or Package Manager. Examples include settings.php + * and related files, public and private files, SQLite databases, and git + * repositories. Custom code can subscribe to + * Drupal\package_manager\Event\CollectPathsToExcludeEvent to flag paths which + * should never be copied into the stage directory from the active directory or + * vice versa. + * + * @see \Drupal\package_manager\Event\CollectPathsToExcludeEvent + * + * @section sec_services Useful services + * The following services are especially useful to validators: + * - \Drupal\package_manager\PathLocator looks up certain important paths in the + * active directory, such as the vendor directory, the project root and the + * web root. + * - \Drupal\package_manager\ComposerInspector is a wrapper to interact with + * Composer at the command line and get information from it about the + * project's `composer.json`, which packages are installed, etc. + * + * @section sec_package_manager_failure_marker Package Manager failure marker + * A file PACKAGE_MANAGER_FAILURE.yml is placed in the active directory while + * staged code is copied back into it, and then removed after the copying is + * finished. If this file exists, it means that the staged changes failed to be + * applied to the active directory (for example: a file system error, or the + * copying process was interrupted), and the site is therefore in an + * indeterminate state. The only thing you can do is to restore the code and + * database from a backup. + * @see \Drupal\package_manager\FailureMarker + * + * @} + */ diff --git a/core/modules/package_manager/package_manager.info.yml b/core/modules/package_manager/package_manager.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..20cd7bca56541e0a7ddf5017a864a671eea3b735 --- /dev/null +++ b/core/modules/package_manager/package_manager.info.yml @@ -0,0 +1,9 @@ +name: 'Package Manager' +type: module +description: 'API module providing functionality to stage package installs and updates with Composer.' +package: Core +version: VERSION +lifecycle: experimental +dependencies: + - drupal:update +hidden: true diff --git a/core/modules/package_manager/package_manager.install b/core/modules/package_manager/package_manager.install new file mode 100644 index 0000000000000000000000000000000000000000..22d42a346ead7fc5b93e132b14b7f150bf057528 --- /dev/null +++ b/core/modules/package_manager/package_manager.install @@ -0,0 +1,82 @@ +<?php + +/** + * @file + * Contains install and update functions for Package Manager. + */ + +declare(strict_types=1); + +use Drupal\Core\Site\Settings; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Exception\StageFailureMarkerException; +use Drupal\package_manager\FailureMarker; +use PhpTuf\ComposerStager\API\Exception\ExceptionInterface; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; + +/** + * Implements hook_requirements(). + */ +function package_manager_requirements(string $phase): array { + $requirements = []; + + if (Settings::get('testing_package_manager', FALSE) === FALSE) { + $requirements['testing_package_manager'] = [ + 'title' => 'Package Manager', + 'description' => t("Package Manager is available for early testing. To install the module set the value of 'testing_package_manager' to TRUE in your settings.php file."), + 'severity' => REQUIREMENT_ERROR, + ]; + return $requirements; + } + + // If we're able to check for the presence of the failure marker at all, do it + // irrespective of the current run phase. If the failure marker is there, the + // site is in an indeterminate state and should be restored from backup ASAP. + $service_id = FailureMarker::class; + if (\Drupal::hasService($service_id)) { + try { + \Drupal::service($service_id)->assertNotExists(NULL); + } + catch (StageFailureMarkerException $exception) { + $requirements['package_manager_failure_marker'] = [ + 'title' => t('Failed Package Manager update detected'), + 'description' => $exception->getMessage(), + 'severity' => REQUIREMENT_ERROR, + ]; + } + } + + if ($phase !== 'runtime') { + return $requirements; + } + /** @var \PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface $executable_finder */ + $executable_finder = \Drupal::service(ExecutableFinderInterface::class); + + // Report the Composer version in use, as well as its path. + $title = t('Composer version'); + try { + $requirements['package_manager_composer'] = [ + 'title' => $title, + 'description' => t('@version (<code>@path</code>)', [ + '@version' => \Drupal::service(ComposerInspector::class)->getVersion(), + '@path' => $executable_finder->find('composer'), + ]), + 'severity' => REQUIREMENT_INFO, + ]; + } + catch (\Throwable $e) { + // All Composer Stager exceptions are translatable. + $message = $e instanceof ExceptionInterface + ? $e->getTranslatableMessage() + : $e->getMessage(); + + $requirements['package_manager_composer'] = [ + 'title' => $title, + 'description' => t('Composer was not found. The error message was: @message', [ + '@message' => $message, + ]), + 'severity' => REQUIREMENT_ERROR, + ]; + } + return $requirements; +} diff --git a/core/modules/package_manager/package_manager.services.yml b/core/modules/package_manager/package_manager.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..88a837631012faf1c718d76ca80a1a5a555204c4 --- /dev/null +++ b/core/modules/package_manager/package_manager.services.yml @@ -0,0 +1,203 @@ +services: + _defaults: + autoconfigure: true + autowire: true + + # Underlying Symfony utilities for Composer Stager. + Symfony\Component\Filesystem\Filesystem: + public: false + Symfony\Component\Process\ExecutableFinder: + public: false + + # Basic infrastructure services for Composer Stager, overridden by us to + # provide additional functionality. + Drupal\package_manager\ExecutableFinder: + public: false + decorates: 'PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface' + Drupal\package_manager\ProcessFactory: + public: false + decorates: 'PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface' + Drupal\package_manager\TranslatableStringFactory: + public: false + decorates: 'PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface' + Drupal\package_manager\LoggingBeginner: + public: false + decorates: 'PhpTuf\ComposerStager\API\Core\BeginnerInterface' + Drupal\package_manager\LoggingStager: + public: false + decorates: 'PhpTuf\ComposerStager\API\Core\StagerInterface' + Drupal\package_manager\LoggingCommitter: + public: false + decorates: 'PhpTuf\ComposerStager\API\Core\CommitterInterface' + logger.channel.package_manager: + parent: logger.channel_base + arguments: + - 'package_manager' + logger.channel.package_manager_change_log: + parent: logger.channel_base + arguments: + - 'package_manager_change_log' + + # Services provided to Drupal by Package Manager. + Drupal\package_manager\PathLocator: + arguments: + $appRoot: '%app.root%' + Drupal\package_manager\FailureMarker: {} + Drupal\package_manager\EventSubscriber\UpdateDataSubscriber: {} + Drupal\package_manager\EventSubscriber\ChangeLogger: + calls: + - [setLogger, ['@logger.channel.package_manager_change_log']] + Drupal\package_manager\ComposerInspector: {} + + # Validators. + Drupal\package_manager\Validator\EnvironmentSupportValidator: {} + Drupal\package_manager\Validator\ComposerValidator: {} + Drupal\package_manager\Validator\DiskSpaceValidator: {} + Drupal\package_manager\Validator\PendingUpdatesValidator: + arguments: + - '%app.root%' + - '@update.post_update_registry' + autowire: false + Drupal\package_manager\Validator\LockFileValidator: + arguments: + $keyValueFactory: '@keyvalue' + Drupal\package_manager\Validator\WritableFileSystemValidator: {} + Drupal\package_manager\Validator\ComposerMinimumStabilityValidator: {} + Drupal\package_manager\Validator\MultisiteValidator: {} + Drupal\package_manager\Validator\SymlinkValidator: {} + Drupal\package_manager\Validator\DuplicateInfoFileValidator: {} + Drupal\package_manager\Validator\EnabledExtensionsValidator: {} + Drupal\package_manager\Validator\OverwriteExistingPackagesValidator: {} + Drupal\package_manager\Validator\AllowedScaffoldPackagesValidator: {} + Drupal\package_manager\Validator\StagedDBUpdateValidator: {} + Drupal\package_manager\PathExcluder\TestSiteExcluder: {} + Drupal\package_manager\PathExcluder\VendorHardeningExcluder: {} + Drupal\package_manager\PathExcluder\SiteFilesExcluder: + arguments: + $wrappers: [public, private, assets] + Drupal\package_manager\PathExcluder\SqliteDatabaseExcluder: {} + Drupal\package_manager\PathExcluder\GitExcluder: {} + Drupal\package_manager\PathExcluder\UnknownPathExcluder: {} + Drupal\package_manager\PathExcluder\SiteConfigurationExcluder: + arguments: + $sitePath: '%site.path%' + Drupal\package_manager\PathExcluder\NodeModulesExcluder: {} + Drupal\package_manager\PackageManagerUninstallValidator: + arguments: + $eventDispatcher: '@event_dispatcher' + Drupal\package_manager\Validator\SettingsValidator: {} + Drupal\package_manager\Validator\RsyncValidator: {} + Drupal\package_manager\Validator\ComposerPluginsValidator: {} + Drupal\package_manager\Validator\ComposerPatchesValidator: {} + Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator: {} + Drupal\package_manager\Validator\SupportedReleaseValidator: {} + Drupal\package_manager\Validator\StageNotInActiveValidator: {} + Drupal\package_manager\Validator\PhpExtensionsValidator: {} + Drupal\package_manager\Validator\PhpTufValidator: + arguments: + $repositories: + - 'https://packages.drupal.org/8' + Drupal\package_manager\PackageManagerUpdateProcessor: + arguments: + # @todo Autowire $update_fetcher when https://drupal.org/i/3325557 lands. + $update_fetcher: '@update.fetcher' + $key_value_factory: '@keyvalue' + $key_value_expirable_factory: '@keyvalue.expirable' + + # Services from php-tuf/composer-stager package. + PhpTuf\ComposerStager\API\Core\BeginnerInterface: + class: PhpTuf\ComposerStager\Internal\Core\Beginner + PhpTuf\ComposerStager\API\Core\CleanerInterface: + class: PhpTuf\ComposerStager\Internal\Core\Cleaner + PhpTuf\ComposerStager\API\Core\CommitterInterface: + class: PhpTuf\ComposerStager\Internal\Core\Committer + PhpTuf\ComposerStager\API\Core\StagerInterface: + class: PhpTuf\ComposerStager\Internal\Core\Stager + PhpTuf\ComposerStager\API\Environment\Service\EnvironmentInterface: + class: PhpTuf\ComposerStager\Internal\Environment\Service\Environment + PhpTuf\ComposerStager\API\FileSyncer\Service\FileSyncerInterface: + class: PhpTuf\ComposerStager\Internal\FileSyncer\Service\FileSyncer + PhpTuf\ComposerStager\API\Filesystem\Service\FilesystemInterface: + class: PhpTuf\ComposerStager\Internal\Filesystem\Service\Filesystem + PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface: + class: PhpTuf\ComposerStager\Internal\Finder\Service\ExecutableFinder + PhpTuf\ComposerStager\API\Finder\Service\FileFinderInterface: + class: PhpTuf\ComposerStager\Internal\Finder\Service\FileFinder + PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface: + class: PhpTuf\ComposerStager\Internal\Path\Factory\PathFactory + PhpTuf\ComposerStager\API\Path\Factory\PathListFactoryInterface: + class: PhpTuf\ComposerStager\Internal\Path\Factory\PathListFactory + PhpTuf\ComposerStager\API\Precondition\Service\ActiveAndStagingDirsAreDifferentInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveAndStagingDirsAreDifferent + PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirExistsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirExists + PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirIsReadyInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirIsReady + PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirIsWritableInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirIsWritable + PhpTuf\ComposerStager\API\Precondition\Service\BeginnerPreconditionsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\BeginnerPreconditions + PhpTuf\ComposerStager\API\Precondition\Service\CleanerPreconditionsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\CleanerPreconditions + PhpTuf\ComposerStager\API\Precondition\Service\CommitterPreconditionsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\CommitterPreconditions + PhpTuf\ComposerStager\API\Precondition\Service\CommonPreconditionsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\CommonPreconditions + PhpTuf\ComposerStager\API\Precondition\Service\ComposerIsAvailableInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\ComposerIsAvailable + PhpTuf\ComposerStager\API\Precondition\Service\HostSupportsRunningProcessesInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\HostSupportsRunningProcesses + PhpTuf\ComposerStager\API\Precondition\Service\NoAbsoluteSymlinksExistInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoAbsoluteSymlinksExist + PhpTuf\ComposerStager\API\Precondition\Service\NoHardLinksExistInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoHardLinksExist + PhpTuf\ComposerStager\API\Precondition\Service\NoLinksExistOnWindowsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoLinksExistOnWindows + PhpTuf\ComposerStager\API\Precondition\Service\NoNestingOnWindowsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoNestingOnWindows + PhpTuf\ComposerStager\API\Precondition\Service\NoSymlinksPointOutsideTheCodebaseInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoSymlinksPointOutsideTheCodebase + PhpTuf\ComposerStager\API\Precondition\Service\NoUnsupportedLinksExistInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\NoUnsupportedLinksExist + PhpTuf\ComposerStager\API\Precondition\Service\RsyncIsAvailableInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\RsyncIsAvailable + PhpTuf\ComposerStager\API\Precondition\Service\StagerPreconditionsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\StagerPreconditions + PhpTuf\ComposerStager\API\Precondition\Service\StagingDirDoesNotExistInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirDoesNotExist + PhpTuf\ComposerStager\API\Precondition\Service\StagingDirExistsInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirExists + PhpTuf\ComposerStager\API\Precondition\Service\StagingDirIsReadyInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirIsReady + PhpTuf\ComposerStager\API\Precondition\Service\StagingDirIsWritableInterface: + class: PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirIsWritable + PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface: + class: PhpTuf\ComposerStager\Internal\Process\Factory\ProcessFactory + PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface: + class: PhpTuf\ComposerStager\Internal\Process\Service\ComposerProcessRunner + PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface: + class: PhpTuf\ComposerStager\Internal\Process\Service\OutputCallback + PhpTuf\ComposerStager\API\Process\Service\ProcessInterface: + class: PhpTuf\ComposerStager\Internal\Process\Service\Process + PhpTuf\ComposerStager\API\Process\Service\RsyncProcessRunnerInterface: + class: PhpTuf\ComposerStager\Internal\Process\Service\RsyncProcessRunner + PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface: + class: PhpTuf\ComposerStager\Internal\Translation\Factory\TranslatableFactory + PhpTuf\ComposerStager\API\Translation\Service\DomainOptionsInterface: + class: PhpTuf\ComposerStager\Internal\Translation\Service\DomainOptions + PhpTuf\ComposerStager\API\Translation\Service\LocaleOptionsInterface: + class: PhpTuf\ComposerStager\Internal\Translation\Service\LocaleOptions + PhpTuf\ComposerStager\API\Translation\Service\TranslatorInterface: + class: PhpTuf\ComposerStager\Internal\Translation\Service\Translator + PhpTuf\ComposerStager\Internal\Path\Service\PathHelperInterface: + class: PhpTuf\ComposerStager\Internal\Path\Service\PathHelper + public: false + PhpTuf\ComposerStager\Internal\Process\Factory\SymfonyProcessFactoryInterface: + class: PhpTuf\ComposerStager\Internal\Process\Factory\SymfonyProcessFactory + public: false + PhpTuf\ComposerStager\Internal\Process\Service\OutputCallbackAdapterInterface: + class: PhpTuf\ComposerStager\Internal\Process\Service\OutputCallbackAdapter + public: false + PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxyInterface: + class: PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxy + public: false diff --git a/core/modules/package_manager/src/ComposerInspector.php b/core/modules/package_manager/src/ComposerInspector.php new file mode 100644 index 0000000000000000000000000000000000000000..69d307388503d157ad1c3d0215ddc880b6a06172 --- /dev/null +++ b/core/modules/package_manager/src/ComposerInspector.php @@ -0,0 +1,481 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Composer\Semver\Semver; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Exception\ComposerNotReadyException; +use PhpTuf\ComposerStager\API\Exception\PreconditionException; +use PhpTuf\ComposerStager\API\Exception\RuntimeException; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use PhpTuf\ComposerStager\API\Precondition\Service\ComposerIsAvailableInterface; +use PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; + +/** + * Defines a class to get information from Composer. + * + * This is a PHP wrapper to facilitate interacting with composer and: + * - list installed packages: getInstalledPackagesList() (`composer show`) + * - validate composer state & project: validate() (`composer validate`) + * - read project & package configuration: getConfig() (`composer config`) + * - read root package info: getRootPackageInfo() (`composer show --self`) + */ +class ComposerInspector implements LoggerAwareInterface { + + use LoggerAwareTrait { + setLogger as traitSetLogger; + } + use StringTranslationTrait; + + /** + * The process output callback. + * + * @var \Drupal\package_manager\ProcessOutputCallback + */ + private ProcessOutputCallback $processCallback; + + /** + * Statically cached installed package lists, keyed by directory. + * + * @var \Drupal\package_manager\InstalledPackagesList[] + */ + private array $packageLists = []; + + /** + * A semantic version constraint for the supported version(s) of Composer. + * + * @see https://endoflife.date/composer + * + * @var string + */ + final public const SUPPORTED_VERSION = '^2.6'; + + public function __construct( + private readonly ComposerProcessRunnerInterface $runner, + private readonly ComposerIsAvailableInterface $composerIsAvailable, + private readonly PathFactoryInterface $pathFactory, + ) { + $this->processCallback = new ProcessOutputCallback(); + $this->setLogger(new NullLogger()); + } + + /** + * {@inheritdoc} + */ + public function setLogger(LoggerInterface $logger): void { + $this->traitSetLogger($logger); + $this->processCallback->setLogger($logger); + } + + /** + * Checks that Composer commands can be run. + * + * @param string $working_dir + * The directory in which Composer will be run. + * + * @see ::validateExecutable() + * @see ::validateProject() + */ + public function validate(string $working_dir): void { + $this->validateExecutable(); + $this->validateProject($working_dir); + } + + /** + * Checks that `composer.json` is valid and `composer.lock` exists. + * + * @param string $working_dir + * The directory to check. + * + * @throws \Drupal\package_manager\Exception\ComposerNotReadyException + * Thrown if: + * - `composer.json` doesn't exist in the given directory or is invalid + * according to `composer validate`. + * - `composer.lock` doesn't exist in the given directory. + */ + private function validateProject(string $working_dir): void { + $messages = []; + $previous_exception = NULL; + + // If either composer.json or composer.lock have changed, ensure the + // directory is in a completely valid state, according to Composer. + if ($this->invalidateCacheIfNeeded($working_dir)) { + try { + $this->runner->run([ + 'validate', + '--check-lock', + '--no-check-publish', + '--with-dependencies', + '--no-ansi', + "--working-dir=$working_dir", + ]); + } + catch (RuntimeException $e) { + $messages[] = $e->getMessage(); + $previous_exception = $e; + } + } + + // Check for the presence of composer.lock, because `composer validate` + // doesn't expect it to exist, but we do (see ::getInstalledPackagesList()). + if (!file_exists($working_dir . DIRECTORY_SEPARATOR . 'composer.lock')) { + $messages[] = $this->t('composer.lock not found in @dir.', [ + '@dir' => $working_dir, + ]); + } + + if ($messages) { + throw new ComposerNotReadyException($working_dir, $messages, 0, $previous_exception); + } + } + + /** + * Validates that the Composer executable exists in a supported version. + * + * @throws \Exception + * Thrown if the Composer executable is not available or the detected + * version of Composer is not supported. + */ + private function validateExecutable(): void { + $messages = []; + + // Ensure the Composer executable is available. For performance reasons, + // statically cache the result, since it's unlikely to change during the + // current request. If $unavailable_message is NULL, it means we haven't + // done this check yet. If it's FALSE, it means we did the check and there + // were no errors; and, if it's a string, it's the error message we received + // the last time we did this check. + static $unavailable_message; + if ($unavailable_message === NULL) { + try { + // The "Composer is available" precondition requires active and stage + // directories, but they don't actually matter to it, nor do path + // exclusions, so dummies can be passed for simplicity. + $active_dir = $this->pathFactory->create(__DIR__); + $stage_dir = $active_dir; + + $this->composerIsAvailable->assertIsFulfilled($active_dir, $stage_dir); + $unavailable_message = FALSE; + } + catch (PreconditionException $e) { + $unavailable_message = $e->getMessage(); + } + } + if ($unavailable_message) { + $messages[] = $unavailable_message; + } + + // The detected version of Composer is unlikely to change during the + // current request, so statically cache it. If $unsupported_message is NULL, + // it means we haven't done this check yet. If it's FALSE, it means we did + // the check and there were no errors; and, if it's a string, it's the error + // message we received the last time we did this check. + static $unsupported_message; + if ($unsupported_message === NULL) { + try { + $detected_version = $this->getVersion(); + + if (Semver::satisfies($detected_version, static::SUPPORTED_VERSION)) { + // We did the version check, and it did not produce an error message. + $unsupported_message = FALSE; + } + else { + $unsupported_message = $this->t('The detected Composer version, @version, does not satisfy <code>@constraint</code>.', [ + '@version' => $detected_version, + '@constraint' => static::SUPPORTED_VERSION, + ]); + } + } + catch (\UnexpectedValueException $e) { + $unsupported_message = $e->getMessage(); + } + } + if ($unsupported_message) { + $messages[] = $unsupported_message; + } + + if ($messages) { + throw new ComposerNotReadyException(NULL, $messages); + } + } + + /** + * Returns a config value from Composer. + * + * @param string $key + * The config key to get. + * @param string $context + * The path of either the directory in which to run Composer, or a specific + * configuration file (such as a particular package's `composer.json`) from + * which to read specific values. + * + * @return string|null + * The output data. Note that the caller must know the shape of the + * requested key's value: if it's a string, no further processing is needed, + * but if it is a boolean, an array or a map, JSON decoding should be + * applied. + * + * @see ::getAllowPluginsConfig() + * @see \Composer\Command\ConfigCommand::execute() + */ + public function getConfig(string $key, string $context): ?string { + $this->validateExecutable(); + + $command = ['config', $key]; + // If we're consulting a specific file for the config value, we don't need + // to validate the project as a whole. + if (is_file($context)) { + $command[] = "--file={$context}"; + } + else { + $this->validateProject($context); + $command[] = "--working-dir={$context}"; + } + try { + $this->runner->run($command, callback: $this->processCallback->reset()); + } + catch (RuntimeException $e) { + // Assume any error from `composer config` is about an undefined key-value + // pair which may have a known default value. + return match ($key) { + 'extra' => '{}', + default => throw $e, + }; + } + $output = $this->processCallback->getOutput(); + return $output ? trim(implode('', $output)) : NULL; + } + + /** + * Returns the current Composer version. + * + * @return string + * The Composer version. + * + * @throws \UnexpectedValueException + * Thrown if the Composer version cannot be determined. + */ + public function getVersion(): string { + $this->runner->run(['--format=json'], callback: $this->processCallback->reset()); + $data = $this->processCallback->parseJsonOutput(); + if (isset($data['application']['name']) + && isset($data['application']['version']) + && $data['application']['name'] === 'Composer' + && is_string($data['application']['version'])) { + return $data['application']['version']; + } + throw new \UnexpectedValueException('Unable to determine Composer version'); + } + + /** + * Returns the installed packages list. + * + * @param string $working_dir + * The working directory in which to run Composer. Should contain a + * `composer.lock` file. + * + * @return \Drupal\package_manager\InstalledPackagesList + * The installed packages list for the directory. + * + * @throws \UnexpectedValueException + * Thrown if a package reports that its install path is the same as the + * working directory, and it is not of the `metapackage` type. + */ + public function getInstalledPackagesList(string $working_dir): InstalledPackagesList { + $working_dir = realpath($working_dir); + $this->validate($working_dir); + + if (array_key_exists($working_dir, $this->packageLists)) { + return $this->packageLists[$working_dir]; + } + + $packages_data = $this->show($working_dir); + $packages_data = $this->getPackageTypes($packages_data, $working_dir); + + foreach ($packages_data as $name => $package) { + $path = $package['path']; + + // For packages installed as dev snapshots from certain version control + // systems, `composer show` displays the version like `1.0.x-dev 0a1b2c`, + // which will cause an exception if we try to parse it as a legitimate + // semantic version. Since we don't need the abbreviated commit hash, just + // remove it. + if (str_contains($package['version'], '-dev ')) { + $packages_data[$name]['version'] = explode(' ', $package['version'], 2)[0]; + } + + // We expect Composer to report that metapackages' install paths are the + // same as the working directory, in which case InstalledPackage::$path + // should be NULL. For all other package types, we consider it invalid + // if the install path is the same as the working directory. + if (isset($package['type']) && $package['type'] === 'metapackage') { + if ($path !== NULL) { + throw new \UnexpectedValueException("Metapackage '$name' is installed at unexpected path: '$path', expected NULL"); + } + $packages_data[$name]['path'] = $path; + } + elseif ($path === $working_dir) { + throw new \UnexpectedValueException("Package '$name' cannot be installed at path: '$path'"); + } + else { + $packages_data[$name]['path'] = realpath($path); + } + } + $packages_data = array_map(InstalledPackage::createFromArray(...), $packages_data); + + $list = new InstalledPackagesList($packages_data); + $this->packageLists[$working_dir] = $list; + + return $list; + } + + /** + * Loads package types from the lock file. + * + * The package type is not available using `composer show` for listing + * packages. To avoiding making many calls to `composer show package-name`, + * load the lock file data to get the `type` key. + * + * @param array $packages_data + * The packages data returned from ::show(). + * @param string $working_dir + * The directory where Composer was run. + * + * @return array + * The packages data, with a `type` key added to each package. + */ + private function getPackageTypes(array $packages_data, string $working_dir): array { + $lock_content = file_get_contents($working_dir . DIRECTORY_SEPARATOR . 'composer.lock'); + $lock_data = json_decode($lock_content, TRUE, flags: JSON_THROW_ON_ERROR); + + $lock_packages = array_merge($lock_data['packages'] ?? [], $lock_data['packages-dev'] ?? []); + foreach ($lock_packages as $lock_package) { + $name = $lock_package['name']; + if (isset($packages_data[$name]) && isset($lock_package['type'])) { + $packages_data[$name]['type'] = $lock_package['type']; + } + } + return $packages_data; + } + + /** + * Returns the output of `composer show --self` in a directory. + * + * @param string $working_dir + * The directory in which to run Composer. + * + * @return array + * The parsed output of `composer show --self`. + */ + public function getRootPackageInfo(string $working_dir): array { + $this->validate($working_dir); + + $this->runner->run(['show', '--self', '--format=json', "--working-dir={$working_dir}"], callback: $this->processCallback->reset()); + return $this->processCallback->parseJsonOutput(); + } + + /** + * Gets the installed packages data from running `composer show`. + * + * @param string $working_dir + * The directory in which to run `composer show`. + * + * @return array[] + * The installed packages data, keyed by package name. + */ + protected function show(string $working_dir): array { + $data = []; + $options = ['show', '--format=json', "--working-dir={$working_dir}"]; + + // We don't get package installation paths back from `composer show` unless + // we explicitly pass the --path option to it. However, for some + // inexplicable reason, that option hides *other* relevant information + // about the installed packages. So, to work around this maddening quirk, we + // call `composer show` once without the --path option, and once with it, + // then merge the results together. Composer, for its part, will not support + // returning the install path from `composer show`: see + // https://github.com/composer/composer/pull/11340. + $this->runner->run($options, callback: $this->processCallback->reset()); + $output = $this->processCallback->parseJsonOutput(); + // $output['installed'] will not be set if no packages are installed. + if (isset($output['installed'])) { + foreach ($output['installed'] as $installed_package) { + $data[$installed_package['name']] = $installed_package; + } + + $options[] = '--path'; + $this->runner->run($options, callback: $this->processCallback->reset()); + $output = $this->processCallback->parseJsonOutput(); + foreach ($output['installed'] as $installed_package) { + $data[$installed_package['name']]['path'] = $installed_package['path']; + } + } + + return $data; + } + + /** + * Invalidates cached data if composer.json or composer.lock have changed. + * + * The following cached data may be invalidated: + * - Installed package lists (see ::getInstalledPackageList()). + * + * @param string $working_dir + * A directory that contains a `composer.json` file, and optionally a + * `composer.lock`. If either file has changed since the last time this + * method was called, any cached data for the directory will be invalidated. + * + * @return bool + * TRUE if the cached data was invalidated, otherwise FALSE. + */ + private function invalidateCacheIfNeeded(string $working_dir): bool { + static $known_hashes = []; + + $invalidate = FALSE; + foreach (['composer.json', 'composer.lock'] as $filename) { + $known_hash = $known_hashes[$working_dir][$filename] ?? ''; + // If the file doesn't exist, hash_file() will return FALSE. + $current_hash = @hash_file('xxh64', $working_dir . DIRECTORY_SEPARATOR . $filename); + + if ($known_hash && $current_hash && hash_equals($known_hash, $current_hash)) { + continue; + } + $known_hashes[$working_dir][$filename] = $current_hash; + $invalidate = TRUE; + } + if ($invalidate) { + unset($this->packageLists[$working_dir]); + } + return $invalidate; + } + + /** + * Returns the value of `allow-plugins` config setting. + * + * @param string $dir + * The directory in which to run Composer. + * + * @return bool[]|bool + * An array of boolean flags to allow or disallow certain plugins, or TRUE + * if all plugins are allowed. + * + * @see https://getcomposer.org/doc/06-config.md#allow-plugins + */ + public function getAllowPluginsConfig(string $dir): array|bool { + $value = $this->getConfig('allow-plugins', $dir); + + // Try to convert the value we got back to a boolean. If it's not a boolean, + // it should be an array of plugin-specific flags. + $value = json_decode($value, TRUE, flags: JSON_THROW_ON_ERROR); + + // An empty array indicates that no plugins are allowed. + return $value ?: []; + } + +} diff --git a/core/modules/package_manager/src/Event/CollectPathsToExcludeEvent.php b/core/modules/package_manager/src/Event/CollectPathsToExcludeEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..a3619d233bed5ca066c71708262b272a5ed14713 --- /dev/null +++ b/core/modules/package_manager/src/Event/CollectPathsToExcludeEvent.php @@ -0,0 +1,128 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\package_manager\StageBase; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use PhpTuf\ComposerStager\API\Path\Factory\PathListFactoryInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; + +/** + * Defines an event that collects paths to exclude. + * + * These paths are excluded by Composer Stager and are never copied into the + * stage directory from the active directory, or vice versa. + */ +final class CollectPathsToExcludeEvent extends StageEvent implements PathListInterface { + + /** + * Constructs a CollectPathsToExcludeEvent object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage which fired this event. + * @param \Drupal\package_manager\PathLocator $pathLocator + * The path locator service. + * @param \PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface $pathFactory + * The path factory service. + * @param \PhpTuf\ComposerStager\API\Path\Value\PathListInterface|null $pathList + * (optional) The list of paths to exclude. + */ + public function __construct( + StageBase $stage, + private readonly PathLocator $pathLocator, + private readonly PathFactoryInterface $pathFactory, + private ?PathListInterface $pathList = NULL, + ) { + parent::__construct($stage); + + $this->pathList ??= \Drupal::service(PathListFactoryInterface::class) + ->create(); + } + + /** + * {@inheritdoc} + */ + public function add(string ...$paths): void { + $this->pathList->add(...$paths); + } + + /** + * {@inheritdoc} + */ + public function getAll(): array { + return array_unique($this->pathList->getAll()); + } + + /** + * Flags paths to be ignored, relative to the web root. + * + * This should only be used for paths that, if they exist at all, are + * *guaranteed* to exist within the web root. + * + * @param string[] $paths + * The paths to ignore. These should be relative to the web root. They will + * be made relative to the project root. + */ + public function addPathsRelativeToWebRoot(array $paths): void { + $web_root = $this->pathLocator->getWebRoot(); + if ($web_root) { + $web_root .= '/'; + } + + foreach ($paths as $path) { + // Make the path relative to the project root by prefixing the web root. + $this->add($web_root . $path); + } + } + + /** + * Flags paths to be ignored, relative to the project root. + * + * @param string[] $paths + * The paths to ignore. Absolute paths will be made relative to the project + * root; relative paths are assumed to be relative to the project root. + * + * @throws \LogicException + * If any of the given paths are absolute, but not inside the project root. + */ + public function addPathsRelativeToProjectRoot(array $paths): void { + $project_root = $this->pathLocator->getProjectRoot(); + + foreach ($paths as $path) { + if ($this->pathFactory->create($path)->isAbsolute()) { + if (!str_starts_with($path, $project_root)) { + throw new \LogicException("$path is not inside the project root: $project_root."); + } + } + + // Make absolute paths relative to the project root. + $path = str_replace($project_root, '', $path); + $path = ltrim($path, '/'); + $this->add($path); + } + } + + /** + * Finds all directories in the project root matching the given name. + * + * @param string $directory_name + * A directory name. + * + * @return string[] + * All discovered absolute paths matching the given directory name. + */ + public function scanForDirectoriesByName(string $directory_name): array { + $flags = \FilesystemIterator::UNIX_PATHS; + $flags |= \FilesystemIterator::CURRENT_AS_SELF; + $directories_tree = new \RecursiveDirectoryIterator($this->pathLocator->getProjectRoot(), $flags); + $filtered_directories = new \RecursiveIteratorIterator($directories_tree, \RecursiveIteratorIterator::SELF_FIRST); + $matched_directories = new \CallbackFilterIterator($filtered_directories, + fn (\RecursiveDirectoryIterator $current) => $current->isDir() && $current->getFilename() === $directory_name + ); + return array_keys(iterator_to_array($matched_directories)); + } + +} diff --git a/core/modules/package_manager/src/Event/PostApplyEvent.php b/core/modules/package_manager/src/Event/PostApplyEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..e31a9fd0de8d0999480cb0fb281c7e413416c772 --- /dev/null +++ b/core/modules/package_manager/src/Event/PostApplyEvent.php @@ -0,0 +1,11 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +/** + * Event fired after staged changes are synced to the active directory. + */ +final class PostApplyEvent extends StageEvent { +} diff --git a/core/modules/package_manager/src/Event/PostCreateEvent.php b/core/modules/package_manager/src/Event/PostCreateEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..6278aa150eaa4570b5ed4f084410108f0119306f --- /dev/null +++ b/core/modules/package_manager/src/Event/PostCreateEvent.php @@ -0,0 +1,11 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +/** + * Event fired after a stage directory has been created. + */ +final class PostCreateEvent extends StageEvent { +} diff --git a/core/modules/package_manager/src/Event/PostRequireEvent.php b/core/modules/package_manager/src/Event/PostRequireEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..47847b69b61ea9e26aa07343bf5133663be0927c --- /dev/null +++ b/core/modules/package_manager/src/Event/PostRequireEvent.php @@ -0,0 +1,14 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +/** + * Event fired after packages are updated to the stage directory. + */ +final class PostRequireEvent extends StageEvent { + + use RequireEventTrait; + +} diff --git a/core/modules/package_manager/src/Event/PreApplyEvent.php b/core/modules/package_manager/src/Event/PreApplyEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..21af791a7ffdd6fd8cf7bb9f8f922e9ba6377006 --- /dev/null +++ b/core/modules/package_manager/src/Event/PreApplyEvent.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\package_manager\ImmutablePathList; +use Drupal\package_manager\StageBase; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; + +/** + * Event fired before staged changes are synced to the active directory. + */ +final class PreApplyEvent extends PreOperationStageEvent { + + /** + * The list of paths to ignore in the active and stage directories. + * + * @var \Drupal\package_manager\ImmutablePathList + */ + public readonly ImmutablePathList $excludedPaths; + + /** + * Constructs a PreApplyEvent object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage which fired this event. + * @param \PhpTuf\ComposerStager\API\Path\Value\PathListInterface $excluded_paths + * The list of paths to exclude. These will not be copied from the stage + * directory to the active directory, nor be deleted from the active + * directory if they exist, when the stage directory is copied back into + * the active directory. + */ + public function __construct(StageBase $stage, PathListInterface $excluded_paths) { + parent::__construct($stage); + $this->excludedPaths = new ImmutablePathList($excluded_paths); + } + +} diff --git a/core/modules/package_manager/src/Event/PreCreateEvent.php b/core/modules/package_manager/src/Event/PreCreateEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..59dd01a757fc2c721276f5afd90cefdd417e0484 --- /dev/null +++ b/core/modules/package_manager/src/Event/PreCreateEvent.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\package_manager\ImmutablePathList; +use Drupal\package_manager\StageBase; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; + +/** + * Event fired before a stage directory is created. + */ +final class PreCreateEvent extends PreOperationStageEvent { + + /** + * The list of paths to exclude from the stage directory. + * + * @var \Drupal\package_manager\ImmutablePathList + */ + public readonly ImmutablePathList $excludedPaths; + + /** + * Constructs a PreCreateEvent object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage which fired this event. + * @param \PhpTuf\ComposerStager\API\Path\Value\PathListInterface $excluded_paths + * The list of paths to exclude. These will not be copied into the stage + * directory when it is created. + */ + public function __construct(StageBase $stage, PathListInterface $excluded_paths) { + parent::__construct($stage); + $this->excludedPaths = new ImmutablePathList($excluded_paths); + } + +} diff --git a/core/modules/package_manager/src/Event/PreOperationStageEvent.php b/core/modules/package_manager/src/Event/PreOperationStageEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..2e6eb0c5292791a02ed80efe3280c4871c167578 --- /dev/null +++ b/core/modules/package_manager/src/Event/PreOperationStageEvent.php @@ -0,0 +1,94 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\package_manager\ValidationResult; +use Drupal\system\SystemManager; + +/** + * Base class for events dispatched before a stage life cycle operation. + */ +abstract class PreOperationStageEvent extends StageEvent { + + /** + * The validation results. + * + * @var \Drupal\package_manager\ValidationResult[] + */ + protected $results = []; + + /** + * Gets the validation results. + * + * @param int|null $severity + * (optional) The severity for the results to return. Should be one of the + * SystemManager::REQUIREMENT_* constants. + * + * @return \Drupal\package_manager\ValidationResult[] + * The validation results. + */ + public function getResults(?int $severity = NULL): array { + if ($severity !== NULL) { + return array_filter($this->results, function ($result) use ($severity) { + return $result->severity === $severity; + }); + } + return $this->results; + } + + /** + * Convenience method to flag a validation error. + * + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages + * The error messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * The summary of error messages. Must be passed if there is more than one + * message. + */ + public function addError(array $messages, ?TranslatableMarkup $summary = NULL): void { + $this->addResult(ValidationResult::createError(array_values($messages), $summary)); + } + + /** + * Convenience method, adds an error validation result from a throwable. + * + * @param \Throwable $throwable + * The throwable. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * (optional) The summary of error messages. + */ + public function addErrorFromThrowable(\Throwable $throwable, ?TranslatableMarkup $summary = NULL): void { + $this->addResult(ValidationResult::createErrorFromThrowable($throwable, $summary)); + } + + /** + * Adds a validation result to the event. + * + * @param \Drupal\package_manager\ValidationResult $result + * The validation result to add. + * + * @throws \InvalidArgumentException + * Thrown if the validation result is not an error. + */ + public function addResult(ValidationResult $result): void { + // Only errors are allowed for this event. + if ($result->severity !== SystemManager::REQUIREMENT_ERROR) { + throw new \InvalidArgumentException('Only errors are allowed.'); + } + $this->results[] = $result; + } + + /** + * {@inheritdoc} + */ + public function stopPropagation(): void { + if (empty($this->getResults(SystemManager::REQUIREMENT_ERROR))) { + $this->addErrorFromThrowable(new \LogicException('Event propagation stopped without any errors added to the event. This bypasses the package_manager validation system.')); + } + parent::stopPropagation(); + } + +} diff --git a/core/modules/package_manager/src/Event/PreRequireEvent.php b/core/modules/package_manager/src/Event/PreRequireEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..54b697b17a5277c5cd154473489c4802af441ef8 --- /dev/null +++ b/core/modules/package_manager/src/Event/PreRequireEvent.php @@ -0,0 +1,14 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +/** + * Event fired before packages are updated to the stage directory. + */ +final class PreRequireEvent extends PreOperationStageEvent { + + use RequireEventTrait; + +} diff --git a/core/modules/package_manager/src/Event/RequireEventTrait.php b/core/modules/package_manager/src/Event/RequireEventTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..deec0a1725920d96e705b9761af6194afbbe6613 --- /dev/null +++ b/core/modules/package_manager/src/Event/RequireEventTrait.php @@ -0,0 +1,99 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\package_manager\StageBase; + +/** + * Common methods for pre- and post-require events. + * + * @internal + * This is an internal part of Automatic Updates and should only be used by + * \Drupal\package_manager\Event\PreRequireEvent and + * \Drupal\package_manager\Event\PostRequireEvent. + */ +trait RequireEventTrait { + + /** + * The runtime packages, in the form 'vendor/name:constraint'. + * + * @var string[] + */ + private $runtimePackages; + + /** + * The dev packages to be required, in the form 'vendor/name:constraint'. + * + * @var string[] + */ + private $devPackages; + + /** + * Constructs the object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage. + * @param string[] $runtime_packages + * The runtime (i.e., non-dev) packages to be required, in the form + * 'vendor/name:constraint'. + * @param string[] $dev_packages + * The dev packages to be required, in the form 'vendor/name:constraint'. + */ + public function __construct(StageBase $stage, array $runtime_packages, array $dev_packages = []) { + $this->runtimePackages = $runtime_packages; + $this->devPackages = $dev_packages; + parent::__construct($stage); + } + + /** + * Gets the runtime (i.e., non-dev) packages. + * + * @return string[] + * An array of packages where the keys are package names in the form + * `vendor/name` and the values are version constraints. Packages without a + * version constraint will default to `*`. + */ + public function getRuntimePackages(): array { + return $this->getKeyedPackages($this->runtimePackages); + } + + /** + * Gets the dev packages. + * + * @return string[] + * An array of packages where the values are version constraints and keys + * are package names in the form `vendor/name`. Packages without a version + * constraint will default to `*`. + */ + public function getDevPackages(): array { + return $this->getKeyedPackages($this->devPackages); + } + + /** + * Gets packages as a keyed array. + * + * @param string[] $packages + * The packages, in the form 'vendor/name:version'. + * + * @return string[] + * An array of packages where the values are version constraints and keys + * are package names in the form `vendor/name`. Packages without a version + * constraint will default to `*`. + */ + private function getKeyedPackages(array $packages): array { + $keyed_packages = []; + foreach ($packages as $package) { + if (strpos($package, ':') > 0) { + [$name, $constraint] = explode(':', $package); + } + else { + [$name, $constraint] = [$package, '*']; + } + $keyed_packages[$name] = $constraint; + } + return $keyed_packages; + } + +} diff --git a/core/modules/package_manager/src/Event/StageEvent.php b/core/modules/package_manager/src/Event/StageEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..3f69f7cdf4f7d907f2cfc91352c2016c41281972 --- /dev/null +++ b/core/modules/package_manager/src/Event/StageEvent.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\package_manager\StageBase; +use Symfony\Contracts\EventDispatcher\Event; + +/** + * Base class for all events related to the life cycle of the stage. + */ +abstract class StageEvent extends Event { + + /** + * Constructs a StageEvent object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage which fired this event. + */ + public function __construct(public readonly StageBase $stage) { + } + +} diff --git a/core/modules/package_manager/src/Event/StatusCheckEvent.php b/core/modules/package_manager/src/Event/StatusCheckEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..4540751a74b00fc604b173a44cd1e3093d962e30 --- /dev/null +++ b/core/modules/package_manager/src/Event/StatusCheckEvent.php @@ -0,0 +1,74 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Event; + +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\package_manager\ImmutablePathList; +use Drupal\package_manager\StageBase; +use Drupal\package_manager\ValidationResult; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; + +/** + * Event fired to check the status of the system to use Package Manager. + */ +final class StatusCheckEvent extends PreOperationStageEvent { + + /** + * The paths to exclude, or NULL if there was an error collecting them. + * + * @var \Drupal\package_manager\ImmutablePathList|null + * + * @see ::__construct() + */ + public readonly ?ImmutablePathList $excludedPaths; + + /** + * Constructs a StatusCheckEvent object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage which fired this event. + * @param \PhpTuf\ComposerStager\API\Path\Value\PathListInterface|\Throwable $excluded_paths + * The list of paths to exclude or, if an error occurred while they were + * being collected, the throwable from that error. If this is a throwable, + * it will be converted to a validation error. + */ + public function __construct(StageBase $stage, PathListInterface|\Throwable $excluded_paths) { + parent::__construct($stage); + + // If there was an error collecting the excluded paths, convert it to a + // validation error so we can still run status checks that don't need to + // examine the list of excluded paths. + if ($excluded_paths instanceof \Throwable) { + $this->addErrorFromThrowable($excluded_paths); + $excluded_paths = NULL; + } + else { + $excluded_paths = new ImmutablePathList($excluded_paths); + } + $this->excludedPaths = $excluded_paths; + } + + /** + * Adds warning information to the event. + * + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages + * One or more warning messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * A summary of warning messages. Must be passed if there is more than one + * message. + */ + public function addWarning(array $messages, ?TranslatableMarkup $summary = NULL): void { + $this->addResult(ValidationResult::createWarning($messages, $summary)); + } + + /** + * {@inheritdoc} + */ + public function addResult(ValidationResult $result): void { + // Override the parent to also allow warnings. + $this->results[] = $result; + } + +} diff --git a/core/modules/package_manager/src/EventSubscriber/ChangeLogger.php b/core/modules/package_manager/src/EventSubscriber/ChangeLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..9c2f2f588aebd29228b7892358efe87f2e27a5ce --- /dev/null +++ b/core/modules/package_manager/src/EventSubscriber/ChangeLogger.php @@ -0,0 +1,184 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\EventSubscriber; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\PathLocator; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Event subscriber to log changes that happen during the stage life cycle. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ChangeLogger implements EventSubscriberInterface, LoggerAwareInterface { + + use LoggerAwareTrait; + use StringTranslationTrait; + + /** + * The key to store the list of packages installed when the stage is created. + * + * @var string + * + * @see ::recordInstalledPackages() + */ + private const INSTALLED_PACKAGES_KEY = 'package_manager_installed_packages'; + + /** + * The metadata key under which to store the requested package versions. + * + * @var string + * + * @see ::recordRequestedPackageVersions() + */ + private const REQUESTED_PACKAGES_KEY = 'package_manager_requested_packages'; + + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + ) {} + + /** + * Records packages installed in the project root. + * + * We need to do this before the staging environment has been created, so that + * we have a complete picture of which requested packages are merely being + * updated, and which are being newly added. Once the staging environment has + * been created, the installed packages won't change -- if they do, a + * validation error will be raised. + * + * @param \Drupal\package_manager\Event\PreCreateEvent $event + * The event being handled. + * + * @see \Drupal\package_manager\Validator\LockFileValidator + */ + public function recordInstalledPackages(PreCreateEvent $event): void { + $packages = $this->composerInspector->getInstalledPackagesList($this->pathLocator->getProjectRoot()); + $event->stage->setMetadata(static::INSTALLED_PACKAGES_KEY, $packages); + } + + /** + * Records requested packages. + * + * @param \Drupal\package_manager\Event\PostRequireEvent $event + * The event object. + */ + public function recordRequestedPackageVersions(PostRequireEvent $event): void { + // There could be multiple 'require' operations, so overlay the requested + // packages from the current operation onto the requested packages from any + // previous 'require' operation. + $requested_packages = array_merge( + $event->stage->getMetadata(static::REQUESTED_PACKAGES_KEY) ?? [], + $event->getRuntimePackages(), + $event->getDevPackages(), + ); + $event->stage->setMetadata(static::REQUESTED_PACKAGES_KEY, $requested_packages); + } + + /** + * Logs changes made by Package Manager. + * + * @param \Drupal\package_manager\Event\PostApplyEvent $event + * The event being handled. + */ + public function logChanges(PostApplyEvent $event): void { + $installed_at_start = $event->stage->getMetadata(static::INSTALLED_PACKAGES_KEY); + $installed_post_apply = $this->composerInspector->getInstalledPackagesList($this->pathLocator->getProjectRoot()); + + // Compare the packages which were installed when the stage was created + // against the package versions that were requested over all the stage's + // require operations, and create a log entry listing all of it. + $requested_log = []; + + $requested_packages = $event->stage->getMetadata(static::REQUESTED_PACKAGES_KEY) ?? []; + // Sort the requested packages by name, to make it easier to review a large + // change list. + ksort($requested_packages, SORT_NATURAL); + foreach ($requested_packages as $name => $constraint) { + $installed_version = $installed_at_start[$name]?->version; + if ($installed_version === NULL) { + // For clarity, make the "any version" constraint human-readable. + if ($constraint === '*') { + $constraint = $this->t('* (any version)'); + } + $requested_log[] = $this->t('- Install @name @constraint', [ + '@name' => $name, + '@constraint' => $constraint, + ]); + } + else { + $requested_log[] = $this->t('- Update @name from @installed_version to @constraint', [ + '@name' => $name, + '@installed_version' => $installed_version, + '@constraint' => $constraint, + ]); + } + } + // It's possible that $requested_log will be empty: for example, a custom + // stage that only does removals, or some other operation, and never + // dispatches PostRequireEvent. + if ($requested_log) { + $message = $this->t("Requested changes:\n@change_list", [ + '@change_list' => implode("\n", array_map('strval', $requested_log)), + ]); + $this->logger?->info($message); + } + + // Create a separate log entry listing everything that actually changed. + $applied_log = []; + + $updated_packages = $installed_post_apply->getPackagesWithDifferentVersionsIn($installed_at_start); + // Sort the packages by name to make it easier to review large change sets. + $updated_packages->ksort(SORT_NATURAL); + foreach ($updated_packages as $name => $package) { + $applied_log[] = $this->t('- Updated @name from @installed_version to @updated_version', [ + '@name' => $name, + '@installed_version' => $installed_at_start[$name]->version, + '@updated_version' => $package->version, + ]); + } + + $added_packages = $installed_post_apply->getPackagesNotIn($installed_at_start); + $added_packages->ksort(SORT_NATURAL); + foreach ($added_packages as $name => $package) { + $applied_log[] = $this->t('- Installed @name @version', [ + '@name' => $name, + '@version' => $package->version, + ]); + } + + $removed_packages = $installed_at_start->getPackagesNotIn($installed_post_apply); + $removed_packages->ksort(SORT_NATURAL); + foreach ($installed_at_start->getPackagesNotIn($installed_post_apply) as $name => $package) { + $applied_log[] = $this->t('- Uninstalled @name', ['@name' => $name]); + } + $message = $this->t("Applied changes:\n@change_list", [ + '@change_list' => implode("\n", array_map('strval', $applied_log)), + ]); + $this->logger?->info($message); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => ['recordInstalledPackages'], + PostRequireEvent::class => ['recordRequestedPackageVersions'], + PostApplyEvent::class => ['logChanges'], + ]; + } + +} diff --git a/core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php b/core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..1bcc900b69109da2f203689ef970916f452c7f6e --- /dev/null +++ b/core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\EventSubscriber; + +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\update\UpdateManagerInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Clears stale update data once staged changes have been applied. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class UpdateDataSubscriber implements EventSubscriberInterface { + + public function __construct(private readonly UpdateManagerInterface $updateManager) { + } + + /** + * Clears stale update data. + * + * This will always run after any stage directory changes are applied to the + * active directory, since it's likely that core and/or multiple extensions + * have been added, removed, or updated. + */ + public function clearData(): void { + $this->updateManager->refreshUpdateData(); + update_storage_clear(); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PostApplyEvent::class => ['clearData', 1000], + ]; + } + +} diff --git a/core/modules/package_manager/src/Exception/ApplyFailedException.php b/core/modules/package_manager/src/Exception/ApplyFailedException.php new file mode 100644 index 0000000000000000000000000000000000000000..59643170f765feda597ebc07cb59a02b9259299d --- /dev/null +++ b/core/modules/package_manager/src/Exception/ApplyFailedException.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +/** + * Exception thrown if a stage encounters an error applying an update. + * + * If this exception is thrown it indicates that an update of the active + * codebase was attempted but failed. If this happens the site code is in an + * indeterminate state. Package Manager does not provide a method for recovering + * from this state. The site code should be restored from a backup. + * + * This exception is different from StageFailureMarkerException in that it is + * thrown if an error happens *during* the apply operation, rather than before + * or after it. + * + * Should not be thrown by external code. + */ +final class ApplyFailedException extends StageException { +} diff --git a/core/modules/package_manager/src/Exception/ComposerNotReadyException.php b/core/modules/package_manager/src/Exception/ComposerNotReadyException.php new file mode 100644 index 0000000000000000000000000000000000000000..e0842ef6959bb9be34ccc4b53a1f57918b641510 --- /dev/null +++ b/core/modules/package_manager/src/Exception/ComposerNotReadyException.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +/** + * Exception thrown if we cannot reliably use Composer. + * + * Should not be thrown by external code. + * + * @see \Drupal\package_manager\ComposerInspector::validate() + */ +final class ComposerNotReadyException extends \RuntimeException { + + /** + * Constructs a ComposerNotReadyException object. + * + * @param string|null $workingDir + * The directory where Composer was run, or NULL if the errors are related + * to the Composer executable itself. + * @param array $messages + * An array of messages explaining why Composer cannot be run correctly. + * @param int $code + * (optional) The exception code. Defaults to 0. + * @param \Throwable|null $previous + * (optional) The previous exception, for exception chaining. + */ + public function __construct(public readonly ?string $workingDir, array $messages, int $code = 0, ?\Throwable $previous = NULL) { + parent::__construct(implode("\n", $messages), $code, $previous); + } + +} diff --git a/core/modules/package_manager/src/Exception/StageEventException.php b/core/modules/package_manager/src/Exception/StageEventException.php new file mode 100644 index 0000000000000000000000000000000000000000..128fe39f4ef65b361f81a26e38008ea2cda0c53b --- /dev/null +++ b/core/modules/package_manager/src/Exception/StageEventException.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StageEvent; + +/** + * Exception thrown if an error related to an event occurs. + * + * This exception is thrown when an error strictly associated with an event + * occurs. This is also what makes it different from StageException. + * + * Should not be thrown by external code. + */ +class StageEventException extends StageException { + + /** + * Constructs a StageEventException object. + * + * @param \Drupal\package_manager\Event\StageEvent $event + * The stage event during which this exception is thrown. + * @param string|null $message + * (optional) The exception message. Defaults to a plain text representation + * of the validation results. + * @param mixed ...$arguments + * Additional arguments to pass to the parent constructor. + */ + public function __construct(public readonly StageEvent $event, ?string $message = NULL, ...$arguments) { + parent::__construct($event->stage, $message ?: $this->getResultsAsText(), ...$arguments); + } + + /** + * Formats the validation results, if any, as plain text. + * + * @return string + * The results, formatted as plain text. + */ + protected function getResultsAsText(): string { + $text = ''; + if ($this->event instanceof PreOperationStageEvent) { + foreach ($this->event->getResults() as $result) { + $messages = $result->messages; + $summary = $result->summary; + if ($summary) { + array_unshift($messages, $summary); + } + $text .= implode("\n", $messages) . "\n"; + } + } + return $text; + } + +} diff --git a/core/modules/package_manager/src/Exception/StageException.php b/core/modules/package_manager/src/Exception/StageException.php new file mode 100644 index 0000000000000000000000000000000000000000..499c3962c374863787cafe3ed5bd8e3efe2eb931 --- /dev/null +++ b/core/modules/package_manager/src/Exception/StageException.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +use Drupal\package_manager\StageBase; + +/** + * Base class for all exceptions related to stage operations. + * + * Should not be thrown by external code. + */ +class StageException extends \RuntimeException { + + /** + * Constructs a StageException object. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage. + * @param mixed ...$arguments + * Additional arguments to pass to the parent constructor. + */ + public function __construct(public readonly StageBase $stage, ...$arguments) { + parent::__construct(...$arguments); + } + +} diff --git a/core/modules/package_manager/src/Exception/StageFailureMarkerException.php b/core/modules/package_manager/src/Exception/StageFailureMarkerException.php new file mode 100644 index 0000000000000000000000000000000000000000..21fc6d4bb86475909f75112c7ce2bc1482c7c8db --- /dev/null +++ b/core/modules/package_manager/src/Exception/StageFailureMarkerException.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +/** + * Exception thrown if a stage can't be created due to an earlier failed commit. + * + * If this exception is thrown it indicates that an earlier commit operation had + * failed. If this happens the site code is in an indeterminate state. Package + * Manager does not provide a method for recovering from this state. The site + * code should be restored from a backup. + * + * We are extending RuntimeException rather than StageException which makes it + * clear that it's unrelated to the stage life cycle. + * + * This exception is different from ApplyFailedException as it focuses on + * the failure marker being detected outside the stage lifecycle. + */ +final class StageFailureMarkerException extends \RuntimeException { +} diff --git a/core/modules/package_manager/src/Exception/StageOwnershipException.php b/core/modules/package_manager/src/Exception/StageOwnershipException.php new file mode 100644 index 0000000000000000000000000000000000000000..aa6f3ec2ef87f9648be5885c6615019a98aed109 --- /dev/null +++ b/core/modules/package_manager/src/Exception/StageOwnershipException.php @@ -0,0 +1,13 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Exception; + +/** + * Exception thrown if a stage encounters an ownership or locking error. + * + * Should not be thrown by external code. + */ +final class StageOwnershipException extends StageException { +} diff --git a/core/modules/package_manager/src/ExecutableFinder.php b/core/modules/package_manager/src/ExecutableFinder.php new file mode 100644 index 0000000000000000000000000000000000000000..d8a2f1c21d52160ac100073107ff46c304c2a7c0 --- /dev/null +++ b/core/modules/package_manager/src/ExecutableFinder.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\Config\ConfigFactoryInterface; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; + +/** + * An executable finder which looks for executable paths in configuration. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ExecutableFinder implements ExecutableFinderInterface { + + public function __construct( + private readonly ExecutableFinderInterface $decorated, + private readonly ConfigFactoryInterface $configFactory, + ) {} + + /** + * {@inheritdoc} + */ + public function find(string $name): string { + $executables = $this->configFactory->get('package_manager.settings') + ->get('executables'); + + return $executables[$name] ?? $this->decorated->find($name); + } + +} diff --git a/core/modules/package_manager/src/FailureMarker.php b/core/modules/package_manager/src/FailureMarker.php new file mode 100644 index 0000000000000000000000000000000000000000..98181ae520945d02477132cd57449a8d55d8bbea --- /dev/null +++ b/core/modules/package_manager/src/FailureMarker.php @@ -0,0 +1,163 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Yaml; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\package_manager\Exception\StageFailureMarkerException; + +/** + * Handles failure marker file operation. + * + * The failure marker is a file placed in the active directory while staged + * code is copied back into it, and then removed afterward. This allows us to + * know if a commit operation failed midway through, which could leave the site + * code base in an indeterminate state -- which, in the worst case scenario, + * might render Drupal being unable to boot. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class FailureMarker implements EventSubscriberInterface { + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Gets the marker file path. + * + * @return string + * The absolute path of the marker file. + */ + public function getPath(): string { + return $this->pathLocator->getProjectRoot() . '/PACKAGE_MANAGER_FAILURE.yml'; + } + + /** + * Deletes the marker file. + */ + public function clear(): void { + unlink($this->getPath()); + } + + /** + * Writes data to marker file. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup $message + * Failure message to be added. + * @param \Throwable|null $throwable + * (optional) The throwable that caused the failure. + */ + public function write(StageBase $stage, TranslatableMarkup $message, ?\Throwable $throwable = NULL): void { + $data = [ + 'stage_class' => get_class($stage), + 'stage_type' => $stage->getType(), + 'stage_file' => (new \ReflectionObject($stage))->getFileName(), + 'message' => (string) $message, + 'throwable_class' => $throwable ? get_class($throwable) : FALSE, + 'throwable_message' => $throwable?->getMessage() ?? 'Not available', + 'throwable_backtrace' => $throwable?->getTraceAsString() ?? 'Not available.', + ]; + file_put_contents($this->getPath(), Yaml::dump($data)); + } + + /** + * Gets the data from the file if it exists. + * + * @return array|null + * The data from the file if it exists. + * + * @throws \Drupal\package_manager\Exception\StageFailureMarkerException + * Thrown if failure marker exists but cannot be decoded. + */ + private function getData(): ?array { + $path = $this->getPath(); + if (file_exists($path)) { + $data = file_get_contents($path); + try { + return Yaml::parse($data); + + } + catch (ParseException $exception) { + throw new StageFailureMarkerException('Failure marker file exists but cannot be decoded.', $exception->getCode(), $exception); + } + } + return NULL; + } + + /** + * Gets the message from the file if it exists. + * + * @param bool $include_backtrace + * Whether to include the backtrace in the message. Defaults to TRUE. May be + * set to FALSE in a context where it does not make sense to include, such + * as emails. + * + * @return string|null + * The message from the file if it exists, otherwise NULL. + * + * @throws \Drupal\package_manager\Exception\StageFailureMarkerException + * Thrown if failure marker exists but cannot be decoded. + */ + public function getMessage(bool $include_backtrace = TRUE): ?string { + $data = $this->getData(); + if ($data === NULL) { + return NULL; + } + $message = $data['message']; + if ($data['throwable_class']) { + $message .= sprintf( + ' Caused by %s, with this message: %s', + $data['throwable_class'], + $data['throwable_message'], + ); + if ($include_backtrace) { + $message .= "\nBacktrace:\n" . $data['throwable_backtrace']; + } + } + return $message; + } + + /** + * Asserts the failure file doesn't exist. + * + * @throws \Drupal\package_manager\Exception\StageFailureMarkerException + * Thrown if the marker file exists. + */ + public function assertNotExists(): void { + if ($message = $this->getMessage()) { + throw new StageFailureMarkerException($message); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeMarkerFile', + ]; + } + + /** + * Excludes the failure marker file from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event being handled. + */ + public function excludeMarkerFile(CollectPathsToExcludeEvent $event): void { + $event->addPathsRelativeToProjectRoot([ + $this->getPath(), + ]); + } + +} diff --git a/core/modules/package_manager/src/FileProcessOutputCallback.php b/core/modules/package_manager/src/FileProcessOutputCallback.php new file mode 100644 index 0000000000000000000000000000000000000000..f236cf349de1434641439fc3a38e1be41ff98b9a --- /dev/null +++ b/core/modules/package_manager/src/FileProcessOutputCallback.php @@ -0,0 +1,76 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * Logs process output to a file. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class FileProcessOutputCallback implements OutputCallbackInterface { + + /** + * The file to write to. + * + * @var resource + */ + private readonly mixed $handle; + + public function __construct( + string $path, + private readonly ?OutputCallbackInterface $decorated = NULL, + ) { + $this->handle = fopen($path, 'a'); + if (empty($this->handle)) { + throw new \RuntimeException("Could not open or create '$path' for writing."); + } + } + + /** + * {@inheritdoc} + */ + public function clearErrorOutput(): void { + $this->decorated?->clearErrorOutput(); + } + + /** + * {@inheritdoc} + */ + public function clearOutput(): void { + $this->decorated?->clearOutput(); + } + + /** + * {@inheritdoc} + */ + public function getErrorOutput(): array { + return $this->decorated?->getErrorOutput() ?? []; + } + + /** + * {@inheritdoc} + */ + public function getOutput(): array { + return $this->decorated?->getOutput() ?? []; + } + + /** + * {@inheritdoc} + */ + public function __invoke(OutputTypeEnum $type, string $buffer): void { + fwrite($this->handle, $buffer); + + if ($this->decorated) { + ($this->decorated)($type, $buffer); + } + } + +} diff --git a/core/modules/package_manager/src/Hook/PackageManagerHooks.php b/core/modules/package_manager/src/Hook/PackageManagerHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..423ea9708c060879b9c814a55a54de45898fa1c4 --- /dev/null +++ b/core/modules/package_manager/src/Hook/PackageManagerHooks.php @@ -0,0 +1,103 @@ +<?php + +namespace Drupal\package_manager\Hook; + +use Drupal\package_manager\ComposerInspector; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for package_manager. + */ +class PackageManagerHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name) : ?string { + switch ($route_name) { + case 'help.page.package_manager': + $output = '<h3 id="package-manager-about">' . t('About') . '</h3>'; + $output .= '<p>' . t('Package Manager is a framework for updating Drupal core and installing contributed modules and themes via Composer. It has no user interface, but it provides an API for creating a temporary copy of the current site, making changes to the copy, and then syncing those changes back into the live site.') . '</p>'; + $output .= '<p>' . t('Package Manager dispatches events before and after various operations, and external code can integrate with it by subscribing to those events. For more information, see <code>package_manager.api.php</code>.') . '</p>'; + $output .= '<h3 id="package-manager-requirements">' . t('Requirements') . '</h3>'; + $output .= '<ul>'; + $output .= ' <li>' . t("The Drupal application's codebase must be writable in order to use Automatic Updates. This includes Drupal core, modules, themes and the Composer dependencies in the <code>vendor</code> directory. This makes Automatic Updates incompatible with some hosting platforms.") . '</li>'; + $output .= ' <li>' . t('Package Manager requires a Composer executable whose version satisfies <code>@version</code>, and PHP must have permission to run it.', ['@version' => ComposerInspector::SUPPORTED_VERSION]) . '</li>'; + $output .= ' <li>' . t("Your Drupal site's <code>composer.json</code> file must be valid according to <code>composer validate</code>. See <a href=\":url\">Composer's documentation</a> for more information.", [':url' => 'https://getcomposer.org/doc/03-cli.md#validate']) . '</li>'; + $output .= ' <li>' . t('Composer must be configured for secure downloads. This means that <a href=":disable-tls">the <code>disable-tls</code> option</a> must be <code>false</code>, and <a href=":secure-http">the <code>secure-http</code> option</a> must be <code>true</code> in the <code>config</code> section of your <code>composer.json</code> file. If these options are not set in your <code>composer.json</code>, Composer will behave securely by default. To set these values at the command line, run the following commands:', [ + ':disable-tls' => 'https://getcomposer.org/doc/06-config.md#disable-tls', + ':secure-http' => 'https://getcomposer.org/doc/06-config.md#secure-http', + ]); + $output .= '<pre><code>'; + $output .= "composer config --unset disable-tls\n"; + $output .= "composer config --unset secure-http\n"; + $output .= '</code></pre></li></ul>'; + $output .= '<h3 id="package-manager-limitations">' . t('Limitations') . '</h3>'; + $output .= '<p>' . t("Because Package Manager modifies the current site's code base, it is intentionally limited in certain ways to prevent unexpected changes to the live site:") . '</p>'; + $output .= '<ul>'; + $output .= ' <li>' . t('It does not support Drupal multi-site installations.') . '</li>'; + $output .= ' <li>' . t('It only allows supported Composer plugins. If you have any, see <a href="#package-manager-faq-unsupported-composer-plugin">What if it says I have unsupported Composer plugins in my codebase?</a>.') . '</li>'; + $output .= ' <li>' . t('It does not automatically perform version control operations, e.g., with Git. Site administrators are responsible for committing updates.') . '</li>'; + $output .= ' <li>' . t('It can only maintain one copy of the site at any given time. If a copy of the site already exists, another one cannot be created until the existing copy is destroyed.') . '</li>'; + $output .= ' <li>' . t('It associates the temporary copy of the site with the user or session that originally created it, and only that user or session can make changes to it.') . '</li>'; + $output .= ' <li>' . t('It does not allow modules to be uninstalled while syncing changes into live site.') . '</li>'; + $output .= '</ul>'; + $output .= '<p>' . t('For more information, see the <a href=":url">online documentation for the Package Manager module</a>.', [':url' => 'https://www.drupal.org/docs/8/core/modules/package-manager']) . '</p>'; + $output .= '<h3 id="package-manager-faq">' . t('FAQ') . '</h3>'; + $output .= '<h4 id="package-manager-composer-related-faq">' . t('FAQs related to Composer') . '</h4>'; + $output .= '<ul>'; + $output .= ' <li>' . t('What if it says the <code>proc_open()</code> function is disabled on your PHP installation?'); + $output .= ' <p>' . t('Ask your system administrator to remove <code>proc_open()</code> from the <a href=":url">disable_functions</a> setting in <code>php.ini</code>.', [':url' => 'https://www.php.net/manual/en/ini.core.php#ini.disable-functions']) . '</p>'; + $output .= ' </li>'; + $output .= ' <li>' . t('What if it says the <code>composer</code> executable cannot be found?'); + $output .= ' <p>' . t("If the <code>composer</code> executable's path cannot be automatically determined, it can be explicitly set by adding the following line to <code>settings.php</code>:") . '</p>'; + $output .= " <pre><code>\$config['package_manager.settings']['executables']['composer'] = '/full/path/to/composer.phar';</code></pre>"; + $output .= ' </li>'; + $output .= ' <li>' . t('What if it says the detected version of Composer is not supported?'); + $output .= ' <p>' . t('The version of the <code>composer</code> executable must satisfy <code>@version</code>. See the <a href=":url">the Composer documentation</a> for more information, or use this command to update Composer:', [ + '@version' => ComposerInspector::SUPPORTED_VERSION, + ':url' => 'https://getcomposer.org/doc/03-cli.md#self-update-selfupdate', + ]) . '</p>'; + $output .= ' <pre><code>composer self-update</code></pre>'; + $output .= ' </li>'; + $output .= ' <li>' . t('What if it says the <code>composer validate</code> command failed?'); + $output .= ' <p>' . t('Composer detected problems with your <code>composer.json</code> and/or <code>composer.lock</code> files, and the project is not in a completely valid state. See <a href=":url">the Composer documentation</a> for more information.', [':url' => 'https://getcomposer.org/doc/04-schema.md']) . '</p>'; + $output .= ' </li>'; + $output .= '</ul>'; + $output .= '<h4 id="package-manager-faq-rsync">' . t('Using rsync') . '</h4>'; + $output .= '<p>' . t('Package Manager must be able to run <code>rsync</code> to copy files between the live site and the stage directory. Package Manager will try to detect the path to <code>rsync</code>, but if it cannot be detected, you can set it explicitly by adding the following line to <code>settings.php</code>:') . '</p>'; + $output .= "<pre><code>\$config['package_manager.settings']['executables']['rsync'] = '/full/path/to/rsync';</code></pre>"; + $output .= '<h4 id="package-manager-tuf-info">' . t('Enabling PHP-TUF protection') . '</h4>'; + $output .= '<p>' . t('Package Manager requires <a href=":php-tuf">PHP-TUF</a>, which implements <a href=":tuf">The Update Framework</a> as a way to help secure Composer package downloads via the <a href=":php-tuf-plugin">PHP-TUF Composer integration plugin</a>. This plugin must be installed and configured properly in order to use Package Manager.', [ + ':php-tuf' => 'https://github.com/php-tuf/php-tuf', + ':tuf' => 'https://theupdateframework.io/', + ':php-tuf-plugin' => 'https://github.com/php-tuf/composer-integration', + ]) . '</p>'; + $output .= '<p>' . t('To install and configure the plugin as needed, you can run the following commands:') . '</p>'; + $output .= '<pre><code>'; + $output .= "composer config allow-plugins.php-tuf/composer-integration true\n"; + $output .= "composer require php-tuf/composer-integration"; + $output .= '</code></pre>'; + $output .= '<p>' . t('Package Manager currently requires the <code>https://packages.drupal.org/8</code> Composer repository to be protected by TUF. To set this up, run the following command:') . '</p>'; + $output .= '<pre><code>'; + $output .= "composer tuf:protect https://packages.drupal.org/8\n"; + $output .= '</code></pre>'; + $output .= '<h4 id="package-manager-faq-unsupported-composer-plugin">' . t('What if it says I have unsupported Composer plugins in my codebase?') . '</h4>'; + $output .= '<p>' . t('A fresh Drupal installation only uses supported Composer plugins, but some modules or themes may depend on additional Composer plugins. <a href=":new-issue">Create a new issue</a> when you encounter this.', [':new-issue' => 'https://www.drupal.org/node/add/project-issue/auto_updates']) . '</p>'; + $output .= '<p>' . t('It is possible to <em>trust</em> additional Composer plugins, but this requires significant expertise: understanding the code of that Composer plugin, what the effects on the file system are and how it affects the Package Manager module. Some Composer plugins could result in a broken site!') . '</p>'; + $output .= '<h4 id="package-manager-faq-composer-patches-installed-or-removed">' . t('What if it says <code>cweagans/composer-patches</code> cannot be installed/removed?') . '</h4>'; + $output .= '<p>' . t('Installation or removal of <code>cweagans/composer-patches</code> via Package Manager is not supported. You can install or remove it manually by running Composer commands in your site root.') . '</p>'; + $output .= '<p>' . t('To install it:') . '</p>'; + $output .= '<pre><code>composer require cweagans/composer-patches</code></pre>'; + $output .= '<p>' . t('To remove it:') . '</p>'; + $output .= '<pre><code>composer remove cweagans/composer-patches</code></pre>'; + $output .= '<h4 id="package-manager-faq-composer-patches-not-a-root-dependency">' . t('What if it says <code>cweagans/composer-patches</code> must be a root dependency?') . '</h4>'; + $output .= '<p>' . t('If <code>cweagans/composer-patches</code> is installed, it must be defined as a dependency of the main project (i.e., it must be listed in the <code>require</code> or <code>require-dev</code> section of <code>composer.json</code>). You can run the following command in your site root to add it as a dependency of the main project:') . '</p>'; + $output .= "<pre><code>composer require cweagans/composer-patches</code></pre>"; + return $output; + } + return NULL; + } + +} diff --git a/core/modules/package_manager/src/ImmutablePathList.php b/core/modules/package_manager/src/ImmutablePathList.php new file mode 100644 index 0000000000000000000000000000000000000000..bed7c1c95d1614964ba422c2405a0d245f6557b5 --- /dev/null +++ b/core/modules/package_manager/src/ImmutablePathList.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; + +/** + * Defines a path list that cannot be changed. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ImmutablePathList implements PathListInterface { + + public function __construct(private readonly PathListInterface $decorated) {} + + /** + * {@inheritdoc} + */ + public function add(string ...$paths): never { + throw new \LogicException('Immutable path lists cannot be changed.'); + } + + /** + * {@inheritdoc} + */ + public function getAll(): array { + return $this->decorated->getAll(); + } + +} diff --git a/core/modules/package_manager/src/InstalledPackage.php b/core/modules/package_manager/src/InstalledPackage.php new file mode 100644 index 0000000000000000000000000000000000000000..97a428d83fd98f24247124259f86af6c535811e6 --- /dev/null +++ b/core/modules/package_manager/src/InstalledPackage.php @@ -0,0 +1,111 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Serialization\Yaml; + +/** + * A value object that represents an installed Composer package. + */ +final class InstalledPackage { + + /** + * Constructs an InstalledPackage object. + * + * @param string $name + * The package name. + * @param string $version + * The package version. + * @param string|null $path + * The package path, or NULL if the package type is `metapackage`. + * @param string $type + * The package type. + */ + private function __construct( + public readonly string $name, + public readonly string $version, + public readonly ?string $path, + public readonly string $type, + ) {} + + /** + * Create an installed package object from an array. + * + * @param array $data + * The package data. + * + * @return static + */ + public static function createFromArray(array $data): static { + $path = isset($data['path']) ? realpath($data['path']) : NULL; + // Fall back to `library`. + // @see https://getcomposer.org/doc/04-schema.md#type + $type = $data['type'] ?? 'library'; + assert(($type === 'metapackage') === is_null($path), 'Metapackage install path must be NULL.'); + + return new static($data['name'], $data['version'], $path, $type); + } + + /** + * Returns the Drupal project name for this package. + * + * This assumes that drupal.org adds a `project` key to every `.info.yml` file + * in the package, regardless of where they are in the package's directory + * structure. The package name is irrelevant except for checking that the + * vendor is `drupal`. For example, if the project key in the info file were + * `my_module`, and the package name were `drupal/whatever`, and this method + * would return `my_module`. + * + * @return string|null + * The name of the Drupal project installed by this package, or NULL if: + * - The package type is not one of `drupal-module`, `drupal-theme`, or + * `drupal-profile`. + * - The package's vendor is not `drupal`. + * - The project name could not otherwise be determined. + * + * @throws \UnexpectedValueException + * Thrown if the same project name exists in more than one package. + */ + public function getProjectName(): ?string { + // Only consider packages which are packaged by drupal.org and will be + // known to the core Update module. + $drupal_package_types = [ + 'drupal-module', + 'drupal-theme', + 'drupal-profile', + ]; + if ($this->path && str_starts_with($this->name, 'drupal/') && in_array($this->type, $drupal_package_types, TRUE)) { + return $this->scanForProjectName(); + } + return NULL; + } + + /** + * Scans a given path to determine the Drupal project name. + * + * The path will be scanned recursively for `.info.yml` files containing a + * `project` key. + * + * @return string|null + * The name of the project, as declared in the first found `.info.yml` which + * contains a `project` key, or NULL if none was found. + */ + private function scanForProjectName(): ?string { + $iterator = new \RecursiveDirectoryIterator($this->path); + $iterator = new \RecursiveIteratorIterator($iterator); + $iterator = new \RegexIterator($iterator, '/.+\.info\.yml$/', \RegexIterator::GET_MATCH); + + foreach ($iterator as $match) { + $info = file_get_contents($match[0]); + $info = Yaml::decode($info); + + if (!empty($info['project'])) { + return $info['project']; + } + } + return NULL; + } + +} diff --git a/core/modules/package_manager/src/InstalledPackagesList.php b/core/modules/package_manager/src/InstalledPackagesList.php new file mode 100644 index 0000000000000000000000000000000000000000..8a8ed468778ca4084d28b0a6ab3a41d5355dab40 --- /dev/null +++ b/core/modules/package_manager/src/InstalledPackagesList.php @@ -0,0 +1,177 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Composer\Semver\Comparator; + +/** + * Defines a class to list installed Composer packages. + * + * This only lists the packages that were installed at the time this object was + * instantiated. If packages are added or removed later on, a new package list + * must be created to reflect those changes. + * + * @see \Drupal\package_manager\ComposerInspector::getInstalledPackagesList() + */ +final class InstalledPackagesList extends \ArrayObject { + + /** + * {@inheritdoc} + */ + public function append(mixed $value): never { + throw new \LogicException('Installed package lists cannot be modified.'); + } + + /** + * {@inheritdoc} + */ + public function offsetSet(mixed $key, mixed $value): never { + throw new \LogicException('Installed package lists cannot be modified.'); + } + + /** + * {@inheritdoc} + */ + public function offsetUnset(mixed $key): never { + throw new \LogicException('Installed package lists cannot be modified.'); + } + + /** + * {@inheritdoc} + */ + public function offsetGet(mixed $key): ?InstalledPackage { + // Overridden to provide a clearer return type hint and compatibility with + // the null-safe operator. + if ($this->offsetExists($key)) { + return parent::offsetGet($key); + } + return NULL; + } + + /** + * {@inheritdoc} + */ + public function exchangeArray(mixed $array): never { + throw new \LogicException('Installed package lists cannot be modified.'); + } + + /** + * Returns the packages that are in this list, but not in another. + * + * @param self $other + * Another list of installed packages. + * + * @return static + * A list of packages which are in this list but not the other one, keyed by + * name. + */ + public function getPackagesNotIn(self $other): static { + $packages = array_diff_key($this->getArrayCopy(), $other->getArrayCopy()); + return new static($packages); + } + + /** + * Returns the packages which have a different version in another list. + * + * This compares this list with another one, and returns a list of packages + * which are present in both, but in different versions. + * + * @param self $other + * Another list of installed packages. + * + * @return static + * A list of packages which are present in both this list and the other one, + * but in different versions, keyed by name. + */ + public function getPackagesWithDifferentVersionsIn(self $other): static { + // Only compare packages that are both here and there. + $packages = array_intersect_key($this->getArrayCopy(), $other->getArrayCopy()); + + $packages = array_filter($packages, fn (InstalledPackage $p) => Comparator::notEqualTo($p->version, $other[$p->name]->version)); + return new static($packages); + } + + /** + * Returns the package for a given Drupal project name, if it is installed. + * + * Although it is common for the package name to match the project name (for + * example, a project name of `token` is likely part of the `drupal/token` + * package), it's not guaranteed. Therefore, in order to avoid inadvertently + * reading information about the wrong package, use this method to properly + * determine which package installs a particular Drupal project. + * + * @param string $project_name + * The name of a Drupal project. + * + * @return \Drupal\package_manager\InstalledPackage|null + * The Composer package which installs the project, or NULL if it could not + * be determined. + */ + public function getPackageByDrupalProjectName(string $project_name): ?InstalledPackage { + $matching_package = NULL; + foreach ($this as $package) { + if ($package->getProjectName() === $project_name) { + if ($matching_package) { + throw new \UnexpectedValueException(sprintf("Project '%s' was found in packages '%s' and '%s'.", $project_name, $matching_package->name, $package->name)); + } + $matching_package = $package; + } + } + return $matching_package; + } + + /** + * Returns the canonical names of the supported core packages. + * + * @return string[] + * The canonical list of supported core package names. + */ + private static function getCorePackageList(): array { + // This method returns the installed packages that are considered part of + // Drupal core. There's no way to tell by package type alone, since these + // packages have varying types, but are all part of Drupal core's + // repository. + return [ + 'drupal/core', + 'drupal/core-composer-scaffold', + 'drupal/core-dev', + 'drupal/core-dev-pinned', + 'drupal/core-project-message', + 'drupal/core-recommended', + 'drupal/core-vendor-hardening', + ]; + } + + /** + * Returns a list of installed core packages. + * + * Packages returned by ::getCorePackageList() are considered core packages. + * + * @param bool $include_dev + * (optional) Whether to include core packages intended for development. + * Defaults to TRUE. + * + * @return static + * A list of the installed core packages. + */ + public function getCorePackages(bool $include_dev = TRUE): static { + $core_packages = array_intersect_key( + $this->getArrayCopy(), + array_flip(static::getCorePackageList()) + ); + + // If drupal/core-recommended is present, it supersedes drupal/core, since + // drupal/core will always be one of its direct dependencies. + if (array_key_exists('drupal/core-recommended', $core_packages)) { + unset($core_packages['drupal/core']); + } + if (!$include_dev) { + unset($core_packages['drupal/core-dev']); + unset($core_packages['drupal/core-dev-pinned']); + } + return new static($core_packages); + } + +} diff --git a/core/modules/package_manager/src/LegacyVersionUtility.php b/core/modules/package_manager/src/LegacyVersionUtility.php new file mode 100644 index 0000000000000000000000000000000000000000..64f46eee5f558c7c7d97f3c52f100b608552f3d5 --- /dev/null +++ b/core/modules/package_manager/src/LegacyVersionUtility.php @@ -0,0 +1,83 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\Extension\ExtensionVersion; + +/** + * A utility class for dealing with legacy version numbers. + * + * @internal + * This is an internal utility class that could be changed or removed in any + * release and should not be used by external code. + */ +final class LegacyVersionUtility { + + /** + * Converts a version number to a semantic version if needed. + * + * @param string $version + * The version number. + * + * @return string + * The version number, converted if needed. + */ + public static function convertToSemanticVersion(string $version): string { + if (self::isLegacyVersion($version)) { + $version = substr($version, 4); + $version_parts = explode('-', $version); + $version = $version_parts[0] . '.0'; + if (count($version_parts) === 2) { + $version .= '-' . $version_parts[1]; + } + } + return $version; + } + + /** + * Converts a version number to a legacy version if needed and possible. + * + * @param string $version_string + * The version number. + * + * @return string|null + * The version number, converted if needed, or NULL if not possible. Only + * semantic version numbers that have patch level of 0 can be converted into + * legacy version numbers. + */ + public static function convertToLegacyVersion($version_string): ?string { + if (self::isLegacyVersion($version_string)) { + return $version_string; + } + $version = ExtensionVersion::createFromVersionString($version_string); + if ($extra = $version->getVersionExtra()) { + $version_string_without_extra = str_replace("-$extra", '', $version_string); + } + else { + $version_string_without_extra = $version_string; + } + [,, $patch] = explode('.', $version_string_without_extra); + // A semantic version can only be converted to legacy if it's patch level is + // '0'. + if ($patch !== '0') { + return NULL; + } + return '8.x-' . $version->getMajorVersion() . '.' . $version->getMinorVersion() . ($extra ? "-$extra" : ''); + } + + /** + * Determines if a version is legacy. + * + * @param string $version + * The version number. + * + * @return bool + * TRUE if the version is a legacy version number, otherwise FALSE. + */ + private static function isLegacyVersion(string $version): bool { + return stripos($version, '8.x-') === 0; + } + +} diff --git a/core/modules/package_manager/src/LoggingBeginner.php b/core/modules/package_manager/src/LoggingBeginner.php new file mode 100644 index 0000000000000000000000000000000000000000..806f253b924a7da7b9d1f482160f3d0ed09456b9 --- /dev/null +++ b/core/modules/package_manager/src/LoggingBeginner.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Config\ConfigFactoryInterface; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * Logs Composer Stager's Beginner process output to a file. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class LoggingBeginner implements BeginnerInterface { + + public function __construct( + private readonly BeginnerInterface $decorated, + private readonly ConfigFactoryInterface $configFactory, + private readonly TimeInterface $time, + ) {} + + /** + * {@inheritdoc} + */ + public function begin(PathInterface $activeDir, PathInterface $stagingDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $path = $this->configFactory->get('package_manager.settings')->get('log'); + if ($path) { + $callback = new FileProcessOutputCallback($path, $callback); + $callback(OutputTypeEnum::OUT, sprintf("### Beginning in %s\n", $stagingDir->absolute())); + } + + $start_time = $this->time->getCurrentMicroTime(); + $this->decorated->begin($activeDir, $stagingDir, $exclusions, $callback, $timeout); + $end_time = $this->time->getCurrentMicroTime(); + if ($callback) { + $callback(OutputTypeEnum::OUT, sprintf("### Finished in %0.3f seconds\n", $end_time - $start_time)); + } + } + +} diff --git a/core/modules/package_manager/src/LoggingCommitter.php b/core/modules/package_manager/src/LoggingCommitter.php new file mode 100644 index 0000000000000000000000000000000000000000..91945714640139b7c6bd4e2dafa8f50c49a5f8bc --- /dev/null +++ b/core/modules/package_manager/src/LoggingCommitter.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Config\ConfigFactoryInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * Logs Composer Stager's Committer process output to a file. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class LoggingCommitter implements CommitterInterface { + + public function __construct( + private readonly CommitterInterface $decorated, + private readonly ConfigFactoryInterface $configFactory, + private readonly TimeInterface $time, + ) {} + + /** + * {@inheritdoc} + */ + public function commit(PathInterface $stagingDir, PathInterface $activeDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $path = $this->configFactory->get('package_manager.settings')->get('log'); + if ($path) { + $callback = new FileProcessOutputCallback($path, $callback); + $callback(OutputTypeEnum::OUT, sprintf("### Committing changes from %s to %s\n", $stagingDir->absolute(), $activeDir->absolute())); + } + + $start_time = $this->time->getCurrentMicroTime(); + $this->decorated->commit($stagingDir, $activeDir, $exclusions, $callback, $timeout); + $end_time = $this->time->getCurrentMicroTime(); + if ($callback) { + $callback(OutputTypeEnum::OUT, sprintf("### Finished in %0.3f seconds\n", $end_time - $start_time)); + } + } + +} diff --git a/core/modules/package_manager/src/LoggingStager.php b/core/modules/package_manager/src/LoggingStager.php new file mode 100644 index 0000000000000000000000000000000000000000..fd4c1c65140b7227955e6ad74148867568e25a81 --- /dev/null +++ b/core/modules/package_manager/src/LoggingStager.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\Config\ConfigFactoryInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * Logs Composer Stager's Stager process output to a file. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class LoggingStager implements StagerInterface { + + public function __construct( + private readonly StagerInterface $decorated, + private readonly ConfigFactoryInterface $configFactory, + ) {} + + /** + * {@inheritdoc} + */ + public function stage(array $composerCommand, PathInterface $activeDir, PathInterface $stagingDir, ?OutputCallbackInterface $callback = NULL, int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $path = $this->configFactory->get('package_manager.settings')->get('log'); + if ($path) { + $callback = new FileProcessOutputCallback($path, $callback); + $callback(OutputTypeEnum::OUT, sprintf("### Staging '%s' in %s\n", implode(' ', $composerCommand), $stagingDir->absolute())); + } + $this->decorated->stage($composerCommand, $activeDir, $stagingDir, $callback, $timeout); + } + +} diff --git a/core/modules/package_manager/src/PackageManagerUninstallValidator.php b/core/modules/package_manager/src/PackageManagerUninstallValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..50dd001c0213d55c16318a799e70fb6bb5a4e661 --- /dev/null +++ b/core/modules/package_manager/src/PackageManagerUninstallValidator.php @@ -0,0 +1,65 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Extension\ModuleUninstallValidatorInterface; +use Drupal\Core\Queue\QueueFactory; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\TempStore\SharedTempStoreFactory; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * Prevents any module from being uninstalled if update is in process. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class PackageManagerUninstallValidator implements ModuleUninstallValidatorInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly BeginnerInterface $beginner, + private readonly StagerInterface $stager, + private readonly CommitterInterface $committer, + private readonly QueueFactory $queueFactory, + private readonly EventDispatcherInterface $eventDispatcher, + private readonly SharedTempStoreFactory $sharedTempStoreFactory, + private readonly TimeInterface $time, + private readonly PathFactoryInterface $pathFactory, + private readonly FailureMarker $failureMarker, + ) {} + + /** + * {@inheritdoc} + */ + public function validate($module) { + $stage = new class( + $this->pathLocator, + $this->beginner, + $this->stager, + $this->committer, + $this->queueFactory, + $this->eventDispatcher, + $this->sharedTempStoreFactory, + $this->time, + $this->pathFactory, + $this->failureMarker) extends StageBase {}; + $reasons = []; + if (!$stage->isAvailable() && $stage->isApplying()) { + $reasons[] = $this->t('Modules cannot be uninstalled while Package Manager is applying staged changes to the active code base.'); + } + return $reasons; + } + +} diff --git a/core/modules/package_manager/src/PackageManagerUpdateProcessor.php b/core/modules/package_manager/src/PackageManagerUpdateProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..afb39e9f8cea8d82540901545cf82d6b5a5dc45a --- /dev/null +++ b/core/modules/package_manager/src/PackageManagerUpdateProcessor.php @@ -0,0 +1,92 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface; +use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; +use Drupal\Core\PrivateKey; +use Drupal\Core\Queue\QueueFactory; +use Drupal\Core\State\StateInterface; +use Drupal\update\UpdateFetcherInterface; +use Drupal\update\UpdateProcessor; + +/** + * Extends the Update module's update processor allow fetching any project. + * + * The Update module's update processor service is intended to only fetch + * information for projects in the active codebase. Although it would be + * possible to use the Update module's update processor service to fetch + * information for projects not in the active code base this would add the + * project information to Update module's cache which would result in these + * projects being returned from the Update module's global functions such as + * update_get_available(). + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class PackageManagerUpdateProcessor extends UpdateProcessor { + + public function __construct( + ConfigFactoryInterface $config_factory, + QueueFactory $queue_factory, + UpdateFetcherInterface $update_fetcher, + StateInterface $state_store, + PrivateKey $private_key, + KeyValueFactoryInterface $key_value_factory, + KeyValueExpirableFactoryInterface $key_value_expirable_factory, + TimeInterface $time, + ) { + parent::__construct(...func_get_args()); + $this->fetchQueue = $queue_factory->get('package_manager.update_fetch_tasks'); + $this->tempStore = $key_value_expirable_factory->get('package_manager.update'); + $this->fetchTaskStore = $key_value_factory->get('package_manager.update_fetch_task'); + $this->availableReleasesTempStore = $key_value_expirable_factory->get('package_manager.update_available_releases'); + } + + /** + * Gets the project data by name. + * + * @param string $name + * The project name. + * + * @return mixed[] + * The project data if any is available, otherwise NULL. + */ + public function getProjectData(string $name): ?array { + if ($this->availableReleasesTempStore->has($name)) { + return $this->availableReleasesTempStore->get($name); + } + $project_fetch_data = [ + 'name' => $name, + 'project_type' => 'unknown', + 'includes' => [], + ]; + $this->createFetchTask($project_fetch_data); + if ($this->processFetchTask($project_fetch_data)) { + // If the fetch task was successful return the project information. + return $this->availableReleasesTempStore->get($name); + } + return NULL; + } + + /** + * {@inheritdoc} + */ + public function processFetchTask($project) { + // The parent method will set 'update.last_check' which will be used to + // inform the user when the last time update information was checked. In + // order to leave this value unaffected we will reset this to its previous + // value. + $last_check = $this->stateStore->get('update.last_check'); + $success = parent::processFetchTask($project); + $this->stateStore->set('update.last_check', $last_check); + return $success; + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/GitExcluder.php b/core/modules/package_manager/src/PathExcluder/GitExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..1e38ad9cf42a4fbf1820d50e9baf4e8dbeafb728 --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/GitExcluder.php @@ -0,0 +1,83 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes .git directories from stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class GitExcluder implements EventSubscriberInterface { + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ComposerInspector $composerInspector, + ) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeGitDirectories', + ]; + } + + /** + * Excludes .git directories from stage operations. + * + * Any .git directories that are a part of an installed package -- for + * example, a module that Composer installed from source -- are included. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + * + * @throws \Exception + * See \Drupal\package_manager\ComposerInspector::validate(). + */ + public function excludeGitDirectories(CollectPathsToExcludeEvent $event): void { + $project_root = $this->pathLocator->getProjectRoot(); + + // To determine which .git directories to exclude, the installed packages + // must be known, and that requires Composer commands to be able to run. + // This intentionally does not catch exceptions: failed Composer validation + // in the project root implies that this excluder cannot function correctly. + // Note: the call to ComposerInspector::getInstalledPackagesList() would + // also have triggered this, but explicitness is preferred here. + // @see \Drupal\package_manager\StatusCheckTrait::runStatusCheck() + $this->composerInspector->validate($project_root); + + $paths_to_exclude = []; + + $installed_paths = []; + // Collect the paths of every installed package. + $installed_packages = $this->composerInspector->getInstalledPackagesList($project_root); + foreach ($installed_packages as $package) { + if (!empty($package->path)) { + $installed_paths[] = $package->path; + } + } + $paths = $event->scanForDirectoriesByName('.git'); + foreach ($paths as $git_directory) { + // Don't exclude any `.git` directory that is directly under an installed + // package's path, since it means Composer probably installed that package + // from source and therefore needs the `.git` directory in order to update + // the package. + if (!in_array(dirname($git_directory), $installed_paths, TRUE)) { + $paths_to_exclude[] = $git_directory; + } + } + $event->addPathsRelativeToProjectRoot($paths_to_exclude); + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/NodeModulesExcluder.php b/core/modules/package_manager/src/PathExcluder/NodeModulesExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..f8eb6ffd5081cfbc1c941eda9294c628c26ee58a --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/NodeModulesExcluder.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes node_modules files from stage directories. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class NodeModulesExcluder implements EventSubscriberInterface { + + /** + * Excludes node_modules directories from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeNodeModulesFiles(CollectPathsToExcludeEvent $event): void { + $event->addPathsRelativeToProjectRoot($event->scanForDirectoriesByName('node_modules')); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeNodeModulesFiles', + ]; + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/SiteConfigurationExcluder.php b/core/modules/package_manager/src/PathExcluder/SiteConfigurationExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..0f38fb2a7b195674712a6d43553796aa00c63c9b --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/SiteConfigurationExcluder.php @@ -0,0 +1,145 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\Core\File\Exception\FileException; +use Drupal\Core\File\FileSystemInterface; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes site configuration files from stage directories. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class SiteConfigurationExcluder implements EventSubscriberInterface { + + public function __construct( + protected string $sitePath, + private readonly PathLocator $pathLocator, + private readonly FileSystemInterface $fileSystem, + ) {} + + /** + * Excludes site configuration files from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeSiteConfiguration(CollectPathsToExcludeEvent $event): void { + // These two files are never relevant to existing sites. + $paths = [ + 'sites/default/default.settings.php', + 'sites/default/default.services.yml', + ]; + + // Exclude site-specific settings files, which are always in the web root. + // By default, Drupal core will always try to write-protect these files. + // @see system_requirements() + $settings_files = [ + 'settings.php', + 'settings.local.php', + 'services.yml', + ]; + foreach ($settings_files as $settings_file) { + $paths[] = $this->sitePath . '/' . $settings_file; + $paths[] = 'sites/default/' . $settings_file; + } + // Site configuration files are always excluded relative to the web root. + $event->addPathsRelativeToWebRoot($paths); + } + + /** + * Makes the staged `sites/default` directory owner-writable. + * + * This allows the core scaffold plugin to make changes in `sites/default`, + * if needed. Otherwise, it would break if `sites/default` is not writable. + * This can happen because rsync preserves directory permissions (and Drupal + * tries to write-protect the site directory). + * + * We specifically exclude `default.settings.php` and `default.services.yml` + * from Package Manager operations. This allows the scaffold plugin to change + * those files in the stage directory. + * + * @param \Drupal\package_manager\Event\PostCreateEvent $event + * The event being handled. + * + * @see ::excludeSiteConfiguration() + */ + public function makeDefaultSiteDirectoryWritable(PostCreateEvent $event): void { + $dir = $this->getDefaultSiteDirectoryPath($event->stage->getStageDirectory()); + // If the directory doesn't even exist, there's nothing to do here. + if (!is_dir($dir)) { + return; + } + if (!$this->fileSystem->chmod($dir, 0700)) { + throw new FileException("Could not change permissions on '$dir'."); + } + } + + /** + * Makes `sites/default` permissions the same in live and stage directories. + * + * @param \Drupal\package_manager\Event\PreApplyEvent $event + * The event being handled. + * + * @throws \Drupal\Core\File\Exception\FileException + * If the permissions of the live `sites/default` cannot be determined, or + * cannot be changed on the staged `sites/default`. + */ + public function syncDefaultSiteDirectoryPermissions(PreApplyEvent $event): void { + $staged_dir = $this->getDefaultSiteDirectoryPath($event->stage->getStageDirectory()); + // If the directory doesn't even exist, there's nothing to do here. + if (!is_dir($staged_dir)) { + return; + } + $live_dir = $this->getDefaultSiteDirectoryPath($this->pathLocator->getProjectRoot()); + + $permissions = fileperms($live_dir); + if ($permissions === FALSE) { + throw new FileException("Could not determine permissions for '$live_dir'."); + } + + if (!$this->fileSystem->chmod($staged_dir, $permissions)) { + throw new FileException("Could not change permissions on '$staged_dir'."); + } + } + + /** + * Returns the full path to `sites/default`, relative to a root directory. + * + * @param string $root_dir + * The root directory. + * + * @return string + * The full path to `sites/default` within the given root directory. + */ + private function getDefaultSiteDirectoryPath(string $root_dir): string { + $dir = [$root_dir]; + $web_root = $this->pathLocator->getWebRoot(); + if ($web_root) { + $dir[] = $web_root; + } + return implode(DIRECTORY_SEPARATOR, [...$dir, 'sites', 'default']); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeSiteConfiguration', + PostCreateEvent::class => 'makeDefaultSiteDirectoryWritable', + PreApplyEvent::class => 'syncDefaultSiteDirectoryPermissions', + ]; + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/SiteFilesExcluder.php b/core/modules/package_manager/src/PathExcluder/SiteFilesExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..15b6295e95d6daabc82f3ac57908b69b639f7e4d --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/SiteFilesExcluder.php @@ -0,0 +1,66 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\Core\StreamWrapper\LocalStream; +use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Filesystem\Filesystem; + +/** + * Excludes site files from stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class SiteFilesExcluder implements EventSubscriberInterface { + + public function __construct( + private readonly StreamWrapperManagerInterface $streamWrapperManager, + private readonly Filesystem $fileSystem, + private readonly array $wrappers, + ) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeSiteFiles', + ]; + } + + /** + * Excludes public and private files from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeSiteFiles(CollectPathsToExcludeEvent $event): void { + // Exclude files handled by the stream wrappers listed in $this->wrappers. + // These paths could be either absolute or relative, depending on site + // settings. If they are absolute, treat them as relative to the project + // root. Otherwise, treat them as relative to the web root. + foreach ($this->wrappers as $scheme) { + $wrapper = $this->streamWrapperManager->getViaScheme($scheme); + if ($wrapper instanceof LocalStream) { + $path = $wrapper->getDirectoryPath(); + + if ($this->fileSystem->isAbsolutePath($path)) { + if ($path = realpath($path)) { + $event->addPathsRelativeToProjectRoot([$path]); + } + } + else { + $event->addPathsRelativeToWebRoot([$path]); + } + } + } + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/SqliteDatabaseExcluder.php b/core/modules/package_manager/src/PathExcluder/SqliteDatabaseExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..47f5d6652682e3fb9042c67591b571215626099a --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/SqliteDatabaseExcluder.php @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\Core\Database\Connection; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes SQLite database files from stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class SqliteDatabaseExcluder implements EventSubscriberInterface { + + public function __construct( + private readonly PathFactoryInterface $pathFactory, + private readonly Connection $database, + ) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeDatabaseFiles', + ]; + } + + /** + * Excludes SQLite database files from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeDatabaseFiles(CollectPathsToExcludeEvent $event): void { + // If the database is SQLite, it might be located in the project directory, + // and should be excluded. + if ($this->database->driver() === 'sqlite') { + // @todo Support database connections other than the default in + // https://www.drupal.org/i/3441919. + $db_path = $this->database->getConnectionOptions()['database']; + // Exclude the database file and auxiliary files created by SQLite. + $paths = [$db_path, "$db_path-shm", "$db_path-wal"]; + + // If the database path is absolute, it might be outside the project root, + // in which case we don't need to do anything. + if ($this->pathFactory->create($db_path)->isAbsolute()) { + try { + $event->addPathsRelativeToProjectRoot($paths); + } + catch (\LogicException) { + // The database is outside the project root, so we're done. + } + } + else { + // The database is in the web root, and must be excluded relative to it. + $event->addPathsRelativeToWebRoot($paths); + } + } + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/TestSiteExcluder.php b/core/modules/package_manager/src/PathExcluder/TestSiteExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..cb6aefc3066f9c9a71206e48dba55e549a98e3c2 --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/TestSiteExcluder.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes 'sites/simpletest' from stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class TestSiteExcluder implements EventSubscriberInterface { + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeTestSites', + ]; + } + + /** + * Excludes sites/simpletest from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeTestSites(CollectPathsToExcludeEvent $event): void { + // Always exclude automated test directories. If they exist, they will be in + // the web root. + $event->addPathsRelativeToWebRoot(['sites/simpletest']); + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/UnknownPathExcluder.php b/core/modules/package_manager/src/PathExcluder/UnknownPathExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..f6babf1814e5998592e806782f962070970f8e31 --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/UnknownPathExcluder.php @@ -0,0 +1,201 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\Component\Serialization\Json; +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Filesystem\Exception\InvalidArgumentException; +use Symfony\Component\Filesystem\Path; + +/** + * Excludes unknown paths from stage operations. + * + * Any path in the root directory of the project that is NOT one of the + * following are considered unknown paths: + * 1. The vendor directory + * 2. The web root + * 3. composer.json + * 4. composer.lock + * 5. Scaffold files as determined by the drupal/core-composer-scaffold plugin + * + * If the web root and the project root are the same, nothing is excluded. + * + * This excluder can be disabled by changing the config setting + * `package_manager.settings:include_unknown_files_in_project_root` to TRUE. + * This may be needed for sites that have files outside the web root (besides + * the vendor directory) which are nonetheless needed in order for Composer to + * assemble the code base correctly; a classic example would be a directory of + * patch files used by `cweagans/composer-patches`. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class UnknownPathExcluder implements EventSubscriberInterface, LoggerAwareInterface { + + use LoggerAwareTrait; + use StringTranslationTrait; + + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + private readonly ConfigFactoryInterface $configFactory, + ) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeUnknownPaths', + StatusCheckEvent::class => 'logExcludedPaths', + ]; + } + + /** + * Returns the paths to exclude from stage operations. + * + * @return string[] + * The paths that should be excluded from stage operations, relative to the + * project root. + * + * @throws \Exception + * See \Drupal\package_manager\ComposerInspector::validate(). + */ + private function getExcludedPaths(): array { + // If this excluder is disabled, or the project root and web root are the + // same, we are not excluding any paths. + $is_disabled = $this->configFactory->get('package_manager.settings') + ->get('include_unknown_files_in_project_root'); + $web_root = $this->pathLocator->getWebRoot(); + if ($is_disabled || empty($web_root)) { + return []; + } + + // To determine the files to include, the installed packages must be known, + // and that requires Composer commands to be able to run. This intentionally + // does not catch exceptions: failed Composer validation in the project root + // implies that this excluder cannot function correctly. In such a case, the + // call to ComposerInspector::getConfig() would also have triggered an + // exception, but explicitness is preferred here. + // @see \Drupal\package_manager\StatusCheckTrait::runStatusCheck() + $project_root = $this->pathLocator->getProjectRoot(); + $this->composerInspector->validate($project_root); + + // The vendor directory and web root are always included in staging + // operations, along with `composer.json`, `composer.lock`, and any scaffold + // files provided by Drupal core. + $always_include = [ + $this->composerInspector->getConfig('vendor-dir', $project_root), + $web_root, + 'composer.json', + 'composer.lock', + ]; + foreach ($this->getScaffoldFiles() as $scaffold_file_path) { + // The web root is always included in staging operations, so we don't need + // to do anything special for scaffold files that live in it. + if (str_starts_with($scaffold_file_path, '[web-root]')) { + continue; + } + $always_include[] = ltrim($scaffold_file_path, '/'); + } + + // Find any path repositories located inside the project root. These need + // to be included or Composer will break in the staging area. + $repositories = $this->composerInspector->getConfig('repositories', $project_root); + $repositories = Json::decode($repositories); + foreach ($repositories as $repository) { + if ($repository['type'] !== 'path') { + continue; + } + try { + // Ensure $path is relative to the project root, even if it's written as + // an absolute path in `composer.json`. + $path = Path::makeRelative($repository['url'], $project_root); + // Strip off everything except the top-level directory name. For + // example, if the repository path is `custom/module/foo`, always + // include `custom`. + $always_include[] = dirname($path, substr_count($path, '/') ?: 1); + } + catch (InvalidArgumentException) { + // The repository path is not relative to the project root, so we don't + // need to worry about it. + } + } + + // Search for all files (including hidden ones) in the project root. We need + // to use readdir() and friends here, rather than glob(), since certain + // glob() flags aren't supported on all systems. We also can't use + // \Drupal\Core\File\FileSystemInterface::scanDirectory(), because it + // unconditionally ignores hidden files and directories. + $files_in_project_root = []; + $handle = opendir($project_root); + if (empty($handle)) { + throw new \RuntimeException("Could not scan for files in the project root."); + } + while ($entry = readdir($handle)) { + $files_in_project_root[] = $entry; + } + closedir($handle); + + return array_diff($files_in_project_root, $always_include, ['.', '..']); + } + + /** + * Excludes unknown paths from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeUnknownPaths(CollectPathsToExcludeEvent $event): void { + // We can exclude the paths as-is; they are already relative to the project + // root. + $event->add(...$this->getExcludedPaths()); + } + + /** + * Logs the paths that will be excluded from stage operations. + */ + public function logExcludedPaths(): void { + $excluded_paths = $this->getExcludedPaths(); + if ($excluded_paths) { + sort($excluded_paths); + + $message = $this->t("The following paths in @project_root aren't recognized as part of your Drupal site, so to be safe, Package Manager is excluding them from all stage operations. If these files are not needed for Composer to work properly in your site, no action is needed. Otherwise, you can disable this behavior by setting the <code>package_manager.settings:include_unknown_files_in_project_root</code> config setting to <code>TRUE</code>.\n\n@list", [ + '@project_root' => $this->pathLocator->getProjectRoot(), + '@list' => implode("\n", $excluded_paths), + ]); + $this->logger?->info($message); + } + } + + /** + * Gets the path of scaffold files, for example 'index.php' and 'robots.txt'. + * + * @return string[] + * The paths of scaffold files provided by `drupal/core`, relative to the + * project root. + * + * @todo Intelligently load scaffold files in https://drupal.org/i/3343802. + */ + private function getScaffoldFiles(): array { + $project_root = $this->pathLocator->getProjectRoot(); + $packages = $this->composerInspector->getInstalledPackagesList($project_root); + $extra = Json::decode($this->composerInspector->getConfig('extra', $packages['drupal/core']->path . '/composer.json')); + + $scaffold_files = $extra['drupal-scaffold']['file-mapping'] ?? []; + return str_replace('[project-root]', '', array_keys($scaffold_files)); + } + +} diff --git a/core/modules/package_manager/src/PathExcluder/VendorHardeningExcluder.php b/core/modules/package_manager/src/PathExcluder/VendorHardeningExcluder.php new file mode 100644 index 0000000000000000000000000000000000000000..6bbe26e47802423d9c8881d7d06a939f905f398c --- /dev/null +++ b/core/modules/package_manager/src/PathExcluder/VendorHardeningExcluder.php @@ -0,0 +1,46 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\PathExcluder; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Excludes vendor hardening files from stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class VendorHardeningExcluder implements EventSubscriberInterface { + + public function __construct(private readonly PathLocator $pathLocator) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'excludeVendorHardeningFiles', + ]; + } + + /** + * Excludes vendor hardening files from stage operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event object. + */ + public function excludeVendorHardeningFiles(CollectPathsToExcludeEvent $event): void { + // If the core-vendor-hardening plugin (used in the legacy-project template) + // is present, it may have written security hardening files in the vendor + // directory. They should always be excluded. + $vendor_dir = $this->pathLocator->getVendorDirectory(); + $event->addPathsRelativeToProjectRoot([$vendor_dir . '/.htaccess']); + } + +} diff --git a/core/modules/package_manager/src/PathLocator.php b/core/modules/package_manager/src/PathLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..a41e767f814c3df517a3cd1ef43283badc6b468f --- /dev/null +++ b/core/modules/package_manager/src/PathLocator.php @@ -0,0 +1,96 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Composer\Autoload\ClassLoader; +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\File\FileSystemInterface; + +/** + * Computes file system paths that are needed to stage code changes. + */ +class PathLocator { + + public function __construct( + protected string $appRoot, + protected ConfigFactoryInterface $configFactory, + protected FileSystemInterface $fileSystem, + ) {} + + /** + * Returns the absolute path of the project root. + * + * This is where the project-level composer.json should normally be found, and + * may or may not be the same path as the Drupal code base. + * + * @return string + * The absolute path of the project root. + */ + public function getProjectRoot(): string { + // Assume that the vendor directory is immediately below the project root. + return realpath($this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..'); + } + + /** + * Returns the absolute path of the vendor directory. + * + * @return string + * The absolute path of the vendor directory. + */ + public function getVendorDirectory(): string { + // There may be multiple class loaders at work. + // ClassLoader::getRegisteredLoaders() keeps track of them all, indexed by + // the path of the vendor directory they load classes from. + $loaders = ClassLoader::getRegisteredLoaders(); + + // If there's only one class loader, we don't need to search for the right + // one. + if (count($loaders) === 1) { + return key($loaders); + } + + // To determine which class loader is the one for Drupal's vendor directory, + // look for the loader whose vendor path starts the same way as the path to + // this file. + foreach (array_keys($loaders) as $path) { + if (str_starts_with(__FILE__, dirname($path))) { + return $path; + } + } + // If we couldn't find a match, assume that the first registered class + // loader is the one we want. + return key($loaders); + } + + /** + * Returns the path of the Drupal installation, relative to the project root. + * + * @return string + * The path of the Drupal installation, relative to the project root and + * without leading or trailing slashes. Will return an empty string if the + * project root and Drupal root are the same. + */ + public function getWebRoot(): string { + $web_root = str_replace(trim($this->getProjectRoot(), DIRECTORY_SEPARATOR), '', trim($this->appRoot, DIRECTORY_SEPARATOR)); + return trim($web_root, DIRECTORY_SEPARATOR); + } + + /** + * Returns the directory where stage directories will be created. + * + * The stage root may be affected by site settings, so stages may wish to + * cache the value returned by this method, to ensure that they use the same + * stage root directory throughout their life cycle. + * + * @return string + * The absolute path of the directory where stage directories should be + * created. + */ + public function getStagingRoot(): string { + $site_id = $this->configFactory->get('system.site')->get('uuid'); + return $this->fileSystem->getTempDirectory() . DIRECTORY_SEPARATOR . '.package_manager' . $site_id; + } + +} diff --git a/core/modules/package_manager/src/Plugin/QueueWorker/Cleaner.php b/core/modules/package_manager/src/Plugin/QueueWorker/Cleaner.php new file mode 100644 index 0000000000000000000000000000000000000000..a64dd6730b56a2fed342329f8b8a75294590762b --- /dev/null +++ b/core/modules/package_manager/src/Plugin/QueueWorker/Cleaner.php @@ -0,0 +1,50 @@ +<?php + +namespace Drupal\package_manager\Plugin\QueueWorker; + +use Drupal\Core\File\FileSystemInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; +use Drupal\Core\Queue\QueueWorkerBase; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Processes a queue of defunct stage directories, deleting them. + * + * @QueueWorker( + * id = "package_manager_cleanup", + * title = @Translation("Stage directory cleaner"), + * cron = {"time" = 30} + * ) + */ +final class Cleaner extends QueueWorkerBase implements ContainerFactoryPluginInterface { + + public function __construct(array $configuration, string $plugin_id, mixed $plugin_definition, private readonly FileSystemInterface $fileSystem) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get(FileSystemInterface::class), + ); + } + + /** + * {@inheritdoc} + */ + public function processItem($dir): void { + assert(is_string($dir)); + + if (file_exists($dir)) { + $this->fileSystem->deleteRecursive($dir, function (string $path): void { + $this->fileSystem->chmod($path, is_dir($path) ? 0700 : 0600); + }); + } + } + +} diff --git a/core/modules/package_manager/src/ProcessFactory.php b/core/modules/package_manager/src/ProcessFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7e92977e7ff8bb7e1a75bc7cff7b9db1e3e5342b --- /dev/null +++ b/core/modules/package_manager/src/ProcessFactory.php @@ -0,0 +1,97 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\File\FileSystemInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +// cspell:ignore BINDIR + +/** + * Defines a process factory which sets the COMPOSER_HOME environment variable. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ProcessFactory implements ProcessFactoryInterface { + + public function __construct( + private readonly FileSystemInterface $fileSystem, + private readonly ConfigFactoryInterface $configFactory, + private readonly ProcessFactoryInterface $decorated, + ) {} + + /** + * {@inheritdoc} + */ + public function create(array $command, ?PathInterface $cwd = NULL, array $env = []): ProcessInterface { + $process = $this->decorated->create($command, $cwd, $env); + + $env = $process->getEnv(); + if ($command && $this->isComposerCommand($command)) { + $env['COMPOSER_HOME'] = $this->getComposerHomePath(); + } + // Ensure that the current PHP installation is the first place that will be + // searched when looking for the PHP interpreter. + $env['PATH'] = static::getPhpDirectory() . ':' . getenv('PATH'); + $process->setEnv($env); + return $process; + } + + /** + * Returns the directory which contains the PHP interpreter. + * + * @return string + * The path of the directory containing the PHP interpreter. If the server + * is running in a command-line interface, the directory portion of + * PHP_BINARY is returned; otherwise, the compile-time PHP_BINDIR is. + * + * @see php_sapi_name() + * @see https://www.php.net/manual/en/reserved.constants.php + */ + private static function getPhpDirectory(): string { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'cli-server') { + return dirname(PHP_BINARY); + } + return PHP_BINDIR; + } + + /** + * Returns the path to use as the COMPOSER_HOME environment variable. + * + * @return string + * The path which should be used as COMPOSER_HOME. + */ + private function getComposerHomePath(): string { + $home_path = $this->fileSystem->getTempDirectory(); + $home_path .= '/package_manager_composer_home-'; + $home_path .= $this->configFactory->get('system.site')->get('uuid'); + $this->fileSystem->prepareDirectory($home_path, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS); + + return $home_path; + } + + /** + * Determines if a command is running Composer. + * + * @param string[] $command + * The command parts. + * + * @return bool + * TRUE if the command is running Composer, FALSE otherwise. + */ + private function isComposerCommand(array $command): bool { + $executable = $command[0]; + $executable_parts = explode('/', $executable); + $file = array_pop($executable_parts); + return str_starts_with($file, 'composer'); + } + +} diff --git a/core/modules/package_manager/src/ProcessOutputCallback.php b/core/modules/package_manager/src/ProcessOutputCallback.php new file mode 100644 index 0000000000000000000000000000000000000000..9a286623f1652ccbf5d5b542b5d82016b81aa902 --- /dev/null +++ b/core/modules/package_manager/src/ProcessOutputCallback.php @@ -0,0 +1,126 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\NullLogger; + +/** + * A process callback for capturing output. + * + * @see \Symfony\Component\Process\Process + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ProcessOutputCallback implements OutputCallbackInterface, LoggerAwareInterface { + + use LoggerAwareTrait; + + /** + * The output buffer. + * + * @var array + */ + private array $outBuffer = []; + + /** + * The error buffer. + * + * @var array + */ + private array $errorBuffer = []; + + /** + * Constructs a ProcessOutputCallback object. + */ + public function __construct() { + $this->setLogger(new NullLogger()); + } + + /** + * {@inheritdoc} + */ + public function __invoke(OutputTypeEnum $type, string $buffer): void { + + if ($type === OutputTypeEnum::OUT) { + $this->outBuffer[] = $buffer; + } + elseif ($type === OutputTypeEnum::ERR) { + $this->errorBuffer[] = $buffer; + } + } + + /** + * Gets the output. + * + * If there is anything in the error buffer, it will be logged as a warning. + * + * @return array + * The output buffer. + */ + public function getOutput(): array { + $error_output = $this->getErrorOutput(); + if ($error_output) { + $this->logger->warning(implode('', $error_output)); + } + return $this->outBuffer; + } + + /** + * Gets the parsed JSON output. + * + * @return mixed + * The decoded JSON output or NULL if there isn't any. + */ + public function parseJsonOutput(): mixed { + $output = $this->getOutput(); + if ($output) { + return json_decode(trim(implode('', $output)), TRUE, flags: JSON_THROW_ON_ERROR); + } + return NULL; + } + + /** + * Gets the error output. + * + * @return array + * The error output buffer. + */ + public function getErrorOutput(): array { + return $this->errorBuffer; + } + + /** + * {@inheritdoc} + */ + public function clearErrorOutput(): void { + $this->errorBuffer = []; + } + + /** + * {@inheritdoc} + */ + public function clearOutput(): void { + $this->outBuffer = []; + } + + /** + * Resets buffers. + * + * @return self + */ + public function reset(): self { + $this->clearErrorOutput(); + $this->clearOutput(); + return $this; + } + +} diff --git a/core/modules/package_manager/src/ProjectInfo.php b/core/modules/package_manager/src/ProjectInfo.php new file mode 100644 index 0000000000000000000000000000000000000000..c574e5fb98e8871275747eeb034626d7eb175842 --- /dev/null +++ b/core/modules/package_manager/src/ProjectInfo.php @@ -0,0 +1,230 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Composer\Semver\Comparator; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\update\ProjectRelease; +use Drupal\Core\Extension\ExtensionVersion; +use Drupal\Core\Utility\Error; +use Drupal\update\UpdateManagerInterface; + +/** + * Defines a class for retrieving project information from Update module. + * + * @internal + * This is an internal part of Automatic Updates and may be changed or removed + * at any time without warning. External code should use the Update API + * directly. + */ +final class ProjectInfo { + + public function __construct(private readonly string $name) { + } + + /** + * Determines if a release can be installed. + * + * @param \Drupal\update\ProjectRelease $release + * The project release. + * @param string[] $support_branches + * The supported branches. + * + * @return bool + * TRUE if the release is installable, otherwise FALSE. A release will be + * considered installable if it is secure, published, supported, and in + * a supported branch. + */ + private function isInstallable(ProjectRelease $release, array $support_branches): bool { + if ($release->isInsecure() || !$release->isPublished() || $release->isUnsupported()) { + return FALSE; + } + $version = ExtensionVersion::createFromVersionString($release->getVersion()); + if ($version->getVersionExtra() === 'dev') { + return FALSE; + } + foreach ($support_branches as $support_branch) { + $support_branch_version = ExtensionVersion::createFromSupportBranch($support_branch); + if ($support_branch_version->getMajorVersion() === $version->getMajorVersion() && $support_branch_version->getMinorVersion() === $version->getMinorVersion()) { + return TRUE; + } + } + return FALSE; + } + + /** + * Returns up-to-date project information. + * + * @return mixed[]|null + * The retrieved project information. + * + * @throws \RuntimeException + * If data about available updates cannot be retrieved. + */ + public function getProjectInfo(): ?array { + $available_updates = $this->getAvailableProjects(); + $project_data = update_calculate_project_data($available_updates); + if (!isset($project_data[$this->name])) { + return $available_updates[$this->name] ?? NULL; + } + return $project_data[$this->name]; + } + + /** + * Gets all project releases to which the site can update. + * + * @return \Drupal\update\ProjectRelease[]|null + * If the project information is available, an array of releases that can be + * installed, keyed by version number; otherwise NULL. The releases are in + * descending order by version number (i.e., higher versions are listed + * first). The currently installed version of the project, and any older + * versions, are not considered installable releases. + * + * @throws \RuntimeException + * Thrown if there are no available releases. + * + * @todo Remove or simplify this function in https://www.drupal.org/i/3252190. + */ + public function getInstallableReleases(): ?array { + $project = $this->getProjectInfo(); + if (!$project) { + return NULL; + } + $available_updates = $this->getAvailableProjects()[$this->name]; + if ($available_updates['project_status'] !== 'published') { + throw new \RuntimeException("The project '{$this->name}' can not be updated because its status is " . $available_updates['project_status']); + } + $installed_version = $this->getInstalledVersion(); + + if ($installed_version && empty($available_updates['releases'])) { + // If project is installed but not current we should always have at + // least one release. + throw new \RuntimeException('There was a problem getting update information. Try again later.'); + } + + $support_branches = explode(',', $available_updates['supported_branches']); + $installable_releases = []; + foreach ($available_updates['releases'] as $release_info) { + try { + $release = ProjectRelease::createFromArray($release_info); + } + catch (\UnexpectedValueException $exception) { + // Ignore releases that are in an invalid format. Although this is + // unlikely we should still only process releases in the correct format. + \Drupal::logger('package_manager') + ->error(sprintf('Invalid project format: %s', print_r($release_info, TRUE)), Error::decodeException($exception)); + continue; + } + + $version = $release->getVersion(); + if ($installed_version) { + $semantic_version = LegacyVersionUtility::convertToSemanticVersion($version); + $semantic_installed_version = LegacyVersionUtility::convertToSemanticVersion($installed_version); + if (Comparator::lessThanOrEqualTo($semantic_version, $semantic_installed_version)) { + // If the project is installed stop searching for releases as soon as + // we find the installed version. + break; + } + } + if ($this->isInstallable($release, $support_branches)) { + $installable_releases[$version] = $release; + } + } + return $installable_releases; + } + + /** + * Returns the installed project version, according to the Update module. + * + * @return string|null + * The installed project version as known to the Update module or NULL if + * the project information is not available. + */ + public function getInstalledVersion(): ?string { + $project_data = $this->getProjectInfo(); + if ($project_data && array_key_exists('existing_version', $project_data)) { + $existing_version = $project_data['existing_version']; + // Treat an unknown version the same as a project whose project + // information is not available, so return NULL. + // @see \update_process_project_info() + if ($existing_version instanceof TranslatableMarkup && $existing_version->getUntranslatedString() === 'Unknown') { + return NULL; + } + + // TRICKY: Since this is relying on data coming from + // \Drupal\update\UpdateManager::getProjects(), we cannot be certain that + // we are actually receiving strings. + // @see \Drupal\update\UpdateManager::getProjects() + if (!is_string($existing_version)) { + return NULL; + } + + return $existing_version; + } + return NULL; + } + + /** + * Gets the available projects. + * + * @return array + * The available projects keyed by project machine name in the format + * returned by update_get_available(). If the project specified in ::name is + * not returned from update_get_available() this project will be explicitly + * fetched and added the return value of this function. + * + * @see \update_get_available() + */ + private function getAvailableProjects(): array { + $available_projects = update_get_available(TRUE); + // update_get_available() will only returns projects that are in the active + // codebase. If the project specified by ::name is not returned in + // $available_projects, it means it is not in the active codebase, therefore + // we will retrieve the project information from Package Manager's own + // update processor service. + if (!isset($available_projects[$this->name])) { + /** @var \Drupal\package_manager\PackageManagerUpdateProcessor $update_processor */ + $update_processor = \Drupal::service(PackageManagerUpdateProcessor::class); + if ($project_data = $update_processor->getProjectData($this->name)) { + $available_projects[$this->name] = $project_data; + } + } + return $available_projects; + } + + /** + * Checks if the installed version of this project is safe to use. + * + * @return bool + * TRUE if the installed version of this project is secure, supported, and + * published. Otherwise, or if the project information could not be + * retrieved, returns FALSE. + */ + public function isInstalledVersionSafe(): bool { + $project_data = $this->getProjectInfo(); + if ($project_data) { + $unsafe = [ + UpdateManagerInterface::NOT_SECURE, + UpdateManagerInterface::NOT_SUPPORTED, + UpdateManagerInterface::REVOKED, + ]; + return !in_array($project_data['status'], $unsafe, TRUE); + } + // If we couldn't get project data, assume the installed version is unsafe. + return FALSE; + } + + /** + * Gets the supported branches of the project. + * + * @return string[] + * The supported branches. + */ + public function getSupportedBranches(): array { + $available_updates = $this->getAvailableProjects()[$this->name]; + return isset($available_updates['supported_branches']) ? explode(',', $available_updates['supported_branches']) : []; + } + +} diff --git a/core/modules/package_manager/src/StageBase.php b/core/modules/package_manager/src/StageBase.php new file mode 100644 index 0000000000000000000000000000000000000000..de70abeec92c900654e6c26a798bc93db93d3d41 --- /dev/null +++ b/core/modules/package_manager/src/StageBase.php @@ -0,0 +1,851 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Composer\Semver\VersionParser; +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Component\Utility\Random; +use Drupal\Core\Queue\QueueFactory; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\TempStore\SharedTempStore; +use Drupal\Core\TempStore\SharedTempStoreFactory; +use Drupal\Core\Utility\Error; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StageEvent; +use Drupal\package_manager\Exception\ApplyFailedException; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\Exception\StageException; +use Drupal\package_manager\Exception\StageOwnershipException; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Exception\InvalidArgumentException; +use PhpTuf\ComposerStager\API\Exception\PreconditionException; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; + +/** + * Creates and manages a stage directory in which to install or update code. + * + * Allows calling code to copy the current Drupal site into a temporary stage + * directory, use Composer to require packages into it, sync changes from the + * stage directory back into the active code base, and then delete the + * stage directory. + * + * Only one stage directory can exist at any given time, and the stage is + * owned by the user or session that originally created it. Only the owner can + * perform operations on the stage directory, and the stage must be "claimed" + * by its owner before any such operations are done. A stage is claimed by + * presenting a unique token that is generated when the stage is created. + * + * Although a site can only have one stage directory, it is possible for + * privileged users to destroy a stage created by another user. To prevent such + * actions from putting the file system into an uncertain state (for example, if + * a stage is destroyed by another user while it is still being created), the + * stage directory has a randomly generated name. For additional cleanliness, + * all stage directories created by a specific site live in a single directory + * ,called the "stage root directory" and identified by the UUID of the current + * site (e.g. `/tmp/.package_managerSITE_UUID`), which is deleted when any stage + * created by that site is destroyed. + */ +abstract class StageBase implements LoggerAwareInterface { + + use LoggerAwareTrait; + use StringTranslationTrait; + + /** + * The tempstore key under which to store the locking info for this stage. + * + * @var string + */ + final protected const TEMPSTORE_LOCK_KEY = 'lock'; + + /** + * The tempstore key under which to store arbitrary metadata for this stage. + * + * @var string + */ + final protected const TEMPSTORE_METADATA_KEY = 'metadata'; + + /** + * The tempstore key under which to store the path of stage root directory. + * + * @var string + * + * @see ::getStagingRoot() + */ + private const TEMPSTORE_STAGING_ROOT_KEY = 'staging_root'; + + /** + * The tempstore key under which to store the time that ::apply() was called. + * + * @var string + * + * @see ::apply() + * @see ::destroy() + */ + private const TEMPSTORE_APPLY_TIME_KEY = 'apply_time'; + + /** + * The tempstore key for whether staged operations have been applied. + * + * @var string + * + * @see ::apply() + * @see ::destroy() + */ + private const TEMPSTORE_CHANGES_APPLIED = 'changes_applied'; + + /** + * The tempstore key for information about previously destroyed stages. + * + * @var string + * + * @see ::apply() + * @see ::destroy() + */ + private const TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX = 'TEMPSTORE_DESTROYED_STAGES_INFO'; + + /** + * The regular expression to check if a package name is a platform package. + * + * @var string + * + * @see \Composer\Repository\PlatformRepository::PLATFORM_PACKAGE_REGEX + * @see ::validateRequirements() + */ + private const COMPOSER_PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[a-z0-9](?:[_.-]?[a-z0-9]+)*|composer(?:-(?:plugin|runtime)-api)?)$}iD'; + + /** + * The regular expression to check if a package name is a regular package. + * + * If you try to require an invalid package name, this is the regular + * expression that Composer will, at the command line, tell you to match. + * + * @var string + * + * @see \Composer\Package\Loader\ValidatingArrayLoader::hasPackageNamingError() + * @see ::validateRequirements() + */ + private const COMPOSER_PACKAGE_REGEX = '/^[a-z0-9]([_.-]?[a-z0-9]+)*\/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$/'; + + /** + * The lock info for the stage. + * + * Consists of a unique random string and the current class name. + * + * @var string[] + */ + private $lock; + + /** + * The shared temp store. + * + * @var \Drupal\Core\TempStore\SharedTempStore + */ + protected SharedTempStore $tempStore; + + /** + * The stage type. + * + * To ensure that stage classes do not unintentionally use another stage's + * type, all concrete subclasses MUST explicitly define this property. + * The recommended pattern is `MODULE:TYPE`. + * + * @var string + */ + protected string $type; + + public function __construct( + protected readonly PathLocator $pathLocator, + protected readonly BeginnerInterface $beginner, + protected readonly StagerInterface $stager, + protected readonly CommitterInterface $committer, + protected readonly QueueFactory $queueFactory, + protected EventDispatcherInterface $eventDispatcher, + protected readonly SharedTempStoreFactory $tempStoreFactory, + protected readonly TimeInterface $time, + protected readonly PathFactoryInterface $pathFactory, + protected readonly FailureMarker $failureMarker, + ) { + $this->tempStore = $tempStoreFactory->get('package_manager_stage'); + } + + /** + * Gets the stage type. + * + * The stage type can be used by stage event subscribers to implement logic + * specific to certain stages, without relying on the class name (which may + * not be part of module's public API). + * + * @return string + * The stage type. + * + * @throws \LogicException + * Thrown if $this->type is not explicitly overridden. + */ + final public function getType(): string { + $reflector = new \ReflectionProperty($this, 'type'); + + // The $type property must ALWAYS be overridden. This means that different + // subclasses can return the same value (thus allowing one stage to + // impersonate another one), but if that happens, it is intentional. + if ($reflector->getDeclaringClass()->getName() === static::class) { + return $this->type; + } + throw new \LogicException(static::class . ' must explicitly override the $type property.'); + } + + /** + * Determines if the stage directory can be created. + * + * @return bool + * TRUE if the stage directory can be created, otherwise FALSE. + */ + final public function isAvailable(): bool { + return empty($this->tempStore->getMetadata(static::TEMPSTORE_LOCK_KEY)); + } + + /** + * Returns a specific piece of metadata associated with this stage. + * + * Only the owner of the stage can access metadata, and the stage must either + * be claimed by its owner, or created during the current request. + * + * @param string $key + * The metadata key. + * + * @return mixed + * The metadata value, or NULL if it is not set. + */ + public function getMetadata(string $key) { + $this->checkOwnership(); + + $metadata = $this->tempStore->get(static::TEMPSTORE_METADATA_KEY) ?: []; + return $metadata[$key] ?? NULL; + } + + /** + * Stores arbitrary metadata associated with this stage. + * + * Only the owner of the stage can set metadata, and the stage must either be + * claimed by its owner, or created during the current request. + * + * @param string $key + * The key under which to store the metadata. To prevent conflicts, it is + * strongly recommended that this be prefixed with the name of the module + * storing the data. + * @param mixed $data + * The metadata to store. + */ + public function setMetadata(string $key, $data): void { + $this->checkOwnership(); + + $metadata = $this->tempStore->get(static::TEMPSTORE_METADATA_KEY); + $metadata[$key] = $data; + $this->tempStore->set(static::TEMPSTORE_METADATA_KEY, $metadata); + } + + /** + * Collects paths that Composer Stager should exclude. + * + * @return \PhpTuf\ComposerStager\API\Path\Value\PathListInterface + * A list of paths that Composer Stager should exclude when creating the + * stage directory and applying staged changes to the active directory. + * + * @throws \Drupal\package_manager\Exception\StageException + * Thrown if an exception occurs while collecting paths to exclude. + * + * @see ::create() + * @see ::apply() + */ + protected function getPathsToExclude(): PathListInterface { + $event = new CollectPathsToExcludeEvent($this, $this->pathLocator, $this->pathFactory); + try { + return $this->eventDispatcher->dispatch($event); + } + catch (\Throwable $e) { + $this->rethrowAsStageException($e); + } + } + + /** + * Copies the active code base into the stage directory. + * + * This will automatically claim the stage, so external code does NOT need to + * call ::claim(). However, if it was created during another request, the + * stage must be claimed before operations can be performed on it. + * + * @param int|null $timeout + * (optional) How long to allow the file copying operation to run before + * timing out, in seconds, or NULL to never time out. Defaults to 300 + * seconds. + * + * @return string + * Unique ID for the stage, which can be used to claim the stage before + * performing other operations on it. Calling code should store this ID for + * as long as the stage needs to exist. + * + * @throws \Drupal\package_manager\Exception\StageException + * Thrown if a stage directory already exists, or if an error occurs while + * creating the stage directory. In the latter situation, the stage + * directory will be destroyed. + * + * @see ::claim() + */ + public function create(?int $timeout = 300): string { + $this->failureMarker->assertNotExists(); + + if (!$this->isAvailable()) { + throw new StageException($this, 'Cannot create a new stage because one already exists.'); + } + // Mark the stage as unavailable as early as possible, before dispatching + // the pre-create event. The idea is to prevent a race condition if the + // event subscribers take a while to finish, and two different users attempt + // to create a stage directory at around the same time. If an error occurs + // while the event is being processed, the stage is marked as available. + // @see ::dispatch() + // We specifically generate a random 32-character alphanumeric name in order + // to guarantee that the stage ID won't start with -, which could cause it + // to be interpreted as an option if it's used as a command-line argument. + // (For example, \Drupal\Component\Utility\Crypt::randomBytesBase64() would + // be vulnerable to this; the stage ID needs to be unique, but not + // cryptographically so.) + $id = (new Random())->name(32); + // Re-acquire the tempstore to ensure that the lock is written by whoever is + // actually logged in (or not) right now, since it's possible that the stage + // was instantiated (i.e., __construct() was called) by a different session, + // which would result in the lock having the wrong owner and the stage not + // being claimable by whoever is actually creating it. + $this->tempStore = $this->tempStoreFactory->get('package_manager_stage'); + // For the lock value, we use both the stage's class and its type in order + // to prevent a stage from being manipulated by two different classes during + // a single life cycle. + $this->tempStore->set(static::TEMPSTORE_LOCK_KEY, [ + $id, + static::class, + $this->getType(), + ]); + $this->claim($id); + + $active_dir = $this->pathFactory->create($this->pathLocator->getProjectRoot()); + $stage_dir = $this->pathFactory->create($this->getStageDirectory()); + + $excluded_paths = $this->getPathsToExclude(); + $event = new PreCreateEvent($this, $excluded_paths); + // If an error occurs and we won't be able to create the stage, mark it as + // available. + $this->dispatch($event, [$this, 'markAsAvailable']); + + try { + $this->beginner->begin($active_dir, $stage_dir, $excluded_paths, NULL, $timeout); + } + catch (\Throwable $error) { + $this->destroy(); + $this->rethrowAsStageException($error); + } + $this->dispatch(new PostCreateEvent($this)); + return $id; + } + + /** + * Wraps an exception in a StageException and re-throws it. + * + * @param \Throwable $e + * The throwable to wrap. + */ + private function rethrowAsStageException(\Throwable $e): never { + throw new StageException($this, $e->getMessage(), $e->getCode(), $e); + } + + /** + * Adds or updates packages in the stage directory. + * + * @param string[] $runtime + * The packages to add as regular top-level dependencies, in the form + * 'vendor/name' or 'vendor/name:version'. + * @param string[] $dev + * (optional) The packages to add as dev dependencies, in the form + * 'vendor/name' or 'vendor/name:version'. Defaults to an empty array. + * @param int|null $timeout + * (optional) How long to allow the Composer operation to run before timing + * out, in seconds, or NULL to never time out. Defaults to 300 seconds. + * + * @throws \Drupal\package_manager\Exception\StageException + * Thrown if the Composer operation cannot be started, or if an error occurs + * during the operation. In the latter situation, the stage directory will + * be destroyed. + */ + public function require(array $runtime, array $dev = [], ?int $timeout = 300): void { + $this->checkOwnership(); + + $this->dispatch(new PreRequireEvent($this, $runtime, $dev)); + + // A helper function to execute a command in the stage, destroying it if an + // exception occurs in the middle of a Composer operation. + $do_stage = function (array $command) use ($timeout): void { + $active_dir = $this->pathFactory->create($this->pathLocator->getProjectRoot()); + $stage_dir = $this->pathFactory->create($this->getStageDirectory()); + + try { + $this->stager->stage($command, $active_dir, $stage_dir, NULL, $timeout); + } + catch (\Throwable $e) { + // If the caught exception isn't InvalidArgumentException or + // PreconditionException, a Composer operation was actually attempted, + // and failed. The stage should therefore be destroyed, because it's in + // an indeterminate and possibly unrecoverable state. + if (!$e instanceof InvalidArgumentException && !$e instanceof PreconditionException) { + $this->destroy(); + } + $this->rethrowAsStageException($e); + } + }; + + // Change the runtime and dev requirements as needed, but don't update + // the installed packages yet. + if ($runtime) { + self::validateRequirements($runtime); + $command = array_merge(['require', '--no-update'], $runtime); + $do_stage($command); + } + if ($dev) { + self::validateRequirements($dev); + $command = array_merge(['require', '--dev', '--no-update'], $dev); + $do_stage($command); + } + + // If constraints were changed, update those packages. + if ($runtime || $dev) { + $command = array_merge(['update', '--with-all-dependencies', '--optimize-autoloader'], $runtime, $dev); + $do_stage($command); + } + $this->dispatch(new PostRequireEvent($this, $runtime, $dev)); + } + + /** + * Applies staged changes to the active directory. + * + * After the staged changes are applied, the current request should be + * terminated as soon as possible. This is because the code loaded into the + * PHP runtime may no longer match the code that is physically present in the + * active code base, which means that the current request is running in an + * unreliable, inconsistent environment. In the next request, + * ::postApply() should be called as early as possible after Drupal is + * fully bootstrapped, to rebuild the service container, flush caches, and + * dispatch the post-apply event. + * + * @param int|null $timeout + * (optional) How long to allow the file copying operation to run before + * timing out, in seconds, or NULL to never time out. Defaults to 600 + * seconds. + * + * @throws \Drupal\package_manager\Exception\ApplyFailedException + * Thrown if there is an error calling Composer Stager, which may indicate + * a failed commit operation. + */ + public function apply(?int $timeout = 600): void { + $this->checkOwnership(); + + $active_dir = $this->pathFactory->create($this->pathLocator->getProjectRoot()); + $stage_dir = $this->pathFactory->create($this->getStageDirectory()); + + $excluded_paths = $this->getPathsToExclude(); + $event = new PreApplyEvent($this, $excluded_paths); + // If an error occurs while dispatching the events, ensure that ::destroy() + // doesn't think we're in the middle of applying the staged changes to the + // active directory. + $this->tempStore->set(self::TEMPSTORE_APPLY_TIME_KEY, $this->time->getRequestTime()); + $this->dispatch($event, $this->setNotApplying(...)); + + // Create a marker file so that we can tell later on if the commit failed. + $this->failureMarker->write($this, $this->getFailureMarkerMessage()); + + try { + $this->committer->commit($stage_dir, $active_dir, $excluded_paths, NULL, $timeout); + } + catch (InvalidArgumentException | PreconditionException $e) { + // The commit operation has not started yet, so we can clear the failure + // marker and release the flag that says we're applying. + $this->setNotApplying(); + $this->failureMarker->clear(); + $this->rethrowAsStageException($e); + } + catch (\Throwable $throwable) { + // The commit operation may have failed midway through, and the site code + // is in an indeterminate state. Release the flag which says we're still + // applying, because in this situation, the site owner should probably + // restore everything from a backup. + $this->setNotApplying(); + // Update the marker file with the information from the throwable. + $this->failureMarker->write($this, $this->getFailureMarkerMessage(), $throwable); + throw new ApplyFailedException($this, $this->failureMarker->getMessage(), $throwable->getCode(), $throwable); + } + $this->failureMarker->clear(); + $this->setMetadata(self::TEMPSTORE_CHANGES_APPLIED, TRUE); + } + + /** + * Returns a closure that marks this stage as no longer being applied. + */ + private function setNotApplying(): void { + $this->tempStore->delete(self::TEMPSTORE_APPLY_TIME_KEY); + } + + /** + * Performs post-apply tasks. + * + * This should be called as soon as possible after ::apply(), in a new + * request. + * + * @see ::apply() + */ + public function postApply(): void { + $this->checkOwnership(); + + if ($this->tempStore->get(self::TEMPSTORE_APPLY_TIME_KEY) === $this->time->getRequestTime()) { + $this->logger?->warning('Post-apply tasks are running in the same request during which staged changes were applied to the active code base. This can result in unpredictable behavior.'); + } + // Rebuild the container and clear all caches, to ensure that new services + // are picked up. + drupal_flush_all_caches(); + // Refresh the event dispatcher so that new or changed event subscribers + // will be called. The other services we depend on are either stateless or + // unlikely to call newly added code during the current request. + $this->eventDispatcher = \Drupal::service('event_dispatcher'); + + $release_apply = $this->setNotApplying(...); + $this->dispatch(new PostApplyEvent($this), $release_apply); + $release_apply(); + } + + /** + * Deletes the stage directory. + * + * @param bool $force + * (optional) If TRUE, the stage directory will be destroyed even if it is + * not owned by the current user or session. Defaults to FALSE. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $message + * (optional) A message about why the stage was destroyed. + * + * @throws \Drupal\package_manager\Exception\StageException + * If the staged changes are being applied to the active directory. + * @throws \Drupal\Core\TempStore\TempStoreException + */ + public function destroy(bool $force = FALSE, ?TranslatableMarkup $message = NULL): void { + if (!$force) { + $this->checkOwnership(); + } + if ($this->isApplying()) { + throw new StageException($this, 'Cannot destroy the stage directory while it is being applied to the active directory.'); + } + + // If the stage directory exists, queue it to be automatically cleaned up + // later by a queue (which may or may not happen during cron). + // @see \Drupal\package_manager\Plugin\QueueWorker\Cleaner + if ($this->stageDirectoryExists()) { + $this->queueFactory->get('package_manager_cleanup') + ->createItem($this->getStageDirectory()); + } + + $this->storeDestroyInfo($force, $message); + $this->markAsAvailable(); + } + + /** + * Marks the stage as available. + */ + protected function markAsAvailable(): void { + $this->tempStore->delete(static::TEMPSTORE_METADATA_KEY); + $this->tempStore->delete(static::TEMPSTORE_LOCK_KEY); + $this->tempStore->delete(self::TEMPSTORE_STAGING_ROOT_KEY); + $this->lock = NULL; + } + + /** + * Dispatches an event and handles any errors that it collects. + * + * @param \Drupal\package_manager\Event\StageEvent $event + * The event object. + * @param callable|null $on_error + * (optional) A callback function to call if an error occurs, before any + * exceptions are thrown. + * + * @throws \Drupal\package_manager\Exception\StageEventException + * If the event collects any validation errors. + */ + protected function dispatch(StageEvent $event, ?callable $on_error = NULL): void { + try { + $this->eventDispatcher->dispatch($event); + + if ($event instanceof PreOperationStageEvent) { + if ($event->getResults()) { + $error = new StageEventException($event); + } + } + } + catch (\Throwable $error) { + $error = new StageEventException($event, $error->getMessage(), $error->getCode(), $error); + } + + if (isset($error)) { + // Ensure the error is logged for post-mortem diagnostics. + if ($this->logger) { + Error::logException($this->logger, $error); + } + if ($on_error) { + $on_error(); + } + throw $error; + } + } + + /** + * Attempts to claim the stage. + * + * Once a stage has been created, no operations can be performed on it until + * it is claimed. This is to ensure that stage operations across multiple + * requests are being done by the same code, running under the same user or + * session that created the stage in the first place. To claim a stage, the + * calling code must provide the unique identifier that was generated when the + * stage was created. + * + * The stage is claimed when it is created, so external code does NOT need to + * call this method after calling ::create() in the same request. + * + * @param string $unique_id + * The unique ID that was returned by ::create(). + * + * @return $this + * + * @throws \Drupal\package_manager\Exception\StageOwnershipException + * If the stage cannot be claimed. This can happen if the current user or + * session did not originally create the stage, if $unique_id doesn't match + * the unique ID that was generated when the stage was created, or the + * current class is not the same one that was used to create the stage. + * + * @see ::create() + */ + final public function claim(string $unique_id): self { + $this->failureMarker->assertNotExists(); + + if ($this->isAvailable()) { + // phpcs:disable DrupalPractice.General.ExceptionT.ExceptionT + // @see https://www.drupal.org/project/auto_updates/issues/3338651 + throw new StageException($this, $this->computeDestroyMessage( + $unique_id, + $this->t('Cannot claim the stage because no stage has been created.') + )->render()); + } + + $stored_lock = $this->tempStore->getIfOwner(static::TEMPSTORE_LOCK_KEY); + if (!$stored_lock) { + throw new StageOwnershipException($this, $this->computeDestroyMessage( + $unique_id, + $this->t('Cannot claim the stage because it is not owned by the current user or session.') + )->render()); + } + + if ($stored_lock === [$unique_id, static::class, $this->getType()]) { + $this->lock = $stored_lock; + return $this; + } + + throw new StageOwnershipException($this, $this->computeDestroyMessage( + $unique_id, + $this->t('Cannot claim the stage because the current lock does not match the stored lock.') + )->render()); + // phpcs:enable DrupalPractice.General.ExceptionT.ExceptionT + } + + /** + * Returns the specific destroy message for the ID. + * + * @param string $unique_id + * The unique ID that was returned by ::create(). + * @param \Drupal\Core\StringTranslation\TranslatableMarkup $fallback_message + * A fallback message, in case no specific message was stored. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup + * A message describing why the stage with the given ID was destroyed, or if + * no message was associated with that destroyed stage, the provided + * fallback message. + */ + private function computeDestroyMessage(string $unique_id, TranslatableMarkup $fallback_message): TranslatableMarkup { + // Check to see if we have a specific message about a stage with a + // specific ID that was given. + return $this->tempStore->get(self::TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX . $unique_id) ?? $fallback_message; + } + + /** + * Validates the ownership of stage directory. + * + * The stage is considered under valid ownership if it was created by current + * user or session, using the current class. + * + * @throws \LogicException + * If ::claim() has not been previously called. + * @throws \Drupal\package_manager\Exception\StageOwnershipException + * If the current user or session does not own the stage directory, or it + * was created by a different class. + */ + final protected function checkOwnership(): void { + if (empty($this->lock)) { + throw new \LogicException('Stage must be claimed before performing any operations on it.'); + } + + $stored_lock = $this->tempStore->getIfOwner(static::TEMPSTORE_LOCK_KEY); + if ($stored_lock !== $this->lock) { + throw new StageOwnershipException($this, 'Stage is not owned by the current user or session.'); + } + } + + /** + * Returns the path of the directory where changes should be staged. + * + * @return string + * The absolute path of the directory where changes should be staged. + * + * @throws \LogicException + * If this method is called before the stage has been created or claimed. + */ + public function getStageDirectory(): string { + if (!$this->lock) { + throw new \LogicException(__METHOD__ . '() cannot be called because the stage has not been created or claimed.'); + } + return $this->getStagingRoot() . DIRECTORY_SEPARATOR . $this->lock[0]; + } + + /** + * Returns the directory where stage directories will be created. + * + * @return string + * The absolute path of the directory containing the stage directories + * managed by this class. + */ + private function getStagingRoot(): string { + // Since the stage root can depend on site settings, store it so that + // things won't break if the settings change during this stage's life + // cycle. + $dir = $this->tempStore->get(self::TEMPSTORE_STAGING_ROOT_KEY); + if (empty($dir)) { + $dir = $this->pathLocator->getStagingRoot(); + $this->tempStore->set(self::TEMPSTORE_STAGING_ROOT_KEY, $dir); + } + return $dir; + } + + /** + * Determines if the stage directory exists. + * + * @return bool + * TRUE if the directory exists, otherwise FALSE. + */ + public function stageDirectoryExists(): bool { + try { + return is_dir($this->getStageDirectory()); + } + catch (\LogicException) { + return FALSE; + } + } + + /** + * Checks if staged changes are being applied to the active directory. + * + * @return bool + * TRUE if the staged changes are being applied to the active directory, and + * it has been less than an hour since that operation began. If more than an + * hour has elapsed since the changes started to be applied, FALSE is + * returned even if the stage internally thinks that changes are still being + * applied. + * + * @see ::apply() + */ + final public function isApplying(): bool { + $apply_time = $this->tempStore->get(self::TEMPSTORE_APPLY_TIME_KEY); + return isset($apply_time) && $this->time->getRequestTime() - $apply_time < 3600; + } + + /** + * Returns the failure marker message. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup + * The translated failure marker message. + */ + protected function getFailureMarkerMessage(): TranslatableMarkup { + return $this->t('Staged changes failed to apply, and the site is in an indeterminate state. It is strongly recommended to restore the code and database from a backup.'); + } + + /** + * Validates a set of package names. + * + * Package names are considered invalid if they look like Drupal project + * names. The only exceptions to this are platform requirements, like `php`, + * `composer`, or `ext-json`, which are legitimate to Composer. + * + * @param string[] $requirements + * A set of package names (with or without version constraints), as passed + * to ::require(). + * + * @throws \InvalidArgumentException + * Thrown if any of the given package names fail basic validation. + */ + protected static function validateRequirements(array $requirements): void { + $version_parser = new VersionParser(); + + foreach ($requirements as $requirement) { + $parts = explode(':', $requirement, 2); + $name = $parts[0]; + + if (!preg_match(self::COMPOSER_PLATFORM_PACKAGE_REGEX, $name) && !preg_match(self::COMPOSER_PACKAGE_REGEX, $name)) { + throw new \InvalidArgumentException("Invalid package name '$name'."); + } + if (count($parts) > 1) { + $version_parser->parseConstraints($parts[1]); + } + } + } + + /** + * Stores information about the stage when it is destroyed. + * + * @param bool $force + * Whether the stage was force destroyed. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $message + * A message about why the stage was destroyed or null. + * + * @throws \Drupal\Core\TempStore\TempStoreException + */ + protected function storeDestroyInfo(bool $force, ?TranslatableMarkup $message): void { + if (!$message) { + if ($this->tempStore->get(self::TEMPSTORE_CHANGES_APPLIED) === TRUE) { + $message = $this->t('This operation has already been applied.'); + } + else { + if ($force) { + $message = $this->t('This operation was canceled by another user.'); + } + else { + $message = $this->t('This operation was already canceled.'); + } + } + } + [$id] = $this->tempStore->get(static::TEMPSTORE_LOCK_KEY); + $this->tempStore->set(self::TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX . $id, $message); + } + +} diff --git a/core/modules/package_manager/src/StatusCheckTrait.php b/core/modules/package_manager/src/StatusCheckTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..97c136a2870936143a1041317e92ff2fd480e3c7 --- /dev/null +++ b/core/modules/package_manager/src/StatusCheckTrait.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; + +/** + * Contains helper methods to run status checks on a stage. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not use or interact with + * this trait. + */ +trait StatusCheckTrait { + + /** + * Runs a status check for a stage and returns the results, if any. + * + * @param \Drupal\package_manager\StageBase $stage + * The stage to run the status check for. + * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|null $event_dispatcher + * (optional) The event dispatcher service. + * @param \Drupal\package_manager\PathLocator|null $path_locator + * (optional) The path locator service. + * @param \PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface|null $path_factory + * (optional) The path factory service. + * + * @return \Drupal\package_manager\ValidationResult[] + * The results of the status check. If a readiness check was also done, + * its results will be included. + */ + protected function runStatusCheck(StageBase $stage, ?EventDispatcherInterface $event_dispatcher = NULL, ?PathLocator $path_locator = NULL, ?PathFactoryInterface $path_factory = NULL): array { + $event_dispatcher ??= \Drupal::service('event_dispatcher'); + $path_locator ??= \Drupal::service(PathLocator::class); + $path_factory ??= \Drupal::service(PathFactoryInterface::class); + try { + $paths_to_exclude_event = new CollectPathsToExcludeEvent($stage, $path_locator, $path_factory); + $event_dispatcher->dispatch($paths_to_exclude_event); + } + catch (\Throwable $throwable) { + $paths_to_exclude_event = $throwable; + } + $event = new StatusCheckEvent($stage, $paths_to_exclude_event); + return $event_dispatcher->dispatch($event)->getResults(); + } + +} diff --git a/core/modules/package_manager/src/TranslatableStringAdapter.php b/core/modules/package_manager/src/TranslatableStringAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..7a622bb8f7a69ff4ffff2e03b39e33e8e3b9b688 --- /dev/null +++ b/core/modules/package_manager/src/TranslatableStringAdapter.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\StringTranslation\TranslatableMarkup; +use PhpTuf\ComposerStager\API\Translation\Service\TranslatorInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslatableInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslationParametersInterface; + +/** + * An adapter for interoperable string translation. + * + * This class is designed to adapt Drupal's style of string translation so it + * can be used with the Symfony-inspired architecture used by Composer Stager. + * + * If this object is cast to a string, it will be translated by Drupal's + * translation system. It will ONLY be translated by Composer Stager if the + * trans() method is explicitly called. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class TranslatableStringAdapter extends TranslatableMarkup implements TranslatableInterface, TranslationParametersInterface { + + /** + * {@inheritdoc} + */ + public function getAll(): array { + return $this->getArguments(); + } + + /** + * {@inheritdoc} + */ + public function trans(?TranslatorInterface $translator = NULL, ?string $locale = NULL): string { + // This method is NEVER used by Drupal to translate the underlying string; + // it exists solely for Composer Stager's translation system to + // transparently translate Drupal strings using its own architecture. + return $translator->trans( + $this->getUntranslatedString(), + $this, + // The 'context' option is the closest analogue to the Symfony-inspired + // concept of translation domains. + $this->getOption('context'), + $locale ?? $this->getOption('langcode'), + ); + } + +} diff --git a/core/modules/package_manager/src/TranslatableStringFactory.php b/core/modules/package_manager/src/TranslatableStringFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..a90eb1ea6a8a3ea05d620ab2faa8e32c64a99a77 --- /dev/null +++ b/core/modules/package_manager/src/TranslatableStringFactory.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Core\StringTranslation\TranslationInterface; +use PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface; +use PhpTuf\ComposerStager\API\Translation\Service\DomainOptionsInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslatableInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslationParametersInterface; + +/** + * Creates translatable strings that can interoperate with Composer Stager. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class TranslatableStringFactory implements TranslatableFactoryInterface { + + public function __construct( + private readonly TranslatableFactoryInterface $decorated, + private readonly TranslationInterface $translation, + ) {} + + /** + * {@inheritdoc} + */ + public function createDomainOptions(): DomainOptionsInterface { + return $this->decorated->createDomainOptions(); + } + + /** + * {@inheritdoc} + */ + public function createTranslatableMessage(string $message, ?TranslationParametersInterface $parameters = NULL, ?string $domain = NULL): TranslatableInterface { + return new TranslatableStringAdapter( + $message, + $parameters?->getAll() ?? [], + // TranslatableMarkup's 'context' option is the closest analogue to the + // $domain parameter. + ['context' => $domain ?? ''], + $this->translation, + ); + } + + /** + * {@inheritdoc} + */ + public function createTranslationParameters(array $parameters = []): TranslationParametersInterface { + return $this->decorated->createTranslationParameters($parameters); + } + +} diff --git a/core/modules/package_manager/src/ValidationResult.php b/core/modules/package_manager/src/ValidationResult.php new file mode 100644 index 0000000000000000000000000000000000000000..be540eb7a7339387b04839069e5f3ff7b65d80c0 --- /dev/null +++ b/core/modules/package_manager/src/ValidationResult.php @@ -0,0 +1,150 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager; + +use Drupal\Component\Assertion\Inspector; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\system\SystemManager; +use PhpTuf\ComposerStager\API\Exception\ExceptionInterface; + +/** + * A value object to contain the results of a validation. + * + * @property \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages + */ +final class ValidationResult { + + /** + * Creates a ValidationResult object. + * + * @param int $severity + * The severity of the result. Should be one of the + * SystemManager::REQUIREMENT_* constants. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[]|string[] $messages + * The result messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * A succinct summary of the result. + * @param bool $assert_translatable + * Whether to assert the messages are translatable. Internal use only. + * + * @throws \InvalidArgumentException + * Thrown if $messages is empty, or if it has 2 or more items but $summary + * is NULL. + */ + private function __construct( + public readonly int $severity, + private readonly array $messages, + public readonly ?TranslatableMarkup $summary, + bool $assert_translatable, + ) { + if ($assert_translatable) { + assert(Inspector::assertAll(fn ($message) => $message instanceof TranslatableMarkup, $messages)); + } + if (empty($messages)) { + throw new \InvalidArgumentException('At least one message is required.'); + } + if (count($messages) > 1 && !$summary) { + throw new \InvalidArgumentException('If more than one message is provided, a summary is required.'); + } + } + + /** + * Implements magic ::__get() method. + */ + public function __get(string $name): mixed { + return match ($name) { + // The messages must be private so that they cannot be mutated by external + // code, but we want to allow callers to access them in the same way as + // $this->summary and $this->severity. + 'messages' => $this->messages, + }; + } + + /** + * Creates an error ValidationResult object from a throwable. + * + * @param \Throwable $throwable + * The throwable. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * The errors summary. + * + * @return static + */ + public static function createErrorFromThrowable(\Throwable $throwable, ?TranslatableMarkup $summary = NULL): static { + // All Composer Stager exceptions are translatable. + $is_translatable = $throwable instanceof ExceptionInterface; + $message = $is_translatable ? $throwable->getTranslatableMessage() : $throwable->getMessage(); + return new static(SystemManager::REQUIREMENT_ERROR, [$message], $summary, $is_translatable); + } + + /** + * Creates an error ValidationResult object. + * + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages + * The error messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * The errors summary. + * + * @return static + */ + public static function createError(array $messages, ?TranslatableMarkup $summary = NULL): static { + return new static(SystemManager::REQUIREMENT_ERROR, $messages, $summary, TRUE); + } + + /** + * Creates a warning ValidationResult object. + * + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages + * The error messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * The errors summary. + * + * @return static + */ + public static function createWarning(array $messages, ?TranslatableMarkup $summary = NULL): static { + return new static(SystemManager::REQUIREMENT_WARNING, $messages, $summary, TRUE); + } + + /** + * Returns the overall severity for a set of validation results. + * + * @param \Drupal\package_manager\ValidationResult[] $results + * The validation results. + * + * @return int + * The overall severity of the results. Will be one of the + * SystemManager::REQUIREMENT_* constants. + */ + public static function getOverallSeverity(array $results): int { + foreach ($results as $result) { + if ($result->severity === SystemManager::REQUIREMENT_ERROR) { + return SystemManager::REQUIREMENT_ERROR; + } + } + // If there were no errors, then any remaining results must be warnings. + return $results ? SystemManager::REQUIREMENT_WARNING : SystemManager::REQUIREMENT_OK; + } + + /** + * Determines if two validation results are equivalent. + * + * @param self $a + * A validation result. + * @param self $b + * Another validation result. + * + * @return bool + * TRUE if the given validation results have the same severity, summary, + * and messages (in the same order); otherwise FALSE. + */ + public static function isEqual(self $a, self $b): bool { + return ( + $a->severity === $b->severity && + strval($a->summary) === strval($b->summary) && + array_map('strval', $a->messages) === array_map('strval', $b->messages) + ); + } + +} diff --git a/core/modules/package_manager/src/Validator/AllowedScaffoldPackagesValidator.php b/core/modules/package_manager/src/Validator/AllowedScaffoldPackagesValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e83fbb6cfb30f2b165737bdfe733d4a360b5f405 --- /dev/null +++ b/core/modules/package_manager/src/Validator/AllowedScaffoldPackagesValidator.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Component\Serialization\Json; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\StatusCheckEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\PathLocator; + +/** + * Validates the list of packages that are allowed to scaffold files. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class AllowedScaffoldPackagesValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + ) {} + + /** + * Validates that only the implicitly allowed packages can use scaffolding. + */ + public function validate(PreOperationStageEvent $event): void { + $stage = $event->stage; + $path = $event instanceof PreApplyEvent + ? $stage->getStageDirectory() + : $this->pathLocator->getProjectRoot(); + + // @see https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold + $implicitly_allowed_packages = [ + "drupal/legacy-scaffold-assets", + "drupal/core", + ]; + $extra = Json::decode($this->composerInspector->getConfig('extra', $path . '/composer.json')); + $allowed_packages = $extra['drupal-scaffold']['allowed-packages'] ?? []; + $extra_packages = array_diff($allowed_packages, $implicitly_allowed_packages); + if (!empty($extra_packages)) { + $event->addError( + array_map($this->t(...), $extra_packages), + $this->t('Any packages other than the implicitly allowed packages are not allowed to scaffold files. See <a href=":url">the scaffold documentation</a> for more information.', [ + ':url' => 'https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold', + ]) + ); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() : array { + return [ + StatusCheckEvent::class => 'validate', + PreCreateEvent::class => 'validate', + PreApplyEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/BaseRequirementValidatorTrait.php b/core/modules/package_manager/src/Validator/BaseRequirementValidatorTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..e7f1020bab5c54fe64cf10c985e217bdcb1fb117 --- /dev/null +++ b/core/modules/package_manager/src/Validator/BaseRequirementValidatorTrait.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StatusCheckEvent; + +/** + * Provides methods for base requirement validators. + * + * This trait should only be used by validators that check base requirements, + * which means they run before + * \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator. + * + * Validators which use this trait should NOT stop event propagation. + * + * @see \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator + */ +trait BaseRequirementValidatorTrait { + + /** + * Validates base requirements. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event being handled. + */ + abstract public function validate(PreOperationStageEvent $event): void; + + /** + * Implements EventSubscriberInterface::getSubscribedEvents(). + */ + public static function getSubscribedEvents(): array { + // Always run before the BaseRequirementsFulfilledValidator. + // @see \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator + $priority = BaseRequirementsFulfilledValidator::PRIORITY + 10; + + return [ + PreCreateEvent::class => ['validate', $priority], + PreRequireEvent::class => ['validate', $priority], + PreApplyEvent::class => ['validate', $priority], + StatusCheckEvent::class => ['validate', $priority], + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/BaseRequirementsFulfilledValidator.php b/core/modules/package_manager/src/Validator/BaseRequirementsFulfilledValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..df0964b8767044890f6e46839e2b1a637cd18c52 --- /dev/null +++ b/core/modules/package_manager/src/Validator/BaseRequirementsFulfilledValidator.php @@ -0,0 +1,71 @@ +<?php + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\system\SystemManager; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that base requirements do not have any errors. + * + * Base requirements are the sorts of things that must be in a good state for + * Package Manager to be usable. For example, Composer must be available and + * usable; certain paths of the file system must be writable; the current site + * cannot be part of a multisite, and so on. + * + * This validator simply stops event propagation if any of the validators before + * it have added error results. Validators that check base requirements should + * run before this validator (they can use + * \Drupal\package_manager\Validator\BaseRequirementValidatorTrait to make this + * easier). To ensure that all base requirement errors are shown to the user, no + * base requirement validator should stop event propagation itself. + * + * Base requirement validators should not depend on each other or assume that + * Composer is usable in the current environment. + * + * @see \Drupal\package_manager\Validator\BaseRequirementValidatorTrait + */ +final class BaseRequirementsFulfilledValidator implements EventSubscriberInterface { + + /** + * The priority of this validator. + * + * @see ::getSubscribedEvents() + * + * @var int + */ + public const PRIORITY = 200; + + /** + * Validates that base requirements are fulfilled. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event. + */ + public function validate(PreOperationStageEvent $event): void { + // If there are any errors from the validators which ran before this one, + // base requirements are not fulfilled. Stop any further validators from + // running. + if ($event->getResults(SystemManager::REQUIREMENT_ERROR)) { + $event->stopPropagation(); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => ['validate', self::PRIORITY], + PreRequireEvent::class => ['validate', self::PRIORITY], + PreApplyEvent::class => ['validate', self::PRIORITY], + StatusCheckEvent::class => ['validate', self::PRIORITY], + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/ComposerMinimumStabilityValidator.php b/core/modules/package_manager/src/Validator/ComposerMinimumStabilityValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..9207b9dcc720c5c3055c6e805070925728bfca67 --- /dev/null +++ b/core/modules/package_manager/src/Validator/ComposerMinimumStabilityValidator.php @@ -0,0 +1,82 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Composer\Semver\Semver; +use Composer\Semver\VersionParser; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that the packages to install meet the minimum stability. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ComposerMinimumStabilityValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ComposerInspector $inspector, + ) {} + + /** + * Validates composer minimum stability. + * + * @param \Drupal\package_manager\Event\PreRequireEvent $event + * The stage event. + */ + public function validate(PreRequireEvent $event): void { + $dir = $this->pathLocator->getProjectRoot(); + $minimum_stability = $this->inspector->getConfig('minimum-stability', $dir); + $requested_packages = array_merge($event->getDevPackages(), $event->getRuntimePackages()); + + foreach ($requested_packages as $package_name => $version) { + // In the root composer.json, a stability flag can also be specified. They + // take the form `constraint@stability`. A stability flag + // allows the project owner to deviate from the minimum-stability setting. + // @see https://getcomposer.org/doc/04-schema.md#package-links + // @see \Composer\Package\Loader\RootPackageLoader::extractStabilityFlags() + if (str_contains($version, '@')) { + continue; + } + $stability = VersionParser::parseStability($version); + + // Because drupal/core prefers to not depend on composer/composer we need + // to compare two versions that are identical except for stability to + // determine if the package stability is less that the minimum stability. + if (Semver::satisfies("1.0.0-$stability", "< 1.0.0-$minimum_stability")) { + $event->addError([ + $this->t("<code>@package_name</code>'s requested version @package_version is less stable (@package_stability) than the minimum stability (@minimum_stability) required in @file.", + [ + '@package_name' => $package_name, + '@package_version' => $version, + '@package_stability' => $stability, + '@minimum_stability' => $minimum_stability, + '@file' => $this->pathLocator->getProjectRoot() . '/composer.json', + ] + ), + ]); + } + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreRequireEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/ComposerPatchesValidator.php b/core/modules/package_manager/src/Validator/ComposerPatchesValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c075b4881d1bdb031495d8c608a9fd2eb376f267 --- /dev/null +++ b/core/modules/package_manager/src/Validator/ComposerPatchesValidator.php @@ -0,0 +1,182 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Composer\Semver\Semver; +use Drupal\Component\Serialization\Json; +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Url; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates the configuration of the cweagans/composer-patches plugin. + * + * To ensure that applied patches remain consistent between the active and + * stage directories, the following rules are enforced if the patcher is + * installed: + * - It must be installed in both places, or in neither of them. It can't, for + * example, be installed in the active directory but not the stage directory + * (or vice versa). + * - It must be one of the project's direct runtime or dev dependencies. + * - It cannot be installed or removed by Package Manager. In other words, it + * must be added to the project at the command line by someone technical + * enough to install and configure it properly. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ComposerPatchesValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * The name of the plugin being analyzed. + * + * @var string + */ + private const PLUGIN_NAME = 'cweagans/composer-patches'; + + public function __construct( + private readonly ModuleHandlerInterface $moduleHandler, + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + ) {} + + /** + * Validates the status of the patcher plugin. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event object. + */ + public function validate(PreOperationStageEvent $event): void { + $messages = []; + + [$plugin_installed_in_active, $is_active_root_requirement, $active_configuration_ok] = $this->computePatcherStatus($this->pathLocator->getProjectRoot()); + if ($event instanceof PreApplyEvent) { + [$plugin_installed_in_stage, $is_stage_root_requirement, $stage_configuration_ok] = $this->computePatcherStatus($event->stage->getStageDirectory()); + $has_staged_update = TRUE; + } + else { + // No staged update exists. + $has_staged_update = FALSE; + } + + // If there's a staged update and the patcher has been installed or removed + // in the stage directory, that's a problem. + if ($has_staged_update && $plugin_installed_in_active !== $plugin_installed_in_stage) { + if ($plugin_installed_in_stage) { + $message = $this->t('It cannot be installed by Package Manager.'); + } + else { + $message = $this->t('It cannot be removed by Package Manager.'); + } + $messages[] = $this->createErrorMessage($message, 'package-manager-faq-composer-patches-installed-or-removed'); + } + + // If the patcher is not listed in the runtime or dev dependencies, that's + // an error as well. + if (($plugin_installed_in_active && !$is_active_root_requirement) || ($has_staged_update && $plugin_installed_in_stage && !$is_stage_root_requirement)) { + $messages[] = $this->createErrorMessage($this->t('It must be a root dependency.'), 'package-manager-faq-composer-patches-not-a-root-dependency'); + } + + // If the plugin is misconfigured in either the active or stage directories, + // flag an error. + if (($plugin_installed_in_active && !$active_configuration_ok) || ($has_staged_update && $plugin_installed_in_stage && !$stage_configuration_ok)) { + $messages[] = $this->t('The <code>composer-exit-on-patch-failure</code> key is not set to <code>true</code> in the <code>extra</code> section of <code>composer.json</code>.'); + } + + if ($messages) { + $summary = $this->t("Problems detected related to the Composer plugin <code>@plugin</code>.", [ + '@plugin' => static::PLUGIN_NAME, + ]); + $event->addError($messages, $summary); + } + } + + /** + * Appends a link to online help to an error message. + * + * @param \Drupal\Core\StringTranslation\TranslatableMarkup $message + * The error message. + * @param string $fragment + * The fragment of the online help to link to. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup + * The final, translated error message. + */ + private function createErrorMessage(TranslatableMarkup $message, string $fragment): TranslatableMarkup { + if ($this->moduleHandler->moduleExists('help')) { + $url = Url::fromRoute('help.page', ['name' => 'package_manager']) + ->setOption('fragment', $fragment) + ->toString(); + + return $this->t('@message See <a href=":url">the help page</a> for information on how to resolve the problem.', [ + '@message' => $message, + ':url' => $url, + ]); + } + return $message; + } + + /** + * Computes the status of the patcher plugin in a particular directory. + * + * @param string $working_dir + * The directory in which to run Composer. + * + * @return bool[] + * An indexed array containing three booleans, in order: + * - Whether the patcher plugin is installed. + * - Whether the patcher plugin is a root requirement in composer.json (in + * either the runtime or dev dependencies). + * - Whether the `composer-exit-on-patch-failure` flag is set in the `extra` + * section of composer.json. + */ + private function computePatcherStatus(string $working_dir): array { + $list = $this->composerInspector->getInstalledPackagesList($working_dir); + $installed_version = $list[static::PLUGIN_NAME]?->version; + + $info = $this->composerInspector->getRootPackageInfo($working_dir); + $is_root_requirement = array_key_exists(static::PLUGIN_NAME, $info['requires'] ?? []) || array_key_exists(static::PLUGIN_NAME, $info['devRequires'] ?? []); + + // The 2.x version of the plugin always exits with an error if a patch can't + // be applied. + if ($installed_version && Semver::satisfies($installed_version, '^2')) { + $exit_on_failure = TRUE; + } + else { + $extra = Json::decode($this->composerInspector->getConfig('extra', $working_dir)); + $exit_on_failure = $extra['composer-exit-on-patch-failure'] ?? FALSE; + } + + return [ + is_string($installed_version), + $is_root_requirement, + $exit_on_failure, + ]; + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'validate', + PreApplyEvent::class => 'validate', + StatusCheckEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php b/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..913ed20c15492067f07d39957b13d1c152ae81a8 --- /dev/null +++ b/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php @@ -0,0 +1,227 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Composer\Semver\Semver; +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Exception\RuntimeException; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates the allowed Composer plugins, both in active and stage. + * + * Composer plugins can make far-reaching changes on the filesystem. That is why + * they can cause Package Manager (more specifically the infrastructure it uses: + * php-tuf/composer-stager) to not work reliably; potentially even break a site! + * + * This validator restricts the use of Composer plugins: + * - Allowing all plugins to run indiscriminately is discouraged by Composer, + * but disallowed by this module (it is too risky): + * `config.allowed-plugins = true` is forbidden. + * - Installed Composer plugins that are not allowed (in composer.json's + * `config.allowed-plugins ) are not executed by Composer, so + * these are safe. + * - Installed Composer plugins that are allowed need to be either explicitly + * supported by this validator (they may still need their own validation to + * ensure their configuration is safe, for example Drupal core's vendor + * hardening plugin), or explicitly trusted by adding it to the + * `package_manager.settings` configuration's + * `additional_trusted_composer_plugins` list. + * + * @todo Determine how other Composer plugins will be supported in + * https://drupal.org/i/3339417. + * + * @see https://getcomposer.org/doc/04-schema.md#type + * @see https://getcomposer.org/doc/articles/plugins.md + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ComposerPluginsValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * Composer plugins known to modify other packages, but are validated. + * + * The validation guarantees they are safe to use. + * + * @var string[] + * Keys are Composer plugin package names, values are version constraints + * for those plugins that this validator explicitly supports. + */ + private const SUPPORTED_PLUGINS_THAT_DO_MODIFY = [ + // @see \Drupal\package_manager\Validator\ComposerPatchesValidator + 'cweagans/composer-patches' => '^1.7.3 || ^2', + // @see \Drupal\package_manager\PathExcluder\VendorHardeningExcluder + 'drupal/core-vendor-hardening' => '*', + 'php-http/discovery' => '*', + ]; + + /** + * Composer plugins known to NOT modify other packages. + * + * @var string[] + * Keys are Composer plugin package names, values are version constraints + * for those plugins that this validator explicitly supports. + */ + private const SUPPORTED_PLUGINS_THAT_DO_NOT_MODIFY = [ + 'composer/installers' => '^2.0', + 'dealerdirect/phpcodesniffer-composer-installer' => '^0.7.1 || ^1.0.0', + 'drupal/core-composer-scaffold' => '*', + 'drupal/core-project-message' => '*', + 'phpstan/extension-installer' => '^1.1', + PhpTufValidator::PLUGIN_NAME => '^1', + ]; + + /** + * The additional trusted Composer plugin package names. + * + * The package names are normalized. + * + * @var string[] + * Keys are package names, values are version constraints. + */ + private array $additionalTrustedComposerPlugins; + + public function __construct( + ConfigFactoryInterface $config_factory, + private readonly ComposerInspector $inspector, + private readonly PathLocator $pathLocator, + ) { + $settings = $config_factory->get('package_manager.settings'); + $this->additionalTrustedComposerPlugins = array_fill_keys( + array_map( + [__CLASS__, 'normalizePackageName'], + $settings->get('additional_trusted_composer_plugins') + ), + // The additional_trusted_composer_plugins setting cannot specify a + // version constraint. The plugins are either trusted or they're not. + '*' + ); + } + + /** + * Normalizes a package name. + * + * @param string $package_name + * A package name. + * + * @return string + * The normalized package name. + */ + private static function normalizePackageName(string $package_name): string { + return strtolower($package_name); + } + + /** + * Validates the allowed Composer plugins, both in active and stage. + */ + public function validate(PreOperationStageEvent $event): void { + $stage = $event->stage; + + // When about to copy the changes from the stage directory to the active + // directory, use the stage directory's composer instead of the active. + // Because composer plugins may be added or removed; the only thing that + // matters is the set of composer plugins that *will* apply — if a composer + // plugin is being removed, that's fine. + $dir = $event instanceof PreApplyEvent + ? $stage->getStageDirectory() + : $this->pathLocator->getProjectRoot(); + try { + $allowed_plugins = $this->inspector->getAllowPluginsConfig($dir); + } + catch (RuntimeException $exception) { + $event->addErrorFromThrowable($exception, $this->t('Unable to determine Composer <code>allow-plugins</code> setting.')); + return; + } + + if ($allowed_plugins === TRUE) { + $event->addError([$this->t('All composer plugins are allowed because <code>config.allow-plugins</code> is configured to <code>true</code>. This is an unacceptable security risk.')]); + return; + } + + // TRICKY: additional trusted Composer plugins is listed first, to allow + // site owners who know what they're doing to use unsupported versions of + // supported Composer plugins. + $trusted_plugins = $this->additionalTrustedComposerPlugins + + self::SUPPORTED_PLUGINS_THAT_DO_MODIFY + + self::SUPPORTED_PLUGINS_THAT_DO_NOT_MODIFY; + + assert(is_array($allowed_plugins)); + // Only packages with `true` as a value are actually executed by Composer. + $allowed_plugins = array_keys(array_filter($allowed_plugins)); + // The keys are normalized package names, and the values are the original, + // non-normalized package names. + $allowed_plugins = array_combine( + array_map([__CLASS__, 'normalizePackageName'], $allowed_plugins), + $allowed_plugins + ); + + $installed_packages = $this->inspector->getInstalledPackagesList($dir); + // Determine which plugins are both trusted by us, AND allowed by Composer's + // configuration. + $supported_plugins = array_intersect_key($allowed_plugins, $trusted_plugins); + // Create an array whose keys are the names of those plugins, and the values + // are their installed versions. + $supported_plugins_installed_versions = array_combine( + $supported_plugins, + array_map( + fn (string $name): ?string => $installed_packages[$name]?->version, + $supported_plugins + ) + ); + // Find the plugins whose installed versions aren't in the supported range. + $unsupported_installed_versions = array_filter( + $supported_plugins_installed_versions, + fn (?string $version, string $name): bool => $version && !Semver::satisfies($version, $trusted_plugins[$name]), + ARRAY_FILTER_USE_BOTH + ); + + $untrusted_plugins = array_diff_key($allowed_plugins, $trusted_plugins); + + $messages = array_map( + fn (string $raw_name) => $this->t('<code>@name</code>', ['@name' => $raw_name]), + $untrusted_plugins + ); + foreach ($unsupported_installed_versions as $name => $installed_version) { + $messages[] = $this->t("<code>@name</code> is supported, but only version <code>@supported_version</code>, found <code>@installed_version</code>.", [ + '@name' => $name, + '@supported_version' => $trusted_plugins[$name], + '@installed_version' => $installed_version, + ]); + } + + if ($messages) { + $summary = $this->formatPlural( + count($messages), + 'An unsupported Composer plugin was detected.', + 'Unsupported Composer plugins were detected.', + ); + $event->addError($messages, $summary); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'validate', + PreApplyEvent::class => 'validate', + StatusCheckEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/ComposerValidator.php b/core/modules/package_manager/src/Validator/ComposerValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..97ef0a1d720faa5758a28c3a2480641d32f68e9d --- /dev/null +++ b/core/modules/package_manager/src/Validator/ComposerValidator.php @@ -0,0 +1,147 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Url; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates the project can be used by the Composer Inspector. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class ComposerValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + use StringTranslationTrait; + + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + private readonly ModuleHandlerInterface $moduleHandler, + ) {} + + /** + * Validates that the Composer executable is the correct version. + */ + public function validate(PreOperationStageEvent $event): void { + // If we can't stat processes, there's nothing else we can possibly do here. + // @see \Symfony\Component\Process\Process::__construct() + if (!\function_exists('proc_open')) { + $message = $this->t('Composer cannot be used because the <code>proc_open()</code> function is disabled.'); + if ($this->moduleHandler->moduleExists('help')) { + $message = $this->t('@message See <a href=":package-manager-help">the help page</a> for information on how to resolve the problem.', [ + '@message' => $message, + ':package-manager-help' => self::getHelpUrl('package-manager-composer-related-faq'), + ]); + } + $event->addError([$message]); + return; + } + + $messages = []; + $dir = $event instanceof PreApplyEvent + ? $event->stage->getStageDirectory() + : $this->pathLocator->getProjectRoot(); + try { + $this->composerInspector->validate($dir); + } + catch (\Throwable $e) { + if ($this->moduleHandler->moduleExists('help')) { + $message = $this->t('@message See <a href=":package-manager-help">the help page</a> for information on how to resolve the problem.', [ + '@message' => $e->getMessage(), + ':package-manager-help' => self::getHelpUrl('package-manager-composer-related-faq'), + ]); + $event->addError([$message]); + } + else { + $event->addErrorFromThrowable($e); + } + return; + } + + $settings = []; + foreach (['disable-tls', 'secure-http'] as $key) { + try { + $settings[$key] = json_decode($this->composerInspector->getConfig($key, $dir)); + } + catch (\Throwable $e) { + $event->addErrorFromThrowable($e, $this->t('Unable to determine Composer <code>@key</code> setting.', [ + '@key' => $key, + ])); + return; + } + } + + // If disable-tls is enabled, it overrides secure-http and sets its value to + // FALSE, even if secure-http is set to TRUE explicitly. + if ($settings['disable-tls'] === TRUE) { + $message = $this->t('TLS must be enabled for HTTPS Composer downloads.'); + + // If the Help module is installed, link to our help page, which displays + // the commands for configuring Composer correctly. Otherwise, direct + // users straight to the Composer documentation, which is a little less + // helpful. + if ($this->moduleHandler->moduleExists('help')) { + $messages[] = $this->t('@message See <a href=":url">the help page</a> for more information on how to configure Composer to download packages securely.', [ + '@message' => $message, + ':url' => self::getHelpUrl('package-manager-requirements'), + ]); + } + else { + $messages[] = $this->t('@message See <a href=":url">the Composer documentation</a> for more information.', [ + '@message' => $message, + ':url' => 'https://getcomposer.org/doc/06-config.md#disable-tls', + ]); + } + $messages[] = $this->t('You should also check the value of <code>secure-http</code> and make sure that it is set to <code>true</code> or not set at all.'); + } + elseif ($settings['secure-http'] !== TRUE) { + $message = $this->t('HTTPS must be enabled for Composer downloads.'); + + if ($this->moduleHandler->moduleExists('help')) { + $messages[] = $this->t('@message See <a href=":url">the help page</a> for more information on how to configure Composer to download packages securely.', [ + '@message' => $message, + ':url' => self::getHelpUrl('package-manager-requirements'), + ]); + } + else { + $messages[] = $this->t('@message See <a href=":url">the Composer documentation</a> for more information.', [ + '@message' => $message, + ':url' => 'https://getcomposer.org/doc/06-config.md#secure-http', + ]); + } + } + + if ($messages) { + $event->addError($messages, $this->t("Composer settings don't satisfy Package Manager's requirements.")); + } + } + + /** + * Returns a URL to a specific fragment of Package Manager's online help. + * + * @param string $fragment + * The fragment to link to. + * + * @return string + * A URL to Package Manager's online help. + */ + private static function getHelpUrl(string $fragment): string { + return Url::fromRoute('help.page', ['name' => 'package_manager']) + ->setOption('fragment', $fragment) + ->toString(); + } + +} diff --git a/core/modules/package_manager/src/Validator/DiskSpaceValidator.php b/core/modules/package_manager/src/Validator/DiskSpaceValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ec875b3b2abaa4c6801f747ba6908ef1fe25d456 --- /dev/null +++ b/core/modules/package_manager/src/Validator/DiskSpaceValidator.php @@ -0,0 +1,147 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\Component\FileSystem\FileSystem; +use Drupal\Component\Utility\Bytes; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that there is enough free disk space to do stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class DiskSpaceValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + use StringTranslationTrait; + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Wrapper around the disk_free_space() function. + * + * @param string $path + * The path for which to retrieve the amount of free disk space. + * + * @return float + * The number of bytes of free space on the disk. + * + * @throws \RuntimeException + * If the amount of free space could not be determined. + */ + protected function freeSpace(string $path): float { + $free_space = disk_free_space($path); + if ($free_space === FALSE) { + throw new \RuntimeException("Cannot get disk information for $path."); + } + return $free_space; + } + + /** + * Wrapper around the stat() function. + * + * @param string $path + * The path to check. + * + * @return mixed[] + * The statistics for the path. + * + * @throws \RuntimeException + * If the statistics could not be determined. + */ + protected function stat(string $path): array { + $stat = stat($path); + if ($stat === FALSE) { + throw new \RuntimeException("Cannot get information for $path."); + } + return $stat; + } + + /** + * Checks if two paths are located on the same logical disk. + * + * @param string $root + * The path of the project root. + * @param string $vendor + * The path of the vendor directory. + * + * @return bool + * TRUE if the project root and vendor directory are on the same logical + * disk, FALSE otherwise. + */ + protected function areSameLogicalDisk(string $root, string $vendor): bool { + $root_statistics = $this->stat($root); + $vendor_statistics = $this->stat($vendor); + return $root_statistics['dev'] === $vendor_statistics['dev']; + } + + /** + * Validates that there is enough free disk space to do stage operations. + */ + public function validate(PreOperationStageEvent $event): void { + $root_path = $this->pathLocator->getProjectRoot(); + $vendor_path = $this->pathLocator->getVendorDirectory(); + $messages = []; + + // @todo Make this configurable or set to a different value in + // https://www.drupal.org/i/3166416. + $minimum_mb = 1024; + $minimum_bytes = Bytes::toNumber($minimum_mb . 'M'); + + if (!$this->areSameLogicalDisk($root_path, $vendor_path)) { + if ($this->freeSpace($root_path) < $minimum_bytes) { + $messages[] = $this->t('Drupal root filesystem "@root" has insufficient space. There must be at least @space megabytes free.', [ + '@root' => $root_path, + '@space' => $minimum_mb, + ]); + } + if (is_dir($vendor_path) && $this->freeSpace($vendor_path) < $minimum_bytes) { + $messages[] = $this->t('Vendor filesystem "@vendor" has insufficient space. There must be at least @space megabytes free.', [ + '@vendor' => $vendor_path, + '@space' => $minimum_mb, + ]); + } + } + elseif ($this->freeSpace($root_path) < $minimum_bytes) { + $messages[] = $this->t('Drupal root filesystem "@root" has insufficient space. There must be at least @space megabytes free.', [ + '@root' => $root_path, + '@space' => $minimum_mb, + ]); + } + $temp = $this->temporaryDirectory(); + if ($this->freeSpace($temp) < $minimum_bytes) { + $messages[] = $this->t('Directory "@temp" has insufficient space. There must be at least @space megabytes free.', [ + '@temp' => $temp, + '@space' => $minimum_mb, + ]); + } + + if ($messages) { + $summary = count($messages) > 1 + ? $this->t("There is not enough disk space to create a stage directory.") + : NULL; + $event->addError($messages, $summary); + } + } + + /** + * Returns the path of the system temporary directory. + * + * @return string + * The absolute path of the system temporary directory. + */ + protected function temporaryDirectory(): string { + return FileSystem::getOsTemporaryDirectory(); + } + +} diff --git a/core/modules/package_manager/src/Validator/DuplicateInfoFileValidator.php b/core/modules/package_manager/src/Validator/DuplicateInfoFileValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..b7bc041d7790708cedf370151a44986b2e1a3398 --- /dev/null +++ b/core/modules/package_manager/src/Validator/DuplicateInfoFileValidator.php @@ -0,0 +1,114 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\Extension\ExtensionDiscovery; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates the stage does not have duplicate info.yml not present in active. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class DuplicateInfoFileValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Validates the stage does not have duplicate info.yml not present in active. + */ + public function validate(PreApplyEvent $event): void { + $active_dir = $this->pathLocator->getProjectRoot(); + $stage_dir = $event->stage->getStageDirectory(); + $active_info_files = $this->findInfoFiles($active_dir); + $stage_info_files = $this->findInfoFiles($stage_dir); + + foreach ($stage_info_files as $stage_info_file => $stage_info_count) { + if (isset($active_info_files[$stage_info_file])) { + // Check if stage directory has more info.yml files matching + // $stage_info_file than in the active directory. + if ($stage_info_count > $active_info_files[$stage_info_file]) { + $event->addError([ + $this->t('The stage directory has @stage_count instances of @stage_info_file as compared to @active_count in the active directory. This likely indicates that a duplicate extension was installed.', [ + '@stage_info_file' => $stage_info_file, + '@stage_count' => $stage_info_count, + '@active_count' => $active_info_files[$stage_info_file], + ]), + ]); + } + } + // Check if stage directory has two or more info.yml files matching + // $stage_info_file which are not in active directory. + elseif ($stage_info_count > 1) { + $event->addError([ + $this->t('The stage directory has @stage_count instances of @stage_info_file. This likely indicates that a duplicate extension was installed.', [ + '@stage_info_file' => $stage_info_file, + '@stage_count' => $stage_info_count, + ]), + ]); + } + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreApplyEvent::class => 'validate', + ]; + } + + /** + * Recursively finds info.yml files in a directory. + * + * @param string $dir + * The path of the directory to check. + * + * @return int[] + * Array of count of info.yml files in the directory keyed by file name. + */ + private function findInfoFiles(string $dir): array { + // Use the official extension discovery mechanism, but tweak it, because by + // default it resolves duplicates. + // @see \Drupal\Core\Extension\ExtensionDiscovery::process() + $duplicate_aware_extension_discovery = new class($dir, FALSE, []) extends ExtensionDiscovery { + + /** + * {@inheritdoc} + */ + protected function process(array $all_files) { + // Unlike parent implementation: no processing, to retain duplicates. + return $all_files; + } + + }; + + // Scan all 4 extension types, explicitly ignoring tests. + $extension_info_files = array_merge( + array_keys($duplicate_aware_extension_discovery->scan('module', FALSE)), + array_keys($duplicate_aware_extension_discovery->scan('theme', FALSE)), + array_keys($duplicate_aware_extension_discovery->scan('profile', FALSE)), + array_keys($duplicate_aware_extension_discovery->scan('theme_engine', FALSE)), + ); + + $info_files = []; + foreach ($extension_info_files as $info_file) { + $file_name = basename($info_file); + $info_files[$file_name] = ($info_files[$file_name] ?? 0) + 1; + } + return $info_files; + } + +} diff --git a/core/modules/package_manager/src/Validator/EnabledExtensionsValidator.php b/core/modules/package_manager/src/Validator/EnabledExtensionsValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..526f5a0fecb092d5010050f7066e5906c5f7e9d8 --- /dev/null +++ b/core/modules/package_manager/src/Validator/EnabledExtensionsValidator.php @@ -0,0 +1,76 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Extension\ThemeHandlerInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates no enabled Drupal extensions are removed from the stage directory. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class EnabledExtensionsValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ModuleHandlerInterface $moduleHandler, + private readonly ComposerInspector $composerInspector, + private readonly ThemeHandlerInterface $themeHandler, + ) {} + + /** + * Validates that no enabled Drupal extensions have been removed. + * + * @param \Drupal\package_manager\Event\PreApplyEvent $event + * The event object. + */ + public function validate(PreApplyEvent $event): void { + $active_packages_list = $this->composerInspector->getInstalledPackagesList($this->pathLocator->getProjectRoot()); + $stage_packages_list = $this->composerInspector->getInstalledPackagesList($event->stage->getStageDirectory()); + + $extensions_list = $this->moduleHandler->getModuleList() + $this->themeHandler->listInfo(); + foreach ($extensions_list as $extension) { + $extension_name = $extension->getName(); + $package = $active_packages_list->getPackageByDrupalProjectName($extension_name); + if ($package && $stage_packages_list->getPackageByDrupalProjectName($extension_name) === NULL) { + $removed_project_messages[] = t("'@name' @type (provided by <code>@package</code>)", [ + '@name' => $extension_name, + '@type' => $extension->getType(), + '@package' => $package->name, + ]); + } + } + + if (!empty($removed_project_messages)) { + $removed_packages_summary = $this->formatPlural( + count($removed_project_messages), + 'The update cannot proceed because the following enabled Drupal extension was removed during the update.', + 'The update cannot proceed because the following enabled Drupal extensions were removed during the update.' + ); + $event->addError($removed_project_messages, $removed_packages_summary); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreApplyEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/EnvironmentSupportValidator.php b/core/modules/package_manager/src/Validator/EnvironmentSupportValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..9837b53ce918f2f190f09d457f7502a0f5b4ef2e --- /dev/null +++ b/core/modules/package_manager/src/Validator/EnvironmentSupportValidator.php @@ -0,0 +1,75 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\Core\Url; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that the environment has support for Package Manager. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class EnvironmentSupportValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait { + getSubscribedEvents as private getSubscribedEventsFromTrait; + } + use StringTranslationTrait; + + /** + * The name of the environment variable to check. + * + * This environment variable, if defined, should be parseable by + * \Drupal\Core\Url::fromUri() and link to an explanation of why Package + * Manager is not supported in the current environment. + * + * @var string + */ + public const VARIABLE_NAME = 'DRUPAL_PACKAGE_MANAGER_NOT_SUPPORTED_HELP_URL'; + + /** + * Checks that this environment supports Package Manager. + */ + public function validate(PreOperationStageEvent $event): void { + $message = $this->t('Package Manager is not supported by your environment.'); + + $help_url = getenv(static::VARIABLE_NAME); + if (empty($help_url)) { + return; + } + // If the URL is not parseable, catch the exception that Url::fromUri() + // would generate. + try { + $message = $this->t('<a href=":url">@message</a>', [ + ':url' => Url::fromUri($help_url)->toString(), + '@message' => $message, + ]); + } + catch (\InvalidArgumentException) { + // No need to do anything here. The message just won't be a link. + } + $event->addError([$message]); + // If Package Manager is unsupported, there's no point in doing any more + // validation. + $event->stopPropagation(); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + // Set priority to run before BaseRequirementsFulfilledValidator, and even + // before other base requirement validators. + // @see \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator + return array_map(fn () => ['validate', BaseRequirementsFulfilledValidator::PRIORITY + 1000], static::getSubscribedEventsFromTrait()); + } + +} diff --git a/core/modules/package_manager/src/Validator/LockFileValidator.php b/core/modules/package_manager/src/Validator/LockFileValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c0ab1398bcbb61a26d1c84bccb6077e30d79f0f1 --- /dev/null +++ b/core/modules/package_manager/src/Validator/LockFileValidator.php @@ -0,0 +1,185 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; +use Drupal\Core\KeyValueStore\KeyValueStoreInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that the active lock file is unchanged during stage operations. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class LockFileValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * The key under which to store the hash of the active lock file. + * + * @var string + */ + private const KEY = 'lock_hash'; + + /** + * The key-value store. + * + * @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface + */ + private readonly KeyValueStoreInterface $keyValue; + + public function __construct( + KeyValueFactoryInterface $keyValueFactory, + private readonly PathLocator $pathLocator, + ) { + $this->keyValue = $keyValueFactory->get('package_manager'); + } + + /** + * Returns the XXH64 hash of a file. + * + * This method is a thin wrapper around hash_file() to facilitate testing. On + * failure, hash_file() emits a warning but doesn't throw an exception. In + * tests, however, PHPUnit converts warnings to exceptions, so we need to + * catch those and convert them to the value hash_file() will actually return + * on error, which is FALSE. We could also just call `hash_file` directly and + * use @ to suppress warnings, but those would be unclear and likely to be + * accidentally removed later. + * + * @param string $path + * Path of the file to hash. + * + * @return string|false + * The hash of the given file, or FALSE if the file doesn't exist or cannot + * be hashed. + */ + private function getHash(string $path): string|false { + try { + return @hash_file('xxh64', $path); + } + catch (\Throwable) { + return FALSE; + } + } + + /** + * Stores the XXH64 hash of the active lock file. + * + * We store the hash of the lock file itself, rather than its content-hash + * value, which is actually a hash of certain parts of composer.json. Our aim + * is to verify that the actual installed packages have not changed + * unexpectedly; we don't care about the contents of composer.json. + * + * @param \Drupal\package_manager\Event\PreCreateEvent $event + * The event being handled. + */ + public function storeHash(PreCreateEvent $event): void { + $active_lock_file_path = $this->pathLocator->getProjectRoot() . DIRECTORY_SEPARATOR . 'composer.lock'; + $hash = $this->getHash($active_lock_file_path); + if ($hash) { + $this->keyValue->set(static::KEY, $hash); + } + else { + $event->addError([ + $this->t('The active lock file (@file) does not exist.', [ + '@file' => $active_lock_file_path, + ]), + ]); + } + } + + /** + * Checks that the active lock file is unchanged during stage operations. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event being handled. + */ + public function validate(PreOperationStageEvent $event): void { + $stage = $event->stage; + + // Early return if the stage is not already created. + if ($event instanceof StatusCheckEvent && $stage->isAvailable()) { + return; + } + + $messages = []; + // Ensure we can get a current hash of the lock file. + $active_lock_file_path = $this->pathLocator->getProjectRoot() . DIRECTORY_SEPARATOR . 'composer.lock'; + $active_lock_file_hash = $this->getHash($active_lock_file_path); + if (empty($active_lock_file_hash)) { + $messages[] = $this->t('The active lock file (@file) does not exist.', [ + '@file' => $active_lock_file_path, + ]); + } + + // Ensure we also have a stored hash of the lock file. + $active_lock_file_stored_hash = $this->keyValue->get(static::KEY); + if (empty($active_lock_file_stored_hash)) { + throw new \LogicException('Stored hash key deleted.'); + } + + // If we have both hashes, ensure they match. + if ($active_lock_file_hash && !hash_equals($active_lock_file_stored_hash, $active_lock_file_hash)) { + $messages[] = $this->t('Unexpected changes were detected in the active lock file (@file), which indicates that other Composer operations were performed since this Package Manager operation started. This can put the code base into an unreliable state and therefore is not allowed.', [ + '@file' => $active_lock_file_path, + ]); + } + + // Don't allow staged changes to be applied if the staged lock file has no + // apparent changes. + if (empty($messages) && $event instanceof PreApplyEvent) { + $staged_lock_file_path = $stage->getStageDirectory() . DIRECTORY_SEPARATOR . 'composer.lock'; + $staged_lock_file_hash = $this->getHash($staged_lock_file_path); + if ($staged_lock_file_hash && hash_equals($active_lock_file_hash, $staged_lock_file_hash)) { + $messages[] = $this->t('There appear to be no pending Composer operations because the active lock file (@active_file) and the staged lock file (@staged_file) are identical.', [ + '@active_file' => $active_lock_file_path, + '@staged_file' => $staged_lock_file_path, + ]); + } + } + + if (!empty($messages)) { + $summary = $this->formatPlural( + count($messages), + 'Problem detected in lock file during stage operations.', + 'Problems detected in lock file during stage operations.', + ); + $event->addError($messages, $summary); + } + } + + /** + * Deletes the stored lock file hash. + */ + public function deleteHash(): void { + $this->keyValue->delete(static::KEY); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'storeHash', + PreRequireEvent::class => 'validate', + PreApplyEvent::class => 'validate', + StatusCheckEvent::class => 'validate', + PostApplyEvent::class => 'deleteHash', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/MultisiteValidator.php b/core/modules/package_manager/src/Validator/MultisiteValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..78fee5cab398c8d14a8ac3e412ac2b3cda7f4e74 --- /dev/null +++ b/core/modules/package_manager/src/Validator/MultisiteValidator.php @@ -0,0 +1,63 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that the current site is not part of a multisite. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class MultisiteValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + use StringTranslationTrait; + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Validates that the current site is not part of a multisite. + */ + public function validate(PreOperationStageEvent $event): void { + if ($this->isMultisite()) { + $event->addError([ + $this->t('Drupal multisite is not supported by Package Manager.'), + ]); + } + } + + /** + * Detects if the current site is part of a multisite. + * + * @return bool + * TRUE if the current site is part of a multisite, otherwise FALSE. + */ + private function isMultisite(): bool { + $web_root = $this->pathLocator->getWebRoot(); + if ($web_root) { + $web_root .= '/'; + } + $sites_php_path = $this->pathLocator->getProjectRoot() . '/' . $web_root . 'sites/sites.php'; + + if (!file_exists($sites_php_path)) { + return FALSE; + } + + // @see \Drupal\Core\DrupalKernel::findSitePath() + $sites = []; + include $sites_php_path; + // @see example.sites.php + return count(array_unique($sites)) > 1; + } + +} diff --git a/core/modules/package_manager/src/Validator/OverwriteExistingPackagesValidator.php b/core/modules/package_manager/src/Validator/OverwriteExistingPackagesValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..d0a6cf1e367e5e8cf96c3fc77a738b75a019b3ad --- /dev/null +++ b/core/modules/package_manager/src/Validator/OverwriteExistingPackagesValidator.php @@ -0,0 +1,80 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that newly installed packages don't overwrite existing directories. + * + * Whether a new package in the stage directory would overwrite an existing + * directory in the active directory when the operation is applied is determined + * by inspecting the `path` property of the staged package. + * + * Certain packages, such as those with the `metapackage` type, don't have a + * `path` property and are ignored by this validator. The Composer facade at + * https://packages.drupal.org/8 currently uses the `metapackage` type for + * submodules of Drupal projects. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + * + * @see https://getcomposer.org/doc/04-schema.md#type + */ +final class OverwriteExistingPackagesValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ComposerInspector $composerInspector, + ) {} + + /** + * Validates that new installed packages don't overwrite existing directories. + * + * @param \Drupal\package_manager\Event\PreApplyEvent $event + * The event being handled. + */ + public function validate(PreApplyEvent $event): void { + $active_dir = $this->pathLocator->getProjectRoot(); + $stage_dir = $event->stage->getStageDirectory(); + $active_packages = $this->composerInspector->getInstalledPackagesList($active_dir); + $new_packages = $this->composerInspector->getInstalledPackagesList($stage_dir) + ->getPackagesNotIn($active_packages); + + foreach ($new_packages as $package) { + if (empty($package->path)) { + // Packages without a `path` cannot overwrite existing directories. + continue; + } + $relative_path = str_replace($stage_dir, '', $package->path); + if (is_dir($active_dir . DIRECTORY_SEPARATOR . $relative_path)) { + $event->addError([ + $this->t('The new package @package will be installed in the directory @path, which already exists but is not managed by Composer.', [ + '@package' => $package->name, + '@path' => $relative_path, + ]), + ]); + } + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreApplyEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/PendingUpdatesValidator.php b/core/modules/package_manager/src/Validator/PendingUpdatesValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..7ad12003d2d4550f11158812c2c5c1be13819d90 --- /dev/null +++ b/core/modules/package_manager/src/Validator/PendingUpdatesValidator.php @@ -0,0 +1,74 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\Update\UpdateRegistry; +use Drupal\Core\Url; +use Drupal\package_manager\Event\StatusCheckEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that there are no pending database updates. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class PendingUpdatesValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly string $appRoot, + private readonly UpdateRegistry $updateRegistry, + ) {} + + /** + * Validates that there are no pending database updates. + */ + public function validate(PreOperationStageEvent $event): void { + if ($this->updatesExist()) { + $message = $this->t('Some modules have database updates pending. You should run the <a href=":update">database update script</a> immediately.', [ + ':update' => Url::fromRoute('system.db_update')->toString(), + ]); + $event->addError([$message]); + } + } + + /** + * Checks if there are any pending update or post-update hooks. + * + * @return bool + * TRUE if there are any pending update or post-update hooks, FALSE + * otherwise. + */ + public function updatesExist(): bool { + require_once $this->appRoot . '/core/includes/install.inc'; + require_once $this->appRoot . '/core/includes/update.inc'; + + drupal_load_updates(); + $hook_updates = update_get_update_list(); + $post_updates = $this->updateRegistry->getPendingUpdateFunctions(); + + return $hook_updates || $post_updates; + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'validate', + StatusCheckEvent::class => 'validate', + PreApplyEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/PhpExtensionsValidator.php b/core/modules/package_manager/src/Validator/PhpExtensionsValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..8933ffbd2cf7ebeaeb169bbc3738d0ac8b21c5ce --- /dev/null +++ b/core/modules/package_manager/src/Validator/PhpExtensionsValidator.php @@ -0,0 +1,108 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Component\FileSystem\FileSystem as DrupalFilesystem; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Performs validation if certain PHP extensions are enabled. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class PhpExtensionsValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * Indicates if a particular PHP extension is loaded. + * + * @param string $name + * The name of the PHP extension to check for. + * + * @return bool + * TRUE if the given extension is loaded, FALSE otherwise. + */ + final protected function isExtensionLoaded(string $name): bool { + // If and ONLY if we're currently running a test, allow the list of loaded + // extensions to be overridden by a state variable. + if (self::insideTest()) { + // By default, assume OpenSSL is enabled and Xdebug isn't. This allows us + // to run tests in environments that we might not support in production, + // such as Drupal CI. + $loaded_extensions = \Drupal::state() + ->get('package_manager_loaded_php_extensions', ['openssl']); + return in_array($name, $loaded_extensions, TRUE); + } + return extension_loaded($name); + } + + /** + * Flags a warning if Xdebug is enabled. + * + * @param \Drupal\package_manager\Event\StatusCheckEvent $event + * The event object. + */ + public function validateXdebug(StatusCheckEvent $event): void { + if ($this->isExtensionLoaded('xdebug')) { + $event->addWarning([ + $this->t('Xdebug is enabled, which may have a negative performance impact on Package Manager and any modules that use it.'), + ]); + } + } + + /** + * Flags an error if the OpenSSL extension is not installed. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event object. + */ + public function validateOpenSsl(PreOperationStageEvent $event): void { + if (!$this->isExtensionLoaded('openssl')) { + $message = $this->t('The OpenSSL extension is not enabled, which is a security risk. See <a href=":url">the PHP documentation</a> for information on how to enable this extension.', [ + ':url' => 'https://www.php.net/manual/en/openssl.installation.php', + ]); + $event->addError([$message]); + } + } + + /** + * Whether this validator is running inside a test. + * + * @return bool + */ + private static function insideTest(): bool { + // @see \Drupal\Core\CoreServiceProvider::registerTest() + $in_functional_test = drupal_valid_test_ua(); + // @see \Drupal\Core\DependencyInjection\DependencySerializationTrait::__wakeup() + $in_kernel_test = isset($GLOBALS['__PHPUNIT_BOOTSTRAP']); + // @see \Drupal\BuildTests\Framework\BuildTestBase::setUp() + $in_build_test = str_contains(__FILE__, DrupalFilesystem::getOsTemporaryDirectory() . '/build_workspace_'); + return $in_functional_test || $in_kernel_test || $in_build_test; + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + StatusCheckEvent::class => [ + ['validateXdebug'], + ['validateOpenSsl'], + ], + PreCreateEvent::class => ['validateOpenSsl'], + PreApplyEvent::class => ['validateOpenSsl'], + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/PhpTufValidator.php b/core/modules/package_manager/src/Validator/PhpTufValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..1e08ec16e684b0ddc3f3f0d3fa8dbe07637104c5 --- /dev/null +++ b/core/modules/package_manager/src/Validator/PhpTufValidator.php @@ -0,0 +1,194 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Component\Assertion\Inspector; +use Drupal\Component\Serialization\Json; +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Site\Settings; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\Url; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that PHP-TUF is installed and correctly configured. + * + * In both the active and stage directories, this checks for the following + * conditions: + * - The PHP-TUF plugin is installed. + * - The plugin is not explicitly blocked by Composer's `allow-plugins` + * configuration. + * - Composer is aware of at least one repository that has TUF support + * explicitly enabled. + * + * Until it's more real world-tested, TUF protection is bypassed by default. + * Ultimately, though, Package Manager will not treat TUF as optional. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class PhpTufValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * The name of the PHP-TUF Composer integration plugin. + * + * @var string + */ + public const PLUGIN_NAME = 'php-tuf/composer-integration'; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ComposerInspector $composerInspector, + private readonly ModuleHandlerInterface $moduleHandler, + private readonly Settings $settings, + private readonly array $repositories, + ) { + assert(Inspector::assertAllStrings($repositories)); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + StatusCheckEvent::class => 'validate', + PreCreateEvent::class => 'validate', + PreRequireEvent::class => 'validate', + PreApplyEvent::class => 'validate', + ]; + } + + /** + * Reacts to a stage event by validating PHP-TUF configuration as needed. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event object. + */ + public function validate(PreOperationStageEvent $event): void { + $messages = $this->validateTuf($this->pathLocator->getProjectRoot()); + if ($messages) { + $event->addError($messages, $this->t('The active directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + } + + $stage = $event->stage; + if ($stage->stageDirectoryExists()) { + $messages = $this->validateTuf($stage->getStageDirectory()); + if ($messages) { + $event->addError($messages, $this->t('The stage directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + } + } + } + + /** + * Flags messages if PHP-TUF is not installed and configured properly. + * + * @param string $dir + * The directory to examine. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup[] + * The error messages, if any. + */ + private function validateTuf(string $dir): array { + $messages = []; + + // This setting will be removed without warning when no longer need. + if ($this->settings->get('package_manager_bypass_tuf', TRUE)) { + return $messages; + } + + if ($this->moduleHandler->moduleExists('help')) { + $help_url = Url::fromRoute('help.page', ['name' => 'package_manager']) + ->setOption('fragment', 'package-manager-tuf-info') + ->toString(); + } + + // The Composer plugin must be installed. + $installed_packages = $this->composerInspector->getInstalledPackagesList($dir); + if (!isset($installed_packages[static::PLUGIN_NAME])) { + $message = $this->t('The <code>@plugin</code> plugin is not installed.', [ + '@plugin' => static::PLUGIN_NAME, + ]); + if (isset($help_url)) { + $message = $this->t('@message See <a href=":url">the help page</a> for more information on how to install the plugin.', [ + '@message' => $message, + ':url' => $help_url, + ]); + } + $messages[] = $message; + } + + // And it has to be explicitly enabled. + $allowed_plugins = $this->composerInspector->getAllowPluginsConfig($dir); + if ($allowed_plugins !== TRUE && empty($allowed_plugins[static::PLUGIN_NAME])) { + $message = $this->t('The <code>@plugin</code> plugin is not listed as an allowed plugin.', [ + '@plugin' => static::PLUGIN_NAME, + ]); + if (isset($help_url)) { + $message = $this->t('@message See <a href=":url">the help page</a> for more information on how to configure the plugin.', [ + '@message' => $message, + ':url' => $help_url, + ]); + } + $messages[] = $message; + } + + // Confirm that all repositories we're configured to look at have opted into + // TUF protection. + foreach ($this->getRepositoryStatus($dir) as $url => $is_protected) { + if ($is_protected) { + continue; + } + $message = $this->t('TUF is not enabled for the <code>@url</code> repository.', [ + '@url' => $url, + ]); + if (isset($help_url)) { + $message = $this->t('@message See <a href=":url">the help page</a> for more information on how to set up this repository.', [ + '@message' => $message, + ':url' => $help_url, + ]); + } + $messages[] = $message; + } + return $messages; + } + + /** + * Gets the TUF protection status of Composer repositories. + * + * @param string $dir + * The directory in which to run Composer. + * + * @return bool[] + * An array of booleans, keyed by repository URL, indicating whether TUF + * protection is enabled for that repository. + */ + private function getRepositoryStatus(string $dir): array { + $status = []; + + $repositories = $this->composerInspector->getConfig('repositories', $dir); + $repositories = Json::decode($repositories); + + foreach ($repositories as $repository) { + // Only Composer repositories can have TUF protection. + if ($repository['type'] === 'composer') { + $url = $repository['url']; + $status[$url] = !empty($repository['tuf']); + } + } + return array_intersect_key($status, array_flip($this->repositories)); + } + +} diff --git a/core/modules/package_manager/src/Validator/RsyncValidator.php b/core/modules/package_manager/src/Validator/RsyncValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..6f396ea47e07e1722c14f2f800552c31690de8fb --- /dev/null +++ b/core/modules/package_manager/src/Validator/RsyncValidator.php @@ -0,0 +1,77 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\Core\Url; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use PhpTuf\ComposerStager\API\Exception\LogicException; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that rsync is available. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class RsyncValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly ExecutableFinderInterface $executableFinder, + private readonly ModuleHandlerInterface $moduleHandler, + ) {} + + /** + * Checks that rsync is available. + * + * @param \Drupal\package_manager\Event\PreOperationStageEvent $event + * The event being handled. + */ + public function validate(PreOperationStageEvent $event): void { + try { + $this->executableFinder->find('rsync'); + $rsync_found = TRUE; + } + catch (LogicException) { + $rsync_found = FALSE; + } + + if ($rsync_found === FALSE) { + $message = $this->t('<code>rsync</code> is not available.'); + + if ($this->moduleHandler->moduleExists('help')) { + $help_url = Url::fromRoute('help.page') + ->setRouteParameter('name', 'package_manager') + ->setOption('fragment', 'package-manager-faq-rsync') + ->toString(); + + $message = $this->t('@message See the <a href=":url">Package Manager help</a> for more information on how to resolve this.', [ + '@message' => $message, + ':url' => $help_url, + ]); + } + $event->addError([$message]); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + StatusCheckEvent::class => 'validate', + PreCreateEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/SettingsValidator.php b/core/modules/package_manager/src/Validator/SettingsValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..f89f586a958535c2f25fcd2500e9d0a3fa8f5c4f --- /dev/null +++ b/core/modules/package_manager/src/Validator/SettingsValidator.php @@ -0,0 +1,49 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\Site\Settings; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that Drupal's settings are valid for Package Manager. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class SettingsValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + /** + * Checks that Drupal's settings are valid for Package Manager. + */ + public function validate(PreOperationStageEvent $event): void { + if (Settings::get('update_fetch_with_http_fallback')) { + $event->addError([ + $this->t('The <code>update_fetch_with_http_fallback</code> setting must be disabled.'), + ]); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'validate', + PreApplyEvent::class => 'validate', + StatusCheckEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/StageNotInActiveValidator.php b/core/modules/package_manager/src/Validator/StageNotInActiveValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..7a48c5ddb08467aaeba2edfa9ae9d7d64d77f9cb --- /dev/null +++ b/core/modules/package_manager/src/Validator/StageNotInActiveValidator.php @@ -0,0 +1,54 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates staging root is not a subdirectory of active. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class StageNotInActiveValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait { + getSubscribedEvents as private getSubscribedEventsFromTrait; + } + use StringTranslationTrait; + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Check if staging root is a subdirectory of active. + */ + public function validate(PreOperationStageEvent $event): void { + $project_root = $this->pathLocator->getProjectRoot(); + $staging_root = $this->pathLocator->getStagingRoot(); + if (str_starts_with($staging_root, $project_root)) { + $message = $this->t("Stage directory is a subdirectory of the active directory."); + $event->addError([$message]); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + $events = static::getSubscribedEventsFromTrait(); + // We don't need to listen to PreApplyEvent because once the stage directory + // has been created, it's not going to be moved. + unset($events[PreApplyEvent::class]); + return $events; + } + +} diff --git a/core/modules/package_manager/src/Validator/StagedDBUpdateValidator.php b/core/modules/package_manager/src/Validator/StagedDBUpdateValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..76b088e4780794f4ac6de59911fa8219381f606e --- /dev/null +++ b/core/modules/package_manager/src/Validator/StagedDBUpdateValidator.php @@ -0,0 +1,205 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\Component\Assertion\Inspector; +use Drupal\Core\Extension\Extension; +use Drupal\Core\Extension\ModuleExtensionList; +use Drupal\Core\Extension\ThemeExtensionList; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Flags a warning if there are database updates in a staged update. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class StagedDBUpdateValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly ModuleExtensionList $moduleList, + private readonly ThemeExtensionList $themeList, + ) {} + + /** + * Checks that the staged update does not have changes to its install files. + * + * @param \Drupal\package_manager\Event\StatusCheckEvent $event + * The event object. + */ + public function checkForStagedDatabaseUpdates(StatusCheckEvent $event): void { + if (!$event->stage->stageDirectoryExists()) { + return; + } + $stage_dir = $event->stage->getStageDirectory(); + $extensions_with_updates = $this->getExtensionsWithDatabaseUpdates($stage_dir); + if ($extensions_with_updates) { + $extensions_with_updates = array_map($this->t(...), $extensions_with_updates); + $event->addWarning($extensions_with_updates, $this->t('Database updates have been detected in the following extensions.')); + } + } + + /** + * Determines if a staged extension has changed update functions. + * + * @param string $stage_dir + * The path of the stage directory. + * @param \Drupal\Core\Extension\Extension $extension + * The extension to check. + * + * @return bool + * TRUE if the staged copy of the extension has changed update functions + * compared to the active copy, FALSE otherwise. + * + * @todo In https://drupal.org/i/3253828 use a more sophisticated method to + * detect changes in the staged extension. Right now, we just compare hashes + * of the .install and .post_update.php files in both copies of the given + * extension, but this will cause false positives for changes to comments, + * whitespace, or runtime code like requirements checks. It would be + * preferable to use a static analyzer to detect new or changed functions + * that are actually executed during an update. No matter what, this method + * must NEVER cause false negatives, since that could result in code which + * is incompatible with the current database schema being copied to the + * active directory. + */ + public function hasStagedUpdates(string $stage_dir, Extension $extension): bool { + $active_dir = $this->pathLocator->getProjectRoot(); + + $web_root = $this->pathLocator->getWebRoot(); + if ($web_root) { + $active_dir .= DIRECTORY_SEPARATOR . $web_root; + $stage_dir .= DIRECTORY_SEPARATOR . $web_root; + } + + $active_functions = $this->getUpdateFunctions($active_dir, $extension); + $staged_functions = $this->getUpdateFunctions($stage_dir, $extension); + + return (bool) array_diff($staged_functions, $active_functions); + } + + /** + * Returns a list of all update functions for a module. + * + * This method only exists because the API in core that scans for available + * updates can only examine the active (running) code base, but we need to be + * able to scan the staged code base as well to compare it against the active + * one. + * + * @param string $root_dir + * The root directory of the Drupal code base. + * @param \Drupal\Core\Extension\Extension $extension + * The module to check. + * + * @return string[] + * The names of the update functions in the module's .install and + * .post_update.php files. + */ + private function getUpdateFunctions(string $root_dir, Extension $extension): array { + $name = $extension->getName(); + + $path = implode(DIRECTORY_SEPARATOR, [ + $root_dir, + $extension->getPath(), + $name, + ]); + $function_names = []; + + $patterns = [ + '.install' => '/^' . $name . '_update_[0-9]+$/i', + '.post_update.php' => '/^' . $name . '_post_update_.+$/i', + ]; + foreach ($patterns as $suffix => $pattern) { + $file = $path . $suffix; + + if (!file_exists($file)) { + continue; + } + // Parse the file and scan for named functions which match the pattern. + $code = file_get_contents($file); + $tokens = token_get_all($code); + + for ($i = 0; $i < count($tokens); $i++) { + $chunk = array_slice($tokens, $i, 3); + if ($this->tokensMatchFunctionNamePattern($chunk, $pattern)) { + $function_names[] = $chunk[2][1]; + } + } + } + return $function_names; + } + + /** + * Determines if a set of tokens contain a function name matching a pattern. + * + * @param array[] $tokens + * A set of three tokens, part of a stream returned by token_get_all(). + * @param string $pattern + * If the tokens declare a named function, a regular expression to test the + * function name against. + * + * @return bool + * TRUE if the given tokens declare a function whose name matches the given + * pattern; FALSE otherwise. + * + * @see token_get_all() + */ + private function tokensMatchFunctionNamePattern(array $tokens, string $pattern): bool { + if (count($tokens) !== 3 || !Inspector::assertAllStrictArrays($tokens)) { + return FALSE; + } + // A named function declaration will always be a T_FUNCTION (the word + // `function`), followed by T_WHITESPACE (or the code would be syntactically + // invalid), followed by a T_STRING (the function name). This will ignore + // anonymous functions, but match class methods (although class methods are + // highly unlikely to match the naming patterns of update hooks). + $names = array_map('token_name', array_column($tokens, 0)); + if ($names === ['T_FUNCTION', 'T_WHITESPACE', 'T_STRING']) { + return (bool) preg_match($pattern, $tokens[2][1]); + } + return FALSE; + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + StatusCheckEvent::class => 'checkForStagedDatabaseUpdates', + ]; + } + + /** + * Gets extensions that have database updates in the stage directory. + * + * @param string $stage_dir + * The path of the stage directory. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup[] + * The names of the extensions that have database updates. + */ + public function getExtensionsWithDatabaseUpdates(string $stage_dir): array { + $extensions_with_updates = []; + // Check all installed extensions for database updates. + $lists = [$this->moduleList, $this->themeList]; + foreach ($lists as $list) { + foreach ($list->getAllInstalledInfo() as $name => $info) { + if ($this->hasStagedUpdates($stage_dir, $list->get($name))) { + $extensions_with_updates[] = $info['name']; + } + } + } + + return $extensions_with_updates; + } + +} diff --git a/core/modules/package_manager/src/Validator/SupportedReleaseValidator.php b/core/modules/package_manager/src/Validator/SupportedReleaseValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..b22690439cb58c9bb6d725ae82bf8bbbde10cee6 --- /dev/null +++ b/core/modules/package_manager/src/Validator/SupportedReleaseValidator.php @@ -0,0 +1,138 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ProjectInfo; +use Drupal\package_manager\LegacyVersionUtility; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\Event\PreApplyEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Validates that updated projects are secure and supported. + * + * @internal + * This class is an internal part of the module's update handling and + * should not be used by external code. + */ +final class SupportedReleaseValidator implements EventSubscriberInterface { + + use StringTranslationTrait; + + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + ) {} + + /** + * Checks if the given version of a project is supported. + * + * Checks if the given version of the given project is in the core update + * system's list of known, secure, installable releases of that project. + * considered a supported release by verifying if the project is found in the + * core update system's list of known, secure, and installable releases. + * + * @param string $name + * The name of the project. + * @param string $semantic_version + * A semantic version number for the project. + * + * @return bool + * TRUE if the given version of the project is supported, otherwise FALSE. + * given version is not supported will return FALSE. + */ + private function isSupportedRelease(string $name, string $semantic_version): bool { + $supported_releases = (new ProjectInfo($name))->getInstallableReleases(); + if (!$supported_releases) { + return FALSE; + } + + // If this version is found in the list of installable releases, it is + // secured and supported. + if (array_key_exists($semantic_version, $supported_releases)) { + return TRUE; + } + // If the semantic version number wasn't in the list of + // installable releases, convert it to a legacy version number and see + // if the version number is in the list. + $legacy_version = LegacyVersionUtility::convertToLegacyVersion($semantic_version); + if ($legacy_version && array_key_exists($legacy_version, $supported_releases)) { + return TRUE; + } + // Neither the semantic version nor the legacy version are in the list + // of installable releases, so the release isn't supported. + return FALSE; + } + + /** + * Checks that the packages are secure and supported. + * + * @param \Drupal\package_manager\Event\PreApplyEvent $event + * The event object. + */ + public function validate(PreApplyEvent $event): void { + $active = $this->composerInspector->getInstalledPackagesList($this->pathLocator->getProjectRoot()); + $staged = $this->composerInspector->getInstalledPackagesList($event->stage->getStageDirectory()); + $updated_packages = array_merge( + $staged->getPackagesNotIn($active)->getArrayCopy(), + $staged->getPackagesWithDifferentVersionsIn($active)->getArrayCopy() + ); + $unknown_packages = []; + $unsupported_packages = []; + foreach ($updated_packages as $package_name => $staged_package) { + // Only packages of the types 'drupal-module' or 'drupal-theme' that + // start with 'drupal/' will have update XML from drupal.org. + if (!in_array($staged_package->type, ['drupal-module', 'drupal-theme'], TRUE) + || !str_starts_with($package_name, 'drupal/')) { + continue; + } + $project_name = $staged[$package_name]->getProjectName(); + if (empty($project_name)) { + $unknown_packages[] = $package_name; + continue; + } + $semantic_version = $staged_package->version; + if (!$this->isSupportedRelease($project_name, $semantic_version)) { + $unsupported_packages[] = $this->t('@project_name (@package_name) @version', [ + '@project_name' => $project_name, + '@package_name' => $package_name, + '@version' => $semantic_version, + ]); + } + } + if ($unsupported_packages) { + $summary = $this->formatPlural( + count($unsupported_packages), + 'Cannot update because the following project version is not in the list of installable releases.', + 'Cannot update because the following project versions are not in the list of installable releases.' + ); + $event->addError($unsupported_packages, $summary); + } + if ($unknown_packages) { + $event->addError([ + $this->formatPlural( + count($unknown_packages), + 'Cannot update because the following new or updated Drupal package does not have project information: @unknown_packages', + 'Cannot update because the following new or updated Drupal packages do not have project information: @unknown_packages', + [ + '@unknown_packages' => implode(', ', $unknown_packages), + ], + ), + ]); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreApplyEvent::class => 'validate', + ]; + } + +} diff --git a/core/modules/package_manager/src/Validator/SymlinkValidator.php b/core/modules/package_manager/src/Validator/SymlinkValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c67b52b83adc9d0f6296b376d6e08e9d89030039 --- /dev/null +++ b/core/modules/package_manager/src/Validator/SymlinkValidator.php @@ -0,0 +1,79 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Exception\PreconditionException; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use PhpTuf\ComposerStager\API\Path\Factory\PathListFactoryInterface; +use PhpTuf\ComposerStager\API\Precondition\Service\NoUnsupportedLinksExistInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Flags errors if unsupported symbolic links are detected. + * + * @see https://github.com/php-tuf/composer-stager/tree/develop/src/Domain/Service/Precondition#symlinks + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +final class SymlinkValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + + public function __construct( + private readonly PathLocator $pathLocator, + private readonly NoUnsupportedLinksExistInterface $precondition, + private readonly PathFactoryInterface $pathFactory, + private readonly PathListFactoryInterface $pathListFactory, + ) {} + + /** + * Flags errors if the project root or stage directory contain symbolic links. + */ + public function validate(PreOperationStageEvent $event): void { + if ($event instanceof PreRequireEvent) { + // We don't need to check symlinks again during PreRequireEvent; this was + // already just validated during PreCreateEvent. + return; + } + $active_dir = $this->pathFactory->create($this->pathLocator->getProjectRoot()); + + // The precondition requires us to pass both an active and stage directory, + // so if the stage hasn't been created or claimed yet, use the directory + // that contains this file, which contains only a few files and no symlinks, + // as the stage directory. The precondition itself doesn't care if the + // directory actually exists or not. + $stage_dir = __DIR__; + if ($event->stage->stageDirectoryExists()) { + $stage_dir = $event->stage->getStageDirectory(); + } + $stage_dir = $this->pathFactory->create($stage_dir); + + // Return early if no excluded paths were collected because this validator + // is dependent on knowing which paths to exclude when searching for + // symlinks. + // @see \Drupal\package_manager\StatusCheckTrait::runStatusCheck() + if ($event->excludedPaths === NULL) { + return; + } + + // The list of excluded paths is immutable, but the precondition may need to + // mutate it, so convert it back to a normal, mutable path list. + $exclusions = $this->pathListFactory->create(...$event->excludedPaths->getAll()); + + try { + $this->precondition->assertIsFulfilled($active_dir, $stage_dir, $exclusions); + } + catch (PreconditionException $e) { + $event->addErrorFromThrowable($e); + } + } + +} diff --git a/core/modules/package_manager/src/Validator/WritableFileSystemValidator.php b/core/modules/package_manager/src/Validator/WritableFileSystemValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..3b31af7735cd89b39f457cfb8aef409fc239a619 --- /dev/null +++ b/core/modules/package_manager/src/Validator/WritableFileSystemValidator.php @@ -0,0 +1,92 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager\Validator; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Checks that the file system is writable. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +class WritableFileSystemValidator implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + use StringTranslationTrait; + + public function __construct(private readonly PathLocator $pathLocator) { + } + + /** + * Checks that the file system is writable. + * + * @todo Determine if 'is_writable()' is a sufficiently robust test across + * different operating systems in https://drupal.org/i/3348253. + */ + public function validate(PreOperationStageEvent $event): void { + $messages = []; + + $project_root = $this->pathLocator->getProjectRoot(); + + // If the web (Drupal) root and project root are different, validate the + // web root separately. + $web_root = $this->pathLocator->getWebRoot(); + if ($web_root) { + $drupal_root = $project_root . DIRECTORY_SEPARATOR . $web_root; + if (!is_writable($drupal_root)) { + $messages[] = $this->t('The Drupal directory "@dir" is not writable.', [ + '@dir' => $drupal_root, + ]); + } + } + + if (!is_writable($project_root)) { + $messages[] = $this->t('The project root directory "@dir" is not writable.', [ + '@dir' => $project_root, + ]); + } + + $dir = $this->pathLocator->getVendorDirectory(); + if (!is_writable($dir)) { + $messages[] = $this->t('The vendor directory "@dir" is not writable.', ['@dir' => $dir]); + } + + // During pre-apply don't check whether the staging root is writable. + if ($event instanceof PreApplyEvent) { + if ($messages) { + $event->addError($messages, $this->t('The file system is not writable.')); + } + return; + } + // Ensure the staging root is writable. If it doesn't exist, ensure we will + // be able to create it. + $dir = $this->pathLocator->getStagingRoot(); + if (!file_exists($dir)) { + $dir = dirname($dir); + if (!is_writable($dir)) { + $messages[] = $this->t('The stage root directory will not able to be created at "@dir".', [ + '@dir' => $dir, + ]); + } + } + elseif (!is_writable($dir)) { + $messages[] = $this->t('The stage root directory "@dir" is not writable.', [ + '@dir' => $dir, + ]); + } + + if ($messages) { + $event->addError($messages, $this->t('The file system is not writable.')); + } + } + +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/README.md b/core/modules/package_manager/tests/fixtures/build_test_projects/README.md new file mode 100644 index 0000000000000000000000000000000000000000..40e2077edb4d2df79f4dee6579178091994789fe --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/README.md @@ -0,0 +1,11 @@ +# Why do we need the `updated_module` fixtures? +Because there is a need to thoroughly test the updating of a module. See `\Drupal\Tests\package_manager\Build\PackageUpdateTest`. + +This requires 2 versions (`1.0.0` and `1.1.0`) of the same module (`updated_module`), each with a different code bases. + +The test updates from one version to the next, and verifies the updated module's code base is actually used after the update: it verifies the updated logic of version of `\Drupal\updated_module\PostApplySubscriber` is being executed. + +`\Drupal\fixture_manipulator\FixtureManipulator` cannot manipulate code nor does it modify the file system: it only creates a "skeleton" extension. (See `\Drupal\fixture_manipulator\FixtureManipulator::addProjectAtPath()`.) + +# Why do we need the `alpha` fixtures? +To be able to test that `php-tuf/composer-stager` indeed only updates the package for which an update was requested (even though more updates are available), no fixture manipulation is allowed to occur. This requires updating a `path` composer package repository to first serve contain one version of a package, and then another. That is what these fixtures are used for. diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/alpha.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/alpha.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..3029b2a6d90fd4e0b170a8c3b68da96226f3e8c2 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/alpha.info.yml.hide @@ -0,0 +1,4 @@ +name: Alpha +type: module +core_version_requirement: ^9.7 || ^10 +project: alpha diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/composer.json b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..35db7d858c4e573b44964fd01fda7c68c565c01d --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.0.0/composer.json @@ -0,0 +1,5 @@ +{ + "name": "drupal/alpha", + "type": "drupal-module", + "version": "1.0.0" +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/alpha.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/alpha.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..3029b2a6d90fd4e0b170a8c3b68da96226f3e8c2 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/alpha.info.yml.hide @@ -0,0 +1,4 @@ +name: Alpha +type: module +core_version_requirement: ^9.7 || ^10 +project: alpha diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/composer.json b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f21a204a76df65c38abc4150645b0481d962f5a2 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/alpha/1.1.0/composer.json @@ -0,0 +1,5 @@ +{ + "name": "drupal/alpha", + "type": "drupal-module", + "version": "1.1.0" +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/composer.json b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..44b9518c5b5304eba09909ae70b4e6b5e786fb41 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/composer.json @@ -0,0 +1,5 @@ +{ + "name": "drupal/main_module", + "type": "drupal-module", + "version": "1.0.0" +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..1852bfe5947fef23c9409f7e231e49b1aae26367 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module.info.yml.hide @@ -0,0 +1,4 @@ +name: Main module +type: module +core_version_requirement: ^9 || ^10 +project: main_module diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module_submodule/main_module_submodule.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module_submodule/main_module_submodule.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..1383bc227ae23d8e74cffa1f6206251d7b588c91 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/main_module/main_module_submodule/main_module_submodule.info.yml.hide @@ -0,0 +1,4 @@ +name: Main Module Submodule +type: module +core_version_requirement: ^9 || ^10 +project: main_module diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/composer.json b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..777cd741d2490c4824f39a8d9664060de6507c99 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/composer.json @@ -0,0 +1,5 @@ +{ + "name": "drupal/updated_module", + "type": "drupal-module", + "version": "1.0.0" +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..5d31bbdb5a80a68434488753a0dc6902949446f6 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.info.yml.hide @@ -0,0 +1,5 @@ +name: 'Updated module' +description: 'A module which will change during an update, to ensure that the changes are picked up.' +type: module +package: Testing +project: updated_module diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.module b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.module new file mode 100644 index 0000000000000000000000000000000000000000..0f90596c5ff12f54342c5254e1bb6d43dcf9c345 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.module @@ -0,0 +1,18 @@ +<?php + +/** + * @file + * Contains global functions for testing updates to a .module file. + */ + +/** + * Page controller that says hello. + * + * @return string[] + * A renderable array of the page content. + */ +function updated_module_hello(): array { + return [ + '#markup' => 'Hello!', + ]; +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/composer.json b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..6f997dad4cf46647eb2a8dbd82f94f232f5e9f5b --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/composer.json @@ -0,0 +1,5 @@ +{ + "name": "drupal/updated_module", + "type": "drupal-module", + "version": "1.1.0" +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/src/PostApplySubscriber.php b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/src/PostApplySubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..351933e341ce917d07f4143d8eeacc49051816d9 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/src/PostApplySubscriber.php @@ -0,0 +1,54 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\updated_module; + +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Writes a file after staged changes are applied to the active directory. + * + * This event subscriber doesn't exist in version 1.0.0 of this module, so we + * use it to test that new event subscribers are picked up after staged changes + * have been applied. + */ +class PostApplySubscriber implements EventSubscriberInterface { + + /** + * The path locator service. + * + * @var \Drupal\package_manager\PathLocator + */ + private $pathLocator; + + /** + * Constructs a PostApplySubscriber. + * + * @param \Drupal\package_manager\PathLocator $path_locator + * The path locator service. + */ + public function __construct(PathLocator $path_locator) { + $this->pathLocator = $path_locator; + } + + /** + * Writes a file when staged changes are applied to the active directory. + */ + public function postApply(): void { + $dir = $this->pathLocator->getProjectRoot(); + file_put_contents("$dir/bravo.txt", 'Bravo!'); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PostApplyEvent::class => 'postApply', + ]; + } + +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.info.yml.hide b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.info.yml.hide new file mode 100644 index 0000000000000000000000000000000000000000..5d31bbdb5a80a68434488753a0dc6902949446f6 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.info.yml.hide @@ -0,0 +1,5 @@ +name: 'Updated module' +description: 'A module which will change during an update, to ensure that the changes are picked up.' +type: module +package: Testing +project: updated_module diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.module b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.module new file mode 100644 index 0000000000000000000000000000000000000000..0f90596c5ff12f54342c5254e1bb6d43dcf9c345 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.module @@ -0,0 +1,18 @@ +<?php + +/** + * @file + * Contains global functions for testing updates to a .module file. + */ + +/** + * Page controller that says hello. + * + * @return string[] + * A renderable array of the page content. + */ +function updated_module_hello(): array { + return [ + '#markup' => 'Hello!', + ]; +} diff --git a/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.services.yml b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..11bbfb9e9547bcfd47e290e8678b550ef751cb02 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.services.yml @@ -0,0 +1,7 @@ +services: + updated_module.post_apply_subscriber: + class: Drupal\updated_module\PostApplySubscriber + arguments: + - '@Drupal\package_manager\PathLocator' + tags: + - { name: event_subscriber } diff --git a/core/modules/package_manager/tests/fixtures/db_update.php b/core/modules/package_manager/tests/fixtures/db_update.php new file mode 100644 index 0000000000000000000000000000000000000000..7adacfb2e2e8d8bcc498735e7472f6fde2577340 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/db_update.php @@ -0,0 +1,14 @@ +<?php + +/** + * @file + * Contains a fake database update function for testing. + */ + +/** + * Here is a fake update hook. + * + * The schema version is the maximum possible value for a 32-bit integer. + */ +function package_manager_update_2147483647() { +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/.gitignore b/core/modules/package_manager/tests/fixtures/fake_site/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e11552b41d40377475700ab10cd3118257d93cc7 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/.gitignore @@ -0,0 +1 @@ +# This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/README.md b/core/modules/package_manager/tests/fixtures/fake_site/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9c9076f5b9fe840e85a22f7a866ebef546db96fc --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/README.md @@ -0,0 +1,19 @@ +This directory is used as the basis for quasi-functional tests of Package Manager based on `\Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase`. It provides a bare-bones simulation of a real Drupal site layout, including: + +* A `.git` directory and `.gitignore` file +* A Drupal core directory with npm modules installed +* An `example` contrib module with its own `.git` directory and npm modules +* A directory in which to store private files (`private`) +* A default site directory with site-specific config files, as well as default versions of them +* A "real" site directory (`example.com`), with a public `files` directory, site-specific config files, and a SQLite database +* A `simpletest` directory containing artifacts from automated tests +* A `vendor` directory to contain installed Composer dependencies +* `composer.json` and `composer.lock` files + +Tests which use this mock site will clone it into a temporary location, then run real Composer commands in it, along with other Package Manager operations, and make assertions about the results. It's important to understand that this mock site is not at all bootable or usable as a real Drupal site. But as far as Package Manager and Composer are concerned, it IS a completely valid project that can go through all phases of the stage life cycle. + +The files named `ignore.txt` are named that way because Package Manager should ALWAYS ignore them when creating a staged copy of this mock site -- that is, they should never be copied into the stage directory, or removed from their original place, by Package Manager. + +The `.git` directories are named `_git` because we cannot commit `.git` directories to our git repository. When a test clones this mock site, these directories are automatically renamed to `.git` in the copy. + +This fixture can be re-created at any time by running, from the repository root, `php scripts/PackageManagerFixtureCreator.php`. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/_git/ignore.txt b/core/modules/package_manager/tests/fixtures/fake_site/_git/ignore.txt new file mode 100644 index 0000000000000000000000000000000000000000..b70fb51506c2980cae2e37aa0fa0591a097210a8 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/_git/ignore.txt @@ -0,0 +1,4 @@ +This file should never be staged. + +The parent directory will be renamed to .git. +@see \Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase::createTestProject() diff --git a/core/modules/package_manager/tests/fixtures/fake_site/composer.json b/core/modules/package_manager/tests/fixtures/fake_site/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..59927347a36203164b93f0b63728f7a3248e18a3 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/composer.json @@ -0,0 +1,47 @@ +{ + "name": "fake/site", + "description": "bull shit", + "version": "1.2.4", + "require": { + "drupal/core-recommended": "9.8.0", + "drupal/core": "9.8.0" + }, + "require-dev": { + "drupal/core-dev": "^9" + }, + "extra": { + "boo": "boo boo", + "foo": { + "dev": "2.x-dev" + }, + "foo-bar": true, + "boo-far": { + "foo": 1.23, + "bar": 134, + "foo-bar": null + }, + "baz": null, + "installer-paths": { + "modules/contrib/{$name}": ["type:drupal-module"], + "profiles/contrib/{$name}": ["type:drupal-profile"], + "themes/contrib/{$name}": ["type:drupal-theme"] + } + }, + "repositories": { + "fake-packages": { + "type": "composer", + "url": "./" + }, + "custom-package": { + "type": "path", + "url": "custom/package" + }, + "packagist.org": false + }, + "minimum-stability": "stable", + "config": { + "allow-plugins": { + "drupal/core-composer-scaffold": false + } + } +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/composer.lock b/core/modules/package_manager/tests/fixtures/fake_site/composer.lock new file mode 100644 index 0000000000000000000000000000000000000000..fcf06e98c7890123690e47ae5726d06bb2ceedb4 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/composer.lock @@ -0,0 +1,88 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e14b8d5fb12bac6df9c78c41c977e9e5", + "packages": [ + { + "name": "drupal/core", + "version": "9.8.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core", + "reference": "31fd2270701526555acae45a3601c777e35508d5" + }, + "type": "drupal-core", + "extra": { + "_readme": [ + "The 'drupal-scaffold' section below is needed because 'Drupal\\auto_updates\\Validator\\ScaffoldFilePermissionsValidator'", + "uses this section to determine which files to check. The actual composer.json file for drupal/core will have more files listed", + "but this limited list is used in '\\Drupal\\Tests\\auto_updates\\Kernel\\StatusCheck\\ScaffoldFilePermissionsValidatorTest'", + "to ensure this section determines the file list." + ], + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[project-root]/recipes/README.txt": "assets/scaffold/files/recipes.README.txt", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.md": "assets/scaffold/files/drupal.README.md", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + }, + "description": "A fake version of drupal/core" + }, + { + "name": "drupal/core-recommended", + "version": "9.8.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-recommended", + "reference": "112e4f7cfe8312457cd0eb58dcbffebc148850d8" + }, + "type": "project", + "description": "A fake version of drupal/core-recommended" + } + ], + "packages-dev": [ + { + "name": "drupal/core-dev", + "version": "9.8.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-dev", + "reference": "b99a99a11ff2779b5e4c5787dc43575382a3548c" + }, + "type": "package", + "description": "A fake version of drupal/core-dev" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/custom/package/composer.json b/core/modules/package_manager/tests/fixtures/fake_site/custom/package/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/custom/package/composer.json @@ -0,0 +1 @@ +{} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/modules/example/_git/ignore.txt b/core/modules/package_manager/tests/fixtures/fake_site/modules/example/_git/ignore.txt new file mode 100644 index 0000000000000000000000000000000000000000..b70fb51506c2980cae2e37aa0fa0591a097210a8 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/modules/example/_git/ignore.txt @@ -0,0 +1,4 @@ +This file should never be staged. + +The parent directory will be renamed to .git. +@see \Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase::createTestProject() diff --git a/core/modules/package_manager/tests/fixtures/fake_site/modules/example/example.info.yml b/core/modules/package_manager/tests/fixtures/fake_site/modules/example/example.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..046fc058cf879d642a412e6c253d0d652d8d2bdd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/modules/example/example.info.yml @@ -0,0 +1,3 @@ +# This file should be staged. +name: Example +type: module diff --git a/core/modules/package_manager/tests/fixtures/fake_site/packages.json b/core/modules/package_manager/tests/fixtures/fake_site/packages.json new file mode 100644 index 0000000000000000000000000000000000000000..6bcbca9045e6bd53145bfbbe8f1c7a784a70c30c --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/packages.json @@ -0,0 +1,101 @@ +{ + "packages": { + "drupal/core-recommended": { + "9.8.0": { + "name": "drupal/core-recommended", + "description": "A fake version of drupal/core-recommended", + "type": "project", + "version": "9.8.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-recommended", + "reference": "112e4f7cfe8312457cd0eb58dcbffebc148850d8" + } + } + }, + "drupal/core-dev": { + "9.8.0": { + "name": "drupal/core-dev", + "description": "A fake version of drupal/core-dev", + "type": "package", + "version": "9.8.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-dev", + "reference": "b99a99a11ff2779b5e4c5787dc43575382a3548c" + } + } + }, + "drupal/core": { + "9.8.0": { + "name": "drupal/core", + "type": "drupal-core", + "description": "A fake version of drupal/core", + "version": "9.8.0", + "extra": { + "_readme": [ + "The 'drupal-scaffold' section below is needed because 'Drupal\\auto_updates\\Validator\\ScaffoldFilePermissionsValidator'", + "uses this section to determine which files to check. The actual composer.json file for drupal/core will have more files listed", + "but this limited list is used in '\\Drupal\\Tests\\auto_updates\\Kernel\\StatusCheck\\ScaffoldFilePermissionsValidatorTest'", + "to ensure this section determines the file list." + ], + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[project-root]/recipes/README.txt": "assets/scaffold/files/recipes.README.txt", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.md": "assets/scaffold/files/drupal.README.md", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + }, + "dist": { + "type": "path", + "url": "../path_repos/drupal--core", + "reference": "31fd2270701526555acae45a3601c777e35508d5" + } + } + }, + "cweagans/composer-patches": { + "1.7.333": { + "name": "cweagans/composer-patches", + "description": "A fake version of cweagans/composer-patches", + "type": "composer-plugin", + "version": "1.7.333", + "extra": { + "class": "\\cweagans\\Fake\\ComposerPatches" + }, + "dist": { + "type": "path", + "url": "../path_repos/cweagans--composer-patches" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "cweagans\\Fake\\": "src" + } + } + } + } + } +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/private/exclude.txt b/core/modules/package_manager/tests/fixtures/fake_site/private/exclude.txt new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/private/exclude.txt @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.services.yml b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..95dde1725d473db573d984d265982dc8484711cb --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.services.yml @@ -0,0 +1,2 @@ +# This file should be staged because it's scaffolded into place by Drupal core. +services: {} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.settings.php b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.settings.php new file mode 100644 index 0000000000000000000000000000000000000000..0d23e84006963818e10866380b9be09c6b92ba92 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/default.settings.php @@ -0,0 +1,6 @@ +<?php + +/** + * @file + * This file should be staged because it's scaffolded into place by Drupal core. + */ diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/services.yml b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/services.yml new file mode 100644 index 0000000000000000000000000000000000000000..cbc4434e8f2bc888569a704746bf41606174d259 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/services.yml @@ -0,0 +1,2 @@ +# This file should never be staged. +must_not_be: 'empty' diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.local.php b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.local.php new file mode 100644 index 0000000000000000000000000000000000000000..15b43d28125cc4a2e30348dc76d972ce240443ac --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.local.php @@ -0,0 +1,6 @@ +<?php + +/** + * @file + * This file should never be staged. + */ diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.php b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..15b43d28125cc4a2e30348dc76d972ce240443ac --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/settings.php @@ -0,0 +1,6 @@ +<?php + +/** + * @file + * This file should never be staged. + */ diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/default/stage.txt b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/stage.txt new file mode 100644 index 0000000000000000000000000000000000000000..0087269e33e50d1805db3c9ecf821660384c11bc --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/default/stage.txt @@ -0,0 +1 @@ +This file should be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-shm b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-shm new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-shm @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-wal b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-wal new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/db.sqlite-wal @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/files/exclude.txt b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/files/exclude.txt new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/files/exclude.txt @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/services.yml b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/services.yml new file mode 100644 index 0000000000000000000000000000000000000000..f408d89e28e978d7e5cc3605b5e35eb81d122e3b --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/services.yml @@ -0,0 +1,2 @@ +# This file should never be staged. +key: "value" diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.local.php b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.local.php new file mode 100644 index 0000000000000000000000000000000000000000..15b43d28125cc4a2e30348dc76d972ce240443ac --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.local.php @@ -0,0 +1,6 @@ +<?php + +/** + * @file + * This file should never be staged. + */ diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.php b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..15b43d28125cc4a2e30348dc76d972ce240443ac --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/example.com/settings.php @@ -0,0 +1,6 @@ +<?php + +/** + * @file + * This file should never be staged. + */ diff --git a/core/modules/package_manager/tests/fixtures/fake_site/sites/simpletest/ignore.txt b/core/modules/package_manager/tests/fixtures/fake_site/sites/simpletest/ignore.txt new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/sites/simpletest/ignore.txt @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/.htaccess b/core/modules/package_manager/tests/fixtures/fake_site/vendor/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..e11552b41d40377475700ab10cd3118257d93cc7 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/.htaccess @@ -0,0 +1 @@ +# This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.json b/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.json new file mode 100644 index 0000000000000000000000000000000000000000..d02150712c5c6cb4468c0da083b1b9cf3af884ab --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.json @@ -0,0 +1,85 @@ +{ + "packages": [ + { + "name": "drupal/core", + "version": "9.8.0", + "version_normalized": "9.8.0.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core", + "reference": "31fd2270701526555acae45a3601c777e35508d5" + }, + "type": "drupal-core", + "extra": { + "_readme": [ + "The 'drupal-scaffold' section below is needed because 'Drupal\\auto_updates\\Validator\\ScaffoldFilePermissionsValidator'", + "uses this section to determine which files to check. The actual composer.json file for drupal/core will have more files listed", + "but this limited list is used in '\\Drupal\\Tests\\auto_updates\\Kernel\\StatusCheck\\ScaffoldFilePermissionsValidatorTest'", + "to ensure this section determines the file list." + ], + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[project-root]/recipes/README.txt": "assets/scaffold/files/recipes.README.txt", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.md": "assets/scaffold/files/drupal.README.md", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + }, + "installation-source": "dist", + "description": "A fake version of drupal/core", + "install-path": "../drupal/core" + }, + { + "name": "drupal/core-dev", + "version": "9.8.0", + "version_normalized": "9.8.0.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-dev", + "reference": "b99a99a11ff2779b5e4c5787dc43575382a3548c" + }, + "type": "package", + "installation-source": "dist", + "description": "A fake version of drupal/core-dev", + "install-path": "../drupal/core-dev" + }, + { + "name": "drupal/core-recommended", + "version": "9.8.0", + "version_normalized": "9.8.0.0", + "dist": { + "type": "path", + "url": "../path_repos/drupal--core-recommended", + "reference": "112e4f7cfe8312457cd0eb58dcbffebc148850d8" + }, + "type": "project", + "installation-source": "dist", + "description": "A fake version of drupal/core-recommended", + "install-path": "../drupal/core-recommended" + } + ], + "dev": true, + "dev-package-names": [ + "drupal/core-dev" + ] +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.php b/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.php new file mode 100644 index 0000000000000000000000000000000000000000..652db9ee38dcd068e457f70af5a63c5061e7dcfc --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/composer/installed.php @@ -0,0 +1,56 @@ +<?php + +/** + * @file + */ + +return [ + 'root' => [ + 'name' => 'fake/site', + 'pretty_version' => '1.2.4', + 'version' => '1.2.4.0', + 'reference' => NULL, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => [], + 'dev' => TRUE, + ], + 'versions' => [ + 'drupal/core' => [ + 'pretty_version' => '9.8.0', + 'version' => '9.8.0.0', + 'reference' => '31fd2270701526555acae45a3601c777e35508d5', + 'type' => 'drupal-core', + 'install_path' => __DIR__ . '/../drupal/core', + 'aliases' => [], + 'dev_requirement' => FALSE, + ], + 'drupal/core-dev' => [ + 'pretty_version' => '9.8.0', + 'version' => '9.8.0.0', + 'reference' => 'b99a99a11ff2779b5e4c5787dc43575382a3548c', + 'type' => 'package', + 'install_path' => __DIR__ . '/../drupal/core-dev', + 'aliases' => [], + 'dev_requirement' => TRUE, + ], + 'drupal/core-recommended' => [ + 'pretty_version' => '9.8.0', + 'version' => '9.8.0.0', + 'reference' => '112e4f7cfe8312457cd0eb58dcbffebc148850d8', + 'type' => 'project', + 'install_path' => __DIR__ . '/../drupal/core-recommended', + 'aliases' => [], + 'dev_requirement' => FALSE, + ], + 'fake/site' => [ + 'pretty_version' => '1.2.4', + 'version' => '1.2.4.0', + 'reference' => NULL, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => [], + 'dev_requirement' => FALSE, + ], + ], +]; diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-dev/composer.json b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-dev/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..0cbfd9f7b5fa8cc447d769a9655292b541837a6d --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-dev/composer.json @@ -0,0 +1 @@ +{"name":"drupal\/core-dev","description": "A fake version of drupal/core-dev","type":"package","version":"9.8.0"} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-recommended/composer.json b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-recommended/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..ca65289753d14f81b97fe2df5b5238f0cd6c4615 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core-recommended/composer.json @@ -0,0 +1 @@ +{"name":"drupal/core-recommended","description": "A fake version of drupal/core-recommended","type":"project","version":"9.8.0"} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core/composer.json b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..e4412436131de904cf83c7461a185697b2a3de01 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/drupal/core/composer.json @@ -0,0 +1,41 @@ +{ + "name": "drupal/core", + "type": "drupal-core", + "description": "A fake version of drupal/core", + "version": "9.8.0", + "extra": { + "_readme": [ + "The 'drupal-scaffold' section below is needed because 'Drupal\\auto_updates\\Validator\\ScaffoldFilePermissionsValidator'", + "uses this section to determine which files to check. The actual composer.json file for drupal/core will have more files listed", + "but this limited list is used in '\\Drupal\\Tests\\auto_updates\\Kernel\\StatusCheck\\ScaffoldFilePermissionsValidatorTest'", + "to ensure this section determines the file list." + ], + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[project-root]/recipes/README.txt": "assets/scaffold/files/recipes.README.txt", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.md": "assets/scaffold/files/drupal.README.md", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + } +} diff --git a/core/modules/package_manager/tests/fixtures/fake_site/vendor/web.config b/core/modules/package_manager/tests/fixtures/fake_site/vendor/web.config new file mode 100644 index 0000000000000000000000000000000000000000..08874eba8bb924527069b41e1195da4b6b69d1dd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/fake_site/vendor/web.config @@ -0,0 +1 @@ +This file should never be staged. diff --git a/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/composer.json b/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..c48abf3e8b946965e85c06416cef2e15b822f867 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/composer.json @@ -0,0 +1,15 @@ +{ + "name": "cweagans/composer-patches", + "description": "A fake version of cweagans/composer-patches", + "type": "composer-plugin", + "version": "1.7.333", + "extra": { + "class": "\\cweagans\\Fake\\ComposerPatches" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": {"cweagans\\Fake\\": "src"} + } +} diff --git a/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/src/ComposerPatches.php b/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/src/ComposerPatches.php new file mode 100644 index 0000000000000000000000000000000000000000..65f431d01ba64bde86b58b3b0de8efbc54aa5144 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/cweagans--composer-patches/src/ComposerPatches.php @@ -0,0 +1,29 @@ +<?php + +namespace cweagans\Fake; + +use Composer\Composer; +use Composer\IO\IOInterface; +use Composer\Plugin\PluginInterface; + +/** + * Dummy composer plugin implementation. + */ +class ComposerPatches implements PluginInterface { + + /** + * {@inheritdoc} + */ + public function activate(Composer $composer, IOInterface $io) {} + + /** + * {@inheritdoc} + */ + public function deactivate(Composer $composer, IOInterface $io) {} + + /** + * {@inheritdoc} + */ + public function uninstall(Composer $composer, IOInterface $io) {} + +} diff --git a/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-dev/composer.json b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-dev/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..0cbfd9f7b5fa8cc447d769a9655292b541837a6d --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-dev/composer.json @@ -0,0 +1 @@ +{"name":"drupal\/core-dev","description": "A fake version of drupal/core-dev","type":"package","version":"9.8.0"} diff --git a/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-recommended/composer.json b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-recommended/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..ca65289753d14f81b97fe2df5b5238f0cd6c4615 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core-recommended/composer.json @@ -0,0 +1 @@ +{"name":"drupal/core-recommended","description": "A fake version of drupal/core-recommended","type":"project","version":"9.8.0"} diff --git a/core/modules/package_manager/tests/fixtures/path_repos/drupal--core/composer.json b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..e4412436131de904cf83c7461a185697b2a3de01 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/drupal--core/composer.json @@ -0,0 +1,41 @@ +{ + "name": "drupal/core", + "type": "drupal-core", + "description": "A fake version of drupal/core", + "version": "9.8.0", + "extra": { + "_readme": [ + "The 'drupal-scaffold' section below is needed because 'Drupal\\auto_updates\\Validator\\ScaffoldFilePermissionsValidator'", + "uses this section to determine which files to check. The actual composer.json file for drupal/core will have more files listed", + "but this limited list is used in '\\Drupal\\Tests\\auto_updates\\Kernel\\StatusCheck\\ScaffoldFilePermissionsValidatorTest'", + "to ensure this section determines the file list." + ], + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[project-root]/recipes/README.txt": "assets/scaffold/files/recipes.README.txt", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.md": "assets/scaffold/files/drupal.README.md", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + } +} diff --git a/core/modules/package_manager/tests/fixtures/path_repos/main_module_submodule/composer.json b/core/modules/package_manager/tests/fixtures/path_repos/main_module_submodule/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..cee4fc43d6a7df994313eceeeda334ee671e6b41 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/path_repos/main_module_submodule/composer.json @@ -0,0 +1,8 @@ +{ + "name": "drupal/main_module_submodule", + "type": "metapackage", + "version": "1.0.0", + "require": { + "drupal/main_module": "*" + } +} diff --git a/core/modules/package_manager/tests/fixtures/post_update.php b/core/modules/package_manager/tests/fixtures/post_update.php new file mode 100644 index 0000000000000000000000000000000000000000..a596cbe1d0f8f73ea3c53aaa58b3fc8b4f1e4acd --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/post_update.php @@ -0,0 +1,12 @@ +<?php + +/** + * @file + * Contains a fake database post-update function for testing. + */ + +/** + * Here is a fake post-update hook. + */ +function package_manager_post_update_test() { +} diff --git a/core/modules/package_manager/tests/fixtures/release-history/aaa_update_test.1.1.xml b/core/modules/package_manager/tests/fixtures/release-history/aaa_update_test.1.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..98c0cf442f5deca6d811c70789dcf7c0d32dcb0b --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/aaa_update_test.1.1.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest. + +Contains metadata about the following (fake) releases of aaa_update_test module, all of which are secure, in order: +- 8.x-3.0, which is in an unsupported branch +- 8.x-2.1 +- 8.x-2.1-beta1 +- 8.x-2.1-alpha1 +- 8.x-2.0 +- 8.x-2.0-beta1 +- 8.x-2.0-alpha1 +- 8.x-1.1 +- 8.x-1.1-beta1 +- 8.x-1.1-alpha1 +- 8.x-1.0 +- 8.x-1.0-beta1 +- 8.x-1.0-alpha1 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>AAA Update test</title> +<short_name>aaa_update_test</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>8.x-2.,8.x-1.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/aaa_update_test</link> + <terms> + <term><name>Projects</name><value>AAA Update test project</value></term> + </terms> +<releases> + <release> + <name>AAA Update test 8.x-3.0</name> + <version>8.x-3.0</version> + <tag>8.x-3.0</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-3-0-release</release_link> + <download_link>http://example.com/aaa_update_test-8-3-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.1</name> + <version>8.x-2.1</version> + <tag>8.x-2.1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-1.tar.gz</download_link> + <date>1581603300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.1-beta1</name> + <version>8.x-2.1-beta1</version> + <tag>8.x-2.1-beta1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-1-beta1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-1-beta1.tar.gz</download_link> + <date>1579011300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.1-alpha1</name> + <version>8.x-2.1-alpha1</version> + <tag>8.x-2.1-alpha1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-1-alpha1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-1-alpha1.tar.gz</download_link> + <date>1576419300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.0</name> + <version>8.x-2.0</version> + <tag>8.x-2.0</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-0-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-0.tar.gz</download_link> + <date>1573827300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.0-beta1</name> + <version>8.x-2.0-beta1</version> + <tag>8.x-2.0-beta1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-0-beta1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-0-beta1.tar.gz</download_link> + <date>1571235300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-2.0-alpha1</name> + <version>8.x-2.0-alpha1</version> + <tag>8.x-2.0-alpha1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-2-0-alpha1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-2-0-alpha1.tar.gz</download_link> + <date>1568643300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.1</name> + <version>8.x-1.1</version> + <tag>8.x-1.1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-1.tar.gz</download_link> + <date>1566051300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.1-beta1</name> + <version>8.x-1.1-beta1</version> + <tag>8.x-1.1-beta1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-1-beta1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-1-beta1.tar.gz</download_link> + <date>1563459300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.1-alpha1</name> + <version>8.x-1.1-alpha1</version> + <tag>8.x-1.1-alpha1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-1-alpha1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-1-alpha1.tar.gz</download_link> + <date>1560867300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.0</name> + <version>8.x-1.0</version> + <tag>8.x-1.0</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-0-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-0.tar.gz</download_link> + <date>1558275300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.0-beta1</name> + <version>8.x-1.0-beta1</version> + <tag>8.x-1.0-beta1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-0-beta1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-0-beta1.tar.gz</download_link> + <date>1555683300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>AAA Update test 8.x-1.0-alpha1</name> + <version>8.x-1.0-alpha1</version> + <tag>8.x-1.0-alpha1</tag> + <status>published</status> + <release_link>http://example.com/aaa_update_test-8-x-1-0-alpha1-release</release_link> + <download_link>http://example.com/aaa_update_test-8-x-1-0-alpha1.tar.gz</download_link> + <date>1553091300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/alpha.1.1.0.xml b/core/modules/package_manager/tests/fixtures/release-history/alpha.1.1.0.xml new file mode 100644 index 0000000000000000000000000000000000000000..5981d8cc879b4cff9ef74d895f85104637cf3aba --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/alpha.1.1.0.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Build\PackageInstallTest. + +Contains metadata about the following (fake) releases of alpha module, all of which are secure, in order: +- 1.1.0 +- 1.0.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Alpha</title> +<short_name>alpha</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>1.1.,1.0.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/alpha</link> + <terms> + <term><name>Projects</name><value>Alpha project</value></term> + </terms> +<releases> + <release> + <name>Alpha 1.1.0</name> + <version>1.1.0</version> + <tag>1.1.0</tag> + <status>published</status> + <release_link>http://example.com/alpha-1-1-0-release</release_link> + <download_link>http://example.com/alpha-1-1-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Alpha 1.0.0</name> + <version>1.0.0</version> + <tag>1.0.0</tag> + <status>published</status> + <release_link>http://example.com/alpha-1-0-0-release</release_link> + <download_link>http://example.com/alpha-1-0-0.tar.gz</download_link> + <date>1581603300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.10.0.0.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.10.0.0.xml new file mode 100644 index 0000000000000000000000000000000000000000..9b34064b5b08a1be90c1a3d1930739911c76eb6a --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.10.0.0.xml @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest +- \Drupal\Tests\auto_updates\Functional\UpdaterFormTest + +Contains metadata about the following (fake) releases of Drupal core, all of which are secure, in order: +- 10.0.0 +- 9.7.2 +- 9.7.1 +- 9.7.0 +- 9.6.1 +- 9.6.0 +- 9.5.1 +- 9.5.0 +- 9.4.0, which is in an unsupported branch +- 9.7.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.5.,9.6.,9.7.,10.0.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 10.0.0</name> + <version>10.0.0</version> + <status>published</status> + <release_link>http://example.com/drupal-10-0-0-release</release_link> + <download_link>http://example.com/drupal-10-0-0.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.2</name> + <version>9.7.2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-2-release</release_link> + <download_link>http://example.com/drupal-9-7-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.1</name> + <version>9.6.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-1-release</release_link> + <download_link>http://example.com/drupal-9-6-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0</name> + <version>9.6.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-release</release_link> + <download_link>http://example.com/drupal-9-6-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.5.1</name> + <version>9.5.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-5-1-release</release_link> + <download_link>http://example.com/drupal-9-5-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.5.0</name> + <version>9.5.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-5-0-release</release_link> + <download_link>http://example.com/drupal-9-5-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.4.0</name> + <version>9.4.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-4-0-release</release_link> + <download_link>http://example.com/drupal-9-4-0.tar.gz</download_link> + <date>1240424421</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.x-dev</name> + <version>9.7.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-7-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-alpha1.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-alpha1.xml new file mode 100644 index 0000000000000000000000000000000000000000..2f3e6f23e7fdc3affc8d0b8ad2fbb12544a25332 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-alpha1.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\ProjectInfoTest. + +Contains metadata about the following (fake) releases of Drupal core, all of which are secure, in order: +- 9.8.0-alpha1 +- 9.7.1 +- 9.7.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-beta1.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-beta1.xml new file mode 100644 index 0000000000000000000000000000000000000000..c34d58ce5da250eeea9f2fe9357a553aa1ded8ba --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-beta1.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\auto_updates\Functional\UpdaterFormTest. + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.0-beta1 +- 9.7.0 +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.8.,9.7.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.0-beta1</name> + <version>9.8.0-beta1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-beta1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-beta1-.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-rc1.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-rc1.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7c60b26be136fb697108dfe5cb88a1b6d1d27c9 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.0-rc1.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\auto_updates\Functional\UpdaterFormTest. + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.0-rc1 +- 9.7.0 +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.8.,9.7.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.0-rc1</name> + <version>9.8.0-rc1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-rc1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-rc1-.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-empty_supported_branches.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-empty_supported_branches.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2c16bdd0138387da0ac56747b2aecc7461eaa17 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-empty_supported_branches.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\ProjectInfoTest. + +Contains metadata about releases of Drupal core with no supported branches: +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches/> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-extra.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-extra.xml new file mode 100644 index 0000000000000000000000000000000000000000..e820b03c893a705a030c9060fd4b058195b251be --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-extra.xml @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\auto_updates\Kernel\StatusCheck\VersionPolicyValidatorTest. + +Contains metadata about the following (fake) releases of Drupal core, all of which are secure, in order: +- 9.8.1-rc3 +- 9.8.1-beta2 +- 9.8.1-alpha1 +- 9.7.1 +- 9.7.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.1-rc3</name> + <version>9.8.1-rc3</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-rc3-release</release_link> + <download_link>http://example.com/drupal-9-8-1-rc3.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1-beta2</name> + <version>9.8.1-beta2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-beta2-release</release_link> + <download_link>http://example.com/drupal-9-8-1-beta2.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1-alpha1</name> + <version>9.8.1-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-1-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1-beta2</name> + <version>9.8.1-beta2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-beta2-release</release_link> + <download_link>http://example.com/drupal-9-8-1-beta2.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Insecure</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-security.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-security.xml new file mode 100644 index 0000000000000000000000000000000000000000..93098f02a921e59ca04645caf85f42aef4748820 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-security.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\auto_updates_extensions\Build\ModuleUpdateTest +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest +- \Drupal\Tests\auto_updates\Build\CoreUpdateTest +- \Drupal\Tests\auto_updates\Functional\AvailableUpdatesReportTest +- \Drupal\Tests\auto_updates\Functional\ClickableHelpTest +- \Drupal\Tests\auto_updates\Functional\StatusCheckTest +- \Drupal\Tests\auto_updates\Functional\UpdaterFormNoRecommendedReleaseMessageTest +- \Drupal\Tests\auto_updates\Kernel\CronUpdaterTest +- \Drupal\Tests\auto_updates\Kernel\UpdaterTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\CronFrequencyValidatorTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\StatusCheckerTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\VersionPolicyValidatorTest + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.1, which is a security release +- 9.8.0, which is insecure +- 9.8.0-alpha1, which is insecure +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.1</name> + <version>9.8.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-release</release_link> + <download_link>http://example.com/drupal-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Security update</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Insecure</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1-.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Insecure</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-supported_branches_not_set.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-supported_branches_not_set.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3030e71c3c0f1fb6328977f1b918a035e3891a6 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.1-supported_branches_not_set.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\ProjectInfoTest. + +Contains metadata about releases of Drupal core with <supported_branches></supported_branches> not set: +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-older-sec-release.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-older-sec-release.xml new file mode 100644 index 0000000000000000000000000000000000000000..128010a9b5b1753a8f0ab4b55d48607f51c5453b --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-older-sec-release.xml @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest +- \Drupal\Tests\auto_updates\Functional\AvailableUpdatesReportTest +- \Drupal\Tests\auto_updates\Kernel\ReleaseChooserTest + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.2 +- 9.8.1, which is a security update +- 9.8.1-beta1, which is a security update +- 9.8.0, which is insecure +- 9.8.0-alpha1 +- 9.7.1, which is a security update +- 9.7.0, which is insecure +- 9.7.0-alpha1 +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.2</name> + <version>9.8.2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-2-release</release_link> + <download_link>http://example.com/drupal-9-8-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1</name> + <version>9.8.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-release</release_link> + <download_link>http://example.com/drupal-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Security update</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1-beta1</name> + <version>9.8.1-beta1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-beta1-release</release_link> + <download_link>http://example.com/drupal-9-8-1-beta1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Security release</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Insecure</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Security update</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Insecure</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0-alpha1</name> + <version>9.7.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-7-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-unsupported_unpublished.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-unsupported_unpublished.xml new file mode 100644 index 0000000000000000000000000000000000000000..6220cae3b076cf23c75f909b63408c3cd3aec406 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2-unsupported_unpublished.xml @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\VersionPolicyValidatorTest + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.2 +- 9.8.1, which is unsupported +- 9.8.0, which is unpublished +- 9.8.0-alpha1 +- 9.7.1 +- 9.7.0 +- 9.7.0-alpha1 +- 9.6.1, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.2</name> + <version>9.8.2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-2-release</release_link> + <download_link>http://example.com/drupal-9-8-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1</name> + <version>9.8.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-release</release_link> + <download_link>http://example.com/drupal-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + <term> + <name>Release type</name> + <value>Unsupported</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>unpublished</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0-alpha1</name> + <version>9.7.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-7-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.1</name> + <version>9.6.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-1-release</release_link> + <download_link>http://example.com/drupal-9-6-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0</name> + <version>9.6.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-release</release_link> + <download_link>http://example.com/drupal-9-6-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0-alpha1</name> + <version>9.6.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-6-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf2384f0347eed0af272de2f55f93079d990a8c3 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2.xml @@ -0,0 +1,241 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\auto_updates_extensions\Functional\UpdaterFormTest +- \Drupal\Tests\auto_updates_extensions\Kernel\Validator\UpdateReleaseValidatorTest +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest +- \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest +- \Drupal\Tests\auto_updates\Functional\AvailableUpdatesReportTest +- \Drupal\Tests\auto_updates\Functional\UpdaterFormNoRecommendedReleaseMessageTest +- \Drupal\Tests\auto_updates\Functional\UpdaterFormTest +- \Drupal\Tests\auto_updates\Kernel\CronUpdaterTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\VersionPolicyValidatorTest +- \Drupal\Tests\auto_updates\Kernel\StatusCheck\VersionPolicy\SupportedBranchInstalledTest + +Contains metadata about the following (fake) releases of Drupal core, all of which are secure, in order: +- 9.8.2 +- 9.8.1 +- 9.8.0 +- 9.8.0-alpha1 +- 9.7.1 +- 9.7.0 +- 9.7.0-alpha1 +- 9.6.1, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.8.x-dev +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.2</name> + <version>9.8.2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-2-release</release_link> + <download_link>http://example.com/drupal-9-8-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1</name> + <version>9.8.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-release</release_link> + <download_link>http://example.com/drupal-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0-alpha1</name> + <version>9.7.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-7-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.1</name> + <version>9.6.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-1-release</release_link> + <download_link>http://example.com/drupal-9-6-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0</name> + <version>9.6.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-release</release_link> + <download_link>http://example.com/drupal-9-6-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0-alpha1</name> + <version>9.6.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-6-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2_unknown_status.xml b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2_unknown_status.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0d599c9b0ba0144119064d90d8f74d50aa07cd6 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/drupal.9.8.2_unknown_status.xml @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\ProjectInfoTest. + +Contains metadata about the following (fake) releases of Drupal core, in order: +- 9.8.2 +- 9.8.1 +- 9.8.0 +- 9.8.0-alpha1 +- 9.7.1 +- 9.7.0 +- 9.7.0-alpha1 +- 9.6.1, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.6.0, which is in an unsupported branch +- 9.8.x-dev + +What's special about this file is that the project as a whole has a status other than "published". +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> + <title>Drupal</title> + <short_name>drupal</short_name> + <dc:creator>Drupal</dc:creator> + <supported_branches>9.7.,9.8.</supported_branches> + <project_status>any status besides published</project_status> + <link>http://example.com/project/drupal</link> + <terms> + <term> + <name>Projects</name> + <value>Drupal project</value> + </term> + </terms> + <releases> + <release> + <name>Drupal 9.8.2</name> + <version>9.8.2</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-2-release</release_link> + <download_link>http://example.com/drupal-9-8-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.1</name> + <version>9.8.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-1-release</release_link> + <download_link>http://example.com/drupal-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0</name> + <version>9.8.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-release</release_link> + <download_link>http://example.com/drupal-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.0-alpha1</name> + <version>9.8.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.1</name> + <version>9.7.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-1-release</release_link> + <download_link>http://example.com/drupal-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0</name> + <version>9.7.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-release</release_link> + <download_link>http://example.com/drupal-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.7.0-alpha1</name> + <version>9.7.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-7-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-7-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.1</name> + <version>9.6.1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-1-release</release_link> + <download_link>http://example.com/drupal-9-6-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0</name> + <version>9.6.0</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-release</release_link> + <download_link>http://example.com/drupal-9-6-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.6.0-alpha1</name> + <version>9.6.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/drupal-9-6-0-alpha1-release</release_link> + <download_link>http://example.com/drupal-9-6-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + <release> + <name>Drupal 9.8.x-dev</name> + <version>9.8.x-dev</version> + <status>published</status> + <release_link>http://example.com/drupal-9-8-x-dex-release</release_link> + <download_link>http://example.com/drupal-9-8-x-dex.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term> + <name>Release type</name> + <value>New features</value> + </term> + <term> + <name>Release type</name> + <value>Bug fixes</value> + </term> + </terms> + </release> + </releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/main_module.1.0.0.xml b/core/modules/package_manager/tests/fixtures/release-history/main_module.1.0.0.xml new file mode 100644 index 0000000000000000000000000000000000000000..a1702e42f7255052ace4862d43e03013caff2921 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/main_module.1.0.0.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Build\PackageInstallTest. + +Contains metadata about the following (fake) releases of main_module, all of which are secure, in order: +- 1.0.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Main Module</title> +<short_name>main_module</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>1.0.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/main_module</link> + <terms> + <term><name>Projects</name><value>Main Module project</value></term> + </terms> +<releases> + <release> + <name>Main Module 1.0.0</name> + <version>1.0.0</version> + <tag>1.0.0</tag> + <status>published</status> + <release_link>http://example.com/main_module-1-0-0-release</release_link> + <download_link>http://example.com/main_module-1-0-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/package_manager_test_update.7.0.1.xml b/core/modules/package_manager/tests/fixtures/release-history/package_manager_test_update.7.0.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..dd5c12a33a6993c4a4288e0a16bf132752dfa55d --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/package_manager_test_update.7.0.1.xml @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by: +- \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest +- \Drupal\Tests\package_manager\Kernel\ProjectInfoTest + +Contains metadata about the following (fake) releases of package_manager_test_update module, all of which are secure, in order: +- 7.0.1 +- 7.0.0 +- 7.0.0-alpha1 +- 8.x-6.2 +- 8.x-6.1 +- 8.x-6.0 +- 8.x-6.0-alpha1 +- 7.0.x-dev +- 8.x-6.x-dev +- 8.x-5.x - An invalid release to ensure invalid releases do not affect processing other releases. +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Package Manager Test Update</title> +<short_name>package_manager_test_update</short_name> +<dc:creator>Package Manager</dc:creator> +<supported_branches>7.0.,8.x-6.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/package_manager_test_update</link> + <terms> + <term><name>Projects</name><value>Package Manager Test Update project</value></term> + </terms> +<releases> + <release> + <name>Package Manager Test Update 7.0.1</name> + <version>7.0.1</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-7-1-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-7-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 7.0.0</name> + <version>7.0.0</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-7-0-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-7-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 7.0.0-alpha1</name> + <version>7.0.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-7-0-alpha1-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-7-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-6.2</name> + <version>8.x-6.2</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-8-2-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-8-2.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-6.1</name> + <version>8.x-6.1</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-8-1-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-8-1.tar.gz</download_link> + <date>1250425521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-6.0</name> + <version>8.x-6.0</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-8-0-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-8-0.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-6.0-alpha1</name> + <version>8.x-6.0-alpha1</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-8-0-alpha1-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-8-0-alpha1.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 7.0.0-dev</name> + <version>7.0.x-dev</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-7-0-dev-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-7-0-dev.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-6.x-dev</name> + <version>8.x-6.x-dev</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-8-0-dev-release</release_link> + <download_link>http://example.com/package_manager_test_update-9-8-0-dev.tar.gz</download_link> + <date>1250424521</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Test Update 8.x-5.x</name> + <version>8.x-5.x</version> + <status>published</status> + <release_link>http://example.com/package_manager_test_update-9-5-0-dev-release</release_link> + <download_link/> + <date/> + <filesize/> + <files> + <file> + <url/> + <archive_type/> + <md5/> + <size/> + </file> + <file> + <url/> + <archive_type/> + <md5/> + <size/> + </file> + </files> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/package_manager_theme.1.1.xml b/core/modules/package_manager/tests/fixtures/release-history/package_manager_theme.1.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..69779f4ce90e6b64d545c458b0972cac13ddfcb1 --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/package_manager_theme.1.1.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest. + +Contains metadata about the following (fake) releases of Package Manager Theme, all of which are secure, in order: +- 8.2.0, which is in an unsupported branch +- 8.1.1 +- 8.1.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Package Manager Theme</title> +<short_name>package_manager_theme</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>8.0.,8.1.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/package_manager_theme</link> + <terms> + <term><name>Projects</name><value>Package Manager Theme project</value></term> + </terms> +<releases> + <release> + <name>Package Manager Theme 8.2.0</name> + <version>8.2.0</version> + <tag>8.2.0</tag> + <status>published</status> + <release_link>http://example.com/package_manager_theme-8-2-0-release</release_link> + <download_link>http://example.com/package_manager_theme-8-2-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Theme 8.1.1</name> + <version>8.1.1</version> + <tag>8.1.1</tag> + <status>published</status> + <release_link>http://example.com/package_manager_theme-8-1-1-release</release_link> + <download_link>http://example.com/package_manager_theme-8-1-1.tar.gz</download_link> + <date>1581603300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Package Manager Theme 8.1.0</name> + <version>8.1.0</version> + <tag>8.1.0</tag> + <status>published</status> + <release_link>http://example.com/package_manager_theme-8-1-0-release</release_link> + <download_link>http://example.com/package_manager_theme-8-1-0.tar.gz</download_link> + <date>1573827300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/semver_test.1.1.xml b/core/modules/package_manager/tests/fixtures/release-history/semver_test.1.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddebbd803cf3ba9241bf33c653aa32f3645a7fbc --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/semver_test.1.1.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest. + +Contains metadata about the following (fake) releases of semver_test module, all of which are secure, in order: +- 8.2.0, which is in an unsupported branch +- 8.1.1 +- 8.1.1-beta1 +- 8.1.1-alpha1 +- 8.1.0 +- 8.1.0-beta1 +- 8.1.0-alpha1 +- 8.0.1 +- 8.0.1-beta1 +- 8.0.1-alpha1 +- 8.0.0 +- 8.0.0-beta1 +- 8.0.0-alpha1 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Semver Test</title> +<short_name>semver_test</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>8.0.,8.1.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/semver_test</link> + <terms> + <term><name>Projects</name><value>Semver Test project</value></term> + </terms> +<releases> + <release> + <name>Semver Test 8.2.0</name> + <version>8.2.0</version> + <tag>8.2.0</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-2-0-release</release_link> + <download_link>http://example.com/semver_test-8-2-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.1</name> + <version>8.1.1</version> + <tag>8.1.1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-1-release</release_link> + <download_link>http://example.com/semver_test-8-1-1.tar.gz</download_link> + <date>1581603300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.1-beta1</name> + <version>8.1.1-beta1</version> + <tag>8.1.1-beta1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-1-beta1-release</release_link> + <download_link>http://example.com/semver_test-8-1-1-beta1.tar.gz</download_link> + <date>1579011300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.1-alpha1</name> + <version>8.1.1-alpha1</version> + <tag>8.1.1-alpha1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-1-alpha1-release</release_link> + <download_link>http://example.com/semver_test-8-1-1-alpha1.tar.gz</download_link> + <date>1576419300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.0</name> + <version>8.1.0</version> + <tag>8.1.0</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-0-release</release_link> + <download_link>http://example.com/semver_test-8-1-0.tar.gz</download_link> + <date>1573827300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.0-beta1</name> + <version>8.1.0-beta1</version> + <tag>8.1.0-beta1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-0-beta1-release</release_link> + <download_link>http://example.com/semver_test-8-1-0-beta1.tar.gz</download_link> + <date>1571235300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.1.0-alpha1</name> + <version>8.1.0-alpha1</version> + <tag>8.1.0-alpha1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-1-0-alpha1-release</release_link> + <download_link>http://example.com/semver_test-8-1-0-alpha1.tar.gz</download_link> + <date>1568643300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.1</name> + <version>8.0.1</version> + <tag>8.0.1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-1-release</release_link> + <download_link>http://example.com/semver_test-8-0-1.tar.gz</download_link> + <date>1566051300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.1-beta1</name> + <version>8.0.1-beta1</version> + <tag>8.0.1-beta1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-1-beta1-release</release_link> + <download_link>http://example.com/semver_test-8-0-1-beta1.tar.gz</download_link> + <date>1563459300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.1-alpha1</name> + <version>8.0.1-alpha1</version> + <tag>8.0.1-alpha1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-1-alpha1-release</release_link> + <download_link>http://example.com/semver_test-8-0-1-alpha1.tar.gz</download_link> + <date>1560867300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.0</name> + <version>8.0.0</version> + <tag>8.0.0</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-0-release</release_link> + <download_link>http://example.com/semver_test-8-0-0.tar.gz</download_link> + <date>1558275300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.0-beta1</name> + <version>8.0.0-beta1</version> + <tag>8.0.0-beta1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-0-beta1-release</release_link> + <download_link>http://example.com/semver_test-8-0-0-beta1.tar.gz</download_link> + <date>1555683300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Semver Test 8.0.0-alpha1</name> + <version>8.0.0-alpha1</version> + <tag>8.0.0-alpha1</tag> + <status>published</status> + <release_link>http://example.com/semver_test-8-0-0-alpha1-release</release_link> + <download_link>http://example.com/semver_test-8-0-0-alpha1.tar.gz</download_link> + <date>1553091300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/fixtures/release-history/updated_module.1.1.0.xml b/core/modules/package_manager/tests/fixtures/release-history/updated_module.1.1.0.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca709ff98bd55918b6f954341604126798dcb86e --- /dev/null +++ b/core/modules/package_manager/tests/fixtures/release-history/updated_module.1.1.0.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This fixture is used by \Drupal\Tests\package_manager\Build\PackageUpdateTest. + +Contains metadata about the following (fake) releases of updated_module, all of which are secure, in order: +- 1.1.0 +- 1.0.0 +--> +<project xmlns:dc="http://purl.org/dc/elements/1.1/"> +<title>Updated Module</title> +<short_name>updated_module</short_name> +<dc:creator>Drupal</dc:creator> +<supported_branches>1.1.,1.0.</supported_branches> +<project_status>published</project_status> +<link>http://example.com/project/alpha</link> + <terms> + <term><name>Projects</name><value>Updated Module project</value></term> + </terms> +<releases> + <release> + <name>Updated Module 1.1.0</name> + <version>1.1.0</version> + <tag>1.1.0</tag> + <status>published</status> + <release_link>http://example.com/updated_module-1-1-0-release</release_link> + <download_link>http://example.com/updated_module-1-1-0.tar.gz</download_link> + <date>1584195300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> + <release> + <name>Updated Module 1.0.0</name> + <version>1.0.0</version> + <tag>1.0.0</tag> + <status>published</status> + <release_link>http://example.com/updated_module-1-0-0-release</release_link> + <download_link>http://example.com/updated_module-1-0-0.tar.gz</download_link> + <date>1581603300</date> + <terms> + <term><name>Release type</name><value>New features</value></term> + <term><name>Release type</name><value>Bug fixes</value></term> + </terms> + </release> +</releases> +</project> diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.info.yml b/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..cebed1395be92c8b1667ecc818f9f21ecdf3f2a5 --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.info.yml @@ -0,0 +1,4 @@ +name: 'Fixture manipulator' +description: 'Manipulate fixtures for tests.' +type: module +package: Testing diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.services.yml b/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..4ea503f7188ab4c0f6d998b00cb1808840654780 --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/fixture_manipulator.services.yml @@ -0,0 +1,7 @@ +services: + _defaults: + autowire: true + Drupal\fixture_manipulator\StageFixtureManipulator: + decorates: 'PhpTuf\ComposerStager\API\Core\BeginnerInterface' + Drupal\fixture_manipulator\ProcessFactory: + decorates: 'PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface' diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/src/ActiveFixtureManipulator.php b/core/modules/package_manager/tests/modules/fixture_manipulator/src/ActiveFixtureManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..d486eb2b5aa1066ac7c8b9909634ccdf08dd3550 --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/src/ActiveFixtureManipulator.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\fixture_manipulator; + +use Drupal\package_manager\PathLocator; + +/** + * A fixture manipulator for the active directory. + */ +final class ActiveFixtureManipulator extends FixtureManipulator { + + /** + * {@inheritdoc} + */ + public function commitChanges(?string $dir = NULL): void { + if ($dir) { + throw new \UnexpectedValueException("$dir cannot be specific for a ActiveFixtureManipulator instance"); + } + $dir = \Drupal::service(PathLocator::class)->getProjectRoot(); + parent::doCommitChanges($dir); + } + +} diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php b/core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..a0410cf751430c1a6731b2618163847cbd82be4a --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php @@ -0,0 +1,645 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\fixture_manipulator; + +use Drupal\Component\FileSystem\FileSystem; +use Drupal\Component\Utility\NestedArray; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; +use Symfony\Component\Filesystem\Filesystem as SymfonyFileSystem; +use Drupal\Component\Serialization\Yaml; + +/** + * Manipulates a test fixture using Composer commands. + * + * The composer.json file CANNOT be safely created or modified using the + * json_encode() function, because Composer does not use a real JSON parser — it + * updates composer.json using \Composer\Json\JsonManipulator, which is known to + * choke in a number of scenarios. + * + * @see https://www.drupal.org/i/3346628 + */ +class FixtureManipulator { + + protected const PATH_REPO_STATE_KEY = self::class . '-path-repo-base'; + + /** + * Whether changes are currently being committed. + * + * @var bool + */ + private bool $committingChanges = FALSE; + + /** + * Arguments to manipulator functions. + * + * @var array + */ + private array $manipulatorArguments = []; + + /** + * Whether changes have been committed. + * + * @var bool + */ + protected bool $committed = FALSE; + + /** + * The fixture directory. + * + * @var string + */ + protected string $dir; + + /** + * Validate the fixtures still passes `composer validate`. + */ + private function validateComposer(): void { + /** @var \PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface $runner */ + $runner = \Drupal::service(ComposerProcessRunnerInterface::class); + $runner->run([ + 'validate', + '--check-lock', + '--no-check-publish', + '--with-dependencies', + '--no-interaction', + '--ansi', + '--no-cache', + "--working-dir={$this->dir}", + // Unlike ComposerInspector::validate(), explicitly do NOT validate + // plugins, to allow for testing edge cases. + '--no-plugins', + // Dummy packages are not meant for publishing, so do not validate that. + '--no-check-publish', + '--no-check-version', + ]); + } + + /** + * Adds a package. + * + * @param array $package + * A Composer package definition. Must include the `name` and `type` keys. + * @param bool $is_dev_requirement + * Whether the package is a development requirement. + * @param bool $allow_plugins + * Whether to use the '--no-plugins' option. + * @param array|null $extra_files + * An array extra files to create in the package. The keys are the file + * paths under package and values are the file contents. + */ + public function addPackage(array $package, bool $is_dev_requirement = FALSE, bool $allow_plugins = FALSE, ?array $extra_files = NULL): self { + if (!$this->committingChanges) { + // To pass Composer validation all packages must have a version specified. + if (!isset($package['version'])) { + $package['version'] = '1.2.3'; + } + $this->queueManipulation('addPackage', [$package, $is_dev_requirement, $allow_plugins, $extra_files]); + return $this; + } + + // Basic validation so we can defer the rest to `composer` commands. + foreach (['name', 'type'] as $required_key) { + if (!isset($package[$required_key])) { + throw new \UnexpectedValueException("The '$required_key' is required when calling ::addPackage()."); + } + } + if (!preg_match('/\w+\/\w+/', $package['name'])) { + throw new \UnexpectedValueException(sprintf("'%s' is not a valid package name.", $package['name'])); + } + + // `composer require` happily will re-require already required packages. + // Prevent test authors from thinking this has any effect when it does not. + $json = $this->runComposerCommand(['show', '--name-only', '--format=json'])->stdout; + $installed_package_names = array_column(json_decode($json)?->installed ?? [], 'name'); + if (in_array($package['name'], $installed_package_names)) { + throw new \LogicException(sprintf("Expected package '%s' to not be installed, but it was.", $package['name'])); + } + + $repo_path = $this->addRepository($package); + if (is_null($extra_files) && isset($package['type']) && in_array($package['type'], ['drupal-module', 'drupal-theme', 'drupal-profile'], TRUE)) { + // For Drupal projects if no files are provided create an info.yml file + // that assumes the project and package names match. + [, $package_name] = explode('/', $package['name']); + $project_name = str_replace('-', '_', $package_name); + $project_info_data = [ + 'name' => $package['name'], + 'project' => $project_name, + ]; + $extra_files["$project_name.info.yml"] = Yaml::encode($project_info_data); + } + if (!empty($extra_files)) { + $fs = new SymfonyFileSystem(); + foreach ($extra_files as $file_name => $file_contents) { + if (str_contains($file_name, DIRECTORY_SEPARATOR)) { + $file_dir = dirname("$repo_path/$file_name"); + if (!is_dir($file_dir)) { + $fs->mkdir($file_dir); + } + } + assert(file_put_contents("$repo_path/$file_name", $file_contents) !== FALSE); + } + } + return $this->requirePackage($package['name'], $package['version'], $is_dev_requirement, $allow_plugins); + } + + /** + * Requires a package. + * + * @param string $package + * A package name. + * @param string $version + * A version constraint. + * @param bool $is_dev_requirement + * Whether the package is a development requirement. + * @param bool $allow_plugins + * Whether to use the '--no-plugins' option. + */ + public function requirePackage(string $package, string $version, bool $is_dev_requirement = FALSE, bool $allow_plugins = FALSE): self { + if (!$this->committingChanges) { + $this->queueManipulation('requirePackage', func_get_args()); + return $this; + } + + $command_options = ['require', "$package:$version"]; + if ($is_dev_requirement) { + $command_options[] = '--dev'; + } + // Unlike ComposerInspector::validate(), explicitly do NOT validate plugins. + if (!$allow_plugins) { + $command_options[] = '--no-plugins'; + } + $this->runComposerCommand($command_options); + return $this; + } + + /** + * Modifies a package's composer.json properties. + * + * @param string $package_name + * The name of the package to modify. + * @param string $version + * The version to use for the modified package. Can be the same as the + * original version, or a different version. + * @param array $config + * The config to be added to the package's composer.json. + * @param bool $is_dev_requirement + * Whether the package is a development requirement. + * + * @see \Composer\Command\ConfigCommand + */ + public function modifyPackageConfig(string $package_name, string $version, array $config, bool $is_dev_requirement = FALSE): self { + if (!$this->committingChanges) { + $this->queueManipulation('modifyPackageConfig', func_get_args()); + return $this; + } + $package = [ + 'name' => $package_name, + 'version' => $version, + ] + $config; + $this->addRepository($package); + $this->runComposerCommand(array_filter(['require', "$package_name:$version", $is_dev_requirement ? '--dev' : NULL])); + return $this; + } + + /** + * Sets a package version. + * + * @param string $package_name + * The package name. + * @param string $version + * The version. + * @param bool $is_dev_requirement + * Whether the package is a development requirement. + * + * @return $this + */ + public function setVersion(string $package_name, string $version, bool $is_dev_requirement = FALSE): self { + if (!$this->committingChanges) { + $this->queueManipulation('setVersion', func_get_args()); + return $this; + } + return $this->modifyPackageConfig($package_name, $version, [], $is_dev_requirement); + } + + /** + * Removes a package. + * + * @param string $name + * The name of the package to remove. + * @param bool $is_dev_requirement + * Whether the package is a developer requirement. + */ + public function removePackage(string $name, bool $is_dev_requirement = FALSE): self { + if (!$this->committingChanges) { + $this->queueManipulation('removePackage', func_get_args()); + return $this; + } + + $output = $this->runComposerCommand(array_filter(['remove', $name, $is_dev_requirement ? '--dev' : NULL])); + // `composer remove` will not set exit code 1 whenever a non-required + // package is being removed. + // @see \Composer\Command\RemoveCommand + if (str_contains($output->stderr, 'not required in your composer.json and has not been removed')) { + $output->stderr = str_replace("./composer.json has been updated\n", '', $output->stderr); + throw new \LogicException($output->stderr); + } + return $this; + } + + /** + * Adds a project at a path. + * + * @param string $path + * The path. + * @param string|null $project_name + * (optional) The project name. If none is specified the last part of the + * path will be used. + * @param string|null $file_name + * (optional) The file name. If none is specified the project name will be + * used. + */ + public function addProjectAtPath(string $path, ?string $project_name = NULL, ?string $file_name = NULL): self { + if (!$this->committingChanges) { + $this->queueManipulation('addProjectAtPath', func_get_args()); + return $this; + } + $path = $this->dir . "/$path"; + if (file_exists($path)) { + throw new \LogicException("'$path' path already exists."); + } + $fs = new SymfonyFileSystem(); + $fs->mkdir($path); + if ($project_name === NULL) { + $project_name = basename($path); + } + if ($file_name === NULL) { + $file_name = "$project_name.info.yml"; + } + assert(file_put_contents("$path/$file_name", Yaml::encode(['project' => $project_name])) !== FALSE); + return $this; + } + + /** + * Modifies core packages. + * + * @param string $version + * Target version. + */ + public function setCorePackageVersion(string $version): self { + $this->setVersion('drupal/core', $version); + $this->setVersion('drupal/core-recommended', $version); + $this->setVersion('drupal/core-dev', $version); + return $this; + } + + /** + * Modifies the project root's composer.json properties. + * + * @see \Composer\Command\ConfigCommand + * + * @param array $additional_config + * The configuration to add. + */ + public function addConfig(array $additional_config): self { + if (empty($additional_config)) { + throw new \InvalidArgumentException('No config to add.'); + } + + if (!$this->committingChanges) { + $this->queueManipulation('addConfig', func_get_args()); + return $this; + } + $clean_value = function ($value) { + return $value === FALSE ? 'false' : $value; + }; + + foreach ($additional_config as $key => $value) { + $command = ['config']; + if (is_array($value)) { + $value = json_encode($value, JSON_UNESCAPED_SLASHES); + $command[] = '--json'; + } + else { + $value = $clean_value($value); + } + $command[] = $key; + $command[] = $value; + $this->runComposerCommand($command); + } + $this->runComposerCommand(['update', '--lock']); + + return $this; + } + + /** + * Commits the changes to the directory. + */ + public function commitChanges(string $dir): void { + $this->doCommitChanges($dir); + $this->committed = TRUE; + } + + /** + * Commits all the changes. + * + * @param string $dir + * The directory to commit the changes to. + */ + final protected function doCommitChanges(string $dir): void { + if ($this->committed) { + throw new \BadMethodCallException('Already committed.'); + } + $this->dir = $dir; + $this->setUpRepos(); + $this->committingChanges = TRUE; + $manipulator_arguments = $this->getQueuedManipulationItems(); + $this->clearQueuedManipulationItems(); + foreach ($manipulator_arguments as $method => $argument_sets) { + // @todo Attempt to make fewer Composer calls in + // https://drupal.org/i/3345639. + foreach ($argument_sets as $argument_set) { + $this->{$method}(...$argument_set); + } + } + $this->committed = TRUE; + $this->committingChanges = FALSE; + $this->validateComposer(); + } + + /** + * Ensure that changes were committed before object is destroyed. + */ + public function __destruct() { + if (!$this->committed && !empty($this->manipulatorArguments)) { + throw new \LogicException('commitChanges() must be called.'); + } + } + + /** + * Creates an empty .git folder after being provided a path. + */ + public function addDotGitFolder(string $path): self { + if (!$this->committingChanges) { + $this->queueManipulation('addDotGitFolder', func_get_args()); + return $this; + } + if (!is_dir($path)) { + throw new \LogicException("No directory exists at $path."); + } + $fs = new SymfonyFileSystem(); + $git_directory_path = $path . "/.git"; + if (is_dir($git_directory_path)) { + throw new \LogicException("A .git directory already exists at $path."); + } + $fs->mkdir($git_directory_path); + return $this; + } + + /** + * Queues manipulation arguments to be called in ::doCommitChanges(). + * + * @param string $method + * The method name. + * @param array $arguments + * The arguments. + */ + protected function queueManipulation(string $method, array $arguments): void { + $this->manipulatorArguments[$method][] = $arguments; + } + + /** + * Clears all queued manipulation items. + */ + protected function clearQueuedManipulationItems(): void { + $this->manipulatorArguments = []; + } + + /** + * Gets all queued manipulation items. + * + * @return array + * The queued manipulation items as set by calls to ::queueManipulation(). + */ + protected function getQueuedManipulationItems(): array { + return $this->manipulatorArguments; + } + + protected function runComposerCommand(array $command_options): OutputCallbackInterface { + $plain_output = new class() implements OutputCallbackInterface { + // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable + public string $stdout = ''; + // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable + public string $stderr = ''; + + /** + * {@inheritdoc} + */ + public function __invoke(OutputTypeEnum $type, string $buffer): void { + if ($type === OutputTypeEnum::OUT) { + $this->stdout .= $buffer; + } + elseif ($type === OutputTypeEnum::ERR) { + $this->stderr .= $buffer; + } + } + + /** + * {@inheritdoc} + */ + public function clearErrorOutput(): void { + throw new \LogicException("Unexpected call to clearErrorOutput()."); + } + + /** + * {@inheritdoc} + */ + public function clearOutput(): void { + throw new \LogicException("Unexpected call to clearOutput()."); + } + + /** + * {@inheritdoc} + */ + public function getErrorOutput(): array { + throw new \LogicException("Unexpected call to getErrorOutput()."); + } + + /** + * {@inheritdoc} + */ + public function getOutput(): array { + throw new \LogicException("Unexpected call to getOutput()."); + } + + }; + /** @var \PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface $runner */ + $runner = \Drupal::service(ComposerProcessRunnerInterface::class); + $command_options[] = "--working-dir={$this->dir}"; + $runner->run($command_options, callback: $plain_output); + return $plain_output; + } + + /** + * Transform the received $package into options for `composer init`. + * + * @param array $package + * A Composer package definition. Must include the `name` and `type` keys. + * + * @return array + * The corresponding `composer init` options. + */ + private static function getComposerInitOptionsForPackage(array $package): array { + return array_filter(array_map(function ($k, $v) { + switch ($k) { + case 'name': + case 'description': + case 'type': + return "--$k=$v"; + + case 'require': + case 'require-dev': + if (empty($v)) { + return NULL; + } + $requirements = array_map( + fn(string $req_package, string $req_version): string => "$req_package:$req_version", + array_keys($v), + array_values($v) + ); + return "--$k=" . implode(',', $requirements); + + case 'version': + // This gets set in the repository metadata itself. + return NULL; + + case 'extra': + // Cannot be set using `composer init`, only `composer config` can. + return NULL; + + default: + throw new \InvalidArgumentException($k); + } + }, array_keys($package), array_values($package))); + } + + /** + * Creates a path repo. + * + * @param array $package + * A Composer package definition. Must include the `name` and `type` keys. + * @param string $repo_path + * The path at which to create a path repo for this package. + * @param string|null $original_repo_path + * If NULL: this is the first version of this package. Otherwise: a string + * containing the path repo to the first version of this package. This will + * be used to automatically inherit the same files (typically *.info.yml). + */ + private function createPathRepo(array $package, string $repo_path, ?string $original_repo_path): void { + $fs = new SymfonyFileSystem(); + if (is_dir($repo_path)) { + throw new \LogicException("A path repo already exists at $repo_path."); + } + // Create the repo if it does not exist. + $fs->mkdir($repo_path); + // Forks also get the original's additional files (e.g. *.info.yml files). + if ($original_repo_path) { + $fs->mirror($original_repo_path, $repo_path); + // composer.json will be freshly generated by `composer init` below. + $fs->remove($repo_path . '/composer.json'); + } + // Switch the working directory from project root to repo path. + $project_root_dir = $this->dir; + $this->dir = $repo_path; + // Create a composer.json file using `composer init`. + $this->runComposerCommand(['init', ...static::getComposerInitOptionsForPackage($package)]); + // Set the `extra` property in the generated composer.json file using + // `composer config`, because `composer init` does not support it. + foreach ($package['extra'] ?? [] as $extra_property => $extra_value) { + $this->runComposerCommand(['config', "extra.$extra_property", '--json', json_encode($extra_value, JSON_UNESCAPED_SLASHES)]); + } + // Restore the project root as the working directory. + $this->dir = $project_root_dir; + } + + /** + * Adds a path repository. + * + * @param array $package + * A Composer package definition. Must include the `name` and `type` keys. + * + * @return string + * The repository path. + */ + private function addRepository(array $package): string { + $name = $package['name']; + $path_repo_base = \Drupal::state()->get(self::PATH_REPO_STATE_KEY); + $repo_path = "$path_repo_base/" . str_replace('/', '--', $name); + + // Determine if the given $package is a new package or a fork of an existing + // one (that means it's either the same version but with other metadata, or + // a new version with other metadata). Existing path repos are never + // modified, not even if the same version of a package is assigned other + // metadata. This allows always comparing with the original metadata. + $is_new_or_fork = !is_dir($repo_path) ? 'new' : 'fork'; + if ($is_new_or_fork === 'fork') { + $original_composer_json_path = $repo_path . DIRECTORY_SEPARATOR . 'composer.json'; + $original_repo_path = $repo_path; + $original_composer_json_data = json_decode(file_get_contents($original_composer_json_path), TRUE, flags: JSON_THROW_ON_ERROR); + $forked_composer_json_data = NestedArray::mergeDeep($original_composer_json_data, $package); + if ($original_composer_json_data === $forked_composer_json_data) { + throw new \LogicException(sprintf('Nothing is actually different in this fork of the package %s.', $package['name'])); + } + $package = $forked_composer_json_data; + $repo_path .= "--{$package['version']}"; + // Cannot create multiple forks with the same version. This is likely + // due to a test simulating a failed Stage::apply(). + if (!is_dir($repo_path)) { + $this->createPathRepo($package, $repo_path, $original_repo_path); + } + } + else { + $this->createPathRepo($package, $repo_path, NULL); + } + + // Add the package to the Composer repository defined for the site. + $packages_json = $this->dir . '/packages.json'; + $packages_data = file_get_contents($packages_json); + $packages_data = json_decode($packages_data, TRUE, flags: JSON_THROW_ON_ERROR); + + $version = $package['version']; + $package['dist'] = [ + 'type' => 'path', + 'url' => $repo_path, + ]; + $packages_data['packages'][$name][$version] = $package; + assert(file_put_contents($packages_json, json_encode($packages_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) !== FALSE); + + return $repo_path; + } + + /** + * Sets up the path repos at absolute paths. + */ + public function setUpRepos(): void { + $fs = new SymfonyFileSystem(); + $path_repo_base = \Drupal::state()->get(self::PATH_REPO_STATE_KEY); + if (empty($path_repo_base)) { + $path_repo_base = FileSystem::getOsTemporaryDirectory() . '/base-repo-' . microtime(TRUE) . rand(0, 10000); + \Drupal::state()->set(self::PATH_REPO_STATE_KEY, $path_repo_base); + // Copy the existing repos that were used to make the fixtures into the + // new folder. + $fs->mirror(__DIR__ . '/../../../fixtures/path_repos', $path_repo_base); + } + // Update all the repos in the composer.json file to point to the new + // repos at the absolute path. + $composer_json = file_get_contents($this->dir . '/packages.json'); + assert(file_put_contents($this->dir . '/packages.json', str_replace('../path_repos/', "$path_repo_base/", $composer_json)) !== FALSE); + $this->runComposerCommand(['update', '--lock']); + $this->runComposerCommand(['install']); + } + +} diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php b/core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..6c77f6a92797e99797fe757dab14cc979787a7ca --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\fixture_manipulator; + +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +/** + * Process factory that always sets the COMPOSER_MIRROR_PATH_REPOS env variable. + * + * This is necessary because the fake_site fixture is built from a Composer-type + * repository, which will normally try to symlink packages which are installed + * from local directories, which in turn will break Package Manager because it + * does not support symlinks pointing outside the main code base. The + * COMPOSER_MIRROR_PATH_REPOS environment variable forces Composer to mirror, + * rather than symlink, local directories when installing packages. + * + * @see \Drupal\fixture_manipulator\FixtureManipulator::setUpRepos() + */ +final class ProcessFactory implements ProcessFactoryInterface { + + /** + * Constructs a ProcessFactory object. + * + * @param \PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface $decorated + * The decorated process factory service. + */ + public function __construct(private readonly ProcessFactoryInterface $decorated) {} + + /** + * {@inheritdoc} + */ + public function create(array $command, ?PathInterface $cwd = NULL, array $env = []): ProcessInterface { + $process = $this->decorated->create($command, $cwd, $env); + + $env = $process->getEnv(); + $env['COMPOSER_MIRROR_PATH_REPOS'] = '1'; + $process->setEnv($env); + return $process; + } + +} diff --git a/core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php b/core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..b9fabada49e8ca923e28dae3029bcb5aad5ed282 --- /dev/null +++ b/core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php @@ -0,0 +1,109 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\fixture_manipulator; + +use Drupal\Core\State\StateInterface; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +/** + * A fixture manipulator service that commits changes after begin. + */ +final class StageFixtureManipulator extends FixtureManipulator implements BeginnerInterface { + + /** + * The state key to use. + */ + private const STATE_KEY = __CLASS__ . 'MANIPULATOR_ARGUMENTS'; + + /** + * The state service. + * + * @var \Drupal\Core\State\StateInterface + */ + private StateInterface $state; + + /** + * The decorated service. + * + * @var \PhpTuf\ComposerStager\API\Core\BeginnerInterface + */ + private BeginnerInterface $inner; + + /** + * Constructions a StageFixtureManipulator object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + * @param \PhpTuf\ComposerStager\API\Core\BeginnerInterface $inner + * The decorated beginner service. + */ + public function __construct(StateInterface $state, BeginnerInterface $inner) { + $this->state = $state; + $this->inner = $inner; + } + + /** + * {@inheritdoc} + */ + public function begin(PathInterface $activeDir, PathInterface $stagingDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, ?int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $this->inner->begin($activeDir, $stagingDir, $exclusions, $callback, $timeout); + if ($this->getQueuedManipulationItems()) { + $this->doCommitChanges($stagingDir->absolute()); + } + } + + /** + * {@inheritdoc} + */ + public function commitChanges(string $dir): void { + throw new \BadMethodCallException('::commitChanges() should not be called directly in StageFixtureManipulator().'); + } + + /** + * {@inheritdoc} + */ + public function __destruct() { + // Overrides `__destruct` because the staged fixture manipulator service + // will be destroyed after every request. + // @see \Drupal\fixture_manipulator\StageFixtureManipulator::handleTearDown() + } + + /** + * Handles test tear down to ensure all changes were committed. + */ + public static function handleTearDown(): void { + if (!empty(\Drupal::state()->get(self::STATE_KEY))) { + throw new \LogicException('The StageFixtureManipulator has arguments that were not cleared. This likely means that the PostCreateEvent was never fired.'); + } + } + + /** + * {@inheritdoc} + */ + protected function queueManipulation(string $method, array $arguments): void { + $stored_arguments = $this->getQueuedManipulationItems(); + $stored_arguments[$method][] = $arguments; + $this->state->set(self::STATE_KEY, $stored_arguments); + } + + /** + * {@inheritdoc} + */ + protected function clearQueuedManipulationItems(): void { + $this->state->delete(self::STATE_KEY); + } + + /** + * {@inheritdoc} + */ + protected function getQueuedManipulationItems(): array { + return $this->state->get(self::STATE_KEY, []); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.info.yml b/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..316afcbb45f2399f16a5e966081f543ac8faa1c4 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.info.yml @@ -0,0 +1,7 @@ +name: 'Package Manager Bypass' +description: 'Mocks PathLocator service, decorates Beginner & Committer services (adds logging) and by default bypasses the Stager service (to minimize I/O during tests).' +type: module +package: Testing +dependencies: + - auto_updates:package_manager + - auto_updates:fixture_manipulator diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.services.yml b/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..b5fea63ec7204ccd0759949c53896a28722e35ff --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/package_manager_bypass.services.yml @@ -0,0 +1,7 @@ +services: + _defaults: + autowire: true + Drupal\package_manager_bypass\LoggingBeginner: + decorates: 'PhpTuf\ComposerStager\API\Core\BeginnerInterface' + Drupal\package_manager_bypass\LoggingCommitter: + decorates: 'PhpTuf\ComposerStager\API\Core\CommitterInterface' diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/ComposerStagerExceptionTrait.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/ComposerStagerExceptionTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..efb8a10759f91ddd3a57574f17105bcd796a7091 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/ComposerStagerExceptionTrait.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +/** + * Trait to make Composer Stager throw pre-determined exceptions in tests. + * + * @internal + */ +trait ComposerStagerExceptionTrait { + + /** + * Sets an exception to be thrown. + * + * @param string|null $class + * The class of exception to throw, or NULL to delete a stored exception. + * @param mixed ...$arguments + * Arguments to pass to the exception constructor. + */ + public static function setException(?string $class = \Exception::class, mixed ...$arguments): void { + if ($class) { + \Drupal::state()->set(static::class . '-exception', func_get_args()); + } + else { + \Drupal::state()->delete(static::class . '-exception'); + } + } + + /** + * Throws the exception if set. + */ + private function throwExceptionIfSet(): void { + if ($exception = $this->state->get(static::class . '-exception')) { + $class = array_shift($exception); + throw new $class(...$exception); + } + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingBeginner.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingBeginner.php new file mode 100644 index 0000000000000000000000000000000000000000..6bb75ed5be9ee0202f906797d144d7d4631d5681 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingBeginner.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +use Drupal\Core\State\StateInterface; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +/** + * A composer-stager Beginner decorator that adds logging. + * + * @internal + */ +final class LoggingBeginner implements BeginnerInterface { + + use ComposerStagerExceptionTrait; + use LoggingDecoratorTrait; + + /** + * The decorated service. + * + * @var \PhpTuf\ComposerStager\API\Core\BeginnerInterface + */ + private $inner; + + /** + * Constructs a Beginner object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + * @param \PhpTuf\ComposerStager\API\Core\BeginnerInterface $inner + * The decorated beginner service. + */ + public function __construct(StateInterface $state, BeginnerInterface $inner) { + $this->state = $state; + $this->inner = $inner; + } + + /** + * {@inheritdoc} + */ + public function begin(PathInterface $activeDir, PathInterface $stagingDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, ?int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $this->saveInvocationArguments($activeDir, $stagingDir, $exclusions?->getAll(), $timeout); + $this->throwExceptionIfSet(); + $this->inner->begin($activeDir, $stagingDir, $exclusions, $callback, $timeout); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingCommitter.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingCommitter.php new file mode 100644 index 0000000000000000000000000000000000000000..4d5e1e160ca45f0dfd828a042ee6d36d7f80fb2e --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingCommitter.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +use Drupal\Core\State\StateInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +/** + * A composer-stager Committer decorator that adds logging. + * + * @internal + */ +final class LoggingCommitter implements CommitterInterface { + + use ComposerStagerExceptionTrait; + use LoggingDecoratorTrait; + + /** + * The decorated service. + * + * @var \PhpTuf\ComposerStager\API\Core\CommitterInterface + */ + private $inner; + + /** + * Constructs a Committer object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + * @param \PhpTuf\ComposerStager\API\Core\CommitterInterface $inner + * The decorated committer service. + */ + public function __construct(StateInterface $state, CommitterInterface $inner) { + $this->state = $state; + $this->inner = $inner; + } + + /** + * {@inheritdoc} + */ + public function commit(PathInterface $stagingDir, PathInterface $activeDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, ?int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $this->saveInvocationArguments($stagingDir, $activeDir, $exclusions?->getAll(), $timeout); + $this->throwExceptionIfSet(); + $this->inner->commit($stagingDir, $activeDir, $exclusions, $callback, $timeout); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingDecoratorTrait.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingDecoratorTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..2bbbad5c774f73ddded507a2d67d9c4ff4f94bce --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/LoggingDecoratorTrait.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +/** + * Records information about method invocations. + * + * This can be used by functional tests to ensure that the bypassed Composer + * Stager services were called as expected. Kernel and unit tests should use + * regular mocks instead. + * + * @internal + */ +trait LoggingDecoratorTrait { + + /** + * The state service. + * + * @var \Drupal\Core\State\StateInterface + */ + private $state; + + /** + * Returns the arguments from every invocation of the main class method. + * + * @return mixed[] + * The arguments from every invocation of the main class method. + */ + public function getInvocationArguments(): array { + return $this->state->get(static::class . ' arguments', []); + } + + /** + * Records the arguments from an invocation of the main class method. + * + * @param mixed ...$arguments + * The arguments that the main class method was called with. + */ + private function saveInvocationArguments(...$arguments): void { + $invocations = $this->getInvocationArguments(); + $invocations[] = $arguments; + $this->state->set(static::class . ' arguments', $invocations); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/MockPathLocator.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/MockPathLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..dcdd6d262b62f1220da9b10d48a3d38de9ae100d --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/MockPathLocator.php @@ -0,0 +1,97 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +use Drupal\Core\State\StateInterface; +use Drupal\package_manager\PathLocator as BasePathLocator; +use Symfony\Component\Filesystem\Path; + +/** + * Mock path locator: allows specifying paths instead of discovering paths. + * + * @internal + */ +final class MockPathLocator extends BasePathLocator { + + /** + * The state service. + * + * @var \Drupal\Core\State\StateInterface + */ + private $state; + + /** + * Constructs a PathLocator object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + * @param mixed ...$arguments + * Additional arguments to pass to the parent constructor. + */ + public function __construct(StateInterface $state, ...$arguments) { + parent::__construct(...$arguments); + $this->state = $state; + } + + /** + * {@inheritdoc} + */ + public function getProjectRoot(): string { + $project_root = $this->state->get(static::class . ' root'); + if ($project_root === NULL) { + $project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..'; + $project_root = realpath($project_root); + } + return $project_root; + } + + /** + * {@inheritdoc} + */ + public function getVendorDirectory(): string { + return $this->state->get(static::class . ' vendor', parent::getVendorDirectory()); + } + + /** + * {@inheritdoc} + */ + public function getWebRoot(): string { + return $this->state->get(static::class . ' web', parent::getWebRoot()); + } + + /** + * {@inheritdoc} + */ + public function getStagingRoot(): string { + return $this->state->get(static::class . ' stage', parent::getStagingRoot()); + } + + /** + * Sets the paths to return. + * + * @param string|null $project_root + * The project root, or NULL to defer to the parent class. + * @param string|null $vendor_dir + * The vendor directory, or NULL to defer to the parent class. + * @param string|null $web_root + * The web root, relative to the project root, or NULL to defer to the + * parent class. + * @param string|null $staging_root + * The absolute path of the stage root directory, or NULL to defer to the + * parent class. + */ + public function setPaths(?string $project_root, ?string $vendor_dir, ?string $web_root, ?string $staging_root): void { + foreach ([$project_root, $staging_root] as $path) { + if (!empty($path) && !Path::isAbsolute($path)) { + throw new \InvalidArgumentException('project_root and staging_root need to be absolute paths.'); + } + } + $this->state->set(static::class . ' root', is_null($project_root) ? NULL : realpath($project_root)); + $this->state->set(static::class . ' vendor', is_null($vendor_dir) ? NULL : realpath($vendor_dir)); + $this->state->set(static::class . ' web', is_null($web_root) ? NULL : Path::canonicalize($web_root)); + $this->state->set(static::class . ' stage', is_null($staging_root) ? NULL : realpath($staging_root)); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/NoOpStager.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/NoOpStager.php new file mode 100644 index 0000000000000000000000000000000000000000..fd15f9fbc517d90fcc1782b8107b618e5e5449b5 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/NoOpStager.php @@ -0,0 +1,73 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +use Composer\Json\JsonFile; +use Drupal\Core\State\StateInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Service\ProcessInterface; + +/** + * A composer-stager Stager implementation that does nothing, except logging. + * + * By default, it will modify composer.lock in the stage directory, to fool the + * \Drupal\package_manager\Validator\LockFileValidator into thinking that there + * are pending composer operations. + * + * Opt out of this by calling @code setLockFileShouldChange(FALSE) @endcode. + * + * @see ::setLockFileShouldChange() + * @see \Drupal\package_manager\Validator\LockFileValidator + * + * @internal + */ +final class NoOpStager implements StagerInterface { + + use ComposerStagerExceptionTrait; + use LoggingDecoratorTrait; + + /** + * Constructs a Stager object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + */ + public function __construct(StateInterface $state) { + $this->state = $state; + } + + /** + * {@inheritdoc} + */ + public function stage(array $composerCommand, PathInterface $activeDir, PathInterface $stagingDir, ?OutputCallbackInterface $callback = NULL, ?int $timeout = ProcessInterface::DEFAULT_TIMEOUT): void { + $this->saveInvocationArguments($composerCommand, $stagingDir, $timeout); + $this->throwExceptionIfSet(); + + // If desired, simulate a change to the lock file (e.g., as a result of + // running `composer update`). + $lockFile = new JsonFile($stagingDir->absolute() . '/composer.lock'); + $changeLockFile = $this->state->get(static::class . ' lock', TRUE); + + if ($changeLockFile && $lockFile->exists()) { + $data = $lockFile->read(); + $data['_time'] = microtime(); + $lockFile->write($data); + } + } + + /** + * Sets whether ::stage() should simulate a change in the lock file. + * + * @param bool $value + * (optional) Whether to simulate a change in the lock file when + * ::stage() is called. Defaults to TRUE. + */ + public static function setLockFileShouldChange(bool $value = TRUE): void { + \Drupal::state()->set(static::class . ' lock', $value); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_bypass/src/PackageManagerBypassServiceProvider.php b/core/modules/package_manager/tests/modules/package_manager_bypass/src/PackageManagerBypassServiceProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..38a55eac4e68c075c6e33c758da66eae97d8ff3d --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_bypass/src/PackageManagerBypassServiceProvider.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_bypass; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\Core\DependencyInjection\ServiceProviderBase; +use Drupal\Core\Site\Settings; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use Symfony\Component\DependencyInjection\Parameter; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Defines services to bypass Package Manager's core functionality. + * + * @internal + */ +final class PackageManagerBypassServiceProvider extends ServiceProviderBase { + + /** + * {@inheritdoc} + */ + public function alter(ContainerBuilder $container): void { + parent::alter($container); + + // By default, \Drupal\package_manager_bypass\NoOpStager is applied, except + // when a test opts out by setting this setting to FALSE. + // @see \Drupal\package_manager_bypass\NoOpStager::setLockFileShouldChange() + if (Settings::get('package_manager_bypass_composer_stager', TRUE)) { + $container->register(NoOpStager::class) + ->setClass(NoOpStager::class) + ->setPublic(FALSE) + ->setAutowired(TRUE) + ->setDecoratedService(StagerInterface::class); + } + + $container->getDefinition(PathLocator::class) + ->setClass(MockPathLocator::class) + ->setAutowired(FALSE) + ->setArguments([ + new Reference('state'), + new Parameter('app.root'), + new Reference('config.factory'), + new Reference('file_system'), + ]); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.info.yml b/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..6a64061f1ced4f499e98e8faf152b722fa1e02f6 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.info.yml @@ -0,0 +1,6 @@ +name: 'Package Manager Test API' +description: 'Provides API endpoints for doing stage operations in functional tests.' +type: module +package: Testing +dependencies: + - auto_updates:package_manager diff --git a/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.routing.yml b/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..7911b8c057aa02234d2820c00f856a3016d8977f --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_api/package_manager_test_api.routing.yml @@ -0,0 +1,21 @@ +package_manager_test_api: + path: '/package-manager-test-api' + defaults: + _controller: 'Drupal\package_manager_test_api\ApiController::run' + requirements: + _access: 'TRUE' +package_manager_test_api.finish: + path: '/package-manager-test-api/finish/{id}' + defaults: + _controller: 'Drupal\package_manager_test_api\ApiController::finish' + requirements: + _access: 'TRUE' +package_manager_test_api.check_setup: + path: '/package-manager-test-api/check-setup' + defaults: + _controller: 'Drupal\package_manager_test_api\ApiController::checkSetup' + requirements: + _access: 'TRUE' + options: + _maintenance_access: TRUE + no_cache: TRUE diff --git a/core/modules/package_manager/tests/modules/package_manager_test_api/src/ApiController.php b/core/modules/package_manager/tests/modules/package_manager_test_api/src/ApiController.php new file mode 100644 index 0000000000000000000000000000000000000000..d2839be3947c6e68dc995642464bb1eb693e0442 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_api/src/ApiController.php @@ -0,0 +1,152 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_api; + +use Drupal\Core\Controller\ControllerBase; +use Drupal\Core\Queue\QueueFactory; +use Drupal\Core\Url; +use Drupal\package_manager\FailureMarker; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\StageBase; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Provides API endpoints to interact with a stage directory in functional test. + */ +class ApiController extends ControllerBase { + + /** + * The route to redirect to after the stage has been applied. + * + * @var string + */ + protected $finishedRoute = 'package_manager_test_api.finish'; + + public function __construct(protected StageBase $stage) { + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container) { + $stage = new ControllerStage( + $container->get(PathLocator::class), + $container->get(BeginnerInterface::class), + $container->get(StagerInterface::class), + $container->get(CommitterInterface::class), + $container->get(QueueFactory::class), + $container->get('event_dispatcher'), + $container->get('tempstore.shared'), + $container->get('datetime.time'), + $container->get(PathFactoryInterface::class), + $container->get(FailureMarker::class), + ); + return new static($stage); + } + + /** + * Begins a stage life cycle. + * + * Creates a stage directory, requires packages into it, applies changes to + * the active directory. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * The request. The runtime and dev dependencies are expected to be in + * either the query string or request body, under the 'runtime' and 'dev' + * keys, respectively. + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + * A response that directs to the ::finish() method. + * + * @see ::finish() + */ + public function run(Request $request): RedirectResponse { + $id = $this->createAndApplyStage($request); + $redirect_url = Url::fromRoute($this->finishedRoute) + ->setRouteParameter('id', $id) + ->setAbsolute() + ->toString(); + + return new RedirectResponse($redirect_url); + } + + /** + * Performs post-apply tasks and destroys the stage. + * + * @param string $id + * The stage ID. + * + * @return \Symfony\Component\HttpFoundation\Response + * The response. + */ + public function finish(string $id): Response { + $this->stage->claim($id)->postApply(); + $this->stage->destroy(); + return new Response(); + } + + /** + * Creates a stage, requires packages into it, and applies the changes. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * The request. The runtime and dev dependencies are expected to be in + * either the query string or request body, under the 'runtime' and 'dev' + * keys, respectively. + * + * @return string + * Unique ID for the stage, which can be used to claim the stage before + * performing other operations on it. Calling code should store this ID for + * as long as the stage needs to exist. + */ + protected function createAndApplyStage(Request $request) : string { + $id = $this->stage->create(); + $this->stage->require( + $request->get('runtime', []), + $request->get('dev', []) + ); + $this->stage->apply(); + return $id; + } + + /** + * Returns the information about current PHP server used for build tests. + * + * @return \Symfony\Component\HttpFoundation\Response + * The response. + */ + public function checkSetup(): Response { + return new Response( + 'max_execution_time=' . ini_get('max_execution_time') . + ':set_time_limit-exists=' . (function_exists('set_time_limit') ? 'yes' : 'no') + ); + } + +} + +/** + * Non-abstract version of StageBase. + * + * This is needed because we cannot instantiate StageBase as it's abstract, and + * we also can't use anonymous class because the name of anonymous class is + * always unique for every request which will create problem while claiming the + * stage as the stored lock will be different from current lock. + * + * @see \Drupal\package_manager\StageBase::claim() + */ +final class ControllerStage extends StageBase { + + /** + * {@inheritdoc} + */ + protected string $type = 'package_manager_test_api:controller'; + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.info.yml b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..2366f4585f3f839adba43f220430b41532b0dea1 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.info.yml @@ -0,0 +1,6 @@ +name: 'Package Manager Test Event Logger' +description: 'Provides an event subscriber to test logging during events in Package Manager' +type: module +package: Testing +dependencies: + - auto_updates:package_manager diff --git a/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.services.yml b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..408eba84e4968d9efe148bc9c60f6f20d291112d --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.services.yml @@ -0,0 +1,5 @@ +services: + package_manager_test_event_logger.subscriber: + class: Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber + tags: + - { name: event_subscriber } diff --git a/core/modules/package_manager/tests/modules/package_manager_test_event_logger/src/EventSubscriber/EventLogSubscriber.php b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/src/EventSubscriber/EventLogSubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..295394ae6320eede5f382feb3876643159752ee8 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_event_logger/src/EventSubscriber/EventLogSubscriber.php @@ -0,0 +1,84 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_event_logger\EventSubscriber; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StageEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Defines an event subscriber to test logging during events in Package Manager. + */ +final class EventLogSubscriber implements EventSubscriberInterface { + + /** + * The name of the log file to write to. + * + * @var string + */ + public const LOG_FILE_NAME = 'package_manager_test_event.log'; + + /** + * Excludes the log file from Package Manager operations. + * + * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event + * The event being handled. + */ + public function excludeLogFile(CollectPathsToExcludeEvent $event): void { + $event->addPathsRelativeToProjectRoot([self::LOG_FILE_NAME]); + } + + /** + * Logs all events in the stage life cycle. + * + * @param \Drupal\package_manager\Event\StageEvent $event + * The event object. + */ + public function logEventInfo(StageEvent $event): void { + $log_file = \Drupal::service(PathLocator::class)->getProjectRoot() . '/' . self::LOG_FILE_NAME; + + if (file_exists($log_file)) { + $log_data = file_get_contents($log_file); + $log_data = json_decode($log_data, TRUE, flags: JSON_THROW_ON_ERROR); + } + else { + $log_data = []; + } + + $log_data[] = [ + 'event' => $event::class, + 'stage' => $event->stage::class, + ]; + file_put_contents($log_file, json_encode($log_data, JSON_UNESCAPED_SLASHES)); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + // This subscriber should run before every other validator, because the + // purpose of this subscriber is to log all dispatched events. + // @see \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator + // @see \Drupal\package_manager\Validator\BaseRequirementValidatorTrait + // @see \Drupal\package_manager\Validator\EnvironmentSupportValidator + return [ + CollectPathsToExcludeEvent::class => ['excludeLogFile'], + PreCreateEvent::class => ['logEventInfo', PHP_INT_MAX], + PostCreateEvent::class => ['logEventInfo', PHP_INT_MAX], + PreRequireEvent::class => ['logEventInfo', PHP_INT_MAX], + PostRequireEvent::class => ['logEventInfo', PHP_INT_MAX], + PreApplyEvent::class => ['logEventInfo', PHP_INT_MAX], + PostApplyEvent::class => ['logEventInfo', PHP_INT_MAX], + ]; + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.info.yml b/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..ecf8c8e6122e9648240eaf05ea07c18886336bda --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.info.yml @@ -0,0 +1,7 @@ +name: 'Package Manager Test Release history' +type: module +description: 'Provides a mechanism for serving fake release history metadata in functional tests.' +package: Testing +dependencies: + - drupal:update + - drupal:update_test diff --git a/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.routing.yml b/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..df0b40c617810dcf79a62e863901c2c24e79855d --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_release_history/package_manager_test_release_history.routing.yml @@ -0,0 +1,9 @@ +package_manager_test_release_history.metadata: + path: '/test-release-history/{project_name}/{version}' + defaults: + _title: 'Update test' + _controller: '\Drupal\package_manager_test_release_history\TestController::metadata' + requirements: + _access: 'TRUE' + options: + _maintenance_access: TRUE diff --git a/core/modules/package_manager/tests/modules/package_manager_test_release_history/src/TestController.php b/core/modules/package_manager/tests/modules/package_manager_test_release_history/src/TestController.php new file mode 100644 index 0000000000000000000000000000000000000000..1c99bb6e192b51fa17b4b84b8d94d8312dac6bcd --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_release_history/src/TestController.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_release_history; + +use Drupal\Core\Controller\ControllerBase; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\Response; + +class TestController extends ControllerBase { + + /** + * Page callback: Prints mock XML for the Update Manager module. + * + * @todo This is a wholesale copy of + * \Drupal\update_test\Controller\UpdateTestController::updateTest() for + * testing package_manager. This was done in order to use a different + * directory of mock XML files. Remove this module in + * https://drupal.org/i/3274826. + */ + public function metadata($project_name = 'drupal', $version = NULL): Response { + $xml_map = $this->config('update_test.settings')->get('xml_map'); + if (isset($xml_map[$project_name])) { + $file = $xml_map[$project_name]; + } + elseif (isset($xml_map['#all'])) { + $file = $xml_map['#all']; + } + else { + // The test didn't specify, for example, the webroot has other modules and + // themes installed but they're disabled by the version of the site + // running the test. So, we default to a file we know won't exist, so at + // least we'll get an empty xml response instead of a bunch of Drupal page + // output. + $file = '#broken#'; + } + + $headers = ['Content-Type' => 'text/xml; charset=utf-8']; + if (!is_file($file)) { + // Return an empty response. + return new Response('', 200, $headers); + } + return new BinaryFileResponse($file, 200, $headers); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_update/package_manager_test_update.info.yml b/core/modules/package_manager/tests/modules/package_manager_test_update/package_manager_test_update.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..c245910b786c5d5351e9695abd8ebc8b1b7c2456 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_update/package_manager_test_update.info.yml @@ -0,0 +1,4 @@ +name: 'Package Manager Test Update' +description: 'A module to test updates' +type: module +package: Testing diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.info.yml b/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..3558b4cd3c8872140eac8bcc224ea004d61d4708 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.info.yml @@ -0,0 +1,6 @@ +name: 'Package Manager Validation Test' +description: 'Provides an event subscriber to test Package Manager validation.' +type: module +package: Testing +dependencies: + - auto_updates:package_manager diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.services.yml b/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..bd41327d3159eae75be794868dfaaf1767c7f43c --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.services.yml @@ -0,0 +1,12 @@ +services: + package_manager_test_validation.subscriber: + class: Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber + arguments: + - '@state' + tags: + - { name: event_subscriber } + package_manager.validator.collect_paths_to_exclude_fail: + class: Drupal\package_manager_test_validation\CollectPathsToExcludeFailValidator + autowire: true + tags: + - { name: event_subscriber } diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/src/CollectPathsToExcludeFailValidator.php b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/CollectPathsToExcludeFailValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..3a920d927f3cb1761481c282a74b742e3e234ca7 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/CollectPathsToExcludeFailValidator.php @@ -0,0 +1,46 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_validation; + +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\PathLocator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Allows to test an excluder which fails on CollectPathsToExcludeEvent. + */ +class CollectPathsToExcludeFailValidator implements EventSubscriberInterface { + + /** + * Constructs a CollectPathsToExcludeFailValidator object. + * + * @param \Drupal\package_manager\ComposerInspector $composerInspector + * The Composer inspector service. + * @param \Drupal\package_manager\PathLocator $pathLocator + * The path locator service. + */ + public function __construct( + private readonly ComposerInspector $composerInspector, + private readonly PathLocator $pathLocator, + ) {} + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + CollectPathsToExcludeEvent::class => 'callToComposer', + ]; + } + + /** + * Fails when composer.json is deleted to simulate failure on excluders. + */ + public function callToComposer(): void { + $this->composerInspector->validate($this->pathLocator->getProjectRoot()); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..53e98202ab74057eca285637cfb10b9c882b702e --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php @@ -0,0 +1,177 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_validation\EventSubscriber; + +use Drupal\Core\State\StateInterface; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Defines an event subscriber for testing validation of Package Manager events. + */ +class TestSubscriber implements EventSubscriberInterface { + + /** + * The key to use store the test results. + * + * @var string + */ + protected const STATE_KEY = 'package_manager_test_validation'; + + /** + * The state service. + * + * @var \Drupal\Core\State\StateInterface + */ + protected $state; + + /** + * Creates a TestSubscriber object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + */ + public function __construct(StateInterface $state) { + $this->state = $state; + } + + /** + * Sets whether a specific event will call exit(). + * + * This is useful for simulating an unrecoverable (fatal) error when handling + * the given event. + * + * @param string $event + * The event class. + */ + public static function setExit(string $event): void { + \Drupal::state()->set(self::getStateKey($event), 'exit'); + } + + /** + * Sets validation results for a specific event. + * + * This method is static to enable setting the expected results before this + * module is enabled. + * + * @param \Drupal\package_manager\ValidationResult[]|null $results + * The validation results, or NULL to delete stored results. + * @param string $event + * The event class. + */ + public static function setTestResult(?array $results, string $event): void { + $key = static::getStateKey($event); + + $state = \Drupal::state(); + if (isset($results)) { + $state->set($key, $results); + } + else { + $state->delete($key); + } + } + + /** + * Sets an exception to throw for a specific event. + * + * This method is static to enable setting the expected results before this + * module is enabled. + * + * @param \Throwable|null $error + * The exception to throw, or NULL to delete a stored exception. + * @param string $event + * The event class. + */ + public static function setException(?\Throwable $error, string $event): void { + $key = self::getStateKey($event); + + $state = \Drupal::state(); + if (isset($error)) { + $state->set($key, $error); + } + else { + $state->delete($key); + } + } + + /** + * Computes the state key to use for a given event class. + * + * @param string $event + * The event class. + * + * @return string + * The state key under which to store the results for the given event. + */ + protected static function getStateKey(string $event): string { + $key = hash('sha256', static::class . $event); + return static::STATE_KEY . substr($key, 0, 8); + } + + /** + * Adds validation results to a stage event. + * + * @param \Drupal\package_manager\Event\StageEvent $event + * The event object. + */ + public function handleEvent(StageEvent $event): void { + $results = $this->state->get(self::getStateKey(get_class($event)), []); + + // Record that value of maintenance mode for each event. + $this->state->set(get_class($event) . '.' . 'system.maintenance_mode', $this->state->get('system.maintenance_mode')); + + if ($results instanceof \Throwable) { + throw $results; + } + elseif ($results === 'exit') { + exit(); + } + elseif (is_string($results)) { + \Drupal::messenger()->addStatus($results); + return; + } + /** @var \Drupal\package_manager\ValidationResult $result */ + foreach ($results as $result) { + $event->addResult($result); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => ['handleEvent', 5], + PostCreateEvent::class => ['handleEvent', 5], + PreRequireEvent::class => ['handleEvent', 5], + PostRequireEvent::class => ['handleEvent', 5], + PreApplyEvent::class => ['handleEvent', 5], + PostApplyEvent::class => ['handleEvent', 5], + StatusCheckEvent::class => ['handleEvent', 5], + ]; + } + + /** + * Sets a status message that will be sent to the messenger for an event. + * + * @param string $message + * Message text. + * @param string $event + * The event class. + */ + public static function setMessage(string $message, string $event): void { + $key = static::getStateKey($event); + $state = \Drupal::state(); + $state->set($key, $message); + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/src/PackageManagerTestValidationServiceProvider.php b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/PackageManagerTestValidationServiceProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..dd8fea39a4d586939c8a024b25c1e5d77a1eee29 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/PackageManagerTestValidationServiceProvider.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_validation; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\Core\DependencyInjection\ServiceProviderBase; +use Drupal\package_manager\Validator\StagedDBUpdateValidator; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Modifies container services for testing. + */ +class PackageManagerTestValidationServiceProvider extends ServiceProviderBase { + + /** + * {@inheritdoc} + */ + public function alter(ContainerBuilder $container): void { + parent::alter($container); + + $service_id = StagedDBUpdateValidator::class; + if ($container->hasDefinition($service_id)) { + $container->getDefinition($service_id) + ->setClass(StagedDatabaseUpdateValidator::class) + ->addMethodCall('setState', [ + new Reference('state'), + ]); + } + } + +} diff --git a/core/modules/package_manager/tests/modules/package_manager_test_validation/src/StagedDatabaseUpdateValidator.php b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/StagedDatabaseUpdateValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..cbab1d42b07082ec3c914aebf11c1f9987eabc48 --- /dev/null +++ b/core/modules/package_manager/tests/modules/package_manager_test_validation/src/StagedDatabaseUpdateValidator.php @@ -0,0 +1,55 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\package_manager_test_validation; + +use Drupal\package_manager\Validator\StagedDBUpdateValidator as BaseValidator; +use Drupal\Core\Extension\Extension; +use Drupal\Core\State\StateInterface; + +/** + * Allows tests to dictate which extensions have staged database updates. + */ +class StagedDatabaseUpdateValidator extends BaseValidator { + + /** + * The state service. + * + * @var \Drupal\Core\State\StateInterface + */ + private $state; + + /** + * Sets the state service dependency. + * + * @param \Drupal\Core\State\StateInterface $state + * The state service. + */ + public function setState(StateInterface $state): void { + $this->state = $state; + } + + /** + * Sets the names of the extensions which should have staged database updates. + * + * @param string[]|null $extensions + * The machine names of the extensions which should say they have staged + * database updates, or NULL to defer to the parent class. + */ + public static function setExtensionsWithUpdates(?array $extensions): void { + \Drupal::state()->set(static::class, $extensions); + } + + /** + * {@inheritdoc} + */ + public function hasStagedUpdates(string $stage_dir, Extension $extension): bool { + $extensions = $this->state->get(static::class); + if (isset($extensions)) { + return in_array($extension->getName(), $extensions, TRUE); + } + return parent::hasStagedUpdates($stage_dir, $extension); + } + +} diff --git a/core/modules/package_manager/tests/src/Build/PackageInstallTest.php b/core/modules/package_manager/tests/src/Build/PackageInstallTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dd9f653133ee049ba72653668822d4420b7c99dd --- /dev/null +++ b/core/modules/package_manager/tests/src/Build/PackageInstallTest.php @@ -0,0 +1,90 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Build; + +/** + * Tests installing packages in a stage directory. + * + * @group package_manager + * @internal + */ +class PackageInstallTest extends TemplateProjectTestBase { + + /** + * Tests installing packages in a stage directory. + */ + public function testPackageInstall(): void { + $this->createTestProject('RecommendedProject'); + + $this->setReleaseMetadata([ + 'alpha' => __DIR__ . '/../../fixtures/release-history/alpha.1.1.0.xml', + ]); + $this->addRepository('alpha', $this->copyFixtureToTempDirectory(__DIR__ . '/../../fixtures/build_test_projects/alpha/1.0.0')); + // Repository definitions affect the lock file hash, so update the hash to + // ensure that Composer won't complain that the lock file is out of sync. + $this->runComposer('composer update --lock', 'project'); + + // Use the API endpoint to create a stage and install alpha 1.0.0. + $this->makePackageManagerTestApiRequest( + '/package-manager-test-api', + [ + 'runtime' => [ + 'drupal/alpha:1.0.0', + ], + ] + ); + // Assert the module was installed. + $this->assertFileEquals( + __DIR__ . '/../../fixtures/build_test_projects/alpha/1.0.0/composer.json', + $this->getWebRoot() . '/modules/contrib/alpha/composer.json', + ); + $this->assertRequestedChangesWereLogged(['Install drupal/alpha 1.0.0']); + $this->assertAppliedChangesWereLogged(['Installed drupal/alpha 1.0.0']); + } + + /** + * Tests installing a Drupal submodule. + * + * This test installs a submodule using a set-up that mimics how + * packages.drupal.org handles submodules. Submodules are Composer + * metapackages which depend on the Composer package of the main module. + */ + public function testSubModules(): void { + $this->createTestProject('RecommendedProject'); + // Set up the release metadata for the main module. The submodule does not + // have its own release metadata. + $this->setReleaseMetadata([ + 'main_module' => __DIR__ . '/../../fixtures/release-history/main_module.1.0.0.xml', + ]); + + // Add repositories for Drupal modules which will contain the code for its + // submodule also. + $this->addRepository('main_module', $this->copyFixtureToTempDirectory(__DIR__ . '/../../fixtures/build_test_projects/main_module')); + + // Add a repository for the submodule of 'main_module'. Submodule + // repositories are metapackages which have no code of their own but that + // require the main module. + $this->addRepository('main_module_submodule', $this->copyFixtureToTempDirectory(__DIR__ . '/../../fixtures/path_repos/main_module_submodule')); + + // Repository definitions affect the lock file hash, so update the hash to + // ensure that Composer won't complain that the lock file is out of sync. + $this->runComposer('composer update --lock', 'project'); + + $this->makePackageManagerTestApiRequest( + '/package-manager-test-api', + [ + 'runtime' => [ + 'drupal/main_module_submodule:1.0.0', + ], + ] + ); + + // Assert main_module and the submodule were installed. + $main_module_path = $this->getWebRoot() . '/modules/contrib/main_module'; + $this->assertFileExists("$main_module_path/main_module.info.yml"); + $this->assertFileExists("$main_module_path/main_module_submodule/main_module_submodule.info.yml"); + } + +} diff --git a/core/modules/package_manager/tests/src/Build/PackageUpdateTest.php b/core/modules/package_manager/tests/src/Build/PackageUpdateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3202b3eb2e00ea13fcd38aee801798e55be34ef2 --- /dev/null +++ b/core/modules/package_manager/tests/src/Build/PackageUpdateTest.php @@ -0,0 +1,74 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Build; + +use Drupal\package_manager_test_api\ControllerStage; + +/** + * Tests updating packages in a stage directory. + * + * @group package_manager + * @internal + */ +class PackageUpdateTest extends TemplateProjectTestBase { + + /** + * Tests updating packages in a stage directory. + */ + public function testPackageUpdate(): void { + $this->createTestProject('RecommendedProject'); + + $fixtures = __DIR__ . '/../../fixtures/build_test_projects'; + + $alpha_repo_path = $this->copyFixtureToTempDirectory("$fixtures/alpha/1.0.0"); + $this->addRepository('alpha', $alpha_repo_path); + $updated_module_repo_path = $this->copyFixtureToTempDirectory("$fixtures/updated_module/1.0.0"); + $this->addRepository('updated_module', $updated_module_repo_path); + $this->setReleaseMetadata([ + 'updated_module' => __DIR__ . '/../../fixtures/release-history/updated_module.1.1.0.xml', + ]); + $this->runComposer('composer require drupal/alpha drupal/updated_module --update-with-all-dependencies', 'project'); + + // The updated_module provides actual Drupal-facing functionality that we're + // testing as well, so we need to install it. + $this->installModules(['updated_module']); + + // Change both modules' upstream version. + static::copyFixtureFilesTo("$fixtures/alpha/1.1.0", $alpha_repo_path); + static::copyFixtureFilesTo("$fixtures/updated_module/1.1.0", $updated_module_repo_path); + // Make .git folder + + // Use the API endpoint to create a stage and update updated_module to + // 1.1.0. Even though both modules have version 1.1.0 available, only + // updated_module should be updated. + $this->makePackageManagerTestApiRequest( + '/package-manager-test-api', + [ + 'runtime' => [ + 'drupal/updated_module:1.1.0', + ], + ] + ); + + $expected_versions = [ + 'alpha' => '1.0.0', + 'updated_module' => '1.1.0', + ]; + foreach ($expected_versions as $module_name => $expected_version) { + $path = "/modules/contrib/$module_name/composer.json"; + $module_composer_json = json_decode(file_get_contents($this->getWebRoot() . "/$path")); + $this->assertSame($expected_version, $module_composer_json?->version); + } + // The post-apply event subscriber in updated_module 1.1.0 should have + // created this file. + // @see \Drupal\updated_module\PostApplySubscriber::postApply() + $this->assertSame('Bravo!', file_get_contents($this->getWorkspaceDirectory() . '/project/bravo.txt')); + + $this->assertExpectedStageEventsFired(ControllerStage::class); + $this->assertRequestedChangesWereLogged(['Update drupal/updated_module from 1.0.0 to 1.1.0']); + $this->assertAppliedChangesWereLogged(['Updated drupal/updated_module from 1.0.0 to 1.1.0']); + } + +} diff --git a/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php new file mode 100644 index 0000000000000000000000000000000000000000..5adf3bec4b8bd42415584c1c9c4995afc70d6878 --- /dev/null +++ b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php @@ -0,0 +1,735 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Build; + +use Composer\Autoload\ClassLoader; +use Composer\InstalledVersions; +use Drupal\BuildTests\QuickStart\QuickStartTestBase; +use Drupal\Composer\Composer; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber; +use Drupal\sqlite\Driver\Database\sqlite\Install\Tasks; +use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait; +use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait; +use Drupal\Tests\RandomGeneratorTrait; +use Symfony\Component\Finder\Finder; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; + +/** + * Base class for tests which create a test site from a core project template. + * + * The test site will be created from one of the core Composer project templates + * (drupal/recommended-project or drupal/legacy-project) and contain complete + * copies of Drupal core and all installed dependencies, completely independent + * of the currently running code base. + * + * @internal + */ +abstract class TemplateProjectTestBase extends QuickStartTestBase { + + use AssertPreconditionsTrait; + use FixtureUtilityTrait; + use RandomGeneratorTrait; + + /** + * The web root of the test site, relative to the workspace directory. + * + * @var string + */ + private string $webRoot; + + /** + * A secondary server instance, to serve XML metadata about available updates. + * + * @var \Symfony\Component\Process\Process + */ + private Process $metadataServer; + + /** + * All output that the PHP web server logs to the error buffer. + * + * @var string + */ + private string $serverErrorLog = ''; + + /** + * The PHP web server's max_execution_time value. + * + * @var int + */ + protected const MAX_EXECUTION_TIME = 20; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + // Build tests cannot be run if SQLite minimum version is not met. + $minimum_version = Tasks::SQLITE_MINIMUM_VERSION; + $actual_version = (new \PDO('sqlite::memory:')) + ->query('select sqlite_version()') + ->fetch()[0]; + if (version_compare($actual_version, $minimum_version, '<')) { + $this->markTestSkipped("SQLite version $minimum_version or later is required, but $actual_version was detected."); + } + + parent::setUp(); + } + + /** + * {@inheritdoc} + */ + protected function tearDown(): void { + $this->metadataServer?->stop(); + parent::tearDown(); + } + + /** + * Data provider for tests which use all the core project templates. + * + * @return string[][] + * The test cases. + */ + public static function providerTemplate(): array { + return [ + 'RecommendedProject' => ['RecommendedProject'], + 'LegacyProject' => ['LegacyProject'], + ]; + } + + /** + * Sets the version of Drupal core to which the test site will be updated. + * + * @param string $version + * The Drupal core version to set. + */ + protected function setUpstreamCoreVersion(string $version): void { + $this->createVendorRepository([ + 'drupal/core' => $version, + 'drupal/core-dev' => $version, + 'drupal/core-dev-pinned' => $version, + 'drupal/core-recommended' => $version, + 'drupal/core-composer-scaffold' => $version, + 'drupal/core-project-message' => $version, + 'drupal/core-vendor-hardening' => $version, + ]); + + // Change the \Drupal::VERSION constant and put placeholder text in the + // README so we can ensure that we really updated to the correct version. We + // also change the default site configuration files so we can ensure that + // these are updated as well, despite `sites/default` being write-protected. + // @see ::assertUpdateSuccessful() + // @see ::createTestProject() + $core_dir = $this->getWorkspaceDrupalRoot() . '/core'; + Composer::setDrupalVersion($this->getWorkspaceDrupalRoot(), $version); + file_put_contents("$core_dir/README.txt", "Placeholder for Drupal core $version."); + + foreach (['default.settings.php', 'default.services.yml'] as $file) { + file_put_contents("$core_dir/assets/scaffold/files/$file", "# This is part of Drupal $version.\n", FILE_APPEND); + } + } + + /** + * Returns the full path to the test site's document root. + * + * @return string + * The full path of the test site's document root. + */ + protected function getWebRoot(): string { + return $this->getWorkspaceDirectory() . '/' . $this->webRoot; + } + + /** + * {@inheritdoc} + */ + protected function instantiateServer($port, $working_dir = NULL) { + $working_dir = $working_dir ?: $this->webRoot; + $finder = new PhpExecutableFinder(); + $working_path = $this->getWorkingPath($working_dir); + $server = [ + $finder->find(), + '-S', + '127.0.0.1:' . $port, + '-d max_execution_time=' . static::MAX_EXECUTION_TIME, + '-d disable_functions=set_time_limit', + '-t', + $working_path, + ]; + if (file_exists($working_path . DIRECTORY_SEPARATOR . '.ht.router.php')) { + $server[] = $working_path . DIRECTORY_SEPARATOR . '.ht.router.php'; + } + $ps = new Process($server, $working_path); + $ps->setIdleTimeout(30) + ->setTimeout(30) + ->start(function ($output_type, $output): void { + if ($output_type === Process::ERR) { + $this->serverErrorLog .= $output; + } + }); + // Wait until the web server has started. It is started if the port is no + // longer available. + for ($i = 0; $i < 50; $i++) { + usleep(100000); + if (!$this->checkPortIsAvailable($port)) { + return $ps; + } + } + + throw new \RuntimeException(sprintf("Unable to start the web server.\nCMD: %s \nCODE: %d\nSTATUS: %s\nOUTPUT:\n%s\n\nERROR OUTPUT:\n%s", $ps->getCommandLine(), $ps->getExitCode(), $ps->getStatus(), $ps->getOutput(), $ps->getErrorOutput())); + } + + /** + * {@inheritdoc} + */ + public function installQuickStart($profile, $working_dir = NULL): void { + parent::installQuickStart("$profile --no-ansi", $working_dir ?: $this->webRoot); + + // Allow package_manager to be installed, since it is hidden by default. + // Always allow test modules to be installed in the UI and, for easier + // debugging, always display errors in their dubious glory. + $php = <<<END +\$settings['testing_package_manager'] = TRUE; +\$settings['extension_discovery_scan_tests'] = TRUE; +\$config['system.logging']['error_level'] = 'verbose'; +END; + $this->writeSettings($php); + } + + /** + * {@inheritdoc} + */ + public function visit($request_uri = '/', $working_dir = NULL) { + return parent::visit($request_uri, $working_dir ?: $this->webRoot); + } + + /** + * {@inheritdoc} + */ + public function formLogin($username, $password, $working_dir = NULL): void { + parent::formLogin($username, $password, $working_dir ?: $this->webRoot); + } + + /** + * Adds a path repository to the test site. + * + * @param string $name + * An arbitrary name for the repository. + * @param string $path + * The path of the repository. Must exist in the file system. + * @param string $working_directory + * (optional) The Composer working directory. Defaults to 'project'. + */ + protected function addRepository(string $name, string $path, $working_directory = 'project'): void { + $this->assertDirectoryExists($path); + + $repository = json_encode([ + 'type' => 'path', + 'url' => $path, + 'options' => [ + 'symlink' => FALSE, + ], + ], JSON_UNESCAPED_SLASHES); + $this->runComposer("composer config repo.$name '$repository'", $working_directory); + } + + /** + * Prepares the test site to serve an XML feed of available release metadata. + * + * @param array $xml_map + * The update XML map, as used by update_test.settings. + * + * @see \Drupal\package_manager_test_release_history\TestController::metadata() + */ + protected function setReleaseMetadata(array $xml_map): void { + foreach ($xml_map as $metadata_file) { + $this->assertFileIsReadable($metadata_file); + } + $xml_map = var_export($xml_map, TRUE); + $this->writeSettings("\$config['update_test.settings']['xml_map'] = $xml_map;"); + } + + /** + * Creates a test project from a given template and installs Drupal. + * + * @param string $template + * The template to use. Can be 'RecommendedProject' or 'LegacyProject'. + */ + protected function createTestProject(string $template): void { + // Create a copy of core (including its Composer plugins, templates, and + // metapackages) which we can modify. + $this->copyCodebase(); + + $workspace_dir = $this->getWorkspaceDirectory(); + $project_dir = $workspace_dir . '/project'; + mkdir($project_dir); + + $data = file_get_contents("$workspace_dir/composer/Template/$template/composer.json"); + $data = json_decode($data, TRUE, flags: JSON_THROW_ON_ERROR); + + // Allow pre-release versions of dependencies. + $data['minimum-stability'] = 'dev'; + + // Remove all repositories and replace them with a single local one that + // provides all dependencies. + $data['repositories'] = [ + 'vendor' => [ + 'type' => 'composer', + 'url' => 'file://' . $workspace_dir . '/vendor.json', + ], + // Disable Packagist entirely so that we don't test the Internet. + 'packagist.org' => FALSE, + ]; + + // Allow any version of the Drupal core packages in the template project. + self::unboundCoreConstraints($data['require']); + self::unboundCoreConstraints($data['require-dev']); + + // Do not run development Composer plugin, since it tries to run an + // executable that might not exist while dependencies are being installed. + // It adds no value to this test. + $data['config']['allow-plugins']['dealerdirect/phpcodesniffer-composer-installer'] = FALSE; + + // Always force Composer to mirror path repositories. This is necessary + // because dependencies are installed from a Composer-type repository, which + // will normally try to symlink packages which are installed from local + // directories. This breaks Package Manager, because it does not support + // symlinks pointing outside the main code base. + $script = '@putenv COMPOSER_MIRROR_PATH_REPOS=1'; + $data['scripts']['pre-install-cmd'] = $script; + $data['scripts']['pre-update-cmd'] = $script; + + file_put_contents($project_dir . '/composer.json', json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)); + + // Because we set the COMPOSER_MIRROR_PATH_REPOS=1 environment variable when + // creating the project, none of the dependencies should be symlinked. + $this->assertStringNotContainsString('Symlinking', $this->runComposer('composer install', 'project')); + + // If using the drupal/recommended-project template, we don't expect there + // to be an .htaccess file at the project root. One would normally be + // generated by Composer when Package Manager or other code creates a + // ComposerInspector object in the active directory, except that Package + // Manager takes specific steps to prevent that. So, here we're just + // confirming that, in fact, Composer's .htaccess protection was disabled. + // We don't do this for the drupal/legacy-project template because its + // project root, which is also the document root, SHOULD contain a .htaccess + // generated by Drupal core. + // We do this check because this test uses PHP's built-in web server, which + // ignores .htaccess files and everything in them, so a Composer-generated + // .htaccess file won't cause this test to fail. + if ($template === 'RecommendedProject') { + $this->assertFileDoesNotExist("$workspace_dir/project/.htaccess"); + } + + // Now that we know the project was created successfully, we can set the + // web root with confidence. + $this->webRoot = 'project/' . $data['extra']['drupal-scaffold']['locations']['web-root']; + + // Install Drupal. + $this->installQuickStart('standard'); + $this->formLogin($this->adminUsername, $this->adminPassword); + + // When checking for updates, we need to be able to make sub-requests, but + // the built-in PHP server is single-threaded. Therefore, open a second + // server instance on another port, which will serve the metadata about + // available updates. + $port = $this->findAvailablePort(); + $this->metadataServer = $this->instantiateServer($port); + $code = <<<END +\$config['update.settings']['fetch']['url'] = 'http://localhost:$port/test-release-history'; +END; + + // Ensure Package Manager logs Composer Stager's process output to a file + // named for the current test. + $log = $this->getDrupalRoot() . '/sites/simpletest/browser_output'; + @mkdir($log, recursive: TRUE); + $this->assertDirectoryIsWritable($log); + $log .= '/' . str_replace('\\', '_', static::class) . '-' . $this->name(); + if ($this->usesDataProvider()) { + $log .= '-' . preg_replace('/[^a-z0-9]+/i', '_', $this->dataName()); + } + $code .= <<<END +\$config['package_manager.settings']['log'] = '$log-package_manager.log'; +END; + + $this->writeSettings($code); + + // Install helpful modules. + $this->installModules([ + 'package_manager_test_api', + 'package_manager_test_event_logger', + 'package_manager_test_release_history', + ]); + + // Confirm the server time out settings. + // @see \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::instantiateServer() + $this->visit('/package-manager-test-api/check-setup'); + $this->getMink() + ->assertSession() + ->pageTextContains("max_execution_time=" . static::MAX_EXECUTION_TIME . ":set_time_limit-exists=no"); + } + + /** + * Changes constraints for core packages to `*`. + * + * @param string[] $constraints + * A set of version constraints, like you'd find in the `require` or + * `require-dev` sections of `composer.json`. This array is modified by + * reference. + */ + private static function unboundCoreConstraints(array &$constraints): void { + $names = preg_grep('/^drupal\/core-?/', array_keys($constraints)); + foreach ($names as $name) { + $constraints[$name] = '*'; + } + } + + /** + * Creates a Composer repository for all dependencies of the test project. + * + * We always reference third-party dependencies (i.e., any package that isn't + * part of Drupal core) from the main project which is running this test. + * + * Packages that are part of Drupal core -- such as `drupal/core`, + * `drupal/core-composer-scaffold`, and so on -- are expected to have been + * copied into the workspace directory, so that we can modify them as needed. + * + * The file will be written to WORKSPACE_DIR/vendor.json. + * + * @param string[] $versions + * (optional) The versions of specific packages, keyed by package name. + * Versions of packages not in this array will be determined first by + * looking for a `version` key in the package's composer.json, then by + * calling \Composer\InstalledVersions::getPrettyVersion(). If none of that + * works, `dev-main` will be used as the package's version. + */ + protected function createVendorRepository(array $versions = []): void { + $packages = []; + + $class_loaders = ClassLoader::getRegisteredLoaders(); + + $workspace_dir = $this->getWorkspaceDirectory(); + $finder = Finder::create() + ->in([ + $this->getWorkspaceDrupalRoot() . '/core', + "$workspace_dir/composer/Metapackage", + "$workspace_dir/composer/Plugin", + key($class_loaders), + ]) + ->depth('< 3') + ->files() + ->name('composer.json'); + + /** @var \Symfony\Component\Finder\SplFileInfo $file */ + foreach ($finder as $file) { + $package_info = json_decode($file->getContents(), TRUE, flags: JSON_THROW_ON_ERROR); + $name = $package_info['name']; + + $requirements = $package_info['require'] ?? []; + // These polyfills are dependencies of some packages, but for reasons we + // don't understand, they are not installed in code bases built on PHP + // versions that are newer than the ones being polyfilled, which means we + // won't be able to build our test project because these polyfills aren't + // available in the local code base. Since we're guaranteed to be on PHP + // 8.3 or later, no package should need to polyfill older versions. + unset( + $requirements['symfony/polyfill-php72'], + $requirements['symfony/polyfill-php73'], + $requirements['symfony/polyfill-php74'], + $requirements['symfony/polyfill-php80'], + $requirements['symfony/polyfill-php81'], + $requirements['symfony/polyfill-php82'], + $requirements['symfony/polyfill-php83'], + ); + // If this package requires any Drupal core packages, ensure it allows + // any version. + self::unboundCoreConstraints($requirements); + // In certain situations, like Drupal CI, auto_updates might be + // required into the code base by Composer. This may cause it to be added to + // the drupal/core-recommended metapackage, which can prevent the test site + // from being built correctly, among other deleterious effects. To prevent + // such shenanigans, always remove drupal/auto_updates from + // drupal/core-recommended. + if ($name === 'drupal/core-recommended') { + unset($requirements['drupal/auto_updates']); + } + + try { + $version = $versions[$name] ?? $package_info['version'] ?? InstalledVersions::getPrettyVersion($name); + } + catch (\OutOfBoundsException) { + $version = 'dev-main'; + } + + // Create a pared-down package definition that has just enough information + // for Composer to install the package from the local copy: the name, + // version, package type, source path ("dist" in Composer terminology), + // and the autoload information, so that the classes provided by the + // package will actually be loadable in the test site we're building. + $path = $file->getPath(); + $packages[$name][$version] = [ + 'name' => $name, + 'version' => $version, + 'type' => $package_info['type'] ?? 'library', + // Disabling symlinks in the transport options doesn't seem to have an + // effect, so we use the COMPOSER_MIRROR_PATH_REPOS environment + // variable to force mirroring in ::createTestProject(). + 'dist' => [ + 'type' => 'path', + 'url' => $path, + ], + 'require' => $requirements, + 'autoload' => $package_info['autoload'] ?? [], + 'provide' => $package_info['provide'] ?? [], + // Composer plugins are loaded and activated as early as possible, and + // they must have a `class` key defined in their `extra` section, along + // with a dependency on `composer-plugin-api` (plus any other real + // runtime dependencies). This is also necessary for packages that ship + // scaffold files, like Drupal core. + 'extra' => $package_info['extra'] ?? [], + ]; + } + $data = json_encode(['packages' => $packages], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); + file_put_contents($workspace_dir . '/vendor.json', $data); + } + + /** + * Runs a Composer command and returns its output. + * + * Always asserts that the command was executed successfully. + * + * @param string $command + * The command to execute, including the `composer` invocation. + * @param string|null $working_dir + * (optional) A working directory relative to the workspace, within which to + * execute the command. Defaults to the workspace directory. + * @param bool $json + * (optional) Whether to parse the command's output as JSON before returning + * it. Defaults to FALSE. + * + * @return mixed|string|null + * The command's output, optionally parsed as JSON. + */ + protected function runComposer(string $command, ?string $working_dir = NULL, bool $json = FALSE) { + $process = $this->executeCommand($command, $working_dir); + $this->assertCommandSuccessful(); + + $output = trim($process->getOutput()); + if ($json) { + $output = json_decode($output, TRUE, flags: JSON_THROW_ON_ERROR); + } + return $output; + } + + /** + * Appends PHP code to the test site's settings.php. + * + * @param string $php + * The PHP code to append to the test site's settings.php. + */ + protected function writeSettings(string $php): void { + // Ensure settings are writable, since this is the only way we can set + // configuration values that aren't accessible in the UI. + $file = $this->getWebRoot() . '/sites/default/settings.php'; + $this->assertFileExists($file); + chmod(dirname($file), 0744); + chmod($file, 0744); + $this->assertFileIsWritable($file); + $this->assertIsInt(file_put_contents($file, $php, FILE_APPEND)); + } + + /** + * Installs modules in the UI. + * + * Assumes that a user with the appropriate permissions is logged in. + * + * @param string[] $modules + * The machine names of the modules to install. + */ + protected function installModules(array $modules): void { + $mink = $this->getMink(); + $page = $mink->getSession()->getPage(); + $assert_session = $mink->assertSession(); + + $this->visit('/admin/modules'); + foreach ($modules as $module) { + $page->checkField("modules[$module][enable]"); + } + $page->pressButton('Install'); + + // If there is a confirmation form warning about additional dependencies + // or non-stable modules, submit it. + $form_id = $assert_session->elementExists('css', 'input[type="hidden"][name="form_id"]') + ->getValue(); + if (preg_match('/^system_modules_(experimental_|non_stable_)?confirm_form$/', $form_id)) { + $page->pressButton('Continue'); + $assert_session->statusCodeEquals(200); + } + } + + /** + * Copies a fixture directory to a temporary directory and returns its path. + * + * @param string $fixture_directory + * The fixture directory. + * + * @return string + * The temporary directory. + */ + protected function copyFixtureToTempDirectory(string $fixture_directory): string { + $temp_directory = $this->getWorkspaceDirectory() . '/fixtures_temp_' . $this->randomMachineName(20); + static::copyFixtureFilesTo($fixture_directory, $temp_directory); + return $temp_directory; + } + + /** + * Asserts stage events were fired in a specific order. + * + * @param string $expected_stage_class + * The expected stage class for the events. + * @param array|null $expected_events + * (optional) The expected stage events that should have been fired in the + * order in which they should have been fired. Events can be specified more + * that once if they will be fired multiple times. If there are no events + * specified all life cycle events from PreCreateEvent to PostApplyEvent + * will be asserted. + * @param int $wait + * (optional) How many seconds to wait for the events to be fired. Defaults + * to 0. + * @param string $message + * (optional) A message to display with the assertion. + * + * @see \Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber::logEventInfo + */ + protected function assertExpectedStageEventsFired(string $expected_stage_class, ?array $expected_events = NULL, int $wait = 0, string $message = ''): void { + if ($expected_events === NULL) { + $expected_events = EventLogSubscriber::getSubscribedEvents(); + // The event subscriber uses this event to ensure the log file is excluded + // from Package Manager operations, but it's not relevant for our purposes + // because it's not part of the stage life cycle. + unset($expected_events[CollectPathsToExcludeEvent::class]); + $expected_events = array_keys($expected_events); + } + $this->assertNotEmpty($expected_events); + + $log_file = $this->getWorkspaceDirectory() . '/project/' . EventLogSubscriber::LOG_FILE_NAME; + $max_wait = time() + $wait; + do { + $this->assertFileIsReadable($log_file); + $log_data = file_get_contents($log_file); + $log_data = json_decode($log_data, TRUE, flags: JSON_THROW_ON_ERROR); + + // Filter out events logged by any other stage. + $log_data = array_filter($log_data, fn (array $event): bool => $event['stage'] === $expected_stage_class); + + // If we've logged at least the expected number of events, stop waiting. + // Break out of the loop and assert the expected events were logged. + if (count($log_data) >= count($expected_events)) { + break; + } + // Wait a bit before checking again. + sleep(5); + } while ($max_wait > time()); + + $this->assertSame($expected_events, array_column($log_data, 'event'), $message); + } + + /** + * Visits the 'admin/reports/dblog' and selects Package Manager's change log. + */ + private function visitPackageManagerChangeLog(): void { + $mink = $this->getMink(); + $assert_session = $mink->assertSession(); + $page = $mink->getSession()->getPage(); + + $this->visit('/admin/reports/dblog'); + $assert_session->statusCodeEquals(200); + $page->selectFieldOption('Type', 'package_manager_change_log'); + $page->pressButton('Filter'); + $assert_session->statusCodeEquals(200); + } + + /** + * Asserts changes requested during the stage life cycle were logged. + * + * This method specifically asserts changes that were *requested* (i.e., + * during the require phase) rather than changes that were actually applied. + * The requested and applied changes may be exactly the same, or they may + * differ (for example, if a secondary dependency was added or updated in the + * stage directory). + * + * @param string[] $expected_requested_changes + * The expected requested changes. + * + * @see ::assertAppliedChangesWereLogged() + * @see \Drupal\package_manager\EventSubscriber\ChangeLogger + */ + protected function assertRequestedChangesWereLogged(array $expected_requested_changes): void { + $this->visitPackageManagerChangeLog(); + $assert_session = $this->getMink()->assertSession(); + + $assert_session->elementExists('css', 'a[href*="/admin/reports/dblog/event/"]:contains("Requested changes:")') + ->click(); + array_walk($expected_requested_changes, $assert_session->pageTextContains(...)); + } + + /** + * Asserts that changes applied during the stage life cycle were logged. + * + * This method specifically asserts changes that were *applied*, rather than + * the changes that were merely requested. For example, if a package was + * required into the stage and it added a secondary dependency, that change + * will be considered one of the applied changes, not a requested change. + * + * @param string[] $expected_applied_changes + * The expected applied changes. + * + * @see ::assertRequestedChangesWereLogged() + * @see \Drupal\package_manager\EventSubscriber\ChangeLogger + */ + protected function assertAppliedChangesWereLogged(array $expected_applied_changes): void { + $this->visitPackageManagerChangeLog(); + $assert_session = $this->getMink()->assertSession(); + + $assert_session->elementExists('css', 'a[href*="/admin/reports/dblog/event/"]:contains("Applied changes:")') + ->click(); + array_walk($expected_applied_changes, $assert_session->pageTextContains(...)); + } + + /** + * Gets a /package-manager-test-api response. + * + * @param string $url + * The package manager test API URL to fetch. + * @param array $query_data + * The query data. + */ + protected function makePackageManagerTestApiRequest(string $url, array $query_data): void { + $url .= '?' . http_build_query($query_data); + $this->visit($url); + $session = $this->getMink()->getSession(); + + // Ensure test failures provide helpful debug output when there's a fatal + // PHP error: don't use \Behat\Mink\WebAssert::statusCodeEquals(). + $message = sprintf( + "Error response: %s\n\nHeaders: %s\n\nServer error log: %s", + $session->getPage()->getContent(), + var_export($session->getResponseHeaders(), TRUE), + $this->serverErrorLog, + ); + $this->assertSame(200, $session->getStatusCode(), $message); + } + + /** + * {@inheritdoc} + */ + public function copyCodebase(?\Iterator $iterator = NULL, $working_dir = NULL): void { + parent::copyCodebase($iterator, $working_dir); + + // Create a local Composer repository for all third-party dependencies and + // core packages. + $this->createVendorRepository(); + } + +} diff --git a/core/modules/package_manager/tests/src/Functional/ComposerRequirementTest.php b/core/modules/package_manager/tests/src/Functional/ComposerRequirementTest.php new file mode 100644 index 0000000000000000000000000000000000000000..45046a8e2adebd463d0c6899e54e6c6f501ce5ed --- /dev/null +++ b/core/modules/package_manager/tests/src/Functional/ComposerRequirementTest.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Functional; + +use Drupal\package_manager\ComposerInspector; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; + +/** + * Tests that Package Manager shows the Composer version on the status report. + * + * @group package_manager + * @internal + */ +class ComposerRequirementTest extends PackageManagerTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = ['package_manager']; + + /** + * Tests that Composer version and path are listed on the status report. + */ + public function testComposerInfoShown(): void { + $config = $this->config('package_manager.settings'); + + // Ensure we can locate the Composer executable. + /** @var \PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface $executable_finder */ + $executable_finder = $this->container->get(ExecutableFinderInterface::class); + $composer_path = $executable_finder->find('composer'); + $composer_version = $this->container->get(ComposerInspector::class)->getVersion(); + + // With a valid path to Composer, ensure the status report shows its version + // number and path. + $config->set('executables.composer', $composer_path)->save(); + $account = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($account); + $this->drupalGet('/admin/reports/status'); + $assert_session = $this->assertSession(); + $assert_session->pageTextContains('Composer version'); + $assert_session->responseContains("$composer_version (<code>$composer_path</code>)"); + + // If the path to Composer is invalid, we should see the error message + // that gets raised when we try to get its version. + $config->set('executables.composer', '/path/to/composer')->save(); + $this->getSession()->reload(); + $assert_session->statusCodeEquals(200); + $assert_session->pageTextContains('Composer was not found. The error message was: Failed to run process: The command "\'/path/to/composer\' \'--format=json\'" failed.'); + } + +} diff --git a/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php b/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c0a84c830651b0ca2cd9514d1614473f275280f9 --- /dev/null +++ b/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php @@ -0,0 +1,67 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Functional; + +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\package_manager\FailureMarker; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\StageBase; +use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait; + +/** + * Tests that Package Manager's requirements check for the failure marker. + * + * @group package_manager + * @internal + */ +class FailureMarkerRequirementTest extends PackageManagerTestBase { + use StringTranslationTrait; + + use AssertPreconditionsTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'package_manager', + 'package_manager_bypass', + ]; + + /** + * Tests that error is shown if failure marker already exists. + */ + public function testFailureMarkerExists(): void { + $account = $this->drupalCreateUser([ + 'administer site configuration', + ]); + $this->drupalLogin($account); + + $fake_project_root = $this->root . DIRECTORY_SEPARATOR . $this->publicFilesDirectory; + $this->container->get(PathLocator::class) + ->setPaths($fake_project_root, NULL, NULL, NULL); + + $failure_marker = $this->container->get(FailureMarker::class); + $message = $this->t('Package Manager is here to wreck your day.'); + $stage = new class() extends StageBase { + + public function __construct() {} + + /** + * {@inheritdoc} + */ + protected string $type = 'test'; + }; + $failure_marker->write($stage, $message); + $path = $failure_marker->getPath(); + $this->assertFileExists($path); + $this->assertStringStartsWith($fake_project_root, $path); + + $this->drupalGet('/admin/reports/status'); + $assert_session = $this->assertSession(); + $assert_session->pageTextContains('Failed Package Manager update detected'); + $assert_session->pageTextContains($message->render()); + } + +} diff --git a/core/modules/package_manager/tests/src/Functional/GenericTest.php b/core/modules/package_manager/tests/src/Functional/GenericTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d096f0c73788fb6e579cd25d8514fbb9da80e687 --- /dev/null +++ b/core/modules/package_manager/tests/src/Functional/GenericTest.php @@ -0,0 +1,14 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Functional; + +use Drupal\Tests\system\Functional\Module\GenericModuleTestBase; + +/** + * Generic module test for package_manager. + * + * @group package_manager + */ +class GenericTest extends GenericModuleTestBase {} diff --git a/core/modules/package_manager/tests/src/Functional/PackageManagerTestBase.php b/core/modules/package_manager/tests/src/Functional/PackageManagerTestBase.php new file mode 100644 index 0000000000000000000000000000000000000000..ac9a73e56e051537367aae8e0fdbe6ed7ab3d1f0 --- /dev/null +++ b/core/modules/package_manager/tests/src/Functional/PackageManagerTestBase.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Functional; + +use Drupal\Tests\BrowserTestBase; + +/** + * Base class for Package Manager Functional tests. + */ +abstract class PackageManagerTestBase extends BrowserTestBase { + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + // Allow package_manager to be installed. + $settings['settings']['testing_package_manager'] = (object) [ + 'value' => TRUE, + 'required' => TRUE, + ]; + $this->writeSettings($settings); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/AllowedScaffoldPackagesValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/AllowedScaffoldPackagesValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..96c80e75d7230f815912ec8cd559a4d8dd939ecb --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/AllowedScaffoldPackagesValidatorTest.php @@ -0,0 +1,61 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\AllowedScaffoldPackagesValidator + * @group package_manager + * @internal + */ +class AllowedScaffoldPackagesValidatorTest extends PackageManagerKernelTestBase { + + /** + * Tests that the allowed-packages setting is validated during pre-create. + */ + public function testPreCreate(): void { + (new ActiveFixtureManipulator())->addConfig([ + 'extra.drupal-scaffold.allowed-packages' => [ + "drupal/dummy_scaffolding", + "drupal/dummy_scaffolding_2", + ], + ])->commitChanges(); + + $result = ValidationResult::createError( + [ + t("drupal/dummy_scaffolding"), + t("drupal/dummy_scaffolding_2"), + ], + t('Any packages other than the implicitly allowed packages are not allowed to scaffold files. See <a href="https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold">the scaffold documentation</a> for more information.') + ); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests that the allowed-packages setting is validated during pre-apply. + */ + public function testPreApply(): void { + $this->getStageFixtureManipulator() + ->addConfig([ + 'extra.drupal-scaffold.allowed-packages' => [ + "drupal/dummy_scaffolding", + ], + ]); + + $result = ValidationResult::createError( + [ + t("drupal/dummy_scaffolding"), + ], + t('Any packages other than the implicitly allowed packages are not allowed to scaffold files. See <a href="https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold">the scaffold documentation</a> for more information.') + ); + $this->assertResults([$result], PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/BaseRequirementsFulfilledValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/BaseRequirementsFulfilledValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..56c8984388b3d482dc72167d9fb46be296eb34a5 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/BaseRequirementsFulfilledValidatorTest.php @@ -0,0 +1,95 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator; +use Drupal\package_manager\Validator\BaseRequirementValidatorTrait; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * @covers \Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator + * @covers \Drupal\package_manager\Validator\BaseRequirementValidatorTrait + * + * @group package_manager + */ +class BaseRequirementsFulfilledValidatorTest extends PackageManagerKernelTestBase implements EventSubscriberInterface { + + use BaseRequirementValidatorTrait; + + /** + * The event class to throw to an error for. + * + * @var string + */ + private string $eventClass; + + /** + * {@inheritdoc} + */ + public function validate(PreOperationStageEvent $event): void { + if (get_class($event) === $this->eventClass) { + $event->addError([ + t('This will not stand!'), + ]); + } + } + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->container->get('event_dispatcher')->addSubscriber($this); + } + + /** + * Data provider for ::testBaseRequirement(). + * + * @return array[] + * The test cases. + */ + public static function providerBaseRequirement(): array { + return [ + [PreCreateEvent::class], + [PreRequireEvent::class], + [PreApplyEvent::class], + [StatusCheckEvent::class], + ]; + } + + /** + * Tests that base requirement failures stop event propagation. + * + * @param string $event_class + * The event which should raise a base requirement error, and thus stop + * event propagation. + * + * @dataProvider providerBaseRequirement + */ + public function testBaseRequirement(string $event_class): void { + $this->eventClass = $event_class; + + $validator = $this->container->get(BaseRequirementsFulfilledValidator::class); + $this->assertEventPropagationStopped($event_class, [$validator, 'validate']); + + $result = ValidationResult::createError([ + t('This will not stand!'), + ]); + + if ($event_class === StatusCheckEvent::class) { + $this->assertStatusCheckResults([$result]); + } + else { + $this->assertResults([$result], $event_class); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ChangeLoggerTest.php b/core/modules/package_manager/tests/src/Kernel/ChangeLoggerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8a7d5e411698d3b34fe9b2a172d729a46b98a639 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ChangeLoggerTest.php @@ -0,0 +1,99 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use ColinODell\PsrTestLogger\TestLogger; +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Psr\Log\LogLevel; + +/** + * @covers \Drupal\package_manager\EventSubscriber\ChangeLogger + * @group package_manager + */ +class ChangeLoggerTest extends PackageManagerKernelTestBase { + + /** + * The logger to which change lists will be written. + * + * @var \ColinODell\PsrTestLogger\TestLogger + */ + private TestLogger $logger; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + $this->logger = new TestLogger(); + parent::setUp(); + } + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + $container->set('logger.channel.package_manager_change_log', $this->logger); + } + + /** + * Tests that the requested and applied changes are logged. + */ + public function testChangeLogging(): void { + $this->setReleaseMetadata([ + 'semver_test' => __DIR__ . '/../../fixtures/release-history/semver_test.1.1.xml', + ]); + + (new ActiveFixtureManipulator()) + ->addPackage([ + 'name' => 'package/removed', + 'type' => 'library', + ]) + ->commitChanges(); + + $this->getStageFixtureManipulator() + ->setCorePackageVersion('9.8.1') + ->addPackage([ + 'name' => 'drupal/semver_test', + 'type' => 'drupal-module', + 'version' => '8.1.1', + ]) + ->removePackage('package/removed'); + + $stage = $this->createStage(); + $stage->create(); + $stage->require([ + 'drupal/semver_test:*', + 'drupal/core-recommended:^9.8.1', + ]); + // Nothing should be logged until post-apply. + $stage->apply(); + $this->assertEmpty($this->logger->records); + $stage->postApply(); + + $this->assertTrue($this->logger->hasInfoRecords()); + $records = $this->logger->recordsByLevel[LogLevel::INFO]; + $this->assertCount(2, $records); + // The first record should be of the requested changes. + $expected_message = <<<END +Requested changes: +- Update drupal/core-recommended from 9.8.0 to ^9.8.1 +- Install drupal/semver_test * (any version) +END; + $this->assertSame($expected_message, (string) $records[0]['message']); + + // The second record should be of the actual changes. + $expected_message = <<<END +Applied changes: +- Updated drupal/core from 9.8.0 to 9.8.1 +- Updated drupal/core-dev from 9.8.0 to 9.8.1 +- Updated drupal/core-recommended from 9.8.0 to 9.8.1 +- Installed drupal/semver_test 8.1.1 +- Uninstalled package/removed +END; + $this->assertSame($expected_message, (string) $records[1]['message']); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php b/core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aa3e4943278fdfa390c709da10f9782163eafd6a --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php @@ -0,0 +1,560 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Composer\Json\JsonFile; +use Drupal\Component\Serialization\Json; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Exception\ComposerNotReadyException; +use Drupal\package_manager\InstalledPackage; +use Drupal\package_manager\InstalledPackagesList; +use Drupal\Tests\package_manager\Traits\InstalledPackagesListTrait; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Exception\PreconditionException; +use PhpTuf\ComposerStager\API\Exception\RuntimeException; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use PhpTuf\ComposerStager\API\Precondition\Service\ComposerIsAvailableInterface; +use PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; +use Prophecy\Argument; +use Prophecy\Prophecy\ObjectProphecy; + +/** + * @coversDefaultClass \Drupal\package_manager\ComposerInspector + * + * @group package_manager + */ +class ComposerInspectorTest extends PackageManagerKernelTestBase { + + use InstalledPackagesListTrait; + + /** + * @covers ::getConfig + */ + public function testConfig(): void { + $dir = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $inspector = $this->container->get(ComposerInspector::class); + $this->assertTrue((bool) Json::decode($inspector->getConfig('secure-http', $dir))); + + $this->assertSame([ + 'boo' => 'boo boo', + "foo" => ["dev" => "2.x-dev"], + "foo-bar" => TRUE, + "boo-far" => [ + "foo" => 1.23, + "bar" => 134, + "foo-bar" => NULL, + ], + 'baz' => NULL, + 'installer-paths' => [ + 'modules/contrib/{$name}' => ['type:drupal-module'], + 'profiles/contrib/{$name}' => ['type:drupal-profile'], + 'themes/contrib/{$name}' => ['type:drupal-theme'], + ], + ], Json::decode($inspector->getConfig('extra', $dir))); + + try { + $inspector->getConfig('non-existent-config', $dir); + $this->fail('Expected an exception when trying to get a non-existent config key, but none was thrown.'); + } + catch (RuntimeException) { + // We don't need to do anything here. + } + + // If composer.json is removed, we should get an exception because + // getConfig() should validate that $dir is Composer-ready. + unlink($dir . '/composer.json'); + $this->expectExceptionMessage("composer.json not found."); + $inspector->getConfig('extra', $dir); + } + + /** + * @covers ::getConfig + */ + public function testConfigUndefinedKey(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $inspector = $this->container->get(ComposerInspector::class); + + // Overwrite the composer.json file and treat it as a + $file = new JsonFile($project_root . '/composer.json'); + $this->assertTrue($file->exists()); + $data = $file->read(); + // Ensure that none of the special keys are defined, to test the fallback + // behavior. + unset( + $data['minimum-stability'], + $data['extra'] + ); + $file->write($data); + + $path = $file->getPath(); + $this->assertSame('stable', $inspector->getConfig('minimum-stability', $path)); + $this->assertSame([], Json::decode($inspector->getConfig('extra', $path))); + } + + /** + * @covers ::getInstalledPackagesList + */ + public function testGetInstalledPackagesList(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + $list = $inspector->getInstalledPackagesList($project_root); + + $expected_list = new InstalledPackagesList([ + 'drupal/core' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core', + 'type' => 'drupal-core', + 'version' => '9.8.0', + 'path' => "$project_root/vendor/drupal/core", + ]), + 'drupal/core-recommended' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-recommended', + 'type' => 'project', + 'version' => '9.8.0', + 'path' => "$project_root/vendor/drupal/core-recommended", + ]), + 'drupal/core-dev' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-dev', + 'type' => 'package', + 'version' => '9.8.0', + 'path' => "$project_root/vendor/drupal/core-dev", + ]), + ]); + + $this->assertPackageListsEqual($expected_list, $list); + + // Since the lock file hasn't changed, we should get the same package list + // back if we call getInstalledPackageList() again. + $this->assertSame($list, $inspector->getInstalledPackagesList($project_root)); + + // If we change the lock file, we should get a different package list. + $lock_file = new JsonFile($project_root . '/composer.lock'); + $lock_data = $lock_file->read(); + $this->assertArrayHasKey('_readme', $lock_data); + unset($lock_data['_readme']); + $lock_file->write($lock_data); + $this->assertNotSame($list, $inspector->getInstalledPackagesList($project_root)); + + // If composer.lock is removed, we should get an exception because + // getInstalledPackagesList() should validate that $project_root is + // Composer-ready. + unlink($lock_file->getPath()); + $this->expectExceptionMessage("composer.lock not found in $project_root."); + $inspector->getInstalledPackagesList($project_root); + } + + /** + * @covers ::validate + */ + public function testComposerUnavailable(): void { + $precondition = $this->prophesize(ComposerIsAvailableInterface::class); + $mocked_precondition = $precondition->reveal(); + $this->container->set(ComposerIsAvailableInterface::class, $mocked_precondition); + + $message = $this->createComposeStagerMessage("Well, that didn't work."); + $precondition->assertIsFulfilled(Argument::cetera()) + ->willThrow(new PreconditionException($mocked_precondition, $message)) + // The result of the precondition is statically cached, so it should only + // be called once even though we call validate() twice. + ->shouldBeCalledOnce(); + + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + try { + $inspector->validate($project_root); + $this->fail('Expected an exception to be thrown, but it was not.'); + } + catch (ComposerNotReadyException $e) { + $this->assertNull($e->workingDir); + $this->assertSame("Well, that didn't work.", $e->getMessage()); + } + + // Call validate() again to ensure the precondition is called once. + $this->expectException(ComposerNotReadyException::class); + $this->expectExceptionMessage("Well, that didn't work."); + $inspector->validate($project_root); + } + + /** + * Tests what happens when composer.json or composer.lock are missing. + * + * @param string $filename + * The filename to delete, which should cause validate() to raise an + * error. + * + * @covers ::validate + * + * @testWith ["composer.json"] + * ["composer.lock"] + */ + public function testComposerFilesDoNotExist(string $filename): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + $file_path = $project_root . '/' . $filename; + unlink($file_path); + + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + try { + $inspector->validate($project_root); + } + catch (ComposerNotReadyException $e) { + $this->assertSame($project_root, $e->workingDir); + $this->assertStringContainsString("$filename not found", $e->getMessage()); + } + } + + /** + * @param string|null $reported_version + * The version of Composer that will be returned by ::getVersion(). + * @param string|null $expected_message + * The error message that should be generated for the reported version of + * Composer. If not passed, will default to the message format defined in + * ::validate(). + * + * @covers ::validate + * + * @testWith ["2.2.12", "<default>"] + * ["2.2.13", "<default>"] + * ["2.5.0", "<default>"] + * ["2.5.5", "<default>"] + * ["2.5.11", "<default>"] + * ["2.6.0", null] + * ["2.2.11", "<default>"] + * ["2.2.0-dev", "<default>"] + * ["2.3.6", "<default>"] + * ["2.4.1", "<default>"] + * ["2.3.4", "<default>"] + * ["2.1.6", "<default>"] + * ["1.10.22", "<default>"] + * ["1.7.3", "<default>"] + * ["2.0.0-alpha3", "<default>"] + * ["2.1.0-RC1", "<default>"] + * ["1.0.0-RC", "<default>"] + * ["1.0.0-beta1", "<default>"] + * ["1.9-dev", "<default>"] + * ["@package_version@", "Invalid version string \"@package_version@\""] + * [null, "Unable to determine Composer version"] + */ + public function testVersionCheck(?string $reported_version, ?string $expected_message): void { + $runner = $this->mockComposerRunner($reported_version); + + // Mock the ComposerIsAvailableInterface so that if it uses the Composer + // runner it will not affect the test expectations. + $composerPrecondition = $this->prophesize(ComposerIsAvailableInterface::class); + $composerPrecondition + ->assertIsFulfilled(Argument::cetera()) + ->shouldBeCalledOnce(); + $this->container->set(ComposerIsAvailableInterface::class, $composerPrecondition->reveal()); + + // The result of the version check is statically cached, so the runner + // should only be called once, even though we call validate() twice in this + // test. + $runner->getMethodProphecies('run')[0]->withArguments([['--format=json'], NULL, [], Argument::any()])->shouldBeCalledOnce(); + // The runner should be called with `validate` as the first argument, but + // it won't affect the outcome of this test. + $runner->run(Argument::withEntry(0, 'validate')); + $this->container->set(ComposerProcessRunnerInterface::class, $runner->reveal()); + + if ($expected_message === '<default>') { + $expected_message = "The detected Composer version, $reported_version, does not satisfy <code>" . ComposerInspector::SUPPORTED_VERSION . '</code>.'; + } + + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + try { + $inspector->validate($project_root); + // If we expected the version check to succeed, ensure we did not expect + // an exception message. + $this->assertNull($expected_message, 'Expected an exception, but none was thrown.'); + } + catch (ComposerNotReadyException $e) { + $this->assertNull($e->workingDir); + $this->assertSame($expected_message, $e->getMessage()); + } + + if (isset($expected_message)) { + $this->expectException(ComposerNotReadyException::class); + $this->expectExceptionMessage($expected_message); + } + $inspector->validate($project_root); + } + + /** + * @covers ::getVersion + * + * @testWith ["2.5.6"] + * [null] + */ + public function testGetVersion(?string $reported_version): void { + $this->container->set(ComposerProcessRunnerInterface::class, $this->mockComposerRunner($reported_version)->reveal()); + + if (empty($reported_version)) { + $this->expectException(\UnexpectedValueException::class); + $this->expectExceptionMessage('Unable to determine Composer version'); + } + $this->assertSame($reported_version, $this->container->get(ComposerInspector::class)->getVersion()); + } + + /** + * @covers ::validate + */ + public function testComposerValidateIsCalled(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + // Put an invalid value into composer.json and ensure it gets surfaced as + // an exception. + $file = new JsonFile($project_root . '/composer.json'); + $this->assertTrue($file->exists()); + $data = $file->read(); + $data['prefer-stable'] = 'truthy'; + $file->write($data); + + try { + $this->container->get(ComposerInspector::class) + ->validate($project_root); + $this->fail('Expected an exception to be thrown, but it was not.'); + } + catch (ComposerNotReadyException $e) { + $this->assertSame($project_root, $e->workingDir); + // The exception message is translated by Composer Stager and HTML-escaped + // by Drupal's markup system, which is why there's a " in the + // final exception message. + $this->assertStringContainsString('composer.json" does not match the expected JSON schema', $e->getMessage()); + $this->assertStringContainsString('prefer-stable : String value found, but a boolean is required', $e->getPrevious()?->getMessage()); + } + } + + /** + * @covers ::getRootPackageInfo + */ + public function testRootPackageInfo(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + $info = $this->container->get(ComposerInspector::class) + ->getRootPackageInfo($project_root); + $this->assertSame('fake/site', $info['name']); + } + + /** + * Tests that the installed path of metapackages is always NULL. + * + * @param bool $is_metapackage + * Whether the test package will be a metapackage. + * @param string|null $install_path + * The package install path that Composer should report. If NULL, the + * reported path will be unchanged. The token <PROJECT_ROOT> will be + * replaced with the project root. + * @param string|null $exception_message + * The expected exception message, or NULL if no exception should be thrown. + * The token <PROJECT_ROOT> will be replaced with the project root. + * + * @covers ::getInstalledPackagesList + * + * @testWith [true, null, null] + * [true, "<PROJECT_ROOT>/another/directory", "Metapackage 'test/package' is installed at unexpected path: '<PROJECT_ROOT>/another/directory', expected NULL"] + * [false, null, null] + * [false, "<PROJECT_ROOT>", "Package 'test/package' cannot be installed at path: '<PROJECT_ROOT>'"] + */ + public function testMetapackagePath(bool $is_metapackage, ?string $install_path, ?string $exception_message): void { + $inspector = new class ( + $this->container->get(ComposerProcessRunnerInterface::class), + $this->container->get(ComposerIsAvailableInterface::class), + $this->container->get(PathFactoryInterface::class), + ) extends ComposerInspector { + + /** + * The install path that Composer should report for `test/package`. + * + * If not set, the reported install path will not be changed. + * + * @var string + */ + public $packagePath; + + /** + * {@inheritdoc} + */ + protected function show(string $working_dir): array { + $data = parent::show($working_dir); + if ($this->packagePath) { + $data['test/package']['path'] = $this->packagePath; + } + return $data; + } + + }; + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + if ($install_path) { + $install_path = str_replace('<PROJECT_ROOT>', $project_root, $install_path); + + // The install path must actually exist. + if (!is_dir($install_path)) { + $this->assertTrue(mkdir($install_path, 0777, TRUE)); + } + $inspector->packagePath = $install_path; + } + + (new ActiveFixtureManipulator()) + ->addPackage([ + 'name' => 'test/package', + 'type' => $is_metapackage ? 'metapackage' : 'library', + ]) + ->commitChanges(); + + if ($exception_message) { + $this->expectException(\UnexpectedValueException::class); + $exception_message = str_replace('<PROJECT_ROOT>', $project_root, $exception_message); + $this->expectExceptionMessage($exception_message); + } + $list = $inspector->getInstalledPackagesList($project_root); + $this->assertArrayHasKey('test/package', $list); + // If the package is a metapackage, its path should be NULL. + $this->assertSame($is_metapackage, is_null($list['test/package']->path)); + } + + /** + * Tests that the commit hash of a dev snapshot package is ignored. + */ + public function testPackageDevSnapshotCommitHashIsRemoved(): void { + $inspector = new class ( + $this->container->get(ComposerProcessRunnerInterface::class), + $this->container->get(ComposerIsAvailableInterface::class), + $this->container->get(PathFactoryInterface::class), + ) extends ComposerInspector { + + /** + * {@inheritdoc} + */ + protected function show(string $working_dir): array { + return [ + 'test/package' => [ + 'name' => 'test/package', + 'path' => __DIR__, + 'version' => '1.0.x-dev 0a1b2c3d', + ], + ]; + } + + }; + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $list = $inspector->getInstalledPackagesList($project_root); + $this->assertSame('1.0.x-dev', $list['test/package']->version); + } + + /** + * Data provider for ::testAllowedPlugins(). + * + * @return array[] + * The test cases. + */ + public static function providerAllowedPlugins(): array { + return [ + 'all plugins allowed' => [ + ['allow-plugins' => TRUE], + TRUE, + ], + 'no plugins allowed' => [ + ['allow-plugins' => FALSE], + [], + ], + 'some plugins allowed' => [ + [ + 'allow-plugins.example/plugin-a' => TRUE, + 'allow-plugins.example/plugin-b' => FALSE, + ], + [ + 'example/plugin-a' => TRUE, + 'example/plugin-b' => FALSE, + // The scaffold plugin is explicitly disallowed by the fake_site + // fixture. + 'drupal/core-composer-scaffold' => FALSE, + ], + ], + ]; + } + + /** + * Tests ComposerInspector's parsing of the allowed plugins list. + * + * @param array $config + * The Composer configuration to set. + * @param array|bool $expected_value + * The expected return value from getAllowPluginsConfig(). + * + * @covers ::getAllowPluginsConfig + * + * @dataProvider providerAllowedPlugins + */ + public function testAllowedPlugins(array $config, bool|array $expected_value): void { + (new ActiveFixtureManipulator()) + ->addConfig($config) + ->commitChanges(); + + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + $actual_value = $this->container->get(ComposerInspector::class) + ->getAllowPluginsConfig($project_root); + + if (is_array($expected_value)) { + ksort($expected_value); + } + if (is_array($actual_value)) { + ksort($actual_value); + } + $this->assertSame($expected_value, $actual_value); + } + + /** + * Mocks the Composer runner service to return a particular version string. + * + * @param string|null $reported_version + * The version number that `composer --format=json` should return. + * + * @return \Prophecy\Prophecy\ObjectProphecy + * The configurator for the mocked Composer runner. + */ + private function mockComposerRunner(?string $reported_version): ObjectProphecy { + $runner = $this->prophesize(ComposerProcessRunnerInterface::class); + + $pass_version_to_output_callback = function (array $arguments_passed_to_runner) use ($reported_version): void { + $command_output = Json::encode([ + 'application' => [ + 'name' => 'Composer', + 'version' => $reported_version, + ], + ]); + + $callback = end($arguments_passed_to_runner); + assert($callback instanceof OutputCallbackInterface); + $callback(OutputTypeEnum::OUT, $command_output); + }; + + // We expect the runner to be called with two arguments: an array whose + // first item is `--format=json`, and an output callback. + $runner->run( + Argument::withEntry(0, '--format=json'), + Argument::cetera(), + )->will($pass_version_to_output_callback); + + return $runner; + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ComposerMinimumStabilityValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/ComposerMinimumStabilityValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ce6c4a60a4b8ac6e6c90230d6abce662aa600090 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ComposerMinimumStabilityValidatorTest.php @@ -0,0 +1,54 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\ComposerMinimumStabilityValidator + * @group package_manager + * @internal + */ +class ComposerMinimumStabilityValidatorTest extends PackageManagerKernelTestBase { + + /** + * Tests error if requested version is less stable than the minimum: stable. + */ + public function testPreRequireEvent(): void { + $stage = $this->createStage(); + $stage->create(); + $result = ValidationResult::createError([ + t("<code>drupal/core</code>'s requested version 9.8.1-beta1 is less stable (beta) than the minimum stability (stable) required in <PROJECT_ROOT>/composer.json."), + ]); + try { + $stage->require(['drupal/core:9.8.1-beta1']); + $this->fail('Able to require a package even though it did not meet minimum stability.'); + } + catch (StageEventException $exception) { + $this->assertValidationResultsEqual([$result], $exception->event->getResults()); + } + $stage->destroy(); + + // Specifying a stability flag bypasses this check. + $stage->create(); + $stage->require(['drupal/core:9.8.1-beta1@dev']); + $stage->destroy(); + + // Dev packages are also checked. + $stage->create(); + $result = ValidationResult::createError([ + t("<code>drupal/core-dev</code>'s requested version 9.8.x-dev is less stable (dev) than the minimum stability (stable) required in <PROJECT_ROOT>/composer.json."), + ]); + try { + $stage->require([], ['drupal/core-dev:9.8.x-dev']); + $this->fail('Able to require a package even though it did not meet minimum stability.'); + } + catch (StageEventException $exception) { + $this->assertValidationResultsEqual([$result], $exception->event->getResults()); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d3652407d8dbcda3bcd688792a4146b1889f84d1 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php @@ -0,0 +1,292 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\Url; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\ComposerPatchesValidator + * @group package_manager + * @internal + */ +class ComposerPatchesValidatorTest extends PackageManagerKernelTestBase { + + const ABSENT = 0; + const CONFIG_ALLOWED_PLUGIN = 1; + const EXTRA_EXIT_ON_PATCH_FAILURE = 2; + const REQUIRE_PACKAGE_FROM_ROOT = 4; + const REQUIRE_PACKAGE_INDIRECTLY = 8; + + /** + * Data provider for testErrorDuringPreCreate(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerErrorDuringPreCreate(): array { + $summary = t('Problems detected related to the Composer plugin <code>cweagans/composer-patches</code>.'); + return [ + 'INVALID: exit-on-patch-failure missing' => [ + static::CONFIG_ALLOWED_PLUGIN | static::REQUIRE_PACKAGE_FROM_ROOT, + [ + ValidationResult::createError([ + t('The <code>composer-exit-on-patch-failure</code> key is not set to <code>true</code> in the <code>extra</code> section of <code>composer.json</code>.'), + ], $summary), + ], + ], + 'INVALID: indirect dependency' => [ + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_INDIRECTLY, + [ + ValidationResult::createError([ + t('It must be a root dependency.'), + ], $summary), + ], + [ + 'package-manager-faq-composer-patches-not-a-root-dependency', + NULL, + ], + ], + 'VALID: present' => [ + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_FROM_ROOT, + [], + ], + 'VALID: absent' => [ + static::ABSENT, + [], + ], + ]; + } + + /** + * Tests that the patcher configuration is validated during pre-create. + * + * @param int $options + * What aspects of the patcher are installed how. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerErrorDuringPreCreate + */ + public function testErrorDuringPreCreate(int $options, array $expected_results): void { + $active_manipulator = new ActiveFixtureManipulator(); + if ($options & static::CONFIG_ALLOWED_PLUGIN) { + $active_manipulator->addConfig(['allow-plugins.cweagans/composer-patches' => TRUE]); + } + if ($options & static::EXTRA_EXIT_ON_PATCH_FAILURE) { + $active_manipulator->addConfig(['extra.composer-exit-on-patch-failure' => TRUE]); + } + if ($options & static::REQUIRE_PACKAGE_FROM_ROOT) { + $active_manipulator->requirePackage('cweagans/composer-patches', '@dev'); + } + elseif ($options & static::REQUIRE_PACKAGE_INDIRECTLY) { + $active_manipulator->addPackage([ + 'type' => 'package', + 'name' => 'dummy/depends-on-composer-patches', + 'description' => 'A dummy package depending on cweagans/composer-patches', + 'version' => '1.0.0', + 'require' => ['cweagans/composer-patches' => '*'], + ]); + } + if ($options !== static::ABSENT) { + $active_manipulator->commitChanges(); + } + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Data provider for testErrorDuringPreApply() and testHelpLink(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerErrorDuringPreApply(): array { + $summary = t('Problems detected related to the Composer plugin <code>cweagans/composer-patches</code>.'); + + return [ + 'composer-patches present in stage, but not present in active' => [ + static::ABSENT, + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_FROM_ROOT, + [ + ValidationResult::createError([ + t('It cannot be installed by Package Manager.'), + ], $summary), + ], + [ + 'package-manager-faq-composer-patches-installed-or-removed', + ], + ], + 'composer-patches partially present (exit missing) in stage, but not present in active' => [ + static::ABSENT, + static::CONFIG_ALLOWED_PLUGIN | static::REQUIRE_PACKAGE_FROM_ROOT, + [ + ValidationResult::createError([ + t('It cannot be installed by Package Manager.'), + t('The <code>composer-exit-on-patch-failure</code> key is not set to <code>true</code> in the <code>extra</code> section of <code>composer.json</code>.'), + ], $summary), + ], + [ + 'package-manager-faq-composer-patches-installed-or-removed', + NULL, + ], + ], + 'composer-patches present due to non-root dependency in stage, but not present in active' => [ + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE, + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_INDIRECTLY, + [ + ValidationResult::createError([ + t('It cannot be installed by Package Manager.'), + t('It must be a root dependency.'), + ], $summary), + ], + [ + 'package-manager-faq-composer-patches-installed-or-removed', + 'package-manager-faq-composer-patches-not-a-root-dependency', + NULL, + ], + ], + 'composer-patches removed in stage, but present in active' => [ + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_FROM_ROOT, + static::ABSENT, + [ + ValidationResult::createError([ + t('It cannot be removed by Package Manager.'), + ], $summary), + ], + [ + 'package-manager-faq-composer-patches-installed-or-removed', + ], + ], + 'composer-patches present in stage and active' => [ + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_FROM_ROOT, + static::CONFIG_ALLOWED_PLUGIN | static::EXTRA_EXIT_ON_PATCH_FAILURE | static::REQUIRE_PACKAGE_FROM_ROOT, + [], + [], + ], + 'composer-patches not present in stage and active' => [ + static::ABSENT, + static::ABSENT, + [], + [], + ], + ]; + } + + /** + * Tests the patcher's presence and configuration are validated on pre-apply. + * + * @param int $in_active + * Whether patcher is installed in active. + * @param int $in_stage + * Whether patcher is installed in stage. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerErrorDuringPreApply + */ + public function testErrorDuringPreApply(int $in_active, int $in_stage, array $expected_results): void { + // Simulate in active. + $active_manipulator = new ActiveFixtureManipulator(); + if ($in_active & static::CONFIG_ALLOWED_PLUGIN) { + $active_manipulator->addConfig(['allow-plugins.cweagans/composer-patches' => TRUE]); + } + if ($in_active & static::EXTRA_EXIT_ON_PATCH_FAILURE) { + $active_manipulator->addConfig(['extra.composer-exit-on-patch-failure' => TRUE]); + } + if ($in_active & static::REQUIRE_PACKAGE_FROM_ROOT) { + $active_manipulator->requirePackage('cweagans/composer-patches', '@dev'); + } + if ($in_active !== static::ABSENT) { + $active_manipulator->commitChanges(); + } + + // Simulate in stage. + $stage_manipulator = $this->getStageFixtureManipulator(); + if ($in_stage & static::CONFIG_ALLOWED_PLUGIN) { + $stage_manipulator->addConfig([ + 'allow-plugins.cweagans/composer-patches' => TRUE, + ]); + } + if ($in_stage & static::EXTRA_EXIT_ON_PATCH_FAILURE) { + $stage_manipulator->addConfig([ + 'extra.composer-exit-on-patch-failure' => TRUE, + ]); + } + if ($in_stage & static::REQUIRE_PACKAGE_FROM_ROOT && !($in_active & static::REQUIRE_PACKAGE_FROM_ROOT)) { + $stage_manipulator->requirePackage('cweagans/composer-patches', '1.7.333'); + } + if (!($in_stage & static::REQUIRE_PACKAGE_FROM_ROOT) && $in_active & static::REQUIRE_PACKAGE_FROM_ROOT) { + $stage_manipulator + ->removePackage('cweagans/composer-patches'); + } + if ($in_stage & static::REQUIRE_PACKAGE_INDIRECTLY) { + $stage_manipulator->addPackage([ + 'type' => 'package', + 'name' => 'dummy/depends-on-composer-patches', + 'description' => 'A dummy package depending on cweagans/composer-patches', + 'version' => '1.0.0', + 'require' => ['cweagans/composer-patches' => '*'], + ]); + } + + $stage = $this->createStage(); + $stage->create(); + $stage_dir = $stage->getStageDirectory(); + $stage->require(['drupal/core:9.8.1']); + + try { + $stage->apply(); + // If we didn't get an exception, ensure we didn't expect any errors. + $this->assertSame([], $expected_results); + } + catch (StageEventException $e) { + $this->assertNotEmpty($expected_results); + $this->assertValidationResultsEqual($expected_results, $e->event->getResults(), NULL, $stage_dir); + } + } + + /** + * Tests that validation errors can carry links to help. + * + * @param int $in_active + * Whether patcher is installed in active. + * @param int $in_stage + * Whether patcher is installed in stage. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * @param string[] $help_page_sections + * An associative array of fragments (anchors) in the online help. The keys + * should be the numeric indices of the validation result messages which + * should link to those fragments. + * + * @dataProvider providerErrorDuringPreApply + */ + public function testErrorDuringPreApplyWithHelp(int $in_active, int $in_stage, array $expected_results, array $help_page_sections): void { + $this->enableModules(['help']); + + foreach ($expected_results as $result_index => $result) { + $messages = $result->messages; + + foreach ($messages as $message_index => $message) { + if ($help_page_sections[$message_index]) { + // Get the link to the online documentation for the error message. + $url = Url::fromRoute('help.page', ['name' => 'package_manager']) + ->setOption('fragment', $help_page_sections[$message_index]) + ->toString(); + // Reformat the provided results so that they all have the link to the + // online documentation appended to them. + $messages[$message_index] = t('@message See <a href=":url">the help page</a> for information on how to resolve the problem.', ['@message' => $message, ':url' => $url]); + } + } + $expected_results[$result_index] = ValidationResult::createError($messages, $result->summary); + } + $this->testErrorDuringPreApply($in_active, $in_stage, $expected_results); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ComposerPluginsValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/ComposerPluginsValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cf3c0638ed730d87cd4e759b23b6a8ae45d08c31 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ComposerPluginsValidatorTest.php @@ -0,0 +1,405 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Component\Utility\NestedArray; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\ComposerPluginsValidator + * @group package_manager + * @internal + */ +class ComposerPluginsValidatorTest extends PackageManagerKernelTestBase { + + /** + * Tests `config.allow-plugins: true` fails validation during pre-create. + */ + public function testInsecureConfigurationFailsValidationPreCreate(): void { + $active_manipulator = new ActiveFixtureManipulator(); + $active_manipulator->addConfig(['allow-plugins' => TRUE]); + $active_manipulator->commitChanges(); + + $expected_results = [ + ValidationResult::createError( + [ + new TranslatableMarkup('All composer plugins are allowed because <code>config.allow-plugins</code> is configured to <code>true</code>. This is an unacceptable security risk.'), + ], + ), + ]; + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests `config.allow-plugins: true` fails validation during pre-apply. + */ + public function testInsecureConfigurationFailsValidationPreApply(): void { + $stage_manipulator = $this->getStageFixtureManipulator(); + $stage_manipulator->addConfig(['allow-plugins' => TRUE]); + + $expected_results = [ + ValidationResult::createError( + [ + new TranslatableMarkup('All composer plugins are allowed because <code>config.allow-plugins</code> is configured to <code>true</code>. This is an unacceptable security risk.'), + ], + ), + ]; + $this->assertResults($expected_results, PreApplyEvent::class); + } + + /** + * Tests composer plugins are validated during pre-create. + * + * @dataProvider providerSimpleValidCases + * @dataProvider providerSimpleInvalidCases + * @dataProvider providerComplexInvalidCases + */ + public function testValidationDuringPreCreate(array $composer_config_to_add, array $packages_to_add, array $expected_results): void { + $active_manipulator = new ActiveFixtureManipulator(); + if ($composer_config_to_add) { + $active_manipulator->addConfig($composer_config_to_add); + } + foreach ($packages_to_add as $package) { + $active_manipulator->addPackage($package); + } + $active_manipulator->commitChanges(); + + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests composer plugins are validated during pre-apply. + * + * @dataProvider providerSimpleValidCases + * @dataProvider providerSimpleInvalidCases + * @dataProvider providerComplexInvalidCases + */ + public function testValidationDuringPreApply(array $composer_config_to_add, array $packages_to_add, array $expected_results): void { + $stage_manipulator = $this->getStageFixtureManipulator(); + if ($composer_config_to_add) { + $stage_manipulator->addConfig($composer_config_to_add); + } + foreach ($packages_to_add as $package) { + $stage_manipulator->addPackage($package); + } + + // Ensure \Drupal\package_manager\Validator\SupportedReleaseValidator does + // not complain. + $release_fixture_folder = __DIR__ . '/../../fixtures/release-history'; + $this->setReleaseMetadata([ + 'semver_test' => "$release_fixture_folder/semver_test.1.1.xml", + ]); + + $this->assertResults($expected_results, PreApplyEvent::class); + } + + /** + * Tests adding a plugin that's not allowed by the allow-plugins config. + * + * The exception that this test looks for is not necessarily triggered by + * ComposerPluginsValidator; Composer will exit with an error if there is an + * installed plugin that is not allowed by the `allow-plugins` config. In + * practice, this means that whichever validator is the first one to do a + * Composer operation (via ComposerInspector) will get the exception -- it + * may or may not be ComposerPluginsValidator. + * + * This test is here to ensure that Composer's behavior remains consistent, + * even if we're not explicitly testing ComposerPluginsValidator here. + */ + public function testAddDisallowedPlugin(): void { + $this->getStageFixtureManipulator() + ->addPackage([ + 'name' => 'composer/plugin-c', + 'version' => '16.4', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ]); + + $expected_message = "composer/plugin-c contains a Composer plugin which is blocked by your allow-plugins config."; + $stage = $this->createStage(); + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + try { + // We are trying to add package plugin-c but not allowing it in config, + // so we expect the operation to fail on PreApplyEvent. + $stage->apply(); + } + catch (StageEventException $e) { + // Processing is required because the error message we get from Composer + // contains multiple white spaces at the start or end of line. + $this->assertStringContainsString($expected_message, preg_replace('/\s\s+/', '', $e->getMessage())); + $this->assertInstanceOf(PreApplyEvent::class, $e->event); + } + } + + /** + * Tests additional composer plugins can be trusted during pre-create. + * + * @dataProvider providerSimpleInvalidCases + * @dataProvider providerComplexInvalidCases + */ + public function testValidationAfterTrustingDuringPreCreate(array $composer_config_to_add, array $packages_to_add, array $expected_results): void { + $expected_results_without_composer_plugin_violations = array_filter( + $expected_results, + fn (ValidationResult $v) => !$v->summary || !str_contains(strtolower($v->summary->getUntranslatedString()), 'unsupported composer plugin'), + ); + + // Trust all added packages. + $this->config('package_manager.settings') + ->set('additional_trusted_composer_plugins', array_map(fn (array $package) => $package['name'], $packages_to_add)) + ->save(); + + // Reuse the test logic that does not trust additional packages, but with + // updated expected results. + $this->testValidationDuringPreCreate($composer_config_to_add, $packages_to_add, $expected_results_without_composer_plugin_violations); + } + + /** + * Tests additional composer plugins can be trusted during pre-apply. + * + * @dataProvider providerSimpleInvalidCases + * @dataProvider providerComplexInvalidCases + */ + public function testValidationAfterTrustingDuringPreApply(array $composer_config_to_add, array $packages_to_add, array $expected_results): void { + $expected_results_without_composer_plugin_violations = array_filter( + $expected_results, + fn (ValidationResult $v) => !$v->summary || !str_contains(strtolower($v->summary->getUntranslatedString()), 'unsupported composer plugin'), + ); + + // Trust all added packages. + $this->config('package_manager.settings') + ->set('additional_trusted_composer_plugins', array_map(fn (array $package) => $package['name'], $packages_to_add)) + ->save(); + + // Reuse the test logic that does not trust additional packages, but with + // updated expected results. + $this->testValidationDuringPreApply($composer_config_to_add, $packages_to_add, $expected_results_without_composer_plugin_violations); + } + + /** + * Generates simple test cases. + * + * @return \Generator + */ + public static function providerSimpleValidCases(): \Generator { + yield 'no composer plugins' => [ + [], + [ + [ + 'name' => "drupal/semver_test", + 'version' => '8.1.0', + 'type' => 'drupal-module', + ], + ], + [], + ]; + + yield 'another supported composer plugin' => [ + [ + 'allow-plugins.drupal/core-vendor-hardening' => TRUE, + ], + [ + [ + 'name' => 'drupal/core-vendor-hardening', + 'version' => '9.8.0', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [], + ]; + + yield 'a supported composer plugin for which any version is supported: party like it is Drupal 99!' => [ + [ + 'allow-plugins.drupal/core-composer-scaffold' => TRUE, + ], + [ + [ + 'name' => 'drupal/core-composer-scaffold', + 'version' => '99.0.0', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [], + ]; + + yield 'one UNsupported but disallowed plugin — pretty package name' => [ + [ + 'allow-plugins.composer/plugin-a' => FALSE, + ], + [ + [ + 'name' => 'composer/plugin-a', + 'version' => '6.1', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [], + ]; + + yield 'one UNsupported but disallowed plugin — normalized package name' => [ + [ + 'allow-plugins.composer/plugin-b' => FALSE, + ], + [ + [ + 'name' => 'composer/plugin-b', + 'version' => '20.1', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [], + ]; + } + + /** + * Generates simple invalid test cases. + * + * @return \Generator + */ + public static function providerSimpleInvalidCases(): \Generator { + yield 'one UNsupported composer plugin — pretty package name' => [ + [ + 'allow-plugins.not-cweagans/not-composer-patches' => TRUE, + ], + [ + [ + 'name' => 'not-cweagans/not-composer-patches', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + 'version' => '6.1', + 'type' => 'composer-plugin', + ], + ], + [ + ValidationResult::createError( + [ + new TranslatableMarkup('<code>not-cweagans/not-composer-patches</code>'), + ], + new TranslatableMarkup('An unsupported Composer plugin was detected.'), + ), + ], + ]; + + yield 'one UNsupported composer plugin — normalized package name' => [ + [ + 'allow-plugins.also-not-cweagans/also-not-composer-patches' => TRUE, + ], + [ + [ + 'name' => 'also-not-cweagans/also-not-composer-patches', + 'version' => '20.1', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [ + ValidationResult::createError( + [ + new TranslatableMarkup('<code>also-not-cweagans/also-not-composer-patches</code>'), + ], + new TranslatableMarkup('An unsupported Composer plugin was detected.'), + ), + ], + ]; + + yield 'one supported composer plugin but incompatible version — newer version' => [ + [ + 'allow-plugins.phpstan/extension-installer' => TRUE, + ], + [ + [ + 'name' => 'phpstan/extension-installer', + 'version' => '20.1', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [ + ValidationResult::createError( + [ + new TranslatableMarkup('<code>phpstan/extension-installer</code> is supported, but only version <code>^1.1</code>, found <code>20.1</code>.'), + ], + new TranslatableMarkup('An unsupported Composer plugin was detected.'), + ), + ], + ]; + + yield 'one supported composer plugin but incompatible version — older version' => [ + [ + 'allow-plugins.dealerdirect/phpcodesniffer-composer-installer' => TRUE, + ], + [ + [ + 'name' => 'dealerdirect/phpcodesniffer-composer-installer', + 'version' => '0.6.1', + 'type' => 'composer-plugin', + 'require' => ['composer-plugin-api' => '*'], + 'extra' => ['class' => 'AnyClass'], + ], + ], + [ + ValidationResult::createError( + [ + new TranslatableMarkup('<code>dealerdirect/phpcodesniffer-composer-installer</code> is supported, but only version <code>^0.7.1 || ^1.0.0</code>, found <code>0.6.1</code>.'), + ], + new TranslatableMarkup('An unsupported Composer plugin was detected.'), + ), + ], + ]; + } + + /** + * Generates complex invalid test cases based on the simple test cases. + * + * @return \Generator + */ + public static function providerComplexInvalidCases(): \Generator { + $valid_cases = iterator_to_array(static::providerSimpleValidCases()); + $invalid_cases = iterator_to_array(static::providerSimpleInvalidCases()); + $all_config = NestedArray::mergeDeepArray( + // First key-value pair for each simple test case: the packages it adds. + array_map(fn (array $c) => $c[0], $valid_cases + $invalid_cases) + ); + $all_packages = NestedArray::mergeDeepArray( + // Second key-value pair for each simple test case: the packages it adds. + array_map(fn (array $c) => $c[1], $valid_cases + $invalid_cases) + ); + + yield 'complex combination' => [ + $all_config, + $all_packages, + [ + ValidationResult::createError( + [ + new TranslatableMarkup('<code>not-cweagans/not-composer-patches</code>'), + new TranslatableMarkup('<code>also-not-cweagans/also-not-composer-patches</code>'), + new TranslatableMarkup('<code>phpstan/extension-installer</code> is supported, but only version <code>^1.1</code>, found <code>20.1</code>.'), + new TranslatableMarkup('<code>dealerdirect/phpcodesniffer-composer-installer</code> is supported, but only version <code>^0.7.1 || ^1.0.0</code>, found <code>0.6.1</code>.'), + ], + new TranslatableMarkup('Unsupported Composer plugins were detected.'), + ), + ], + ]; + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ComposerValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/ComposerValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7320d7a385b08f83daeb68737791cefe1d2bd7d8 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ComposerValidatorTest.php @@ -0,0 +1,173 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\ComposerValidator + * @group package_manager + * @internal + */ +class ComposerValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testComposerSettingsValidation(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerComposerSettingsValidation(): array { + $summary = t("Composer settings don't satisfy Package Manager's requirements."); + + $secure_http_error = ValidationResult::createError([ + t('HTTPS must be enabled for Composer downloads. See <a href="https://getcomposer.org/doc/06-config.md#secure-http">the Composer documentation</a> for more information.'), + ], $summary); + $tls_error = ValidationResult::createError([ + t('TLS must be enabled for HTTPS Composer downloads. See <a href="https://getcomposer.org/doc/06-config.md#disable-tls">the Composer documentation</a> for more information.'), + t('You should also check the value of <code>secure-http</code> and make sure that it is set to <code>true</code> or not set at all.'), + ], $summary); + + return [ + 'secure-http set to FALSE' => [ + [ + 'secure-http' => FALSE, + ], + [$secure_http_error], + ], + 'secure-http explicitly set to TRUE' => [ + [ + 'secure-http' => TRUE, + ], + [], + ], + 'secure-http implicitly set to TRUE' => [ + [ + 'extra.unrelated' => TRUE, + ], + [], + ], + 'disable-tls set to TRUE' => [ + [ + 'disable-tls' => TRUE, + ], + [$tls_error], + ], + 'disable-tls implicitly set to FALSE' => [ + [ + 'extra.unrelated' => TRUE, + ], + [], + ], + 'explicitly set disable-tls to FALSE' => [ + [ + 'disable-tls' => FALSE, + ], + [], + ], + 'disable-tls set to TRUE + secure-http set to TRUE, message only for TLS, secure-http overridden' => [ + [ + 'disable-tls' => TRUE, + 'secure-http' => TRUE, + ], + [$tls_error], + ], + 'disable-tls set to TRUE + secure-http set to FALSE, message only for TLS' => [ + [ + 'disable-tls' => TRUE, + 'secure-http' => FALSE, + ], + [$tls_error], + ], + ]; + } + + /** + * Tests that Composer's settings are validated. + * + * @param array $config + * The config to set. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results, if any. + * + * @dataProvider providerComposerSettingsValidation + */ + public function testComposerSettingsValidation(array $config, array $expected_results): void { + (new ActiveFixtureManipulator())->addConfig($config)->commitChanges(); + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests that Composer's settings are validated during pre-apply. + * + * @param array $config + * The config to set. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results, if any. + * + * @dataProvider providerComposerSettingsValidation + */ + public function testComposerSettingsValidationDuringPreApply(array $config, array $expected_results): void { + $this->getStageFixtureManipulator()->addConfig($config); + $this->assertResults($expected_results, PreApplyEvent::class); + } + + /** + * Data provider for ::testLinkToOnlineHelp(). + * + * @return array[] + * The test cases. + */ + public static function providerLinkToOnlineHelp(): array { + return [ + 'TLS disabled' => [ + ['disable-tls' => TRUE], + [ + t('TLS must be enabled for HTTPS Composer downloads. See <a href="/admin/help/package_manager#package-manager-requirements">the help page</a> for more information on how to configure Composer to download packages securely.'), + t('You should also check the value of <code>secure-http</code> and make sure that it is set to <code>true</code> or not set at all.'), + ], + ], + 'secure-http is off' => [ + ['secure-http' => FALSE], + [ + t('HTTPS must be enabled for Composer downloads. See <a href="/admin/help/package_manager#package-manager-requirements">the help page</a> for more information on how to configure Composer to download packages securely.'), + ], + ], + ]; + } + + /** + * Tests that invalid configuration links to online help, if available. + * + * @param array $config + * The Composer configuration to set. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $expected_messages + * The expected validation error messages. + * + * @dataProvider providerLinkToOnlineHelp + */ + public function testLinkToOnlineHelp(array $config, array $expected_messages): void { + $this->enableModules(['help']); + (new ActiveFixtureManipulator())->addConfig($config)->commitChanges(); + + $result = ValidationResult::createError($expected_messages, t("Composer settings don't satisfy Package Manager's requirements.")); + $this->assertStatusCheckResults([$result]); + } + + /** + * {@inheritdoc} + */ + protected function tearDown(): void { + // Ensure that any warnings arising from Composer settings (which we expect + // in this test) will not fail the test during tear-down. + $this->failureLogger->reset(); + parent::tearDown(); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a7ea9f40512b1233440247967d763a9279a94dd9 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php @@ -0,0 +1,189 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; +use Drupal\Component\Utility\Bytes; +use Drupal\package_manager\Validator\DiskSpaceValidator; + +/** + * @covers \Drupal\package_manager\Validator\DiskSpaceValidator + * @group package_manager + * @internal + */ +class DiskSpaceValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testDiskSpaceValidation(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerDiskSpaceValidation(): array { + // @see \Drupal\Tests\package_manager\Traits\ValidationTestTrait::resolvePlaceholdersInArrayValuesWithRealPaths() + $root = '<PROJECT_ROOT>'; + $vendor = '<VENDOR_DIR>'; + + $root_insufficient = t('Drupal root filesystem "<PROJECT_ROOT>" has insufficient space. There must be at least 1024 megabytes free.'); + $vendor_insufficient = t('Vendor filesystem "<VENDOR_DIR>" has insufficient space. There must be at least 1024 megabytes free.'); + $temp_insufficient = t('Directory "temp" has insufficient space. There must be at least 1024 megabytes free.'); + $summary = t("There is not enough disk space to create a stage directory."); + + return [ + 'shared, vendor and temp sufficient, root insufficient' => [ + TRUE, + [ + $root => '1M', + $vendor => '2G', + 'temp' => '4G', + ], + [ + ValidationResult::createError([$root_insufficient]), + ], + ], + 'shared, root and vendor insufficient, temp sufficient' => [ + TRUE, + [ + $root => '1M', + $vendor => '2M', + 'temp' => '2G', + ], + [ + ValidationResult::createError([$root_insufficient]), + ], + ], + 'shared, vendor and root sufficient, temp insufficient' => [ + TRUE, + [ + $root => '2G', + $vendor => '4G', + 'temp' => '1M', + ], + [ + ValidationResult::createError([$temp_insufficient]), + ], + ], + 'shared, root and temp insufficient, vendor sufficient' => [ + TRUE, + [ + $root => '1M', + $vendor => '2G', + 'temp' => '2M', + ], + [ + ValidationResult::createError([ + $root_insufficient, + $temp_insufficient, + ], $summary), + ], + ], + 'not shared, root insufficient, vendor and temp sufficient' => [ + FALSE, + [ + $root => '5M', + $vendor => '1G', + 'temp' => '4G', + ], + [ + ValidationResult::createError([$root_insufficient]), + ], + ], + 'not shared, vendor insufficient, root and temp sufficient' => [ + FALSE, + [ + $root => '2G', + $vendor => '10M', + 'temp' => '4G', + ], + [ + ValidationResult::createError([$vendor_insufficient]), + ], + ], + 'not shared, root and vendor sufficient, temp insufficient' => [ + FALSE, + [ + $root => '1G', + $vendor => '2G', + 'temp' => '3M', + ], + [ + ValidationResult::createError([$temp_insufficient]), + ], + ], + 'not shared, root and vendor insufficient, temp sufficient' => [ + FALSE, + [ + $root => '500M', + $vendor => '75M', + 'temp' => '2G', + ], + [ + ValidationResult::createError([ + $root_insufficient, + $vendor_insufficient, + ], $summary), + ], + ], + ]; + } + + /** + * Tests disk space validation. + * + * @param bool $shared_disk + * Whether the root and vendor directories are on the same logical disk. + * @param array $free_space + * The free space that should be reported for various paths. The keys + * are the paths, and the values are the free space that should be reported, + * in a format that can be parsed by + * \Drupal\Component\Utility\Bytes::toNumber(). + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerDiskSpaceValidation + */ + public function testDiskSpaceValidation(bool $shared_disk, array $free_space, array $expected_results): void { + $free_space = array_flip($this->resolvePlaceholdersInArrayValuesWithRealPaths(array_flip($free_space))); + + /** @var \Drupal\Tests\package_manager\Kernel\TestDiskSpaceValidator $validator */ + $validator = $this->container->get(DiskSpaceValidator::class); + $validator->sharedDisk = $shared_disk; + $validator->freeSpace = array_map([Bytes::class, 'toNumber'], $free_space); + + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests disk space validation during pre-apply. + * + * @param bool $shared_disk + * Whether the root and vendor directories are on the same logical disk. + * @param array $free_space + * The free space that should be reported for various paths. The keys + * are the paths, and the values are the free space that should be reported, + * in a format that can be parsed by + * \Drupal\Component\Utility\Bytes::toNumber(). + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerDiskSpaceValidation + */ + public function testDiskSpaceValidationDuringPreApply(bool $shared_disk, array $free_space, array $expected_results): void { + $free_space = array_flip($this->resolvePlaceholdersInArrayValuesWithRealPaths(array_flip($free_space))); + + $this->addEventTestListener(function () use ($shared_disk, $free_space): void { + /** @var \Drupal\Tests\package_manager\Kernel\TestDiskSpaceValidator $validator */ + $validator = $this->container->get(DiskSpaceValidator::class); + $validator->sharedDisk = $shared_disk; + $validator->freeSpace = array_map([Bytes::class, 'toNumber'], $free_space); + }); + + $this->assertResults($expected_results, PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7583f63d340434bf2eb88bdccc6c8b11f6222da5 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php @@ -0,0 +1,242 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use Symfony\Component\Filesystem\Filesystem; + +/** + * @covers \Drupal\package_manager\Validator\DuplicateInfoFileValidator + * @group package_manager + * @internal + */ +class DuplicateInfoFileValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testDuplicateInfoFilesInStage. + * + * @return mixed[][] + * The test cases. + */ + public static function providerDuplicateInfoFilesInStage(): array { + return [ + 'Duplicate info.yml files in stage' => [ + [ + '/module.info.yml', + ], + [ + '/module.info.yml', + '/modules/module.info.yml', + ], + [ + ValidationResult::createError([ + t('The stage directory has 2 instances of module.info.yml as compared to 1 in the active directory. This likely indicates that a duplicate extension was installed.'), + ]), + ], + ], + // Duplicate files in stage but having different extension which we don't + // care about. + 'Duplicate info files in stage' => [ + [ + '/my_file.info', + ], + [ + '/my_file.info', + '/modules/my_file.info', + ], + [], + ], + 'Duplicate info.yml files in stage with one file in tests/fixtures folder' => [ + [ + '/tests/fixtures/module.info.yml', + ], + [ + '/tests/fixtures/module.info.yml', + '/modules/module.info.yml', + ], + [], + ], + 'Duplicate info.yml files in stage with one file in tests/modules folder' => [ + [ + '/tests/modules/module.info.yml', + ], + [ + '/tests/modules/module.info.yml', + '/modules/module.info.yml', + ], + [], + ], + 'Duplicate info.yml files in stage with one file in tests/themes folder' => [ + [ + '/tests/themes/theme.info.yml', + ], + [ + '/tests/themes/theme.info.yml', + '/themes/theme.info.yml', + ], + [], + ], + 'Duplicate info.yml files in stage with one file in tests/profiles folder' => [ + [ + '/tests/profiles/profile.info.yml', + ], + [ + '/tests/profiles/profile.info.yml', + '/profiles/profile.info.yml', + ], + [], + ], + 'Duplicate info.yml files in stage not present in active' => [ + [], + [ + '/module.info.yml', + '/modules/module.info.yml', + ], + [ + ValidationResult::createError([ + t('The stage directory has 2 instances of module.info.yml. This likely indicates that a duplicate extension was installed.'), + ]), + ], + ], + 'Duplicate info.yml files in active' => [ + [ + '/module.info.yml', + '/modules/module.info.yml', + ], + [ + '/module.info.yml', + ], + [], + ], + 'Same number of info.yml files in active and stage' => [ + [ + '/module.info.yml', + '/modules/module.info.yml', + ], + [ + '/module.info.yml', + '/modules/module.info.yml', + ], + [], + ], + 'Multiple duplicate info.yml files in stage' => [ + [ + '/modules/module1/module1.info.yml', + '/modules/module2/module2.info.yml', + ], + [ + '/modules/module1/module1.info.yml', + '/modules/module2/module2.info.yml', + '/modules/foo/module1.info.yml', + '/modules/bar/module2.info.yml', + '/modules/baz/module2.info.yml', + ], + [ + ValidationResult::createError([ + t('The stage directory has 3 instances of module2.info.yml as compared to 1 in the active directory. This likely indicates that a duplicate extension was installed.'), + ]), + ValidationResult::createError([ + t('The stage directory has 2 instances of module1.info.yml as compared to 1 in the active directory. This likely indicates that a duplicate extension was installed.'), + ]), + ], + ], + 'Multiple duplicate info.yml files in stage not present in active' => [ + [], + [ + '/modules/module1/module1.info.yml', + '/modules/module2/module2.info.yml', + '/modules/foo/module1.info.yml', + '/modules/bar/module2.info.yml', + '/modules/baz/module2.info.yml', + ], + [ + ValidationResult::createError([ + t('The stage directory has 3 instances of module2.info.yml. This likely indicates that a duplicate extension was installed.'), + ]), + ValidationResult::createError([ + t('The stage directory has 2 instances of module1.info.yml. This likely indicates that a duplicate extension was installed.'), + ]), + ], + ], + 'Multiple duplicate info.yml files in stage with one info.yml file not present in active' => [ + [ + '/modules/module1/module1.info.yml', + ], + [ + '/modules/module1/module1.info.yml', + '/modules/module2/module2.info.yml', + '/modules/foo/module1.info.yml', + '/modules/bar/module2.info.yml', + '/modules/baz/module2.info.yml', + ], + [ + ValidationResult::createError([ + t('The stage directory has 3 instances of module2.info.yml. This likely indicates that a duplicate extension was installed.'), + ]), + ValidationResult::createError([ + t('The stage directory has 2 instances of module1.info.yml as compared to 1 in the active directory. This likely indicates that a duplicate extension was installed.'), + ]), + ], + ], + ]; + } + + /** + * Tests that duplicate info.yml in stage raise an error. + * + * @param string[] $active_info_files + * An array of info.yml files in active directory. + * @param string[] $stage_info_files + * An array of info.yml files in stage directory. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * An array of expected results. + * + * @dataProvider providerDuplicateInfoFilesInStage + */ + public function testDuplicateInfoFilesInStage(array $active_info_files, array $stage_info_files, array $expected_results): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['composer/semver:^3']); + + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + $stage_dir = $stage->getStageDirectory(); + foreach ($active_info_files as $active_info_file) { + $this->createFileAtPath($active_dir, $active_info_file); + } + foreach ($stage_info_files as $stage_info_file) { + $this->createFileAtPath($stage_dir, $stage_info_file); + } + try { + $stage->apply(); + $this->assertEmpty($expected_results); + } + catch (StageEventException $e) { + $this->assertNotEmpty($expected_results); + $this->assertValidationResultsEqual($expected_results, $e->event->getResults()); + } + } + + /** + * Creates the file at the root directory. + * + * @param string $root_directory + * The base directory in which the file will be created. + * @param string $file_path + * The path of the file to create. + */ + private function createFileAtPath(string $root_directory, string $file_path): void { + $parts = explode(DIRECTORY_SEPARATOR, $file_path); + $filename = array_pop($parts); + $file_dir = str_replace($filename, '', $file_path); + $fs = new Filesystem(); + if (!file_exists($file_dir)) { + $fs->mkdir($root_directory . $file_dir); + } + file_put_contents($root_directory . $file_path, "name: SOME MODULE\ntype: module\n"); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/EnabledExtensionsValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/EnabledExtensionsValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c17cccf7a7ac8861098f1d4ca99908241d1e22d2 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/EnabledExtensionsValidatorTest.php @@ -0,0 +1,163 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\Extension\Extension; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use Drupal\Tests\package_manager\Traits\ComposerInstallersTrait; + +/** + * @covers \Drupal\package_manager\Validator\EnabledExtensionsValidator + * @group package_manager + * @internal + */ +class EnabledExtensionsValidatorTest extends PackageManagerKernelTestBase { + + use ComposerInstallersTrait; + + /** + * Data provider for testExtensionRemoved(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerExtensionRemoved(): array { + $summary = t('The update cannot proceed because the following enabled Drupal extension was removed during the update.'); + return [ + 'module' => [ + [ + [ + 'name' => 'drupal/test_module2', + 'version' => '1.3.1', + 'type' => 'drupal-module', + ], + ], + [ + ValidationResult::createError([t("'test_module2' module (provided by <code>drupal/test_module2</code>)")], $summary), + ], + ], + 'module and theme' => [ + [ + [ + 'name' => 'drupal/test_module1', + 'version' => '1.3.1', + 'type' => 'drupal-module', + ], + [ + 'name' => 'drupal/test_theme', + 'version' => '1.3.1', + 'type' => 'drupal-theme', + ], + ], + [ + ValidationResult::createError([ + t("'test_module1' module (provided by <code>drupal/test_module1</code>)"), + t("'test_theme' theme (provided by <code>drupal/test_theme</code>)"), + ], t('The update cannot proceed because the following enabled Drupal extensions were removed during the update.')), + ], + ], + 'profile' => [ + [ + [ + 'name' => 'drupal/test_profile', + 'version' => '1.3.1', + 'type' => 'drupal-profile', + ], + ], + [ + ValidationResult::createError([t("'test_profile' profile (provided by <code>drupal/test_profile</code>)")], $summary), + ], + ], + 'theme' => [ + [ + [ + 'name' => 'drupal/test_theme', + 'version' => '1.3.1', + 'type' => 'drupal-theme', + ], + ], + [ + ValidationResult::createError([t("'test_theme' theme (provided by <code>drupal/test_theme</code>)")], $summary), + ], + ], + ]; + } + + /** + * Tests that error is raised if Drupal modules, profiles or themes are removed. + * + * @param array $packages + * Packages that will be added to the active directory, and removed from the + * stage directory. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerExtensionRemoved + */ + public function testExtensionRemoved(array $packages, array $expected_results): void { + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + $this->installComposerInstallers($project_root); + + $active_manipulator = new ActiveFixtureManipulator(); + $stage_manipulator = $this->getStageFixtureManipulator(); + foreach ($packages as $package) { + $active_manipulator->addPackage($package, FALSE, TRUE); + $stage_manipulator->removePackage($package['name']); + } + $active_manipulator->commitChanges(); + + foreach ($packages as $package) { + $extension_name = str_replace('drupal/', '', $package['name']); + $extension = self::createExtension($project_root, $package['type'], $extension_name); + + if ($extension->getType() === 'theme') { + /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ + $theme_handler = $this->container->get('theme_handler'); + $theme_handler->addTheme($extension); + $this->assertArrayHasKey($extension_name, $theme_handler->listInfo()); + } + else { + /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ + $module_handler = $this->container->get('module_handler'); + $module_list = $module_handler->getModuleList(); + $module_list[$extension_name] = $extension; + $module_handler->setModuleList($module_list); + $this->assertArrayHasKey($extension_name, $module_handler->getModuleList()); + } + } + $this->assertResults($expected_results, PreApplyEvent::class); + } + + /** + * Returns a mocked extension object for a package. + * + * @param string $project_root + * The project root directory. + * @param string $package_type + * The package type (e.g., `drupal-module` or `drupal-theme`). + * @param string $extension_name + * The name of the extension. + * + * @return \Drupal\Core\Extension\Extension + * An extension object. + */ + private static function createExtension(string $project_root, string $package_type, string $extension_name): Extension { + $type = match ($package_type) { + 'drupal-theme' => 'theme', + 'drupal-profile' => 'profile', + default => 'module', + }; + $subdirectory = match ($type) { + 'theme' => 'themes', + 'profile' => 'profiles', + 'module' => 'modules', + }; + return new Extension($project_root, $type, "$subdirectory/contrib/$extension_name/$extension_name.info.yml"); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e9a3909bf9c583d688e68a909ecc586856688b8 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php @@ -0,0 +1,81 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\EnvironmentSupportValidator; + +/** + * @covers \Drupal\package_manager\Validator\EnvironmentSupportValidator + * @group package_manager + * @internal + */ +class EnvironmentSupportValidatorTest extends PackageManagerKernelTestBase { + + /** + * Tests handling of an invalid URL in the environment support variable. + */ + public function testInvalidUrl(): void { + putenv(EnvironmentSupportValidator::VARIABLE_NAME . '=broken/url.org'); + + $result = ValidationResult::createError([ + t('Package Manager is not supported by your environment.'), + ]); + foreach ([PreCreateEvent::class, StatusCheckEvent::class] as $event_class) { + $this->assertEventPropagationStopped($event_class, [$this->container->get(EnvironmentSupportValidator::class), 'validate']); + } + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests an invalid URL in the environment support variable during pre-apply. + */ + public function testInvalidUrlDuringPreApply(): void { + $this->addEventTestListener(function (): void { + putenv(EnvironmentSupportValidator::VARIABLE_NAME . '=broken/url.org'); + }); + + $result = ValidationResult::createError([ + t('Package Manager is not supported by your environment.'), + ]); + + $this->assertEventPropagationStopped(PreApplyEvent::class, [$this->container->get(EnvironmentSupportValidator::class), 'validate']); + $this->assertResults([$result], PreApplyEvent::class); + } + + /** + * Tests that the validation message links to the provided URL. + */ + public function testValidUrl(): void { + $url = 'http://www.example.com'; + putenv(EnvironmentSupportValidator::VARIABLE_NAME . '=' . $url); + + $result = ValidationResult::createError([ + t('<a href=":url">Package Manager is not supported by your environment.</a>', [':url' => $url]), + ]); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests that the validation message links to the provided URL during pre-apply. + */ + public function testValidUrlDuringPreApply(): void { + $url = 'http://www.example.com'; + $this->addEventTestListener(function () use ($url): void { + putenv(EnvironmentSupportValidator::VARIABLE_NAME . '=' . $url); + }); + + $result = ValidationResult::createError([ + t('<a href=":url">Package Manager is not supported by your environment.</a>', [':url' => $url]), + ]); + $this->assertResults([$result], PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/FailureMarkerTest.php b/core/modules/package_manager/tests/src/Kernel/FailureMarkerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a41de4a9220019324b5ea73750a5ccd78232594b --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/FailureMarkerTest.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Exception\StageFailureMarkerException; +use Drupal\package_manager\FailureMarker; +use Drupal\package_manager\PathLocator; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; + +/** + * @coversDefaultClass \Drupal\package_manager\FailureMarker + * @group package_manager + * @internal + */ +class FailureMarkerTest extends PackageManagerKernelTestBase { + + /** + * @covers ::getMessage + * @testWith [true] + * [false] + */ + public function testGetMessageWithoutThrowable(bool $include_backtrace): void { + $failure_marker = $this->container->get(FailureMarker::class); + $failure_marker->write($this->createStage(), t('Disastrous catastrophe!')); + + $this->assertMatchesRegularExpression('/^Disastrous catastrophe!$/', $failure_marker->getMessage($include_backtrace)); + } + + /** + * @covers ::getMessage + * @testWith [true] + * [false] + */ + public function testGetMessageWithThrowable(bool $include_backtrace): void { + $failure_marker = $this->container->get(FailureMarker::class); + $failure_marker->write($this->createStage(), t('Disastrous catastrophe!'), new \Exception('Witchcraft!')); + + $expected_pattern = $include_backtrace + ? <<<REGEXP +/^Disastrous catastrophe! Caused by Exception, with this message: Witchcraft! +Backtrace: +#0 .*FailureMarkerTest->testGetMessageWithThrowable\(true\) +#1 .* +#2 .* +#3 .*/ +REGEXP + : '/^Disastrous catastrophe! Caused by Exception, with this message: Witchcraft!$/'; + $this->assertMatchesRegularExpression( + $expected_pattern, + $failure_marker->getMessage($include_backtrace) + ); + } + + /** + * Tests that an exception is thrown if the marker file contains invalid YAML. + * + * @covers ::assertNotExists + */ + public function testExceptionForInvalidYaml(): void { + $failure_marker = $this->container->get(FailureMarker::class); + // Write the failure marker with invalid YAML. + file_put_contents($failure_marker->getPath(), 'message : something message : something1'); + + $this->expectException(StageFailureMarkerException::class); + $this->expectExceptionMessage('Failure marker file exists but cannot be decoded.'); + $failure_marker->assertNotExists(); + } + + /** + * Tests that the failure marker can contain an exception message. + * + * @covers ::assertNotExists + */ + public function testAssertNotExists(): void { + $failure_marker = $this->container->get(FailureMarker::class); + $failure_marker->write($this->createStage(), t('Something wicked occurred here.'), new \Exception('Witchcraft!')); + + $this->expectException(StageFailureMarkerException::class); + $this->expectExceptionMessageMatches('/^Something wicked occurred here. Caused by Exception, with this message: Witchcraft!\nBacktrace:\n#0 .*/'); + $failure_marker->assertNotExists(); + } + + /** + * @covers ::getSubscribedEvents + * @covers ::excludeMarkerFile + */ + public function testMarkerFileIsExcluded(): void { + $event = new CollectPathsToExcludeEvent( + $this->createStage(), + $this->container->get(PathLocator::class), + $this->container->get(PathFactoryInterface::class), + ); + $this->container->get('event_dispatcher')->dispatch($event); + $this->assertContains('PACKAGE_MANAGER_FAILURE.yml', $event->getAll()); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php b/core/modules/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7ed43228bbd41581bf1a55ff74a8e536dad7265 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php @@ -0,0 +1,161 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\PathLocator; +use Symfony\Component\Process\Process; + +/** + * Test that the 'fake-site' fixture is a valid starting point. + * + * @group package_manager + * @internal + */ +class FakeSiteFixtureTest extends PackageManagerKernelTestBase { + + /** + * Tests the complete stage life cycle using the 'fake-site' fixture. + */ + public function testLifeCycle(): void { + $this->assertStatusCheckResults([]); + $this->assertResults([]); + // Ensure there are no validation errors after the stage lifecycle has been + // completed. + $this->assertStatusCheckResults([]); + } + + /** + * Tests calls to ComposerInspector class methods. + */ + public function testCallToComposerInspectorMethods(): void { + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + $list = $inspector->getInstalledPackagesList($active_dir); + $this->assertNull($list->getPackageByDrupalProjectName('any_random_name')); + $this->assertFalse(isset($list['drupal/any_random_name'])); + } + + /** + * Tests if `setVersion` can be called on all packages in the fixture. + * + * @see \Drupal\fixture_manipulator\FixtureManipulator::setVersion() + */ + public function testCallToSetVersion(): void { + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + $installed_packages = $inspector->getInstalledPackagesList($active_dir); + foreach (self::getExpectedFakeSitePackages() as $package_name) { + $this->assertArrayHasKey($package_name, $installed_packages); + $this->assertSame($installed_packages[$package_name]->version, '9.8.0'); + (new ActiveFixtureManipulator()) + ->setVersion($package_name, '11.1.0') + ->commitChanges(); + $list = $inspector->getInstalledPackagesList($active_dir); + $this->assertSame($list[$package_name]?->version, '11.1.0'); + } + } + + /** + * Tests if `removePackage` can be called on all packages in the fixture. + * + * @covers \Drupal\fixture_manipulator\FixtureManipulator::removePackage + */ + public function testCallToRemovePackage(): void { + /** @var \Drupal\package_manager\ComposerInspector $inspector */ + $inspector = $this->container->get(ComposerInspector::class); + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + $expected_packages = self::getExpectedFakeSitePackages(); + $actual_packages = array_keys($inspector->getInstalledPackagesList($active_dir)->getArrayCopy()); + sort($actual_packages); + $this->assertSame($expected_packages, $actual_packages); + foreach (self::getExpectedFakeSitePackages() as $package_name) { + (new ActiveFixtureManipulator()) + ->removePackage($package_name, $package_name === 'drupal/core-dev') + ->commitChanges(); + array_shift($expected_packages); + $actual_package_names = array_keys($inspector->getInstalledPackagesList($active_dir)->getArrayCopy()); + sort($actual_package_names); + $this->assertSame($expected_packages, $actual_package_names); + } + + } + + /** + * Checks that the expected packages are installed in the fake site fixture. + */ + public function testExpectedPackages(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $installed_packages = $this->container->get(ComposerInspector::class) + ->getInstalledPackagesList($project_root) + ->getArrayCopy(); + ksort($installed_packages); + $this->assertSame($this->getExpectedFakeSitePackages(), array_keys($installed_packages)); + } + + /** + * Gets the expected packages in the `fake_site` fixture. + * + * @return string[] + * The package names. + */ + private static function getExpectedFakeSitePackages(): array { + $packages = [ + 'drupal/core', + 'drupal/core-recommended', + 'drupal/core-dev', + ]; + sort($packages); + return $packages; + } + + /** + * Tests that Composer show command can be used on the fixture. + */ + public function testComposerShow(): void { + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + (new ActiveFixtureManipulator()) + ->addPackage([ + 'type' => 'package', + 'version' => '1.2.3', + 'name' => 'any-org/any-package', + ]) + ->commitChanges(); + $process = new Process(['composer', 'show', '--format=json'], $active_dir); + $process->run(); + if ($error = $process->getErrorOutput()) { + $this->fail('Process error: ' . $error); + } + $output = json_decode($process->getOutput(), TRUE); + $package_names = array_map(fn (array $package) => $package['name'], $output['installed']); + $this->assertTrue(asort($package_names)); + $this->assertSame(['any-org/any-package', 'drupal/core', 'drupal/core-dev', 'drupal/core-recommended'], $package_names); + $list = $this->container->get(ComposerInspector::class)->getInstalledPackagesList($active_dir); + $list_packages_names = array_keys($list->getArrayCopy()); + $this->assertSame(['any-org/any-package', 'drupal/core', 'drupal/core-dev', 'drupal/core-recommended'], $list_packages_names); + } + + /** + * Tests that the fixture passes `composer validate`. + */ + public function testComposerValidate(): void { + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + $process = new Process([ + 'composer', + 'validate', + '--check-lock', + '--with-dependencies', + '--no-interaction', + '--ansi', + '--no-cache', + ], $active_dir); + $process->mustRun(); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/FixtureManipulatorTest.php b/core/modules/package_manager/tests/src/Kernel/FixtureManipulatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..566201f9135ac35b0cc2e8143be22c6a6f6f362f --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/FixtureManipulatorTest.php @@ -0,0 +1,280 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\fixture_manipulator\FixtureManipulator; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\InstalledPackagesList; +use Drupal\Tests\package_manager\Traits\InstalledPackagesListTrait; +use Drupal\package_manager\PathLocator; + +/** + * @coversDefaultClass \Drupal\fixture_manipulator\FixtureManipulator + * + * @group package_manager + */ +class FixtureManipulatorTest extends PackageManagerKernelTestBase { + + use InstalledPackagesListTrait; + + /** + * The root directory of the test project. + * + * @var string + */ + private string $dir; + + /** + * The exception expected in ::tearDown() of this test. + * + * @var \Exception + */ + private \Exception $expectedTearDownException; + + /** + * The Composer inspector service. + * + * @var \Drupal\package_manager\ComposerInspector + */ + private ComposerInspector $inspector; + + /** + * The original fixture package list at the start of the test. + * + * @var \Drupal\package_manager\InstalledPackagesList + */ + private InstalledPackagesList $originalFixturePackages; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + $this->dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + $this->inspector = $this->container->get(ComposerInspector::class); + + $manipulator = new ActiveFixtureManipulator(); + $manipulator + ->addPackage([ + 'name' => 'my/package', + 'type' => 'library', + 'version' => '1.2.3', + ]) + ->addPackage( + [ + 'name' => 'my/dev-package', + 'version' => '2.1.0', + 'type' => 'library', + ], + TRUE + ) + ->commitChanges(); + $this->originalFixturePackages = $this->inspector->getInstalledPackagesList($this->dir); + } + + /** + * @covers ::addPackage + */ + public function testAddPackage(): void { + // Packages cannot be added without a name. + foreach (['name', 'type'] as $require_key) { + // Make a package that is missing the required key. + $package = array_diff_key( + [ + 'name' => 'Any old name', + 'type' => 'Any old type', + ], + [$require_key => ''] + ); + try { + $manipulator = new ActiveFixtureManipulator(); + $manipulator->addPackage($package) + ->commitChanges(); + $this->fail("Adding a package without the '$require_key' should raise an error."); + } + catch (\UnexpectedValueException $e) { + $this->assertSame("The '$require_key' is required when calling ::addPackage().", $e->getMessage()); + } + } + + // We should get a helpful error if the name is not a valid package name. + try { + $manipulator = new ActiveFixtureManipulator(); + $manipulator->addPackage([ + 'name' => 'my_drupal_module', + 'type' => 'drupal-module', + ]) + ->commitChanges(); + $this->fail('Trying to add a package with an invalid name should raise an error.'); + } + catch (\UnexpectedValueException $e) { + $this->assertSame("'my_drupal_module' is not a valid package name.", $e->getMessage()); + } + + // We should not be able to add an existing package. + try { + $manipulator = new ActiveFixtureManipulator(); + $manipulator->addPackage([ + 'name' => 'my/package', + 'type' => 'library', + ]) + ->commitChanges(); + $this->fail('Trying to add an existing package should raise an error.'); + } + catch (\LogicException $e) { + $this->assertStringContainsString("Expected package 'my/package' to not be installed, but it was.", $e->getMessage()); + } + // Ensure that none of the failed calls to ::addPackage() changed the installed + // packages. + $this->assertPackageListsEqual($this->originalFixturePackages, $this->inspector->getInstalledPackagesList($this->dir)); + $root_info = $this->inspector->getRootPackageInfo($this->dir); + $this->assertSame( + ['drupal/core-dev', 'my/dev-package'], + array_keys($root_info['devRequires']) + ); + } + + /** + * @covers ::modifyPackageConfig + */ + public function testModifyPackageConfig(): void { + // Assert ::modifyPackage() works with a package in an existing fixture not + // created by ::addPackage(). + $decode_packages_json = function (): array { + return json_decode(file_get_contents($this->dir . "/packages.json"), TRUE, flags: JSON_THROW_ON_ERROR); + }; + $original_packages_json = $decode_packages_json(); + (new ActiveFixtureManipulator()) + // @see ::setUp() + ->modifyPackageConfig('my/dev-package', '2.1.0', ['description' => 'something else'], TRUE) + ->commitChanges(); + // Verify that the package is indeed properly installed. + $this->assertSame('2.1.0', $this->inspector->getInstalledPackagesList($this->dir)['my/dev-package']?->version); + // Verify that the original exists, but has no description. + $this->assertSame('my/dev-package', $original_packages_json['packages']['my/dev-package']['2.1.0']['name']); + $this->assertArrayNotHasKey('description', $original_packages_json); + // Verify that the description was updated. + $this->assertSame('something else', $decode_packages_json()['packages']['my/dev-package']['2.1.0']['description']); + + (new ActiveFixtureManipulator()) + // Add a key to an existing package. + ->modifyPackageConfig('my/package', '1.2.3', ['extra' => ['foo' => 'bar']]) + // Change a key in an existing package. + ->setVersion('my/dev-package', '3.2.1', TRUE) + ->commitChanges(); + $this->assertSame(['foo' => 'bar'], $decode_packages_json()['packages']['my/package']['1.2.3']['extra']); + $this->assertSame('3.2.1', $this->inspector->getInstalledPackagesList($this->dir)['my/dev-package']?->version); + } + + /** + * @covers ::removePackage + */ + public function testRemovePackage(): void { + // We should not be able to remove a package that's not installed. + try { + (new ActiveFixtureManipulator()) + ->removePackage('junk/drawer') + ->commitChanges(); + $this->fail('Removing a non-existent package should raise an error.'); + } + catch (\LogicException $e) { + $this->assertStringContainsString('junk/drawer is not required in your composer.json and has not been remove', $e->getMessage()); + } + + // Remove the 2 packages that were added in ::setUp(). + (new ActiveFixtureManipulator()) + ->removePackage('my/package') + ->removePackage('my/dev-package', TRUE) + ->commitChanges(); + $expected_packages = $this->originalFixturePackages->getArrayCopy(); + unset($expected_packages['my/package'], $expected_packages['my/dev-package']); + $expected_list = new InstalledPackagesList($expected_packages); + $this->assertPackageListsEqual($expected_list, $this->inspector->getInstalledPackagesList($this->dir)); + $root_info = $this->inspector->getRootPackageInfo($this->dir); + $this->assertSame( + ['drupal/core-dev'], + array_keys($root_info['devRequires']) + ); + } + + /** + * Test that an exception is thrown if ::commitChanges() is not called. + */ + public function testActiveManipulatorNoCommitError(): void { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('commitChanges() must be called.'); + (new ActiveFixtureManipulator()) + ->setVersion('drupal/core', '1.2.3'); + } + + /** + * @covers ::addDotGitFolder + */ + public function testAddDotGitFolder(): void { + $path_locator = $this->container->get(PathLocator::class); + $project_root = $path_locator->getProjectRoot(); + $this->assertFalse(is_dir($project_root . "/relative/path/.git")); + // We should not be able to add a git folder to a non-existing directory. + try { + (new FixtureManipulator()) + ->addDotGitFolder($project_root . "/relative/path") + ->commitChanges($project_root); + $this->fail('Trying to create a .git directory that already exists should raise an error.'); + } + catch (\LogicException $e) { + $this->assertSame('No directory exists at ' . $project_root . '/relative/path.', $e->getMessage()); + } + mkdir($project_root . "/relative/path", 0777, TRUE); + $fixture_manipulator = (new FixtureManipulator()) + ->addPackage([ + 'name' => 'relative/project_path', + 'type' => 'drupal-module', + ]) + ->addDotGitFolder($path_locator->getVendorDirectory() . "/relative/project_path") + ->addDotGitFolder($project_root . "/relative/path"); + $this->assertTrue(!is_dir($project_root . "/relative/project_path/.git")); + $fixture_manipulator->commitChanges($project_root); + $this->assertTrue(is_dir($project_root . "/relative/path/.git")); + // We should not be able to create already existing directory. + try { + (new FixtureManipulator()) + ->addDotGitFolder($project_root . "/relative/path") + ->commitChanges($project_root); + $this->fail('Trying to create a .git directory that already exists should raise an error.'); + } + catch (\LogicException $e) { + $this->assertStringContainsString("A .git directory already exists at " . $project_root, $e->getMessage()); + } + } + + /** + * Tests that the stage manipulator throws an exception if not committed. + */ + public function testStagedFixtureNotCommitted(): void { + $this->expectedTearDownException = new \LogicException('The StageFixtureManipulator has arguments that were not cleared. This likely means that the PostCreateEvent was never fired.'); + $this->getStageFixtureManipulator()->setVersion('any-org/any-package', '3.2.1'); + } + + /** + * {@inheritdoc} + * + * @todo Remove the line below when https://github.com/phpstan/phpstan-phpunit/issues/187 is fixed. + * @phpstan-ignore-next-line + */ + protected function tearDown(): void { + try { + parent::tearDown(); + } + catch (\Exception $exception) { + if (!(get_class($exception) === get_class($this->expectedTearDownException) && $exception->getMessage() === $this->expectedTearDownException->getMessage())) { + throw $exception; + } + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/InstalledPackagesListTest.php b/core/modules/package_manager/tests/src/Kernel/InstalledPackagesListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d0fb6b37827a3da583851cc4390ec423a6a270c2 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/InstalledPackagesListTest.php @@ -0,0 +1,170 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Component\Serialization\Yaml; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\InstalledPackage; +use Drupal\package_manager\InstalledPackagesList; +use Drupal\package_manager\PathLocator; + +/** + * @coversDefaultClass \Drupal\package_manager\InstalledPackagesList + * + * @group package_manager + */ +class InstalledPackagesListTest extends PackageManagerKernelTestBase { + + /** + * @covers \Drupal\package_manager\InstalledPackage::getProjectName + * @covers ::getPackageByDrupalProjectName + */ + public function testPackageByDrupalProjectName(): void { + // In getPackageByDrupalProjectName(), we don't expect that projects will be + // in the "correct" places -- for example, we don't assume that modules will + // be in the `modules` directory, or themes will be the `themes` directory. + // So, in this test, we ensure that flexibility works by just throwing all + // the projects into a single `projects` directory. + $projects_path = $this->container->get(PathLocator::class) + ->getProjectRoot() . '/projects'; + + // The project name does not match the package name, and the project + // physically exists. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/theme_project') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/a_package' => InstalledPackage::createFromArray([ + 'name' => 'drupal/a_package', + 'version' => '1.0.0', + 'type' => 'drupal-theme', + 'path' => $projects_path . '/theme_project', + ]), + ]); + $this->assertSame($list['drupal/a_package'], $list->getPackageByDrupalProjectName('theme_project')); + + // The project physically exists, but the package path points to the wrong + // place. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/example3') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/example3' => InstalledPackage::createFromArray([ + 'name' => 'drupal/example3', + 'version' => '1.0.0', + 'type' => 'drupal-module', + // This path exists, but it doesn't contain the `example3` project. + 'path' => $projects_path . '/theme_project', + ]), + ]); + $this->assertNull($list->getPackageByDrupalProjectName('example3')); + + // The project does not physically exist, which means it must be a metapackage. + $list = new InstalledPackagesList([ + 'drupal/missing' => InstalledPackage::createFromArray([ + 'name' => 'drupal/missing', + 'version' => '1.0.0', + 'type' => 'metapackage', + 'path' => NULL, + ]), + ]); + $this->assertNull($list->getPackageByDrupalProjectName('missing')); + + // The project physically exists in a subdirectory of the package. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/grab_bag/modules/module_in_subdirectory') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/grab_bag' => InstalledPackage::createFromArray([ + 'name' => 'drupal/grab_bag', + 'version' => '1.0.0', + 'type' => 'drupal-profile', + 'path' => $projects_path . '/grab_bag', + ]), + ]); + $this->assertSame($list['drupal/grab_bag'], $list->getPackageByDrupalProjectName('module_in_subdirectory')); + + // The package name matches a project that physically exists, but the + // package vendor is not `drupal`. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/not_from_drupal') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'vendor/not_from_drupal' => InstalledPackage::createFromArray([ + 'name' => 'vendor/not_from_drupal', + 'version' => '1.0.0', + 'type' => 'drupal-module', + 'path' => $projects_path . '/not_from_drupal', + ]), + ]); + $this->assertNull($list->getPackageByDrupalProjectName('not_from_drupal')); + + // These package names match physically existing projects, and they are + // from the `drupal` vendor, but they're not supported package types. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/custom_module') + ->addProjectAtPath('projects/custom_theme') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/custom_module' => InstalledPackage::createFromArray([ + 'name' => 'drupal/custom_module', + 'version' => '1.0.0', + 'type' => 'drupal-custom-module', + 'path' => $projects_path . '/custom_module', + ]), + 'drupal/custom_theme' => InstalledPackage::createFromArray([ + 'name' => 'drupal/custom_theme', + 'version' => '1.0.0', + 'type' => 'drupal-custom-theme', + 'path' => $projects_path . '/custom_theme', + ]), + ]); + $this->assertNull($list->getPackageByDrupalProjectName('custom_module')); + $this->assertNull($list->getPackageByDrupalProjectName('custom_theme')); + + // The `project` key has been removed from the info file. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/no_project_key') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/no_project_key' => InstalledPackage::createFromArray([ + 'name' => 'drupal/no_project_key', + 'version' => '1.0.0', + 'type' => 'drupal-module', + 'path' => $projects_path . '/no_project_key', + ]), + ]); + $info_file = $list['drupal/no_project_key']->path . '/no_project_key.info.yml'; + $this->assertFileIsWritable($info_file); + $info = Yaml::decode(file_get_contents($info_file)); + unset($info['project']); + file_put_contents($info_file, Yaml::encode($info)); + $this->assertNull($list->getPackageByDrupalProjectName('no_project_key')); + + // The project name is repeated. + (new ActiveFixtureManipulator()) + ->addProjectAtPath('projects/duplicate_project') + ->addProjectAtPath('projects/repeat/duplicate_project') + ->commitChanges(); + $list = new InstalledPackagesList([ + 'drupal/test_project1' => InstalledPackage::createFromArray([ + 'name' => 'drupal/test_project1', + 'version' => '1.0.0', + 'type' => 'drupal-module', + 'path' => $projects_path . '/duplicate_project', + ]), + 'drupal/test_project2' => InstalledPackage::createFromArray([ + 'name' => 'drupal/test_project2', + 'version' => '1.0.0', + 'type' => 'drupal-module', + 'path' => $projects_path . '/repeat/duplicate_project', + ]), + ]); + $this->expectException(\UnexpectedValueException::class); + $this->expectExceptionMessage("Project 'duplicate_project' was found in packages 'drupal/test_project1' and 'drupal/test_project2'."); + $list->getPackageByDrupalProjectName('duplicate_project'); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/LockFileValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/LockFileValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bcd32f639dfbd3587080a0a4158b34781aa34421 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/LockFileValidatorTest.php @@ -0,0 +1,217 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Exception\StageException; +use Drupal\package_manager\InstalledPackagesList; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\Validator\LockFileValidator; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager_bypass\NoOpStager; +use Prophecy\Argument; + +/** + * @coversDefaultClass \Drupal\package_manager\Validator\LockFileValidator + * @group package_manager + * @internal + */ +class LockFileValidatorTest extends PackageManagerKernelTestBase { + + /** + * The path of the active directory in the test project. + * + * @var string + */ + private $activeDir; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->activeDir = $this->container->get(PathLocator::class) + ->getProjectRoot(); + } + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + // Temporarily mock the Composer inspector to prevent it from complaining + // over the lack of a lock file if it's invoked by other validators. + $inspector = $this->prophesize(ComposerInspector::class); + $arguments = Argument::cetera(); + $inspector->getConfig('allow-plugins', $arguments)->willReturn('[]'); + $inspector->getConfig('secure-http', $arguments)->willReturn('true'); + $inspector->getConfig('disable-tls', $arguments)->willReturn('false'); + $inspector->getConfig('extra', $arguments)->willReturn('{}'); + $inspector->getConfig('minimum-stability', $arguments)->willReturn('stable'); + $inspector->getInstalledPackagesList($arguments)->willReturn(new InstalledPackagesList()); + $inspector->getAllowPluginsConfig($arguments)->willReturn([]); + $inspector->validate($arguments); + $inspector->getRootPackageInfo($arguments)->willReturn([]); + $container->set(ComposerInspector::class, $inspector->reveal()); + } + + /** + * Tests that if no active lock file exists, a stage cannot be created. + * + * @covers ::storeHash + */ + public function testCreateWithNoLock(): void { + unlink($this->activeDir . '/composer.lock'); + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + $lock_file_path = $project_root . DIRECTORY_SEPARATOR . 'composer.lock'; + $no_lock = ValidationResult::createError([ + t('The active lock file (@file) does not exist.', ['@file' => $lock_file_path]), + ]); + $stage = $this->assertResults([$no_lock], PreCreateEvent::class); + // The stage was not created successfully, so the status check should be + // clear. + $this->assertStatusCheckResults([], $stage); + } + + /** + * Tests that if an active lock file exists, a stage can be created. + * + * @covers ::storeHash + * @covers ::deleteHash + */ + public function testCreateWithLock(): void { + $this->assertResults([]); + + // Change the lock file to ensure the stored hash of the previous version + // has been deleted. + file_put_contents($this->activeDir . '/composer.lock', '{"changed": true}'); + $this->assertResults([]); + } + + /** + * Tests validation when the lock file has changed. + * + * @dataProvider providerValidateStageEvents + */ + public function testLockFileChanged(string $event_class): void { + // Add a listener with an extremely high priority to the same event that + // should raise the validation error. Because the validator uses the default + // priority of 0, this listener changes lock file before the validator + // runs. + $this->addEventTestListener(function () { + $lock = json_decode(file_get_contents($this->activeDir . '/composer.lock'), TRUE, flags: JSON_THROW_ON_ERROR); + $lock['extra']['key'] = 'value'; + file_put_contents($this->activeDir . '/composer.lock', json_encode($lock, JSON_THROW_ON_ERROR)); + }, $event_class); + $result = ValidationResult::createError([ + t('Unexpected changes were detected in the active lock file (@file), which indicates that other Composer operations were performed since this Package Manager operation started. This can put the code base into an unreliable state and therefore is not allowed.', + ['@file' => $this->activeDir . '/composer.lock']), + ], t('Problem detected in lock file during stage operations.')); + $stage = $this->assertResults([$result], $event_class); + // A status check should agree that there is an error here. + $this->assertStatusCheckResults([$result], $stage); + } + + /** + * Tests validation when the lock file is deleted. + * + * @dataProvider providerValidateStageEvents + */ + public function testLockFileDeleted(string $event_class): void { + // Add a listener with an extremely high priority to the same event that + // should raise the validation error. Because the validator uses the default + // priority of 0, this listener deletes lock file before the validator + // runs. + $this->addEventTestListener(function () { + unlink($this->activeDir . '/composer.lock'); + }, $event_class); + $result = ValidationResult::createError([ + t('The active lock file (@file) does not exist.', [ + '@file' => $this->activeDir . '/composer.lock', + ]), + ], t('Problem detected in lock file during stage operations.')); + $stage = $this->assertResults([$result], $event_class); + // A status check should agree that there is an error here. + $this->assertStatusCheckResults([$result], $stage); + } + + /** + * Tests exception when a stored hash of the active lock file is unavailable. + * + * @dataProvider providerValidateStageEvents + */ + public function testNoStoredHash(string $event_class): void { + $reflector = new \ReflectionClassConstant(LockFileValidator::class, 'KEY'); + $key = $reflector->getValue(); + + // Add a listener with an extremely high priority to the same event that + // should throw an exception. Because the validator uses the default + // priority of 0, this listener deletes stored hash before the validator + // runs. + $this->addEventTestListener(function () use ($key) { + $this->container->get('keyvalue') + ->get('package_manager') + ->delete($key); + }, $event_class); + + $stage = $this->createStage(); + $stage->create(); + try { + $stage->require(['drupal/core:9.8.1']); + $stage->apply(); + } + catch (StageException $e) { + $this->assertSame(\LogicException::class, $e->getPrevious()::class); + $this->assertSame('Stored hash key deleted.', $e->getMessage()); + } + } + + /** + * Tests validation when the staged and active lock files are identical. + */ + public function testApplyWithNoChange(): void { + // Leave the staged lock file alone. + NoOpStager::setLockFileShouldChange(FALSE); + + $result = ValidationResult::createError([ + t('There appear to be no pending Composer operations because the active lock file (<PROJECT_ROOT>/composer.lock) and the staged lock file (<STAGE_DIR>/composer.lock) are identical.'), + ], t('Problem detected in lock file during stage operations.')); + $stage = $this->assertResults([$result], PreApplyEvent::class); + // A status check shouldn't produce raise any errors, because it's only + // during pre-apply that we care if there are any pending Composer + // operations. + $this->assertStatusCheckResults([], $stage); + } + + /** + * Tests StatusCheckEvent when the stage is available. + */ + public function testStatusCheckAvailableStage():void { + $this->assertStatusCheckResults([]); + } + + /** + * Data provider for test methods that validate the stage directory. + * + * @return string[][] + * The test cases. + */ + public static function providerValidateStageEvents(): array { + return [ + 'pre-require' => [ + PreRequireEvent::class, + ], + 'pre-apply' => [ + PreApplyEvent::class, + ], + ]; + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/MultisiteValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/MultisiteValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24084014126de6b2359b7edd4475d20b645796ed --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/MultisiteValidatorTest.php @@ -0,0 +1,107 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\MultisiteValidator + * @group package_manager + * @internal + */ +class MultisiteValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testMultisite(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerMultisite(): array { + return [ + 'sites.php present and listing multiple sites' => [ + <<<'PHP' +<?php +// Site 1: the main site. +$sites['example.com'] = 'default'; +// Site 2: the shop. +$sites['shop.example.com'] = 'shop'; +PHP, + [ + ValidationResult::createError([ + t('Drupal multisite is not supported by Package Manager.'), + ]), + ], + ], + 'sites.php present and listing single site' => [ + <<<'PHP' +<?php +// Site 1: the main site. +$sites['example.com'] = 'default'; +PHP, + [], + ], + 'sites.php present and listing multiple aliases for a single site' => [ + <<<'PHP' +<?php +// Site 1: the main site. +$sites['example.com'] = 'example'; +// Alias for site 1! +$sites['example.dev'] = 'example'; +PHP, + [], + ], + 'sites.php absent' => [ + NULL, + [], + ], + ]; + } + + /** + * Tests that Package Manager flags an error if run in a multisite. + * + * @param string|null $sites_php + * The sites.php contents to write, if any. If NULL, no sites.php will be + * created. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerMultisite + */ + public function testMultisite(?string $sites_php, array $expected_results = []): void { + if ($sites_php) { + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + file_put_contents($project_root . '/sites/sites.php', $sites_php); + } + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests that an error is flagged if run in a multisite during pre-apply. + * + * @param string|null $sites_php + * The sites.php contents to write, if any. If NULL, no sites.php will be + * created. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerMultisite + */ + public function testMultisiteDuringPreApply(?string $sites_php, array $expected_results = []): void { + $this->addEventTestListener(function () use ($sites_php): void { + if ($sites_php) { + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + file_put_contents($project_root . '/sites/sites.php', $sites_php); + } + }); + $this->assertResults($expected_results, PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..93360a5c50065f334fd885b12973629d80b551c5 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php @@ -0,0 +1,159 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\ComposerInspector; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\SupportedReleaseValidator; +use Drupal\Tests\package_manager\Traits\ComposerInstallersTrait; + +/** + * @covers \Drupal\package_manager\Validator\OverwriteExistingPackagesValidator + * @group package_manager + * @internal + */ +class OverwriteExistingPackagesValidatorTest extends PackageManagerKernelTestBase { + + use ComposerInstallersTrait; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + // In this test, we don't care whether the updated projects are secure and + // supported. + $this->disableValidators[] = SupportedReleaseValidator::class; + parent::setUp(); + + $this->installComposerInstallers($this->container->get(PathLocator::class)->getProjectRoot()); + } + + /** + * Tests that new installed packages overwrite existing directories. + * + * The fixture simulates a scenario where the active directory has four + * modules installed: module_1, module_2, module_5 and module_6. None of them + * are managed by Composer. These modules will be moved into the stage + * directory by the 'package_manager_bypass' module. + */ + public function testNewPackagesOverwriteExisting(): void { + (new ActiveFixtureManipulator()) + ->addProjectAtPath('modules/module_1') + ->addProjectAtPath('modules/module_2') + ->addProjectAtPath('modules/module_5') + ->addProjectAtPath('modules/module_6') + ->commitChanges(); + $stage_manipulator = $this->getStageFixtureManipulator(); + + $installer_paths = []; + // module_1 and module_2 will raise errors because they would overwrite + // non-Composer managed paths in the active directory. + $stage_manipulator->addPackage( + [ + 'name' => 'drupal/other_module_1', + 'version' => '1.3.0', + 'type' => 'drupal-module', + ], + FALSE, + TRUE + ); + $installer_paths['modules/module_1'] = ['drupal/other_module_1']; + $stage_manipulator->addPackage( + [ + 'name' => 'drupal/other_module_2', + 'version' => '1.3.0', + 'type' => 'drupal-module', + ], + FALSE, + TRUE, + ); + $installer_paths['modules/module_2'] = ['drupal/other_module_2']; + + // module_3 will cause no problems, since it doesn't exist in the active + // directory at all. + $stage_manipulator->addPackage([ + 'name' => 'drupal/other_module_3', + 'version' => '1.3.0', + 'type' => 'drupal-module', + ], + FALSE, + TRUE, + ); + $installer_paths['modules/module_3'] = ['drupal/other_module_3']; + + // module_4 doesn't exist in the active directory but the 'install_path' as + // known to Composer in the staged directory collides with module_6 in the + // active directory which will cause an error. + $stage_manipulator->addPackage( + [ + 'name' => 'drupal/module_4', + 'version' => '1.3.0', + 'type' => 'drupal-module', + ], + FALSE, + TRUE + ); + $installer_paths['modules/module_6'] = ['drupal/module_4']; + + // module_5_different_path will not cause a problem, even though its package + // name is drupal/module_5, because its project name and path in the stage + // directory differ from the active directory. + $stage_manipulator->addPackage( + [ + 'name' => 'drupal/other_module_5', + 'version' => '1.3.0', + 'type' => 'drupal-module', + ], + FALSE, + TRUE + ); + $installer_paths['modules/module_5_different_path'] = ['drupal/other_module_5']; + + // Set the installer path config in the active directory this will be + // copied to the stage directory where we install the packages. + $this->setInstallerPaths($installer_paths, $this->container->get(PathLocator::class)->getProjectRoot()); + + // Add a package without an install_path set which will not raise an error. + // The most common example of this in the Drupal ecosystem is a submodule. + $stage_manipulator->addPackage( + [ + 'name' => 'drupal/sub-module', + 'version' => '1.3.0', + 'type' => 'metapackage', + ], + FALSE, + TRUE + ); + $inspector = $this->container->get(ComposerInspector::class); + $listener = function (PostCreateEvent $event) use ($inspector) { + $list = $inspector->getInstalledPackagesList($event->stage->getStageDirectory()); + $this->assertArrayHasKey('drupal/sub-module', $list->getArrayCopy()); + $this->assertArrayHasKey('drupal/other_module_1', $list->getArrayCopy()); + // Confirm that metapackage will have a NULL install path. + $this->assertNull($list['drupal/sub-module']->path); + // Confirm another package has specified install path. + $this->assertSame($list['drupal/other_module_1']->path, $event->stage->getStageDirectory() . '/modules/module_1'); + }; + $this->addEventTestListener($listener, PostCreateEvent::class); + + $expected_results = [ + ValidationResult::createError([ + t('The new package drupal/module_4 will be installed in the directory /modules/module_6, which already exists but is not managed by Composer.'), + ]), + ValidationResult::createError([ + t('The new package drupal/other_module_1 will be installed in the directory /modules/module_1, which already exists but is not managed by Composer.'), + ]), + ValidationResult::createError([ + t('The new package drupal/other_module_2 will be installed in the directory /modules/module_2, which already exists but is not managed by Composer.'), + ]), + ]; + $this->assertResults($expected_results, PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php b/core/modules/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php new file mode 100644 index 0000000000000000000000000000000000000000..ed7b5a7f377997e36f0fa339ec5683564c219f2c --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php @@ -0,0 +1,520 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use ColinODell\PsrTestLogger\TestLogger; +use Drupal\Component\FileSystem\FileSystem as DrupalFileSystem; +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\Core\Logger\RfcLogLevel; +use Drupal\Core\Queue\QueueFactory; +use Drupal\Core\Site\Settings; +use Drupal\fixture_manipulator\StageFixtureManipulator; +use Drupal\KernelTests\KernelTestBase; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\FailureMarker; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\StatusCheckTrait; +use Drupal\package_manager\Validator\DiskSpaceValidator; +use Drupal\package_manager\StageBase; +use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait; +use Drupal\Tests\package_manager\Traits\ComposerStagerTestTrait; +use Drupal\Tests\package_manager\Traits\FixtureManipulatorTrait; +use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait; +use Drupal\Tests\package_manager\Traits\ValidationTestTrait; +use GuzzleHttp\Client; +use GuzzleHttp\Handler\MockHandler; +use GuzzleHttp\HandlerStack; +use GuzzleHttp\Psr7\Response; +use GuzzleHttp\Psr7\Utils; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Psr\Http\Message\RequestInterface; +use Symfony\Component\Filesystem\Filesystem; + +/** + * Base class for kernel tests of Package Manager's functionality. + * + * @internal + */ +abstract class PackageManagerKernelTestBase extends KernelTestBase { + + use AssertPreconditionsTrait; + use ComposerStagerTestTrait; + use FixtureManipulatorTrait; + use FixtureUtilityTrait; + use StatusCheckTrait; + use ValidationTestTrait; + + /** + * The mocked HTTP client that returns metadata about available updates. + * + * We need to preserve this as a class property so that we can re-inject it + * into the container when a rebuild is triggered by module installation. + * + * @var \GuzzleHttp\Client + * + * @see ::register() + */ + private $client; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'fixture_manipulator', + 'package_manager', + 'package_manager_bypass', + 'system', + 'update', + 'update_test', + ]; + + /** + * The service IDs of any validators to disable. + * + * @var string[] + */ + protected $disableValidators = []; + + /** + * The test root directory, if any, created by ::createTestProject(). + * + * @var string|null + * + * @see ::createTestProject() + * @see ::tearDown() + */ + protected ?string $testProjectRoot = NULL; + + /** + * The Symfony filesystem class. + * + * @var \Symfony\Component\Filesystem\Filesystem + */ + private Filesystem $fileSystem; + + /** + * A logger that will fail the test if Package Manager logs any errors. + * + * @var \ColinODell\PsrTestLogger\TestLogger + * + * @see ::tearDown() + */ + protected TestLogger $failureLogger; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->installConfig('package_manager'); + + $this->fileSystem = new Filesystem(); + $this->createTestProject(); + + // The Update module's default configuration must be installed for our + // fake release metadata to be fetched, and the System module's to ensure + // the site has a name. + $this->installConfig(['system', 'update']); + + // Make the update system think that all of System's post-update functions + // have run. + $this->registerPostUpdateFunctions(); + + // Ensure we can fail the test if any warnings, or worse, are logged by + // Package Manager. + // @see ::tearDown() + $this->failureLogger = new TestLogger(); + $this->container->get('logger.channel.package_manager') + ->addLogger($this->failureLogger); + } + + /** + * {@inheritdoc} + */ + protected function enableModules(array $modules): void { + parent::enableModules($modules); + $this->registerPostUpdateFunctions(); + } + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + // If we previously set up a mock HTTP client in ::setReleaseMetadata(), + // re-inject it into the container. + if ($this->client) { + $container->set('http_client', $this->client); + } + + // When the test project is used, the disk space validator is replaced with + // a mock. When staged changes are applied, the container is rebuilt, which + // destroys the mocked service and can cause unexpected side effects. The + // 'persist' tag prevents the mock from being destroyed during a container + // rebuild. + // @see ::createTestProject() + $container->getDefinition(DiskSpaceValidator::class)->addTag('persist'); + + // Ensure that our failure logger will survive container rebuilds. + $container->getDefinition('logger.channel.package_manager') + ->addTag('persist'); + + array_walk($this->disableValidators, $container->removeDefinition(...)); + } + + /** + * Creates a stage object for testing purposes. + * + * @return \Drupal\Tests\package_manager\Kernel\TestStage + * A stage object, with test-only modifications. + */ + protected function createStage(): TestStage { + return new TestStage( + $this->container->get(PathLocator::class), + $this->container->get(BeginnerInterface::class), + $this->container->get(StagerInterface::class), + $this->container->get(CommitterInterface::class), + $this->container->get(QueueFactory::class), + $this->container->get('event_dispatcher'), + $this->container->get('tempstore.shared'), + $this->container->get('datetime.time'), + $this->container->get(PathFactoryInterface::class), + $this->container->get(FailureMarker::class) + ); + } + + /** + * Asserts validation results are returned from a stage life cycle event. + * + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * @param string|null $event_class + * (optional) The class of the event which should return the results. Must + * be passed if $expected_results is not empty. + * + * @return \Drupal\package_manager\StageBase + * The stage that was used to collect the validation results. + */ + protected function assertResults(array $expected_results, ?string $event_class = NULL): StageBase { + $stage = $this->createStage(); + + try { + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + $stage->apply(); + $stage->postApply(); + $stage->destroy(); + + // If we did not get an exception, ensure we didn't expect any results. + $this->assertValidationResultsEqual([], $expected_results); + } + catch (StageEventException $e) { + $this->assertNotEmpty($expected_results); + $this->assertInstanceOf($event_class, $e->event); + $this->assertExpectedResultsFromException($expected_results, $e); + } + return $stage; + } + + /** + * Asserts validation results are returned from the status check event. + * + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * @param \Drupal\Tests\package_manager\Kernel\TestStage|null $stage + * (optional) The test stage to use to create the status check event. If + * none is provided a new stage will be created. + */ + protected function assertStatusCheckResults(array $expected_results, ?StageBase $stage = NULL): void { + $actual_results = $this->runStatusCheck($stage ?? $this->createStage(), $this->container->get('event_dispatcher')); + $this->assertValidationResultsEqual($expected_results, $actual_results); + } + + /** + * Marks all pending post-update functions as completed. + * + * Since kernel tests don't normally install modules and register their + * updates, this method makes sure that we are testing from a clean, fully + * up-to-date state. + */ + protected function registerPostUpdateFunctions(): void { + static $updates = []; + $updates = array_merge($updates, $this->container->get('update.post_update_registry') + ->getPendingUpdateFunctions()); + + $this->container->get('keyvalue') + ->get('post_update') + ->set('existing_updates', $updates); + } + + /** + * Creates a test project. + * + * This will create a temporary uniques root directory and then creates two + * directories in it: + * 'active', which is the active directory containing a fake Drupal code base, + * and 'stage', which is the root directory used to stage changes. The path + * locator service will also be mocked so that it points to the test project. + * + * @param string|null $source_dir + * (optional) The path of a directory which should be copied into the + * test project and used as the active directory. + */ + protected function createTestProject(?string $source_dir = NULL): void { + static $called; + if (isset($called)) { + throw new \LogicException('Only one test project should be created per kernel test method!'); + } + else { + $called = TRUE; + } + + $this->testProjectRoot = DrupalFileSystem::getOsTemporaryDirectory() . DIRECTORY_SEPARATOR . 'package_manager_testing_root' . $this->databasePrefix; + if (is_dir($this->testProjectRoot)) { + $this->fileSystem->remove($this->testProjectRoot); + } + $this->fileSystem->mkdir($this->testProjectRoot); + + // Create the active directory and copy its contents from a fixture. + $active_dir = $this->testProjectRoot . DIRECTORY_SEPARATOR . 'active'; + $this->assertTrue(mkdir($active_dir)); + static::copyFixtureFilesTo($source_dir ?? __DIR__ . '/../../fixtures/fake_site', $active_dir); + + // Removing 'vfs://root/' from site path set in + // \Drupal\KernelTests\KernelTestBase::setUpFilesystem as we don't use vfs. + $test_site_path = str_replace('vfs://root/', '', $this->siteDirectory); + + // Copy directory structure from vfs site directory to our site directory. + $this->fileSystem->mirror($this->siteDirectory, $active_dir . DIRECTORY_SEPARATOR . $test_site_path); + + // Override siteDirectory to point to root/active/... instead of root/... . + $this->siteDirectory = $active_dir . DIRECTORY_SEPARATOR . $test_site_path; + + // Override KernelTestBase::setUpFilesystem's Settings object. + $settings = Settings::getInstance() ? Settings::getAll() : []; + $settings['file_public_path'] = $this->siteDirectory . '/files'; + $settings['config_sync_directory'] = $this->siteDirectory . '/files/config/sync'; + new Settings($settings); + + // Create a stage root directory alongside the active directory. + $staging_root = $this->testProjectRoot . DIRECTORY_SEPARATOR . 'stage'; + $this->assertTrue(mkdir($staging_root)); + + // Ensure the path locator points to the test project. We assume that is its + // own web root and the vendor directory is at its top level. + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + $path_locator->setPaths($active_dir, $active_dir . '/vendor', '', $staging_root); + + // This validator will persist through container rebuilds. + // @see ::register() + $validator = new TestDiskSpaceValidator($path_locator); + // By default, the validator should report that the root, vendor, and + // temporary directories have basically infinite free space. + $validator->freeSpace = [ + $path_locator->getProjectRoot() => PHP_INT_MAX, + $path_locator->getVendorDirectory() => PHP_INT_MAX, + $validator->temporaryDirectory() => PHP_INT_MAX, + ]; + $this->container->set(DiskSpaceValidator::class, $validator); + } + + /** + * Sets the current (running) version of core, as known to the Update module. + * + * @todo Remove this function with use of the trait from the Update module in + * https://drupal.org/i/3348234. + * + * @param string $version + * The current version of core. + */ + protected function setCoreVersion(string $version): void { + $this->config('update_test.settings') + ->set('system_info.#all.version', $version) + ->save(); + } + + /** + * Sets the release metadata file to use when fetching available updates. + * + * @param string[] $files + * The paths of the XML metadata files to use, keyed by project name. + */ + protected function setReleaseMetadata(array $files): void { + $responses = []; + + foreach ($files as $project => $file) { + $metadata = Utils::tryFopen($file, 'r'); + $responses["/release-history/$project/current"] = new Response(200, [], Utils::streamFor($metadata)); + } + $callable = function (RequestInterface $request) use ($responses): Response { + return $responses[$request->getUri()->getPath()] ?? new Response(404); + }; + + // The mock handler's queue consist of same callable as many times as the + // number of requests we expect to be made for update XML because it will + // retrieve one item off the queue for each request. + // @see \GuzzleHttp\Handler\MockHandler::__invoke() + $handler = new MockHandler(array_fill(0, 100, $callable)); + $this->client = new Client([ + 'handler' => HandlerStack::create($handler), + ]); + $this->container->set('http_client', $this->client); + } + + /** + * Adds an event listener on an event for testing purposes. + * + * @param callable $listener + * The listener to add. + * @param string $event_class + * (optional) The event to listen to. Defaults to PreApplyEvent. + * @param int $priority + * (optional) The priority. Defaults to PHP_INT_MAX. + */ + protected function addEventTestListener(callable $listener, string $event_class = PreApplyEvent::class, int $priority = PHP_INT_MAX): void { + $this->container->get('event_dispatcher') + ->addListener($event_class, $listener, $priority); + } + + /** + * Asserts event propagation is stopped by a certain event subscriber. + * + * @param string $event_class + * The event during which propagation is expected to stop. + * @param callable $expected_propagation_stopper + * The event subscriber (which subscribes to the given event class) which is + * expected to stop propagation. This event subscriber must have been + * registered by one of the installed Drupal module. + */ + protected function assertEventPropagationStopped(string $event_class, callable $expected_propagation_stopper): void { + $priority = $this->container->get('event_dispatcher')->getListenerPriority($event_class, $expected_propagation_stopper); + // Ensure the event subscriber was actually a listener for the event. + $this->assertIsInt($priority); + // Add a listener with a priority that is 1 less than priority of the + // event subscriber. This listener would be called after + // $expected_propagation_stopper if the event propagation was not stopped + // and cause the test to fail. + $this->addEventTestListener(function () use ($event_class): void { + $this->fail('Event propagation should have been stopped during ' . $event_class . '.'); + }, $event_class, $priority - 1); + } + + /** + * {@inheritdoc} + */ + protected function tearDown(): void { + // Delete the test project root, which contains the active directory and + // the stage directory. First, make it writable in case any permissions were + // changed during the test. + if ($this->testProjectRoot) { + $this->fileSystem->chmod($this->testProjectRoot, 0777, 0000, TRUE); + $this->fileSystem->remove($this->testProjectRoot); + } + + StageFixtureManipulator::handleTearDown(); + + // Ensure no warnings (or worse) were logged by Package Manager. + $this->assertFalse($this->failureLogger->hasRecords(RfcLogLevel::EMERGENCY), 'Package Manager logged emergencies.'); + $this->assertFalse($this->failureLogger->hasRecords(RfcLogLevel::ALERT), 'Package Manager logged alerts.'); + $this->assertFalse($this->failureLogger->hasRecords(RfcLogLevel::CRITICAL), 'Package Manager logged critical errors.'); + $this->assertFalse($this->failureLogger->hasRecords(RfcLogLevel::ERROR), 'Package Manager logged errors.'); + $this->assertFalse($this->failureLogger->hasRecords(RfcLogLevel::WARNING), 'Package Manager logged warnings.'); + parent::tearDown(); + } + + /** + * Asserts that a StageEventException has a particular set of results. + * + * @param array $expected_results + * The expected results. + * @param \Drupal\package_manager\Exception\StageEventException $exception + * The exception. + */ + protected function assertExpectedResultsFromException(array $expected_results, StageEventException $exception): void { + $event = $exception->event; + $this->assertInstanceOf(PreOperationStageEvent::class, $event); + + $stage = $event->stage; + $stage_dir = $stage->stageDirectoryExists() ? $stage->getStageDirectory() : NULL; + $this->assertValidationResultsEqual($expected_results, $event->getResults(), NULL, $stage_dir); + } + +} + +/** + * Defines a stage specifically for testing purposes. + */ +class TestStage extends StageBase { + + /** + * {@inheritdoc} + */ + protected string $type = 'package_manager:test'; + + /** + * Implements the magic __sleep() method. + * + * TRICKY: without this, any failed ::assertStatusCheckResults() + * will fail, because PHPUnit will want to serialize all arguments in the call + * stack. + * + * @see https://www.drupal.org/project/auto_updates/issues/3312619#comment-14801308 + */ + public function __sleep(): array { + return []; + } + +} + +/** + * A test version of the disk space validator to bypass system-level functions. + */ +class TestDiskSpaceValidator extends DiskSpaceValidator { + + /** + * Whether the root and vendor directories are on the same logical disk. + * + * @var bool + */ + public $sharedDisk = TRUE; + + /** + * The amount of free space, keyed by path. + * + * @var float[] + */ + public $freeSpace = []; + + /** + * {@inheritdoc} + */ + protected function stat(string $path): array { + return [ + 'dev' => $this->sharedDisk ? 'disk' : uniqid(), + ]; + } + + /** + * {@inheritdoc} + */ + protected function freeSpace(string $path): float { + return $this->freeSpace[$path]; + } + + /** + * {@inheritdoc} + */ + public function temporaryDirectory(): string { + return 'temp'; + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b1863bf7b21092721dbee1cfb0d1a02f7ba191ef --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php @@ -0,0 +1,140 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\Core\Serialization\Yaml; +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; +use Drupal\Tests\package_manager\Traits\ComposerInstallersTrait; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use Symfony\Component\Filesystem\Filesystem; + +/** + * @covers \Drupal\package_manager\PathExcluder\GitExcluder + * @group package_manager + * @internal + */ +class GitExcluderTest extends PackageManagerKernelTestBase { + + use ComposerInstallersTrait; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + $this->installComposerInstallers($project_root); + $active_manipulator = new ActiveFixtureManipulator(); + $active_manipulator + ->addPackage([ + 'name' => 'foo/package_known_to_composer_removed_later', + 'type' => 'drupal-module', + 'version' => '1.0.0', + ], FALSE, TRUE) + ->addPackage([ + 'name' => 'foo/custom_package_known_to_composer', + 'type' => 'drupal-custom-module', + 'version' => '1.0.0', + ], FALSE, TRUE) + ->addPackage([ + 'name' => 'foo/package_with_different_installer_path_known_to_composer', + 'type' => 'drupal-module', + 'version' => '1.0.0', + ], FALSE, TRUE); + // Set the installer path config in the project root where we install the + // package. + $installer_paths['different_installer_path/package_known_to_composer'] = ['foo/package_with_different_installer_path_known_to_composer']; + $this->setInstallerPaths($installer_paths, $project_root); + $active_manipulator->addProjectAtPath("modules/module_not_known_to_composer_in_active") + ->addDotGitFolder($project_root . "/modules/module_not_known_to_composer_in_active") + ->addDotGitFolder($project_root . "/modules/contrib/package_known_to_composer_removed_later") + ->addDotGitFolder($project_root . "/modules/custom/custom_package_known_to_composer") + ->addDotGitFolder($project_root . "/different_installer_path/package_known_to_composer") + ->commitChanges(); + } + + /** + * Tests that Git directories are excluded from stage during PreCreate. + */ + public function testGitDirectoriesExcludedActive(): void { + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $stage = $this->createStage(); + $stage->create(); + /** @var \Drupal\package_manager_bypass\LoggingBeginner $beginner */ + $beginner = $this->container->get(BeginnerInterface::class); + $beginner_args = $beginner->getInvocationArguments(); + $excluded_paths = [ + '.git', + 'modules/module_not_known_to_composer_in_active/.git', + 'modules/example/.git', + ]; + foreach ($excluded_paths as $excluded_path) { + $this->assertContains($excluded_path, $beginner_args[0][2]); + } + $not_excluded_paths = [ + 'modules/contrib/package_known_to_composer_removed_later/.git', + 'modules/custom/custom_package_known_to_composer/.git', + 'different_installer_path/package_known_to_composer/.git', + ]; + foreach ($not_excluded_paths as $not_excluded_path) { + $this->assertNotContains($not_excluded_path, $beginner_args[0][2]); + } + } + + /** + * Tests that Git directories are excluded from active during PreApply. + */ + public function testGitDirectoriesExcludedStage(): void { + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $this->getStageFixtureManipulator() + ->removePackage('foo/package_known_to_composer_removed_later'); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + // Adding a module with .git in stage which is unknown to composer, we + // expect it to not be copied to the active directory. + $path = "$stage_dir/modules/unknown_to_composer_in_stage"; + $fs = new Filesystem(); + $fs->mkdir("$path/.git"); + file_put_contents( + "$path/unknown_to_composer.info.yml", + Yaml::encode([ + 'name' => 'Unknown to composer in stage', + 'type' => 'module', + 'core_version_requirement' => '^9.7 || ^10', + ]) + ); + file_put_contents("$path/.git/excluded.txt", 'Phoenix!'); + + $stage->apply(); + /** @var \Drupal\package_manager_bypass\LoggingCommitter $committer */ + $committer = $this->container->get(CommitterInterface::class); + $committer_args = $committer->getInvocationArguments(); + $excluded_paths = [ + '.git', + 'modules/module_not_known_to_composer_in_active/.git', + 'modules/example/.git', + ]; + // We are missing "modules/unknown_to_composer_in_stage/.git" in excluded + // paths because there is no validation for it as it is assumed about any + // new .git folder in stage directory that either composer is aware of it or + // the developer knows what they are doing. + foreach ($excluded_paths as $excluded_path) { + $this->assertContains($excluded_path, $committer_args[0][2]); + } + $this->assertNotContains('modules/unknown_to_composer_in_stage/.git', $committer_args[0][2]); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6bf3b58ff9bb3d5a42acadcc14f293cf93ad1955 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php @@ -0,0 +1,55 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; + +/** + * @covers \Drupal\package_manager\PathExcluder\NodeModulesExcluder + * @group package_manager + * @internal + */ +class NodeModulesExcluderTest extends PackageManagerKernelTestBase { + + /** + * Tests that node_modules directories are excluded from stage operations. + */ + public function testExcludedPaths(): void { + // In this test, we want to perform the actual stage operations so that we + // can be sure that files are staged as expected. + $this->setSetting('package_manager_bypass_composer_stager', FALSE); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $active_dir = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $excluded = [ + "core/node_modules/exclude.txt", + 'modules/example/node_modules/exclude.txt', + ]; + foreach ($excluded as $path) { + mkdir(dirname("$active_dir/$path"), 0777, TRUE); + file_put_contents("$active_dir/$path", "This file should never be staged."); + } + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + + $stage->apply(); + // The excluded files should still be in the active directory. + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cb347e55c12fd2e500287c6292e54be8655ca8e3 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php @@ -0,0 +1,120 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\package_manager\PathExcluder\SiteConfigurationExcluder; +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; + +/** + * @covers \Drupal\package_manager\PathExcluder\SiteConfigurationExcluder + * @group package_manager + * @internal + */ +class SiteConfigurationExcluderTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + $container->getDefinition(SiteConfigurationExcluder::class) + ->setClass(TestSiteConfigurationExcluder::class); + } + + /** + * Tests that certain paths are excluded from stage operations. + */ + public function testExcludedPaths(): void { + // In this test, we want to perform the actual stage operations so that we + // can be sure that files are staged as expected. + $this->setSetting('package_manager_bypass_composer_stager', FALSE); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + $site_path = 'sites/example.com'; + + // Update the event subscribers' dependencies. + $site_configuration_excluder = $this->container->get(SiteConfigurationExcluder::class); + $site_configuration_excluder->sitePath = $site_path; + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + $excluded = [ + "$site_path/settings.php", + "$site_path/settings.local.php", + "$site_path/services.yml", + // Default site-specific settings files should be excluded. + 'sites/default/settings.php', + 'sites/default/settings.local.php', + 'sites/default/services.yml', + ]; + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + // A non-excluded file in the default site directory should be staged. + $this->assertFileExists("$stage_dir/sites/default/stage.txt"); + // Regular module files should be staged. + $this->assertFileExists("$stage_dir/modules/example/example.info.yml"); + + // A new file added to the site directory in the stage directory should be + // copied to the active directory. + $file = "$stage_dir/sites/default/new.txt"; + touch($file); + $stage->apply(); + $this->assertFileExists("$active_dir/sites/default/new.txt"); + + // The excluded files should still be in the active directory. + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + + /** + * Tests that `sites/default` is made writable in the stage directory. + */ + public function testDefaultSiteDirectoryPermissions(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $live_dir = $project_root . '/sites/default'; + chmod($live_dir, 0555); + $this->assertDirectoryIsNotWritable($live_dir); + // Record the permissions of the directory now, so we can be sure those + // permissions are restored after apply. + $original_permissions = fileperms($live_dir); + $this->assertIsInt($original_permissions); + + $stage = $this->createStage(); + $stage->create(); + // The staged `sites/default` will be made world-writable, because we want + // to ensure the scaffold plugin can copy certain files into there. + $staged_dir = str_replace($project_root, $stage->getStageDirectory(), $live_dir); + $this->assertDirectoryIsWritable($staged_dir); + + $stage->require(['ext-json:*']); + $stage->apply(); + // After applying, the live directory should NOT inherit the staged + // directory's world-writable permissions. + $this->assertSame($original_permissions, fileperms($live_dir)); + } + +} + +/** + * A test version of the site configuration excluder, to expose internals. + */ +class TestSiteConfigurationExcluder extends SiteConfigurationExcluder { + + public string $sitePath; + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99fa0e2326acfcb3dff3f226076dbd1be6133b44 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; + +/** + * @covers \Drupal\package_manager\PathExcluder\SiteFilesExcluder + * @group package_manager + * @internal + */ +class SiteFilesExcluderTest extends PackageManagerKernelTestBase { + + /** + * Tests that public and private files are excluded from stage operations. + */ + public function testSiteFilesExcluded(): void { + // The private stream wrapper is only registered if this setting is set. + // @see \Drupal\Core\CoreServiceProvider::register() + $this->setSetting('file_private_path', 'private'); + // In this test, we want to perform the actual stage operations so that we + // can be sure that files are staged as expected. This will also rebuild + // the container, enabling the private stream wrapper. + $this->setSetting('package_manager_bypass_composer_stager', FALSE); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + // Ensure that we are using directories within the fake site fixture for + // public and private files. + $this->setSetting('file_public_path', "sites/example.com/files"); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + $excluded = [ + "sites/example.com/files/exclude.txt", + 'private/exclude.txt', + ]; + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + + $stage->apply(); + // The excluded files should still be in the active directory. + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + + /** + * Tests that invalid file settings do not cause errors. + */ + public function testInvalidFileSettings(): void { + $invalid_path = '/path/does/not/exist'; + $this->assertFileDoesNotExist($invalid_path); + $this->setSetting('file_public_path', $invalid_path); + $this->setSetting('file_private_path', $invalid_path); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + $this->assertStatusCheckResults([]); + $this->assertResults([]); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2f8cb42901ea0377a336a800b547bd5c55f809c9 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php @@ -0,0 +1,152 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\Core\Database\Connection; +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\PathExcluder\SqliteDatabaseExcluder; +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; +use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface; +use Prophecy\Prophecy\ObjectProphecy; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @covers \Drupal\package_manager\PathExcluder\SqliteDatabaseExcluder + * @group package_manager + * @internal + */ +class SqliteDatabaseExcluderTest extends PackageManagerKernelTestBase { + + /** + * The mocked database connection. + * + * @var \Drupal\Core\Database\Connection|\Prophecy\Prophecy\ObjectProphecy + */ + private Connection|ObjectProphecy $mockDatabase; + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + $this->mockDatabase = $this->prophesize(Connection::class); + $this->mockDatabase->driver() + ->willReturn('sqlite') + ->shouldBeCalled(); + $container->set('mock_database', $this->mockDatabase->reveal()); + + $container->getDefinition(SqliteDatabaseExcluder::class) + ->setArgument('$database', new Reference('mock_database')); + } + + /** + * Data provider for ::testSqliteDatabaseFilesExcluded(). + * + * @return array[] + * The test cases. + */ + public static function providerSqliteDatabaseFilesExcluded(): array { + return [ + // If the database is at a relative path, it should be excluded relative + // to the web root. + 'relative path in relocated web root' => [ + 'www', + 'db.sqlite', + 'www/db.sqlite', + ], + 'relative path, web root is project root' => [ + '', + 'db.sqlite', + 'db.sqlite', + ], + // If the database is at an absolute path in the project root, it should + // be excluded relative to the project root. + 'absolute path in relocated web root' => [ + 'www', + '<PROJECT_ROOT>/www/db.sqlite', + 'www/db.sqlite', + ], + 'absolute path, web root is project root' => [ + '', + '<PROJECT_ROOT>/db.sqlite', + 'db.sqlite', + ], + // If the database is outside the project root, the excluder doesn't need + // to do anything. + 'absolute path outside of project, relocated web root' => [ + 'www', + '/path/to/database.sqlite', + FALSE, + ], + 'absolute path outside of project, web root is project root' => [ + '', + '/path/to/database.sqlite', + FALSE, + ], + ]; + } + + /** + * Tests that SQLite database files are excluded from stage operations. + * + * @param string $web_root + * The web root that should be returned by the path locator. See + * \Drupal\package_manager\PathLocator::getWebRoot(). + * @param string $db_path + * The path of the SQLite database, as it should be reported by the database + * connection. This can be a relative or absolute path; it does not need to + * actually exist. + * @param string|false $expected_excluded_path + * The path to the database, as it should be given to + * CollectPathsToExcludeEvent. If FALSE, the database is located outside the + * project and therefore is not excluded. + * + * @dataProvider providerSqliteDatabaseFilesExcluded + */ + public function testSqliteDatabaseFilesExcluded(string $web_root, string $db_path, string|false $expected_excluded_path): void { + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + $project_root = $path_locator->getProjectRoot(); + + // Set the mocked web root, keeping everything else as-is. + $path_locator->setPaths( + $project_root, + $path_locator->getVendorDirectory(), + $web_root, + $path_locator->getStagingRoot(), + ); + $db_path = str_replace('<PROJECT_ROOT>', $project_root, $db_path); + $this->mockDatabase->getConnectionOptions() + ->willReturn(['database' => $db_path]) + ->shouldBeCalled(); + + $event = new CollectPathsToExcludeEvent( + $this->createStage(), + $path_locator, + $this->container->get(PathFactoryInterface::class), + ); + $actual_excluded_paths = $this->container->get('event_dispatcher') + ->dispatch($event) + ->getAll(); + + if (is_string($expected_excluded_path)) { + $expected_exclusions = [ + $expected_excluded_path, + $expected_excluded_path . '-shm', + $expected_excluded_path . '-wal', + ]; + $this->assertEmpty(array_diff($expected_exclusions, $actual_excluded_paths)); + } + else { + // The path of the database should not appear anywhere in the list of + // excluded paths. + $this->assertStringNotContainsString($db_path, serialize($actual_excluded_paths)); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..93831d97d56cf7fd44802dd227fd6204f62d9c38 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php @@ -0,0 +1,49 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; + +/** + * @covers \Drupal\package_manager\PathExcluder\TestSiteExcluder + * @group package_manager + * @internal + */ +class TestSiteExcluderTest extends PackageManagerKernelTestBase { + + /** + * Tests that test site directories are excluded from stage operations. + */ + public function testTestSitesExcluded(): void { + // In this test, we want to perform the actual stage operations so that we + // can be sure that files are staged as expected. + $this->setSetting('package_manager_bypass_composer_stager', FALSE); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + $excluded = [ + 'sites/simpletest', + ]; + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + + $stage->apply(); + // The excluded files should still be in the active directory. + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d68da1cba9aac56db0cf965f9ded0781addd9746 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php @@ -0,0 +1,246 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use ColinODell\PsrTestLogger\TestLogger; +use Drupal\Component\FileSystem\FileSystem as DrupalFileSystem; +use Drupal\Core\Logger\RfcLogLevel; +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; +use Symfony\Component\Filesystem\Filesystem; + +/** + * @covers \Drupal\package_manager\PathExcluder\UnknownPathExcluder + * @group package_manager + * @internal + */ +class UnknownPathExcluderTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + protected function createTestProject(?string $source_dir = NULL): void { + // This class needs the test project to be varied for different test + // methods, so it cannot be called in the setup. + // @see ::createTestProjectForTemplate() + } + + /** + * Creates a test project with or without a nested webroot. + * + * @param bool $use_nested_webroot + * Whether to use a nested webroot. + */ + protected function createTestProjectForTemplate(bool $use_nested_webroot): void { + if (!$use_nested_webroot) { + // We are not using a nested webroot: the parent test project can be used. + parent::createTestProject(); + } + else { + // Create another directory and copy its contents from fake_site fixture. + $fake_site_with_nested_webroot = DrupalFileSystem::getOsTemporaryDirectory() . DIRECTORY_SEPARATOR . 'fake_site_with_nested_webroot'; + $fs = new Filesystem(); + if (is_dir($fake_site_with_nested_webroot)) { + $fs->remove($fake_site_with_nested_webroot); + } + $fs->mkdir($fake_site_with_nested_webroot); + $fs->mirror(__DIR__ . '/../../../fixtures/fake_site', $fake_site_with_nested_webroot); + + // Create a webroot directory in our new directory and copy all folders + // and files into it, except for ones that should always be in the + // project root. + $fs->mkdir($fake_site_with_nested_webroot . DIRECTORY_SEPARATOR . 'webroot'); + $paths_in_project_root = glob("$fake_site_with_nested_webroot/*"); + $keep_in_project_root = [ + $fake_site_with_nested_webroot . '/vendor', + $fake_site_with_nested_webroot . '/webroot', + $fake_site_with_nested_webroot . '/composer.json', + $fake_site_with_nested_webroot . '/composer.lock', + $fake_site_with_nested_webroot . '/custom', + ]; + foreach ($paths_in_project_root as $path_in_project_root) { + if (!in_array($path_in_project_root, $keep_in_project_root, TRUE)) { + $fs->rename($path_in_project_root, $fake_site_with_nested_webroot . '/webroot' . str_replace($fake_site_with_nested_webroot, '', $path_in_project_root)); + } + } + parent::createTestProject($fake_site_with_nested_webroot); + + // We need to reset the test paths with our new webroot. + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + + $path_locator->setPaths( + $path_locator->getProjectRoot(), + $path_locator->getVendorDirectory(), + 'webroot', + $path_locator->getStagingRoot() + ); + } + } + + /** + * Data provider for testUnknownPath(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerTestUnknownPath() { + return [ + 'unknown file where web and project root same' => [ + FALSE, + NULL, + ['unknown_file.txt'], + ], + 'unknown file where web and project root different' => [ + TRUE, + NULL, + ['unknown_file.txt'], + ], + 'unknown hidden file where web and project root same' => [ + FALSE, + NULL, + ['.unknown_file'], + ], + 'unknown hidden file where web and project root different' => [ + TRUE, + NULL, + ['.unknown_file'], + ], + 'unknown directory where web and project root same' => [ + FALSE, + 'unknown_dir', + ['unknown_dir/unknown_dir.README.md', 'unknown_dir/unknown_file.txt'], + ], + 'unknown directory where web and project root different' => [ + TRUE, + 'unknown_dir', + ['unknown_dir/unknown_dir.README.md', 'unknown_dir/unknown_file.txt'], + ], + 'unknown hidden directory where web and project root same' => [ + FALSE, + '.unknown_dir', + ['.unknown_dir/unknown_dir.README.md', '.unknown_dir/unknown_file.txt'], + ], + 'unknown hidden directory where web and project root different' => [ + TRUE, + '.unknown_dir', + ['.unknown_dir/unknown_dir.README.md', '.unknown_dir/unknown_file.txt'], + ], + ]; + } + + /** + * Tests that the unknown files and directories are excluded. + * + * @param bool $use_nested_webroot + * Whether to create test project with a nested webroot. + * @param string|null $unknown_dir + * The path of unknown directory to test or NULL none should be tested. + * @param string[] $unknown_files + * The list of unknown files. + * + * @dataProvider providerTestUnknownPath + */ + public function testUnknownPath(bool $use_nested_webroot, ?string $unknown_dir, array $unknown_files): void { + $this->createTestProjectForTemplate($use_nested_webroot); + + $active_dir = $this->container->get(PathLocator::class) + ->getProjectRoot(); + if ($unknown_dir) { + mkdir("$active_dir/$unknown_dir"); + } + foreach ($unknown_files as $unknown_file) { + file_put_contents("$active_dir/$unknown_file", "Unknown File"); + } + + $stage = $this->createStage(); + // Files are only excluded if the web root and project root are different. + // If anything in the project root is excluded, those paths should be + // logged. + if ($use_nested_webroot) { + $logger = new TestLogger(); + $this->container->get('logger.factory') + ->get('package_manager') + ->addLogger($logger); + + $this->runStatusCheck($stage); + $this->assertTrue($logger->hasRecordThatContains("The following paths in $active_dir aren't recognized as part of your Drupal site, so to be safe, Package Manager is excluding them from all stage operations. If these files are not needed for Composer to work properly in your site, no action is needed. Otherwise, you can disable this behavior by setting the <code>package_manager.settings:include_unknown_files_in_project_root</code> config setting to <code>TRUE</code>.", RfcLogLevel::INFO)); + foreach ($unknown_files as $unknown_file) { + // If $unknown_file is in a subdirectory, only the subdirectory is going + // to be logged as an excluded path. The excluder doesn't recurse into + // subdirectories. + if (str_contains($unknown_file, '/')) { + $unknown_file = dirname($unknown_file); + } + $this->assertTrue($logger->hasRecordThatContains($unknown_file, RfcLogLevel::INFO)); + } + } + + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + foreach ($unknown_files as $path) { + $this->assertFileExists("$active_dir/$path"); + if ($use_nested_webroot) { + // It will not exist in stage as it will be excluded because web and + // project root are different. + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + else { + // If the project root and web root are the same, unknown files will not + // be excluded, so this path should exist in the stage directory. + $this->assertFileExists("$stage_dir/$path"); + } + } + + $stage->apply(); + // The excluded files should still be in the active directory. + foreach ($unknown_files as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + + /** + * Tests that the excluder can be disabled by a config flag. + */ + public function testExcluderCanBeDisabled(): void { + $this->createTestProjectForTemplate(TRUE); + + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + mkdir($project_root . '/unknown'); + touch($project_root . '/unknown/file.txt'); + + $config = $this->config('package_manager.settings'); + $config->set('include_unknown_files_in_project_root', TRUE)->save(); + + $stage = $this->createStage(); + $stage->create(); + $this->assertFileExists($stage->getStageDirectory() . '/unknown/file.txt'); + $stage->destroy(); + + $config->set('include_unknown_files_in_project_root', FALSE)->save(); + $this->assertFileExists($project_root . '/unknown/file.txt'); + $stage->create(); + $this->assertFileDoesNotExist($stage->getStageDirectory() . '/unknown/file.txt'); + } + + public function testPathRepositoriesAreIncluded(): void { + $this->createTestProjectForTemplate(TRUE); + + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + $this->assertDirectoryExists($project_root . '/custom'); + + $stage = $this->createStage(); + $stage->create(); + $this->assertDirectoryExists($stage->getStageDirectory() . '/custom'); + $stage->require(['ext-json:*']); + $stage->apply(); + $this->assertDirectoryExists($project_root . '/custom'); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7e2c53605095f150601a308e1c98f2004343a560 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel\PathExcluder; + +use Drupal\package_manager\PathLocator; +use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; + +/** + * @covers \Drupal\package_manager\PathExcluder\VendorHardeningExcluder + * @group package_manager + * @internal + */ +class VendorHardeningExcluderTest extends PackageManagerKernelTestBase { + + /** + * Tests that vendor hardening files are excluded from stage operations. + */ + public function testVendorHardeningFilesExcluded(): void { + // In this test, we want to perform the actual stage operations so that we + // can be sure that files are staged as expected. + $this->setSetting('package_manager_bypass_composer_stager', FALSE); + // Ensure we have an up-to-date container. + $this->container = $this->container->get('kernel')->rebuildContainer(); + + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage_dir = $stage->getStageDirectory(); + + $excluded = ['vendor/.htaccess']; + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + $this->assertFileDoesNotExist("$stage_dir/$path"); + } + + $stage->apply(); + // The excluded files should still be in the active directory. + foreach ($excluded as $path) { + $this->assertFileExists("$active_dir/$path"); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d8682d60fae04ae35e33815a0ab88895c6786fde --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php @@ -0,0 +1,89 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\PendingUpdatesValidator + * @group package_manager + * @internal + */ +class PendingUpdatesValidatorTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = ['system']; + + /** + * Tests that no error is raised if there are no pending updates. + */ + public function testNoPendingUpdates(): void { + $this->assertStatusCheckResults([]); + $this->assertResults([], PreCreateEvent::class); + } + + /** + * Tests that an error is raised if there are pending schema updates. + * + * @depends testNoPendingUpdates + */ + public function testPendingUpdateHook(): void { + // Set the installed schema version of Package Manager to its default value + // and import an empty update hook which is numbered much higher than will + // ever exist in the real world. + $this->container->get('keyvalue') + ->get('system.schema') + ->set('package_manager', \Drupal::CORE_MINIMUM_SCHEMA_VERSION); + + require_once __DIR__ . '/../../fixtures/db_update.php'; + + $result = ValidationResult::createError([ + t('Some modules have database updates pending. You should run the <a href="/update.php">database update script</a> immediately.'), + ]); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests that an error is raised if there are pending post-updates. + */ + public function testPendingPostUpdate(): void { + // Make an additional post-update function available; the update registry + // will think it's pending. + require_once __DIR__ . '/../../fixtures/post_update.php'; + $result = ValidationResult::createError([ + t('Some modules have database updates pending. You should run the <a href="/update.php">database update script</a> immediately.'), + ]); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests that pending updates stop an operation from being applied. + */ + public function testPendingUpdateAfterStaged(): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + // Make an additional post-update function available; the update registry + // will think it's pending. + require_once __DIR__ . '/../../fixtures/post_update.php'; + $result = ValidationResult::createError([ + t('Some modules have database updates pending. You should run the <a href="/update.php">database update script</a> immediately.'), + ]); + try { + $stage->apply(); + $this->fail('Able to apply update even though there is pending update.'); + } + catch (StageEventException $exception) { + $this->assertExpectedResultsFromException([$result], $exception); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PhpExtensionsValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/PhpExtensionsValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..727c9ba32926a9f2e0800472ad3964761b26e07e --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PhpExtensionsValidatorTest.php @@ -0,0 +1,87 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\PhpExtensionsValidator + * @group package_manager + * @internal + */ +class PhpExtensionsValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for ::testPhpExtensionsValidation(). + * + * @return array[] + * The test cases. + */ + public static function providerPhpExtensionsValidation(): array { + $openssl_error = ValidationResult::createError([ + t('The OpenSSL extension is not enabled, which is a security risk. See <a href="https://www.php.net/manual/en/openssl.installation.php">the PHP documentation</a> for information on how to enable this extension.'), + ]); + $xdebug_warning = ValidationResult::createWarning([ + t('Xdebug is enabled, which may have a negative performance impact on Package Manager and any modules that use it.'), + ]); + return [ + 'xdebug enabled, openssl installed' => [ + ['xdebug', 'openssl'], + [$xdebug_warning], + [], + ], + 'xdebug enabled, openssl not installed' => [ + ['xdebug'], + [$xdebug_warning, $openssl_error], + [$openssl_error], + ], + 'xdebug disabled, openssl installed' => [ + ['openssl'], + [], + [], + ], + 'xdebug disabled, openssl not installed' => [ + [], + [$openssl_error], + [$openssl_error], + ], + ]; + } + + /** + * Tests that PHP extensions' status are checked by Package Manager. + * + * @param string[] $loaded_extensions + * The names of the PHP extensions that the validator should think are + * loaded. + * @param \Drupal\package_manager\ValidationResult[] $expected_status_check_results + * The expected validation results during the status check event. + * @param \Drupal\package_manager\ValidationResult[] $expected_life_cycle_results + * The expected validation results during pre-create and pre-apply event. + * + * @dataProvider providerPhpExtensionsValidation + */ + public function testPhpExtensionsValidation(array $loaded_extensions, array $expected_status_check_results, array $expected_life_cycle_results): void { + $state = $this->container->get('state'); + // @see \Drupal\package_manager\Validator\PhpExtensionsValidator::isExtensionLoaded() + $state->set('package_manager_loaded_php_extensions', $loaded_extensions); + + $this->assertStatusCheckResults($expected_status_check_results); + $this->assertResults($expected_life_cycle_results, PreCreateEvent::class); + // To test pre-apply delete the loaded extensions in state which will allow + // the pre-create event to run without a validation error. + $state->delete('package_manager_loaded_php_extensions'); + // On post-create set the loaded extensions in state so that the pre-apply + // event will have the expected validation error. + $this->addEventTestListener(function () use ($state, $loaded_extensions) { + $state->set('package_manager_loaded_php_extensions', $loaded_extensions); + }, PostCreateEvent::class); + $this->assertResults($expected_life_cycle_results, PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/PhpTufValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/PhpTufValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ea0eb41f39a120c97288e2bf36db8b2fb293146e --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/PhpTufValidatorTest.php @@ -0,0 +1,233 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\fixture_manipulator\FixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\LockFileValidator; +use Drupal\package_manager\Validator\PhpTufValidator; + +/** + * @coversDefaultClass \Drupal\package_manager\Validator\PhpTufValidator + * @group package_manager + * @internal + */ +class PhpTufValidatorTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + // PHP-TUF must be enabled for this test to run. + $this->setSetting('package_manager_bypass_tuf', FALSE); + + (new ActiveFixtureManipulator()) + ->addConfig([ + 'repositories.drupal' => [ + 'type' => 'composer', + 'url' => 'https://packages.drupal.org/8', + 'tuf' => TRUE, + ], + 'allow-plugins.' . PhpTufValidator::PLUGIN_NAME => TRUE, + ]) + ->addPackage([ + 'name' => PhpTufValidator::PLUGIN_NAME, + 'type' => 'composer-plugin', + 'require' => [ + 'composer-plugin-api' => '*', + ], + 'extra' => [ + 'class' => 'PhpTufComposerPlugin', + ], + ]) + ->commitChanges(); + } + + /** + * Tests that there are no errors if the plugin is set up correctly. + */ + public function testPluginInstalledAndConfiguredProperly(): void { + $this->assertStatusCheckResults([]); + $this->assertResults([]); + } + + /** + * Tests there is an error if the plugin is not installed in the project root. + */ + public function testPluginNotInstalledInProjectRoot(): void { + (new ActiveFixtureManipulator()) + ->removePackage(PhpTufValidator::PLUGIN_NAME) + ->commitChanges(); + + $messages = [ + t('The <code>php-tuf/composer-integration</code> plugin is not installed.'), + // Composer automatically removes the plugin from the `allow-plugins` + // list when the plugin package is removed. + t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'), + ]; + $result = ValidationResult::createError($messages, t('The active directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests removing the plugin from the stage on pre-require. + */ + public function testPluginRemovedFromStagePreRequire(): void { + $this->getStageFixtureManipulator() + ->removePackage(PhpTufValidator::PLUGIN_NAME); + + $messages = [ + t('The <code>php-tuf/composer-integration</code> plugin is not installed.'), + // Composer automatically removes the plugin from the `allow-plugins` + // list when the plugin package is removed. + t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'), + ]; + $result = ValidationResult::createError($messages, t('The stage directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + $this->assertResults([$result], PreRequireEvent::class); + } + + /** + * Tests removing the plugin from the stage before applying it. + */ + public function testPluginRemovedFromStagePreApply(): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + + (new FixtureManipulator()) + ->removePackage(PhpTufValidator::PLUGIN_NAME) + ->commitChanges($stage->getStageDirectory()); + + $messages = [ + t('The <code>php-tuf/composer-integration</code> plugin is not installed.'), + // Composer automatically removes the plugin from the `allow-plugins` + // list when the plugin package is removed. + t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'), + ]; + $result = ValidationResult::createError($messages, t('The stage directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + try { + $stage->apply(); + $this->fail('Expected an exception but none was thrown.'); + } + catch (StageEventException $e) { + $this->assertInstanceOf(PreApplyEvent::class, $e->event); + $this->assertValidationResultsEqual([$result], $e->event->getResults()); + } + } + + /** + * Data provider for testing invalid plugin configuration. + * + * @return array[] + * The test cases. + */ + public static function providerInvalidConfiguration(): array { + return [ + 'plugin specifically disallowed' => [ + [ + 'allow-plugins.' . PhpTufValidator::PLUGIN_NAME => FALSE, + ], + [ + t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'), + ], + ], + 'all plugins disallowed' => [ + [ + 'allow-plugins' => FALSE, + ], + [ + t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'), + ], + ], + 'packages.drupal.org not using TUF' => [ + [ + 'repositories.drupal' => [ + 'type' => 'composer', + 'url' => 'https://packages.drupal.org/8', + ], + ], + [ + t('TUF is not enabled for the <code>https://packages.drupal.org/8</code> repository.'), + ], + ], + ]; + } + + /** + * Data provider for testing invalid plugin configuration in the stage. + * + * @return \Generator + * The test cases. + */ + public static function providerInvalidConfigurationInStage(): \Generator { + foreach (static::providerInvalidConfiguration() as $name => $arguments) { + $arguments[] = PreRequireEvent::class; + yield "$name on pre-require" => $arguments; + + array_splice($arguments, -1, NULL, PreApplyEvent::class); + yield "$name on pre-apply" => $arguments; + } + } + + /** + * Tests errors caused by invalid plugin configuration in the project root. + * + * @param array $config + * The Composer configuration to set. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $expected_messages + * The expected error messages. + * + * @dataProvider providerInvalidConfiguration + */ + public function testInvalidConfigurationInProjectRoot(array $config, array $expected_messages): void { + (new ActiveFixtureManipulator())->addConfig($config)->commitChanges(); + + $result = ValidationResult::createError($expected_messages, t('The active directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests errors caused by invalid plugin configuration in the stage directory. + * + * @param array $config + * The Composer configuration to set. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $expected_messages + * The expected error messages. + * @param string $event_class + * The event before which the plugin's configuration should be changed. + * + * @dataProvider providerInvalidConfigurationInStage + */ + public function testInvalidConfigurationInStage(array $config, array $expected_messages, string $event_class): void { + $listener = function (PreRequireEvent|PreApplyEvent $event) use ($config): void { + (new FixtureManipulator()) + ->addConfig($config) + ->commitChanges($event->stage->getStageDirectory()); + }; + $this->addEventTestListener($listener, $event_class); + + // LockFileValidator will complain because we have not added, removed, or + // updated any packages in the stage. In this very specific situation, it's + // okay to disable that validator to remove the interference. + if ($event_class === PreApplyEvent::class) { + $lock_file_validator = $this->container->get(LockFileValidator::class); + $this->container->get('event_dispatcher') + ->removeSubscriber($lock_file_validator); + } + + $result = ValidationResult::createError($expected_messages, t('The stage directory is not protected by PHP-TUF, which is required to use Package Manager securely.')); + $this->assertResults([$result], $event_class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ProcessFactoryTest.php b/core/modules/package_manager/tests/src/Kernel/ProcessFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..db27b06efa879da6dc6a49b77816be23d4b3c95b --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ProcessFactoryTest.php @@ -0,0 +1,36 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\ProcessFactory; +use PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface; + +/** + * @coversDefaultClass \Drupal\package_manager\ProcessFactory + * @group auto_updates + * @internal + */ +class ProcessFactoryTest extends PackageManagerKernelTestBase { + + /** + * Tests that the process factory prepends the PHP directory to PATH. + */ + public function testPhpDirectoryPrependedToPath(): void { + $factory = $this->container->get(ProcessFactoryInterface::class); + $this->assertInstanceOf(ProcessFactory::class, $factory); + + // Ensure that the directory of the PHP interpreter can be found. + $reflector = new \ReflectionObject($factory); + $method = $reflector->getMethod('getPhpDirectory'); + $php_dir = $method->invoke(NULL); + $this->assertNotEmpty($php_dir); + + // The process factory should always put the PHP interpreter's directory + // at the beginning of the PATH environment variable. + $env = $factory->create(['whoami'])->getEnv(); + $this->assertStringStartsWith("$php_dir:", $env['PATH']); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php b/core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php new file mode 100644 index 0000000000000000000000000000000000000000..16bb603b1894289f811f225a454b049d35698b92 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php @@ -0,0 +1,303 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\Logger\RfcLogLevel; +use Drupal\package_manager\ProjectInfo; + +/** + * @coversDefaultClass \Drupal\package_manager\ProjectInfo + * @group auto_updates + * @internal + */ +class ProjectInfoTest extends PackageManagerKernelTestBase { + + /** + * @covers ::getInstallableReleases + * + * @param string $fixture + * The fixture file name. + * @param string $installed_version + * The installed version core version to set. + * @param string[] $expected_versions + * The expected versions. + * + * @dataProvider providerGetInstallableReleases + */ + public function testGetInstallableReleases(string $fixture, string $installed_version, array $expected_versions): void { + [$project] = explode('.', $fixture); + $fixtures_directory = __DIR__ . '/../../fixtures/release-history/'; + if ($project === 'drupal') { + $this->setCoreVersion($installed_version); + } + else { + // Update the version and the project of the project. + $this->enableModules(['package_manager_test_update']); + $extension_info_update = [ + 'version' => $installed_version, + 'project' => 'package_manager_test_update', + ]; + // @todo Replace with use of the trait from the Update module in https://drupal.org/i/3348234. + $this->config('update_test.settings') + ->set("system_info.$project", $extension_info_update) + ->save(); + // The Update module will always request Drupal core's update XML. + $metadata_fixtures['drupal'] = $fixtures_directory . 'drupal.9.8.2.xml'; + } + $metadata_fixtures[$project] = "$fixtures_directory$fixture"; + $this->setReleaseMetadata($metadata_fixtures); + $project_info = new ProjectInfo($project); + $actual_releases = $project_info->getInstallableReleases(); + // Assert that we returned the correct releases in the expected order. + $this->assertSame($expected_versions, array_keys($actual_releases)); + // Assert that we version keys match the actual releases. + foreach ($actual_releases as $version => $release) { + $this->assertSame($version, $release->getVersion()); + } + } + + /** + * Data provider for testGetInstallableReleases(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerGetInstallableReleases(): array { + return [ + 'core, no updates' => [ + 'drupal.9.8.2.xml', + '9.8.2', + [], + ], + 'core, on supported branch, pre-release in next minor' => [ + 'drupal.9.8.0-alpha1.xml', + '9.7.1', + ['9.8.0-alpha1'], + ], + 'core, on unsupported branch, updates in multiple supported branches' => [ + 'drupal.9.8.2.xml', + '9.6.0-alpha1', + ['9.8.2', '9.8.1', '9.8.0', '9.8.0-alpha1', '9.7.1', '9.7.0', '9.7.0-alpha1'], + ], + // A test case with an unpublished release, 9.8.0, and unsupported + // release, 9.8.1, both of these releases should not be returned. + 'core, filter out unsupported and unpublished releases' => [ + 'drupal.9.8.2-unsupported_unpublished.xml', + '9.6.0-alpha1', + ['9.8.2', '9.8.0-alpha1', '9.7.1', '9.7.0', '9.7.0-alpha1'], + ], + 'core, supported branches before and after installed release' => [ + 'drupal.9.8.2.xml', + '9.8.0-alpha1', + ['9.8.2', '9.8.1', '9.8.0'], + ], + 'core, one insecure release filtered out' => [ + 'drupal.9.8.1-security.xml', + '9.8.0-alpha1', + ['9.8.1'], + ], + 'core, skip insecure releases and return secure releases' => [ + 'drupal.9.8.2-older-sec-release.xml', + '9.7.0-alpha1', + ['9.8.2', '9.8.1', '9.8.1-beta1', '9.8.0-alpha1', '9.7.1'], + ], + 'contrib, semver and legacy' => [ + 'package_manager_test_update.7.0.1.xml', + '8.x-6.0-alpha1', + ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2', '8.x-6.1', '8.x-6.0'], + ], + 'contrib, semver and legacy, some lower' => [ + 'package_manager_test_update.7.0.1.xml', + '8.x-6.1', + ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2'], + ], + 'contrib, semver and legacy, on semantic dev' => [ + 'package_manager_test_update.7.0.1.xml', + '7.0.x-dev', + ['7.0.1', '7.0.0', '7.0.0-alpha1'], + ], + 'contrib, semver and legacy, on legacy dev' => [ + 'package_manager_test_update.7.0.1.xml', + '8.x-6.x-dev', + ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2', '8.x-6.1', '8.x-6.0', '8.x-6.0-alpha1'], + ], + ]; + } + + /** + * Tests a project that is not in the codebase. + */ + public function testNewProject(): void { + $fixtures_directory = __DIR__ . '/../../fixtures/release-history/'; + $metadata_fixtures['drupal'] = $fixtures_directory . 'drupal.9.8.2.xml'; + $metadata_fixtures['package_manager_test_update'] = $fixtures_directory . 'package_manager_test_update.7.0.1.xml'; + $this->setReleaseMetadata($metadata_fixtures); + $available = update_get_available(TRUE); + $this->assertSame(['drupal'], array_keys($available)); + $this->setReleaseMetadata($metadata_fixtures); + $state = $this->container->get('state'); + // Set the state that the update module uses to store last checked time + // ensure our calls do not affect it. + $state->set('update.last_check', 123); + $project_info = new ProjectInfo('package_manager_test_update'); + $project_data = $project_info->getProjectInfo(); + // Ensure the project information is correct. + $this->assertSame('Package Manager Test Update', $project_data['title']); + $all_releases = [ + '7.0.1', + '7.0.0', + '7.0.0-alpha1', + '8.x-6.2', + '8.x-6.1', + '8.x-6.0', + '8.x-6.0-alpha1', + '7.0.x-dev', + '8.x-6.x-dev', + '8.x-5.x', + ]; + $uninstallable_releases = ['7.0.x-dev', '8.x-6.x-dev', '8.x-5.x']; + $installable_releases = array_values(array_diff($all_releases, $uninstallable_releases)); + $this->assertSame( + $all_releases, + array_keys($project_data['releases']) + ); + $this->assertSame( + $installable_releases, + array_keys($project_info->getInstallableReleases()) + ); + $this->assertNull($project_info->getInstalledVersion()); + // Ensure we have not changed the state the update module uses to store + // the last checked time. + $this->assertSame(123, $state->get('update.last_check')); + + $this->assertTrue($this->failureLogger->hasRecordThatContains('Invalid project format: Array', (string) RfcLogLevel::ERROR)); + $this->assertTrue($this->failureLogger->hasRecordThatContains('[name] => Package Manager Test Update 8.x-5.x', (string) RfcLogLevel::ERROR)); + // Prevent the logged errors from causing failures during tear-down. + $this->failureLogger->reset(); + } + + /** + * Tests a project with a status other than "published". + * + * @covers ::getInstallableReleases + */ + public function testNotPublishedProject(): void { + $this->setReleaseMetadata(['drupal' => __DIR__ . '/../../fixtures/release-history/drupal.9.8.2_unknown_status.xml']); + $project_info = new ProjectInfo('drupal'); + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage("The project 'drupal' can not be updated because its status is any status besides published"); + $project_info->getInstallableReleases(); + } + + /** + * Data provider for ::testInstalledVersionSafe(). + * + * @return array[] + * The test cases. + */ + public static function providerInstalledVersionSafe(): array { + $dir = __DIR__ . '/../../fixtures/release-history'; + + return [ + 'safe version' => [ + '9.8.0', + $dir . '/drupal.9.8.2.xml', + TRUE, + ], + 'unpublished version' => [ + '9.8.0', + $dir . '/drupal.9.8.2-unsupported_unpublished.xml', + FALSE, + ], + 'unsupported branch' => [ + '9.6.1', + $dir . '/drupal.9.8.2-unsupported_unpublished.xml', + FALSE, + ], + 'unsupported version' => [ + '9.8.1', + $dir . '/drupal.9.8.2-unsupported_unpublished.xml', + FALSE, + ], + 'insecure version' => [ + '9.8.0', + $dir . '/drupal.9.8.1-security.xml', + FALSE, + ], + ]; + } + + /** + * Tests checking if the currently installed version of a project is safe. + * + * @param string $installed_version + * The currently installed version of the project. + * @param string $release_xml + * The path of the release metadata. + * @param bool $expected_to_be_safe + * Whether the installed version of the project is expected to be found + * safe. + * + * @covers ::isInstalledVersionSafe + * + * @dataProvider providerInstalledVersionSafe + */ + public function testInstalledVersionSafe(string $installed_version, string $release_xml, bool $expected_to_be_safe): void { + $this->setCoreVersion($installed_version); + $this->setReleaseMetadata(['drupal' => $release_xml]); + + $project_info = new ProjectInfo('drupal'); + $this->assertSame($expected_to_be_safe, $project_info->isInstalledVersionSafe()); + } + + /** + * Data provider for testGetSupportedBranches(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerGetSupportedBranches(): array { + $dir = __DIR__ . '/../../fixtures/release-history/'; + + return [ + 'xml with supported branches' => [ + $dir . 'drupal.10.0.0.xml', + [ + '9.5.', + '9.6.', + '9.7.', + '10.0.', + ], + ], + 'xml with supported branches not set' => [ + $dir . 'drupal.9.8.1-supported_branches_not_set.xml', + [], + ], + 'xml with empty supported branches' => [ + $dir . 'drupal.9.8.1-empty_supported_branches.xml', + [ + '', + ], + ], + ]; + } + + /** + * @covers ::getSupportedBranches + * + * @param string $release_xml + * The path of the release metadata. + * @param string[] $expected_supported_branches + * The expected supported branches. + * + * @dataProvider providerGetSupportedBranches + */ + public function testGetSupportedBranches(string $release_xml, array $expected_supported_branches): void { + $this->setReleaseMetadata(['drupal' => $release_xml]); + $project_info = new ProjectInfo('drupal'); + $this->assertSame($expected_supported_branches, $project_info->getSupportedBranches()); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/RsyncValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/RsyncValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e066100e1882e15a45165b915c895338914606bf --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/RsyncValidatorTest.php @@ -0,0 +1,76 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\RsyncValidator; +use PhpTuf\ComposerStager\API\Exception\LogicException; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; +use PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @covers \Drupal\package_manager\Validator\RsyncValidator + * @group package_manager + * @internal + */ +class RsyncValidatorTest extends PackageManagerKernelTestBase { + + /** + * The mocked executable finder. + * + * @var \PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface + */ + private $executableFinder; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + // Set up a mocked executable finder which will always be re-injected into + // the validator when the container is rebuilt. + $this->executableFinder = $this->prophesize(ExecutableFinderInterface::class); + $this->executableFinder->find('rsync')->willReturn('/path/to/rsync'); + + parent::setUp(); + } + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + $container->set('mock_executable_finder', $this->executableFinder->reveal()); + + $container->getDefinition(RsyncValidator::class) + ->setArgument('$executableFinder', new Reference('mock_executable_finder')); + } + + /** + * Tests that the stage cannot be created if rsync is selected, but not found. + */ + public function testPreCreateFailsIfRsyncNotFound(): void { + /** @var \PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface $translatable_factory */ + $translatable_factory = $this->container->get(TranslatableFactoryInterface::class); + $message = $translatable_factory->createTranslatableMessage('Nope!'); + $this->executableFinder->find('rsync')->willThrow(new LogicException($message)); + + $result = ValidationResult::createError([ + t('<code>rsync</code> is not available.'), + ]); + $this->assertResults([$result], PreCreateEvent::class); + + $this->enableModules(['help']); + + $result = ValidationResult::createError([ + t('<code>rsync</code> is not available. See the <a href="/admin/help/package_manager#package-manager-faq-rsync">Package Manager help</a> for more information on how to resolve this.'), + ]); + $this->assertResults([$result], PreCreateEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/ServicesTest.php b/core/modules/package_manager/tests/src/Kernel/ServicesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a1db5a517c156252c8478e7bed7c9fd685ac5b73 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/ServicesTest.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\KernelTests\KernelTestBase; +use Drupal\package_manager\ExecutableFinder; +use Drupal\package_manager\LoggingBeginner; +use Drupal\package_manager\LoggingCommitter; +use Drupal\package_manager\LoggingStager; +use Drupal\package_manager\ProcessFactory; +use Drupal\package_manager\TranslatableStringFactory; +use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; +use PhpTuf\ComposerStager\API\Process\Factory\ProcessFactoryInterface; +use PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface; + +/** + * Tests that Package Manager services are wired correctly. + * + * @group package_manager + * @internal + */ +class ServicesTest extends KernelTestBase { + + use AssertPreconditionsTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = ['package_manager', 'update']; + + /** + * Tests that Package Manager's public services can be instantiated. + */ + public function testPackageManagerServices(): void { + // Ensure that any overridden Composer Stager services were overridden + // correctly. + $overrides = [ + ExecutableFinderInterface::class => ExecutableFinder::class, + ProcessFactoryInterface::class => ProcessFactory::class, + TranslatableFactoryInterface::class => TranslatableStringFactory::class, + BeginnerInterface::class => LoggingBeginner::class, + StagerInterface::class => LoggingStager::class, + CommitterInterface::class => LoggingCommitter::class, + ]; + foreach ($overrides as $interface => $expected_class) { + $this->assertInstanceOf($expected_class, $this->container->get($interface)); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/SettingsValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/SettingsValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..850d8ce03d9dc201de1de0678add74e3cc89604e --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/SettingsValidatorTest.php @@ -0,0 +1,66 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\SettingsValidator + * @group package_manager + * @internal + */ +class SettingsValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testSettingsValidation(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerSettingsValidation(): array { + $result = ValidationResult::createError([t('The <code>update_fetch_with_http_fallback</code> setting must be disabled.')]); + + return [ + 'HTTP fallback enabled' => [TRUE, [$result]], + 'HTTP fallback disabled' => [FALSE, []], + ]; + } + + /** + * Tests settings validation before starting an update. + * + * @param bool $setting + * The value of the update_fetch_with_http_fallback setting. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerSettingsValidation + */ + public function testSettingsValidation(bool $setting, array $expected_results): void { + $this->setSetting('update_fetch_with_http_fallback', $setting); + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests settings validation during pre-apply. + * + * @param bool $setting + * The value of the update_fetch_with_http_fallback setting. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerSettingsValidation + */ + public function testSettingsValidationDuringPreApply(bool $setting, array $expected_results): void { + $this->addEventTestListener(function () use ($setting): void { + $this->setSetting('update_fetch_with_http_fallback', $setting); + }); + $this->assertResults($expected_results, PreApplyEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/StageBaseTest.php b/core/modules/package_manager/tests/src/Kernel/StageBaseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7fca967a932591a87b8e1b339555d933f4074522 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/StageBaseTest.php @@ -0,0 +1,831 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Component\Datetime\Time; +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\Core\Extension\ModuleUninstallValidatorException; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StageEvent; +use Drupal\package_manager\Exception\ApplyFailedException; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\Exception\StageException; +use Drupal\package_manager\Exception\StageFailureMarkerException; +use Drupal\package_manager\FailureMarker; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\Validator\WritableFileSystemValidator; +use Drupal\package_manager_bypass\LoggingBeginner; +use Drupal\package_manager_bypass\LoggingCommitter; +use Drupal\package_manager_bypass\NoOpStager; +use Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Exception\ExceptionInterface; +use PhpTuf\ComposerStager\API\Exception\InvalidArgumentException; +use PhpTuf\ComposerStager\API\Exception\PreconditionException; +use PhpTuf\ComposerStager\API\Precondition\Service\PreconditionInterface; +use Psr\Log\LogLevel; +use ColinODell\PsrTestLogger\TestLogger; + +/** + * @coversDefaultClass \Drupal\package_manager\StageBase + * @covers \Drupal\package_manager\PackageManagerUninstallValidator + * @group package_manager + * @internal + */ +class StageBaseTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = ['package_manager_test_validation']; + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + $container->getDefinition('datetime.time') + ->setClass(TestTime::class); + + // Since this test adds arbitrary event listeners that aren't services, we + // need to ensure they will persist even if the container is rebuilt when + // staged changes are applied. + $container->getDefinition('event_dispatcher')->addTag('persist'); + } + + /** + * Data provider for testLoggedOnError(). + * + * @return string[][] + * The test cases. + */ + public static function providerLoggedOnError(): array { + return [ + [PreCreateEvent::class], + [PostCreateEvent::class], + [PreRequireEvent::class], + [PostRequireEvent::class], + [PreApplyEvent::class], + [PostApplyEvent::class], + ]; + } + + /** + * @covers \Drupal\package_manager\StageBase::dispatch + * + * @dataProvider providerLoggedOnError + * + * @param string $event_class + * The event class to throw an exception on. + */ + public function testLoggedOnError(string $event_class): void { + $exception = new \Exception("This should be logged!"); + TestSubscriber::setException($exception, $event_class); + + $stage = $this->createStage(); + $logger = new TestLogger(); + $stage->setLogger($logger); + + try { + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + $stage->apply(); + $stage->postApply(); + $this->fail('Expected an exception to be thrown, but none was.'); + } + catch (StageEventException $e) { + $this->assertInstanceOf($event_class, $e->event); + + $predicate = function (array $record) use ($e): bool { + $context = $record['context']; + return $context['@message'] === $e->getMessage() && str_contains($context['@backtrace_string'], 'testLoggedOnError'); + }; + $this->assertTrue($logger->hasRecordThatPasses($predicate, LogLevel::ERROR)); + } + } + + /** + * @covers ::getMetadata + * @covers ::setMetadata + */ + public function testMetadata(): void { + $stage = $this->createStage(); + $stage->create(); + $this->assertNull($stage->getMetadata('new_key')); + $stage->setMetadata('new_key', 'value'); + $this->assertSame('value', $stage->getMetadata('new_key')); + $stage->destroy(); + + // Ensure that metadata associated with the previous stage was deleted. + $stage = $this->createStage(); + $stage->create(); + $this->assertNull($stage->getMetadata('new_key')); + $stage->destroy(); + + // Ensure metadata cannot be accessed or set unless the stage has been + // claimed. + $stage = $this->createStage(); + try { + $stage->getMetadata('new_key'); + $this->fail('Expected an ownership exception, but none was thrown.'); + } + catch (\LogicException $e) { + $this->assertSame('Stage must be claimed before performing any operations on it.', $e->getMessage()); + } + + try { + $stage->setMetadata('new_key', 'value'); + $this->fail('Expected an ownership exception, but none was thrown.'); + } + catch (\LogicException $e) { + $this->assertSame('Stage must be claimed before performing any operations on it.', $e->getMessage()); + } + } + + /** + * @covers ::getStageDirectory + */ + public function testGetStageDirectory(): void { + // In this test, we're working with paths that (probably) don't exist in + // the file system at all, so we don't want to validate that the file system + // is writable when creating stages. + $validator = $this->container->get(WritableFileSystemValidator::class); + $this->container->get('event_dispatcher')->removeSubscriber($validator); + + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + + $stage = $this->createStage(); + $id = $stage->create(); + $stage_dir = $stage->getStageDirectory(); + $this->assertStringStartsWith($path_locator->getStagingRoot() . '/', $stage_dir); + $this->assertStringEndsWith("/$id", $stage_dir); + // If the stage root directory is changed, the existing stage shouldn't be + // affected... + $active_dir = $path_locator->getProjectRoot(); + $new_staging_root = $this->testProjectRoot . DIRECTORY_SEPARATOR . 'junk'; + if (!is_dir($new_staging_root)) { + mkdir($new_staging_root); + } + $path_locator->setPaths($active_dir, "$active_dir/vendor", '', $new_staging_root); + $this->assertSame($stage_dir, $stage->getStageDirectory()); + $stage->destroy(); + // ...but a new stage should be. + $stage = $this->createStage(); + $another_id = $stage->create(); + $this->assertNotSame($id, $another_id); + $stage_dir = $stage->getStageDirectory(); + $this->assertStringStartsWith(realpath($new_staging_root), $stage_dir); + $this->assertStringEndsWith("/$another_id", $stage_dir); + } + + /** + * @covers ::getStageDirectory + */ + public function testUncreatedGetStageDirectory(): void { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Drupal\package_manager\StageBase::getStageDirectory() cannot be called because the stage has not been created or claimed.'); + $this->createStage()->getStageDirectory(); + } + + /** + * Data provider for testDestroyDuringApply(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerDestroyDuringApply(): array { + $error_message_while_being_applied = 'Cannot destroy the stage directory while it is being applied to the active directory.'; + return [ + 'force destroy on pre-apply, fresh' => [ + PreApplyEvent::class, + TRUE, + 1, + $error_message_while_being_applied, + ], + 'destroy on pre-apply, fresh' => [ + PreApplyEvent::class, + FALSE, + 1, + $error_message_while_being_applied, + ], + 'force destroy on pre-apply, stale' => [ + PreApplyEvent::class, + TRUE, + 7200, + 'Stage directory does not exist', + ], + 'destroy on pre-apply, stale' => [ + PreApplyEvent::class, + FALSE, + 7200, + 'Stage directory does not exist', + ], + 'force destroy on post-apply, fresh' => [ + PostApplyEvent::class, + TRUE, + 1, + $error_message_while_being_applied, + ], + 'destroy on post-apply, fresh' => [ + PostApplyEvent::class, + FALSE, + 1, + $error_message_while_being_applied, + ], + 'force destroy on post-apply, stale' => [ + PostApplyEvent::class, + TRUE, + 7200, + NULL, + ], + 'destroy on post-apply, stale' => [ + PostApplyEvent::class, + FALSE, + 7200, + NULL, + ], + ]; + } + + /** + * Tests destroying a stage while applying it. + * + * @param string $event_class + * The event class for which to attempt to destroy the stage. + * @param bool $force + * Whether the stage should be force destroyed. + * @param int $time_offset + * How many simulated seconds should have elapsed between the PreApplyEvent + * being dispatched and the attempt to destroy the stage. + * @param string|null $expected_exception_message + * The expected exception message string if an exception is expected, or + * NULL if no exception message was expected. + * + * @dataProvider providerDestroyDuringApply + */ + public function testDestroyDuringApply(string $event_class, bool $force, int $time_offset, ?string $expected_exception_message): void { + $listener = function (StageEvent $event) use ($force, $time_offset): void { + // Simulate that a certain amount of time has passed since we started + // applying staged changes. After a point, it should be possible to + // destroy the stage even if it hasn't finished. + TestTime::$offset = $time_offset; + + // No real-life event subscriber should try to destroy the stage while + // handling another event. The only reason we're doing it here is to + // simulate an attempt to destroy the stage while it's being applied, for + // testing purposes. + $event->stage->destroy($force); + LoggingCommitter::setException( + PreconditionException::class, + $this->createMock(PreconditionInterface::class), + $this->createComposeStagerMessage('Stage directory does not exist'), + ); + }; + $this->addEventTestListener($listener, $event_class, 0); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + if ($expected_exception_message) { + $this->expectException(StageException::class); + $this->expectExceptionMessage($expected_exception_message); + } + $stage->apply(); + + // If the stage was successfully destroyed by the event handler (i.e., the + // stage has been applying for too long and is therefore considered stale), + // the postApply() method should fail because the stage is not claimed. + if ($stage->isAvailable()) { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Stage must be claimed before performing any operations on it.'); + } + $stage->postApply(); + } + + /** + * Test uninstalling any module while the staged changes are being applied. + */ + public function testUninstallModuleDuringApply(): void { + $listener = function (PreApplyEvent $event): void { + $this->assertTrue($event->stage->isApplying()); + + // Trying to uninstall any module while the stage is being applied should + // result in a module uninstall validation error. + try { + $this->container->get('module_installer') + ->uninstall(['package_manager_bypass']); + $this->fail('Expected an exception to be thrown while uninstalling a module.'); + } + catch (ModuleUninstallValidatorException $e) { + $this->assertStringContainsString('Modules cannot be uninstalled while Package Manager is applying staged changes to the active code base.', $e->getMessage()); + } + }; + $this->addEventTestListener($listener); + + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage->apply(); + } + + /** + * Tests that Composer Stager is invoked with a long timeout. + */ + public function testTimeouts(): void { + $stage = $this->createStage(); + $stage->create(420); + $stage->require(['ext-json:*']); + $stage->apply(); + + $timeouts = [ + // The beginner was given an explicit timeout. + BeginnerInterface::class => 420, + // The stager should be called with a timeout of 300 seconds, which is + // longer than Composer Stager's default timeout of 120 seconds. + StagerInterface::class => 300, + // The committer should have been called with an even longer timeout, + // since it's the most failure-sensitive operation. + CommitterInterface::class => 600, + ]; + foreach ($timeouts as $service_id => $expected_timeout) { + $invocations = $this->container->get($service_id)->getInvocationArguments(); + + // The services should have been called with the expected timeouts. + $expected_count = 1; + if ($service_id === StagerInterface::class) { + // Stage::require() calls Stager::stage() twice, once to change the + // version constraints in composer.json, and again to actually update + // the installed dependencies. + $expected_count = 2; + } + $this->assertCount($expected_count, $invocations); + $this->assertSame($expected_timeout, end($invocations[0])); + } + } + + /** + * Data provider for testCommitException(). + * + * @return \string[][] + * The test cases. + */ + public static function providerCommitException(): array { + return [ + 'RuntimeException to ApplyFailedException' => [ + 'RuntimeException', + ApplyFailedException::class, + ], + 'InvalidArgumentException' => [ + InvalidArgumentException::class, + StageException::class, + ], + 'PreconditionException' => [ + PreconditionException::class, + StageException::class, + ], + 'Exception' => [ + 'Exception', + ApplyFailedException::class, + ], + ]; + } + + /** + * Tests exception handling during calls to Composer Stager commit. + * + * @param string $thrown_class + * The throwable class that should be thrown by Composer Stager. + * @param string $expected_class + * The expected exception class, if different from $thrown_class. + * + * @dataProvider providerCommitException + */ + public function testCommitException(string $thrown_class, string $expected_class): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + + $throwable_arguments = [ + 'A very bad thing happened', + 123, + ]; + // Composer Stager's exception messages are usually translatable, so they + // need to be wrapped by a TranslatableMessage object. + if (is_subclass_of($thrown_class, ExceptionInterface::class)) { + $throwable_arguments[0] = $this->createComposeStagerMessage($throwable_arguments[0]); + } + // PreconditionException requires a preconditions object. + if ($thrown_class === PreconditionException::class) { + array_unshift($throwable_arguments, $this->createMock(PreconditionInterface::class)); + } + LoggingCommitter::setException($thrown_class, ...$throwable_arguments); + + try { + $stage->apply(); + $this->fail('Expected an exception.'); + } + catch (\Throwable $exception) { + $this->assertInstanceOf($expected_class, $exception); + $this->assertSame(123, $exception->getCode()); + + // This needs to be done because we always use the message from + // \Drupal\package_manager\Stage::getFailureMarkerMessage() when throwing + // ApplyFailedException. + if ($expected_class == ApplyFailedException::class) { + $this->assertMatchesRegularExpression("/^Staged changes failed to apply, and the site is in an indeterminate state. It is strongly recommended to restore the code and database from a backup. Caused by $thrown_class, with this message: A very bad thing happened\nBacktrace:\n#0 .*/", $exception->getMessage()); + } + else { + $this->assertSame('A very bad thing happened', $exception->getMessage()); + } + + $failure_marker = $this->container->get(FailureMarker::class); + if ($exception instanceof ApplyFailedException) { + $this->assertFileExists($failure_marker->getPath()); + $this->assertFalse($stage->isApplying()); + } + else { + $failure_marker->assertNotExists(); + } + } + } + + /** + * Tests that if a stage fails to apply, another stage cannot be created. + */ + public function testFailureMarkerPreventsCreate(): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + + // Make the committer throw an exception, which should cause the failure + // marker to be present. + $thrown_message = 'Thrown by the committer.'; + LoggingCommitter::setException(\Exception::class, $thrown_message); + try { + $stage->apply(); + $this->fail('Expected an exception.'); + } + catch (ApplyFailedException $e) { + $this->assertStringContainsString($thrown_message, $e->getMessage()); + $this->assertFalse($stage->isApplying()); + } + $stage->destroy(); + + // Even through the previous stage was destroyed, we cannot create a new one + // because the failure marker is still there. + $stage = $this->createStage(); + try { + $stage->create(); + $this->fail('Expected an exception.'); + } + catch (StageFailureMarkerException $e) { + $this->assertMatchesRegularExpression('/^Staged changes failed to apply, and the site is in an indeterminate state. It is strongly recommended to restore the code and database from a backup. Caused by Exception, with this message: ' . $thrown_message . "\nBacktrace:\n#0 .*/", $e->getMessage()); + $this->assertFalse($stage->isApplying()); + } + + // If the failure marker is cleared, we should be able to create the stage + // without issue. + $this->container->get(FailureMarker::class)->clear(); + $stage->create(); + } + + /** + * Tests that the failure marker file doesn't exist if apply succeeds. + * + * @see ::testCommitException + */ + public function testNoFailureFileOnSuccess(): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + $stage->apply(); + + $this->container->get(FailureMarker::class) + ->assertNotExists(); + } + + /** + * Data provider for testStoreDestroyInfo(). + * + * @return \string[][] + * The test cases. + */ + public static function providerStoreDestroyInfo(): array { + return [ + 'Changes applied' => [ + FALSE, + TRUE, + NULL, + 'This operation has already been applied.', + ], + 'Changes not applied and forced' => [ + TRUE, + FALSE, + NULL, + 'This operation was canceled by another user.', + ], + 'Changes not applied and not forced' => [ + FALSE, + FALSE, + NULL, + 'This operation was already canceled.', + ], + 'Changes applied, with a custom exception message.' => [ + FALSE, + TRUE, + t('Stage destroyed with a custom message.'), + 'Stage destroyed with a custom message.', + ], + 'Changes not applied and forced, with a custom exception message.' => [ + TRUE, + FALSE, + t('Stage destroyed with a custom message.'), + 'Stage destroyed with a custom message.', + ], + 'Changes not applied and not forced, with a custom exception message.' => [ + FALSE, + FALSE, + t('Stage destroyed with a custom message.'), + 'Stage destroyed with a custom message.', + ], + ]; + } + + /** + * Tests exceptions thrown because of previously destroyed stage. + * + * @param bool $force + * Whether the stage was forcefully destroyed. + * @param bool $changes_applied + * Whether the changes are applied. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $message + * A message about why the stage was destroyed or null. + * @param string $expected_exception_message + * The expected exception message string. + * + * @dataProvider providerStoreDestroyInfo + */ + public function testStoreDestroyInfo(bool $force, bool $changes_applied, ?TranslatableMarkup $message, string $expected_exception_message): void { + $stage = $this->createStage(); + $stage_id = $stage->create(); + $stage->require(['drupal/core:9.8.1']); + $tempstore = $this->container->get('tempstore.shared'); + // Simulate whether ::apply() has run or not. + // @see \Drupal\package_manager\Stage::TEMPSTORE_CHANGES_APPLIED + $tempstore->get('package_manager_stage')->set('changes_applied', $changes_applied); + $stage->destroy($force, $message); + + // Prove the first stage was destroyed: a second stage can be created + // without an exception being thrown. + $stage2 = $this->createStage(); + $stage2->create(); + + // Claiming the first stage always fails in this test because it was + // destroyed, but the exception message depends on why it was destroyed. + $this->expectException(StageException::class); + $this->expectExceptionMessage($expected_exception_message); + $stage->claim($stage_id); + } + + /** + * Tests exception message once temp store message has expired. + */ + public function testTempStoreMessageExpired(): void { + $stage = $this->createStage(); + $stage_id = $stage->create(); + $stage->require(['drupal/core:9.8.1']); + $stage->destroy(TRUE, t('Force destroy stage.')); + + // Delete the tempstore message stored for the previously destroyed stage. + $tempstore = $this->container->get('tempstore.shared'); + // @see \Drupal\package_manager\Stage::TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX + $tempstore->get('package_manager_stage')->delete('TEMPSTORE_DESTROYED_STAGES_INFO' . $stage_id); + + // Claiming the stage will fail, but we won't get the message we set in + // \Drupal\package_manager\Stage::storeDestroyInfo() as we are deleting it + // above. + $this->expectException(StageException::class); + $this->expectExceptionMessage('Cannot claim the stage because no stage has been created.'); + $stage->claim($stage_id); + } + + /** + * Tests running apply and post-apply in the same request. + */ + public function testApplyAndPostApplyInSameRequest(): void { + $stage = $this->createStage(); + + $logger = new TestLogger(); + $stage->setLogger($logger); + $warning_message = 'Post-apply tasks are running in the same request during which staged changes were applied to the active code base. This can result in unpredictable behavior.'; + + // Run apply and post-apply in the same request (i.e., the same request + // time), and ensure the warning is logged. + $stage->create(); + $stage->require(['drupal/core:9.8.1']); + $stage->apply(); + $stage->postApply(); + $this->assertTrue($logger->hasRecord($warning_message, LogLevel::WARNING)); + $stage->destroy(); + + $logger->reset(); + $stage->create(); + $stage->require(['drupal/core:9.8.2']); + $stage->apply(); + // Simulate post-apply taking place in another request by simulating a + // request time 30 seconds after apply started. + TestTime::$offset = 30; + $stage->postApply(); + $this->assertFalse($logger->hasRecord($warning_message, LogLevel::WARNING)); + } + + /** + * Data provider for ::testFailureDuringComposerStagerOperations(). + * + * @return array[] + * The test cases. + */ + public static function providerFailureDuringComposerStagerOperations(): array { + return [ + [LoggingBeginner::class], + [NoOpStager::class], + [LoggingCommitter::class], + ]; + } + + /** + * Tests when Composer Stager throws an exception during an operation. + * + * @param class-string $throwing_class + * The fully qualified name of the Composer Stager class that should throw + * an exception. It is expected to have a static ::setException() method, + * provided by \Drupal\package_manager_bypass\ComposerStagerExceptionTrait. + * + * @dataProvider providerFailureDuringComposerStagerOperations + */ + public function testFailureDuringComposerStagerOperations(string $throwing_class): void { + $exception_message = "$throwing_class is angry!"; + $throwing_class::setException(\Exception::class, $exception_message, 1024); + + $expected_message = preg_quote($exception_message); + if ($throwing_class === LoggingCommitter::class) { + $expected_message = "/^Staged changes failed to apply, and the site is in an indeterminate state. It is strongly recommended to restore the code and database from a backup. Caused by Exception, with this message: $expected_message\nBacktrace:\n#0 .*/"; + } + else { + $expected_message = "/^$expected_message$/"; + } + + $stage = $this->createStage(); + try { + $stage->create(); + $stage->require(['ext-json:*']); + $stage->apply(); + $this->fail('Expected an exception to be thrown, but it was not.'); + } + catch (StageException $e) { + $this->assertMatchesRegularExpression($expected_message, $e->getMessage()); + $this->assertSame(1024, $e->getCode()); + $this->assertInstanceOf(\Exception::class, $e->getPrevious()); + } + } + + /** + * Tests that paths to exclude are collected before create and apply. + */ + public function testCollectPathsToExclude(): void { + $this->addEventTestListener(function (CollectPathsToExcludeEvent $event): void { + $event->add('exclude/me'); + }, CollectPathsToExcludeEvent::class); + + // On pre-create and pre-apply, ensure that the excluded path is known to + // the event. + $asserted = FALSE; + $assert_excluded = function (object $event) use (&$asserted): void { + $this->assertContains('exclude/me', $event->excludedPaths->getAll()); + // Use this to confirm that this listener was actually called. + $asserted = TRUE; + }; + $this->addEventTestListener($assert_excluded, PreCreateEvent::class); + $this->addEventTestListener($assert_excluded); + + $stage = $this->createStage(); + $stage->create(); + $this->assertTrue($asserted); + $asserted = FALSE; + $stage->require(['ext-json:*']); + $stage->apply(); + $this->assertTrue($asserted); + } + + /** + * Tests that the failure marker file is excluded using a relative path. + */ + public function testFailureMarkerFileExcluded(): void { + $this->assertResults([]); + /** @var \Drupal\package_manager_bypass\LoggingCommitter $committer */ + $committer = $this->container->get(CommitterInterface::class); + $committer_args = $committer->getInvocationArguments(); + $this->assertCount(1, $committer_args); + $this->assertContains('PACKAGE_MANAGER_FAILURE.yml', $committer_args[0][2]); + } + + /** + * Tests that if a stage fails to get paths to exclude, throws a stage exception. + */ + public function testFailureCollectPathsToExclude(): void { + $project_root = $this->container->get(PathLocator::class)->getProjectRoot(); + unlink($project_root . '/composer.json'); + $this->expectException(StageException::class); + $this->expectExceptionMessage("composer.json not found."); + $this->createStage()->create(); + } + + /** + * Tests that if apply fails to get paths to exclude, throws a stage exception. + */ + public function testFailureCollectPathsToExcludeOnApply(): void { + $stage = $this->createStage(); + $stage->create(); + $stage->require(['drupal/random']); + $this->expectException(StageException::class); + $this->expectExceptionMessage("composer.json not found."); + unlink($stage->getStageDirectory() . '/composer.json'); + $stage->apply(); + } + + /** + * @covers ::stageDirectoryExists + */ + public function testStageDirectoryExists(): void { + // Ensure that stageDirectoryExists() returns an accurate result during + // pre-create. + $listener = function (StageEvent $event): void { + $stage = $event->stage; + // The directory should not exist yet, because we are still in pre-create. + $this->assertDirectoryDoesNotExist($stage->getStageDirectory()); + $this->assertFalse($stage->stageDirectoryExists()); + }; + $this->addEventTestListener($listener, PreCreateEvent::class); + + $stage = $this->createStage(); + $this->assertFalse($stage->stageDirectoryExists()); + $stage->create(); + $this->assertTrue($stage->stageDirectoryExists()); + } + + /** + * Tests that destroyed stage directories are actually deleted during cron. + * + * @covers ::destroy + * @covers \Drupal\package_manager\Plugin\QueueWorker\Cleaner + */ + public function testStageDirectoryDeletedDuringCron(): void { + $stage = $this->createStage(); + $stage->create(); + $dir = $stage->getStageDirectory(); + $this->assertDirectoryExists($dir); + $stage->destroy(); + // The stage directory should still exist, but the stage should be + // available. + $this->assertTrue($stage->isAvailable()); + $this->assertDirectoryExists($dir); + + $this->container->get('cron')->run(); + $this->assertDirectoryDoesNotExist($dir); + } + +} + +/** + * A test-only implementation of the time service. + */ +class TestTime extends Time { + + /** + * An offset to add to the request time. + * + * @var int + */ + public static $offset = 0; + + /** + * {@inheritdoc} + */ + public function getRequestTime() { + return parent::getRequestTime() + static::$offset; + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/StageEventsTest.php b/core/modules/package_manager/tests/src/Kernel/StageEventsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8782d27a44c3a42257c78f2318cb8c3dfed672d1 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/StageEventsTest.php @@ -0,0 +1,217 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\package_manager\Event\PostApplyEvent; +use Drupal\package_manager\Event\PostCreateEvent; +use Drupal\package_manager\Event\PostRequireEvent; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Event\PreOperationStageEvent; +use Drupal\package_manager\Event\PreRequireEvent; +use Drupal\package_manager\Event\StageEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\ValidationResult; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Tests that the stage fires events during its lifecycle. + * + * @covers \Drupal\package_manager\Event\StageEvent + * @group package_manager + * @internal + */ +class StageEventsTest extends PackageManagerKernelTestBase implements EventSubscriberInterface { + + /** + * The events that were fired, in the order they were fired. + * + * @var string[] + */ + private $events = []; + + /** + * The stage under test. + * + * @var \Drupal\package_manager\StageBase + */ + private $stage; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->stage = $this->createStage(); + } + + /** + * {@inheritdoc} + */ + public function register(ContainerBuilder $container): void { + parent::register($container); + + // Since this test adds arbitrary event listeners that aren't services, we + // need to ensure they will persist even if the container is rebuilt when + // staged changes are applied. + $container->getDefinition('event_dispatcher')->addTag('persist'); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + PreCreateEvent::class => 'handleEvent', + PostCreateEvent::class => 'handleEvent', + PreRequireEvent::class => 'handleEvent', + PostRequireEvent::class => 'handleEvent', + PreApplyEvent::class => 'handleEvent', + PostApplyEvent::class => 'handleEvent', + ]; + } + + /** + * Handles a stage life cycle event. + * + * @param \Drupal\package_manager\Event\StageEvent $event + * The event object. + */ + public function handleEvent(StageEvent $event): void { + $this->events[] = get_class($event); + + // The event should have a reference to the stage which fired it. + $this->assertSame($event->stage, $this->stage); + } + + /** + * Tests that the stage fires life cycle events in a specific order. + */ + public function testEvents(): void { + $this->container->get('event_dispatcher')->addSubscriber($this); + + $this->stage->create(); + $this->stage->require(['ext-json:*']); + $this->stage->apply(); + $this->stage->postApply(); + $this->stage->destroy(); + + $this->assertSame($this->events, [ + PreCreateEvent::class, + PostCreateEvent::class, + PreRequireEvent::class, + PostRequireEvent::class, + PreApplyEvent::class, + PostApplyEvent::class, + ]); + } + + /** + * Data provider for testValidationResults(). + * + * @return string[][] + * The test cases. + */ + public static function providerValidationResults(): array { + return [ + 'PreCreateEvent' => [PreCreateEvent::class], + 'PreRequireEvent' => [PreRequireEvent::class], + 'PreApplyEvent' => [PreApplyEvent::class], + ]; + } + + /** + * Tests that an exception is thrown if an event has validation results. + * + * @param string $event_class + * The event class to test. + * + * @dataProvider providerValidationResults + */ + public function testValidationResults(string $event_class): void { + $error_messages = [t('Burn, baby, burn')]; + // Set up an event listener which will only flag an error for the event + // class under test. + $handler = function (StageEvent $event) use ($event_class, $error_messages): void { + if (get_class($event) === $event_class) { + if ($event instanceof PreOperationStageEvent) { + $event->addError($error_messages); + } + } + }; + $this->addEventTestListener($handler, $event_class); + + $result = ValidationResult::createError($error_messages); + $this->assertResults([$result], $event_class); + } + + /** + * Tests adding validation results to events. + */ + public function testAddResult(): void { + $stage = $this->createStage(); + + $error = ValidationResult::createError([ + t('Burn, baby, burn!'), + ]); + $warning = ValidationResult::createWarning([ + t('The path ahead is scary...'), + ]); + $excluded_paths = $this->createMock(PathListInterface::class); + + // Status check events can accept both errors and warnings. + $event = new StatusCheckEvent($stage, $excluded_paths); + $event->addResult($error); + $event->addResult($warning); + $this->assertSame([$error, $warning], $event->getResults()); + + // Other stage events will accept errors, but throw an exception if you try + // to add a warning. + $event = new PreCreateEvent($stage, $excluded_paths); + $event->addResult($error); + $this->assertSame([$error], $event->getResults()); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Only errors are allowed.'); + $event->addResult($warning); + } + + /** + * Tests that pre- and post-require events have access to the package lists. + */ + public function testPackageListsAvailableToRequireEvents(): void { + $listener = function (object $event): void { + $expected_runtime = ['drupal/core' => '9.8.2']; + $expected_dev = ['drupal/core-dev' => '9.8.2']; + + /** @var \Drupal\package_manager\Event\PreRequireEvent|\Drupal\package_manager\Event\PostRequireEvent $event */ + $this->assertSame($expected_runtime, $event->getRuntimePackages()); + $this->assertSame($expected_dev, $event->getDevPackages()); + }; + $this->addEventTestListener($listener, PreRequireEvent::class); + $this->addEventTestListener($listener, PostRequireEvent::class); + + $this->stage->create(); + $this->stage->require(['drupal/core:9.8.2'], ['drupal/core-dev:9.8.2']); + } + + /** + * Tests exception is thrown if error is not added before stopPropagation(). + */ + public function testExceptionIfNoErrorBeforeStopPropagation(): void { + $listener = function (PreCreateEvent $event): void { + $event->stopPropagation(); + }; + $this->addEventTestListener($listener, PreCreateEvent::class); + + $this->expectException(StageEventException::class); + $this->expectExceptionMessage('Event propagation stopped without any errors added to the event. This bypasses the package_manager validation system.'); + $stage = $this->createStage(); + $stage->create(); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php b/core/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e55c472e2bab5dcd479b2c4565985c385966e50f --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php @@ -0,0 +1,242 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Exception\StageException; +use Drupal\package_manager\Exception\StageOwnershipException; +use Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber; +use Drupal\Tests\user\Traits\UserCreationTrait; + +/** + * Tests that ownership of the stage is enforced. + * + * @group package_manager + * @internal + */ +class StageOwnershipTest extends PackageManagerKernelTestBase { + + use UserCreationTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'system', + 'user', + 'package_manager_test_validation', + ]; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->installEntitySchema('user'); + } + + /** + * Tests only the owner of stage can perform operations, even if logged out. + */ + public function testOwnershipEnforcedWhenLoggedOut(): void { + $this->assertOwnershipIsEnforced($this->createStage(), $this->createStage()); + } + + /** + * Tests only the owner of stage can perform operations. + */ + public function testOwnershipEnforcedWhenLoggedIn(): void { + $user_1 = $this->createUser([], NULL, FALSE, ['uid' => 2]); + $this->setCurrentUser($user_1); + + $will_create = $this->createStage(); + // Rebuild the container so that the shared tempstore factory is made + // properly aware of the new current user ($user_2) before another stage + // is created. + $kernel = $this->container->get('kernel'); + $this->container = $kernel->rebuildContainer(); + $user_2 = $this->createUser(); + $this->setCurrentUser($user_2); + $this->assertOwnershipIsEnforced($will_create, $this->createStage()); + } + + /** + * Asserts that ownership is enforced across stage directories. + * + * @param \Drupal\Tests\package_manager\Kernel\TestStage $will_create + * The stage that will be created, and owned by the current user or session. + * @param \Drupal\Tests\package_manager\Kernel\TestStage $never_create + * The stage that will not be created, but should still respect the + * ownership and status of the other stage. + */ + private function assertOwnershipIsEnforced(TestStage $will_create, TestStage $never_create): void { + // Before the stage directory is created, isAvailable() should return + // TRUE. + $this->assertTrue($will_create->isAvailable()); + $this->assertTrue($never_create->isAvailable()); + + $stage_id = $will_create->create(); + // Both stage directories should be considered unavailable (i.e., cannot + // be created until the existing one is destroyed first). + $this->assertFalse($will_create->isAvailable()); + $this->assertFalse($never_create->isAvailable()); + + // We should get an error if we try to create the stage directory again, + // regardless of who owns it. + foreach ([$will_create, $never_create] as $stage) { + try { + $stage->create(); + $this->fail("Able to create a stage that already exists."); + } + catch (StageException $exception) { + $this->assertSame('Cannot create a new stage because one already exists.', $exception->getMessage()); + } + } + + try { + $never_create->claim($stage_id); + } + catch (StageOwnershipException $exception) { + $this->assertSame('Cannot claim the stage because it is not owned by the current user or session.', $exception->getMessage()); + } + + // Only the stage's owner should be able to move it through its life cycle. + $callbacks = [ + 'require' => [ + ['vendor/lib:0.0.1'], + ], + 'apply' => [], + 'postApply' => [], + 'destroy' => [], + ]; + foreach ($callbacks as $method => $arguments) { + try { + $never_create->$method(...$arguments); + $this->fail("Able to call '$method' on a stage that was never created."); + } + catch (\LogicException $exception) { + $this->assertSame('Stage must be claimed before performing any operations on it.', $exception->getMessage()); + } + // The call should succeed on the created stage. + $will_create->$method(...$arguments); + } + } + + /** + * Tests that the stage is owned by the person who calls create() on it. + */ + public function testStageOwnedByCreator(): void { + // Even if the stage is instantiated before anyone is logged in, it should + // still be owned (and claimable) by the user who called create() on it. + $stage = $this->createStage(); + + $account = $this->createUser([], NULL, FALSE, ['uid' => 2]); + $this->setCurrentUser($account); + $id = $stage->create(); + $this->createStage()->claim($id); + } + + /** + * Tests behavior of claiming a stage. + */ + public function testClaim(): void { + // Log in as a user so that any stage instances created during the session + // should be able to successfully call ::claim(). + $user_2 = $this->createUser([], NULL, FALSE, ['uid' => 2]); + $this->setCurrentUser($user_2); + $creator_stage = $this->createStage(); + + // Ensure that exceptions thrown during ::create() will not lock the stage. + $error = new \Exception('I am going to stop stage creation.'); + TestSubscriber::setException($error, PreCreateEvent::class); + try { + $creator_stage->create(); + $this->fail('Was able to create the stage despite throwing an exception in pre-create.'); + } + catch (\RuntimeException $exception) { + $this->assertSame($error->getMessage(), $exception->getMessage()); + } + + // The stage should be available, and throw if we try to claim it. + $this->assertTrue($creator_stage->isAvailable()); + try { + $creator_stage->claim('any-id-would-fail'); + $this->fail('Was able to claim a stage that has not been created.'); + } + catch (StageException $exception) { + $this->assertSame('Cannot claim the stage because no stage has been created.', $exception->getMessage()); + } + TestSubscriber::setException(NULL, PreCreateEvent::class); + + // Even if we own the stage, we should not be able to claim it with an + // incorrect ID. + $stage_id = $creator_stage->create(); + try { + $this->createStage()->claim('not-correct-id'); + $this->fail('Was able to claim an owned stage with an incorrect ID.'); + } + catch (StageOwnershipException $exception) { + $this->assertSame('Cannot claim the stage because the current lock does not match the stored lock.', $exception->getMessage()); + } + + // A stage that is successfully claimed should be able to call any method + // for its life cycle. + $callbacks = [ + 'require' => [ + ['vendor/lib:0.0.1'], + ], + 'apply' => [], + 'postApply' => [], + 'destroy' => [], + ]; + foreach ($callbacks as $method => $arguments) { + // Create a new stage instance for each method. + $this->createStage()->claim($stage_id)->$method(...$arguments); + } + + // The stage cannot be claimed after it's been destroyed. + try { + $this->createStage()->claim($stage_id); + $this->fail('Was able to claim an owned stage after it was destroyed.'); + } + catch (StageException $exception) { + $this->assertSame('This operation was already canceled.', $exception->getMessage()); + } + + // Create a new stage and then log in as a different user. + $new_stage_id = $this->createStage()->create(); + $user_3 = $this->createUser([], NULL, FALSE, ['uid' => 3]); + $this->setCurrentUser($user_3); + + // Even if they use the correct stage ID, the current user cannot claim a + // stage they didn't create. + try { + $this->createStage()->claim($new_stage_id); + } + catch (StageOwnershipException $exception) { + $this->assertSame('Cannot claim the stage because it is not owned by the current user or session.', $exception->getMessage()); + } + } + + /** + * Tests a stage being destroyed by a user who doesn't own it. + */ + public function testForceDestroy(): void { + $owned = $this->createStage(); + $owned->create(); + + $not_owned = $this->createStage(); + try { + $not_owned->destroy(); + $this->fail("Able to destroy a stage that we don't own."); + } + catch (\LogicException $exception) { + $this->assertSame('Stage must be claimed before performing any operations on it.', $exception->getMessage()); + } + // We should be able to destroy the stage if we ignore ownership. + $not_owned->destroy(TRUE); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..86473cc988f36145efc2c187d404c480cd683c5e --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php @@ -0,0 +1,207 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\Validator\StagedDBUpdateValidator + * @group package_manager + * @internal + */ +class StagedDBUpdateValidatorTest extends PackageManagerKernelTestBase { + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + $this->container->get('theme_installer')->install(['stark']); + $this->assertFalse($this->container->get('module_handler')->moduleExists('views')); + $this->assertFalse($this->container->get('theme_handler')->themeExists('olivero')); + + // Ensure that all the extensions we're testing with have database update + // files in the active directory. + $active_dir = $this->container->get(PathLocator::class)->getProjectRoot(); + + // System and Stark are installed, so they are used to test what happens + // when database updates are detected in installed extensions. Views and + // Olivero are not installed, so they are used to test what happens when + // non-installed extensions have database updates. + $extensions = [ + 'core/modules/system', + 'core/themes/stark', + 'core/modules/views', + 'core/themes/olivero', + ]; + foreach ($extensions as $extension_path) { + $extension_path = $active_dir . '/' . $extension_path; + mkdir($extension_path, 0777, TRUE); + $extension_name = basename($extension_path); + + // Ensure each extension has a .install and a .post_update.php file with + // an empty update function in it. + foreach (['install', 'post_update.php'] as $suffix) { + $function_name = match ($suffix) { + 'install' => $extension_name . '_update_1000', + 'post_update.php' => $extension_name . '_post_update_test', + }; + file_put_contents("$extension_path/$extension_name.$suffix", "<?php\nfunction $function_name() {}"); + } + } + } + + /** + * Data provider for ::testStagedDatabaseUpdates(). + * + * @return array[] + * The test cases. + */ + public static function providerStagedDatabaseUpdate(): array { + $summary = t('Database updates have been detected in the following extensions.'); + + return [ + 'schema update in installed module' => [ + 'core/modules/system', + 'install', + [ + ValidationResult::createWarning([ + t('System'), + ], $summary), + ], + ], + 'post-update in installed module' => [ + 'core/modules/system', + 'post_update.php', + [ + ValidationResult::createWarning([ + t('System'), + ], $summary), + ], + ], + 'schema update in installed theme' => [ + 'core/themes/stark', + 'install', + [ + ValidationResult::createWarning([ + t('Stark'), + ], $summary), + ], + ], + 'post-update in installed theme' => [ + 'core/themes/stark', + 'post_update.php', + [ + ValidationResult::createWarning([ + t('Stark'), + ], $summary), + ], + ], + // The validator should ignore changes in any extensions that aren't + // installed. + 'schema update in non-installed module' => [ + 'core/modules/views', + 'install', + [], + ], + 'post-update in non-installed module' => [ + 'core/modules/views', + 'post_update.php', + [], + ], + 'schema update in non-installed theme' => [ + 'core/themes/olivero', + 'install', + [], + ], + 'post-update in non-installed theme' => [ + 'core/themes/olivero', + 'post_update.php', + [], + ], + ]; + } + + /** + * Tests validation of staged database updates. + * + * @param string $extension_dir + * The directory of the extension that should have database updates, + * relative to the stage directory. + * @param string $file_extension + * The extension of the update file, without the leading period. Must be + * either `install` or `post_update.php`. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerStagedDatabaseUpdate + */ + public function testStagedDatabaseUpdate(string $extension_dir, string $file_extension, array $expected_results): void { + $extension_name = basename($extension_dir); + $relative_file_path = $extension_dir . '/' . $extension_name . '.' . $file_extension; + + $stage = $this->createStage(); + $stage->create(); + // Nothing has been changed in the stage, so ensure the validator doesn't + // detect any changes. + $this->assertStatusCheckResults([], $stage); + + $staged_update_file = $stage->getStageDirectory() . '/' . $relative_file_path; + $this->assertFileIsWritable($staged_update_file); + + // Now add a "real" update function -- either a schema update or a + // post-update, depending on what $file_extension is -- and ensure that the + // validator detects it. + $update_function_name = match ($file_extension) { + 'install' => $extension_name . '_update_1001', + 'post_update.php' => $extension_name . '_post_update_' . $this->randomMachineName(), + }; + file_put_contents($staged_update_file, "function $update_function_name() {}\n", FILE_APPEND); + $this->assertStatusCheckResults($expected_results, $stage); + + // Add a bunch of functions which are named similarly to real schema update + // and post-update functions, but not quite right, to ensure they are + // ignored by the validator. Also throw an anonymous function in there to + // ensure those are ignored as well. + $code = <<<END +<?php +function {$extension_name}_update() { \$foo = function () {}; } +function {$extension_name}_update_string_123() {} +function {$extension_name}_update__123() {} +function ($extension_name}__post_update_test() {} +function ($extension_name}_post_update() {} +END; + file_put_contents($staged_update_file, $code); + $this->assertStatusCheckResults([], $stage); + + // If the update file is deleted from the stage, the validator should not + // detect any database updates. + unlink($staged_update_file); + $this->assertStatusCheckResults([], $stage); + + // If the update file doesn't exist in the active directory, but does exist + // in the stage with a legitimate schema update or post-update function, the + // validator should detect it. + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + unlink($project_root . '/' . $relative_file_path); + file_put_contents($staged_update_file, "<?php\nfunction $update_function_name() {}"); + $this->assertStatusCheckResults($expected_results, $stage); + } + + /** + * Tests that the validator disregards unclaimed stages. + */ + public function testUnclaimedStage(): void { + $stage = $this->createStage(); + $stage->create(); + $this->assertStatusCheckResults([], $stage); + // A new, unclaimed stage should be ignored by the validator. + $this->assertStatusCheckResults([], $this->createStage()); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/StatusCheckTraitTest.php b/core/modules/package_manager/tests/src/Kernel/StatusCheckTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7242405264c89fbac47c868449afd929c6ae62de --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/StatusCheckTraitTest.php @@ -0,0 +1,61 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\CollectPathsToExcludeEvent; +use Drupal\package_manager\Event\StatusCheckEvent; +use Drupal\package_manager\StatusCheckTrait; +use Drupal\package_manager\ValidationResult; + +/** + * @covers \Drupal\package_manager\StatusCheckTrait + * @group package_manager + * @internal + */ +class StatusCheckTraitTest extends PackageManagerKernelTestBase { + + use StatusCheckTrait; + + /** + * Tests that StatusCheckTrait will collect paths to exclude. + */ + public function testPathsToExcludeCollected(): void { + $this->addEventTestListener(function (CollectPathsToExcludeEvent $event): void { + $event->add('/junk/drawer'); + }, CollectPathsToExcludeEvent::class); + + $status_check_called = FALSE; + $this->addEventTestListener(function (StatusCheckEvent $event) use (&$status_check_called): void { + $this->assertContains('/junk/drawer', $event->excludedPaths->getAll()); + $status_check_called = TRUE; + }, StatusCheckEvent::class); + $this->runStatusCheck($this->createStage(), $this->container->get('event_dispatcher')); + $this->assertTrue($status_check_called); + } + + /** + * Tests that any error will be added to the status check event. + */ + public function testNoErrorIfPathsToExcludeCannotBeCollected(): void { + $e = new \Exception('Not a chance, friend.'); + + $listener = function () use ($e): never { + throw $e; + }; + $this->addEventTestListener($listener, CollectPathsToExcludeEvent::class); + + $excluded_paths_are_null = FALSE; + $listener = function (StatusCheckEvent $event) use (&$excluded_paths_are_null): void { + $excluded_paths_are_null = is_null($event->excludedPaths); + }; + $this->addEventTestListener($listener, StatusCheckEvent::class); + + $this->assertStatusCheckResults([ + ValidationResult::createErrorFromThrowable($e), + ]); + $this->assertTrue($excluded_paths_are_null); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..80bffd5119767e32af58e407e015781496763c18 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php @@ -0,0 +1,243 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\fixture_manipulator\ActiveFixtureManipulator; +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\ValidationResult; +use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait; + +/** + * @coversDefaultClass \Drupal\package_manager\Validator\SupportedReleaseValidator + * @group package_manager + * @internal + */ +class SupportedReleaseValidatorTest extends PackageManagerKernelTestBase { + + use FixtureUtilityTrait; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + (new ActiveFixtureManipulator()) + ->addPackage([ + 'name' => "drupal/dependency", + 'version' => '9.8.0', + 'type' => 'drupal-library', + ]) + ->addPackage([ + 'name' => "drupal/semver_test", + 'version' => '8.1.0', + 'type' => 'drupal-module', + ]) + ->addPackage([ + 'name' => "drupal/aaa_update_test", + 'version' => '2.0.0', + 'type' => 'drupal-module', + ]) + ->addPackage([ + 'name' => "drupal/package_manager_theme", + 'version' => '8.1.0', + 'type' => 'drupal-theme', + ]) + ->addPackage([ + 'name' => "somewhere/a_drupal_module", + 'version' => '8.1.0', + 'type' => 'drupal-module', + ]) + ->addPackage( + [ + 'name' => "drupal/module_no_project", + 'version' => '1.0.0', + 'type' => 'drupal-module', + ], + FALSE, + FALSE, + [ + 'module_no_project.info.yml' => '{name: "Module No Project", type: "module"}', + ], + ) + ->commitChanges(); + } + + /** + * Data provider for testException(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerException(): array { + $release_fixture_folder = __DIR__ . '/../../fixtures/release-history'; + $summary = t('Cannot update because the following project version is not in the list of installable releases.'); + return [ + 'semver, supported update' => [ + [ + 'semver_test' => "$release_fixture_folder/semver_test.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/semver_test", + 'version' => '8.1.1', + 'type' => 'drupal-module', + ], + [], + ], + 'semver, update to unsupported branch' => [ + [ + 'semver_test' => "$release_fixture_folder/semver_test.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/semver_test", + 'version' => '8.2.0', + 'type' => 'drupal-module', + ], + [ + ValidationResult::createError([t('semver_test (drupal/semver_test) 8.2.0')], $summary), + ], + ], + 'legacy, supported update' => [ + [ + 'aaa_update_test' => "$release_fixture_folder/aaa_update_test.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/aaa_update_test", + 'version' => '2.1.0', + 'type' => 'drupal-module', + ], + [], + ], + 'legacy, update to unsupported branch' => [ + [ + 'aaa_update_test' => "$release_fixture_folder/aaa_update_test.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/aaa_update_test", + 'version' => '3.0.0', + 'type' => 'drupal-module', + ], + [ + ValidationResult::createError([t('aaa_update_test (drupal/aaa_update_test) 3.0.0')], $summary), + ], + ], + 'package_manager_test_update(not in active), update to unsupported branch' => [ + [ + 'package_manager_test_update' => "$release_fixture_folder/package_manager_test_update.7.0.1.xml", + ], + FALSE, + [ + 'name' => "drupal/package_manager_test_update", + 'version' => '7.0.1-dev', + 'type' => 'drupal-module', + ], + [ + ValidationResult::createError([t('package_manager_test_update (drupal/package_manager_test_update) 7.0.1-dev')], $summary), + ], + ], + 'package_manager_test_update(not in active), update to supported branch' => [ + [ + 'package_manager_test_update' => "$release_fixture_folder/package_manager_test_update.7.0.1.xml", + ], + FALSE, + [ + 'name' => "drupal/package_manager_test_update", + 'version' => '7.0.1', + 'type' => 'drupal-module', + ], + [], + ], + 'package_manager_theme, supported update' => [ + [ + 'package_manager_theme' => "$release_fixture_folder/package_manager_theme.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/package_manager_theme", + 'version' => '8.1.1', + 'type' => 'drupal-theme', + ], + [], + ], + 'package_manager_theme, update to unsupported branch' => [ + [ + 'package_manager_theme' => "$release_fixture_folder/package_manager_theme.1.1.xml", + ], + TRUE, + [ + 'name' => "drupal/package_manager_theme", + 'version' => '8.2.0', + 'type' => 'drupal-theme', + ], + [ + ValidationResult::createError([t('package_manager_theme (drupal/package_manager_theme) 8.2.0')], $summary), + ], + ], + // For modules that don't start with 'drupal/' will not have update XML + // from drupal.org and so will not be checked by the validator. + // @see \Drupal\package_manager\Validator\SupportedReleaseValidator::checkStagedReleases() + 'updating a module that does not start with drupal/' => [ + [], + TRUE, + [ + 'name' => "somewhere/a_drupal_module", + 'version' => '8.1.1', + 'type' => 'drupal-module', + ], + [], + ], + 'updating a module that does not have project info' => [ + [], + TRUE, + [ + 'name' => "drupal/module_no_project", + 'version' => '1.1.0', + 'type' => 'drupal-module', + ], + [ + ValidationResult::createError([t('Cannot update because the following new or updated Drupal package does not have project information: drupal/module_no_project')]), + ], + ], + ]; + } + + /** + * Tests exceptions when updating to unsupported or insecure releases. + * + * @param array $release_metadata + * Array of paths of the fake release metadata keyed by project name. + * @param bool $project_in_active + * Whether the project is in the active directory or not. + * @param array $package + * The package that will be added or modified. + * @param array $expected_results + * The expected validation results. + * + * @dataProvider providerException + */ + public function testException(array $release_metadata, bool $project_in_active, array $package, array $expected_results): void { + $this->setReleaseMetadata(['drupal' => __DIR__ . '/../../fixtures/release-history/drupal.9.8.2.xml'] + $release_metadata); + + $stage_manipulator = $this->getStageFixtureManipulator(); + if ($project_in_active) { + $stage_manipulator->setVersion($package['name'], $package['version']); + } + else { + $stage_manipulator->addPackage($package); + } + // We always update this module to prove that the validator will skip this + // module as it's of type 'drupal-library'. + // @see \Drupal\package_manager\Validator\SupportedReleaseValidator::checkStagedReleases() + $stage_manipulator->setVersion('drupal/dependency', '9.8.1'); + $this->assertResults($expected_results, PreApplyEvent::class); + // Ensure that any errors arising from invalid project info (which we expect + // in this test) will not fail the test during tear-down. + $this->failureLogger->reset(); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/SymlinkValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/SymlinkValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..46d36bfb83c4212c6bc3c12131606007821851e6 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/SymlinkValidatorTest.php @@ -0,0 +1,203 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\Exception\StageEventException; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use PhpTuf\ComposerStager\API\Environment\Service\EnvironmentInterface; +use Prophecy\Argument; + +/** + * @covers \Drupal\package_manager\Validator\SymlinkValidator + * @group package_manager + * @internal + */ +class SymlinkValidatorTest extends PackageManagerKernelTestBase { + + /** + * Tests that relative symlinks within the same package are supported. + */ + public function testSymlinksWithinSamePackage(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + $drush_dir = $project_root . '/vendor/drush/drush'; + mkdir($drush_dir . '/docs', 0777, TRUE); + touch($drush_dir . '/drush_logo-black.png'); + // Relative symlinks must be made from their actual directory to be + // correctly evaluated. + chdir($drush_dir . '/docs'); + symlink('../drush_logo-black.png', 'drush_logo-black.png'); + + // Switch back to the Drupal root to ensure that the check isn't affected + // by which directory we happen to be in. + chdir($this->getDrupalRoot()); + $this->assertStatusCheckResults([]); + } + + /** + * Tests that hard links are not supported. + */ + public function testHardLinks(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + link($project_root . '/composer.json', $project_root . '/composer.link'); + $result = ValidationResult::createError([ + t('The %which directory at %dir contains hard links, which is not supported. The first one is %file.', [ + '%which' => 'active', + '%dir' => $project_root, + '%file' => $project_root . '/composer.json', + ]), + ]); + $this->assertStatusCheckResults([$result]); + } + + /** + * Tests that symlinks with absolute paths are not supported. + */ + public function testAbsoluteSymlinks(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + symlink($project_root . '/composer.json', $project_root . '/composer.link'); + $result = ValidationResult::createError([ + t('The %which directory at %dir contains absolute links, which is not supported. The first one is %file.', [ + '%which' => 'active', + '%dir' => $project_root, + '%file' => $project_root . '/composer.link', + ]), + ]); + $this->assertStatusCheckResults([$result]); + } + + /** + * Tests that relative symlinks cannot point outside the project root. + */ + public function testSymlinkPointingOutsideProjectRoot(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + $parent_dir = dirname($project_root); + touch($parent_dir . '/hello.txt'); + // Relative symlinks must be made from their actual directory to be + // correctly evaluated. + chdir($project_root); + symlink('../hello.txt', 'fail.txt'); + $result = ValidationResult::createError([ + t('The %which directory at %dir contains links that point outside the codebase, which is not supported. The first one is %file.', [ + '%which' => 'active', + '%dir' => $project_root, + '%file' => $project_root . '/fail.txt', + ]), + ]); + $this->assertStatusCheckResults([$result]); + $this->assertResults([$result], PreCreateEvent::class); + } + + /** + * Tests that relative symlinks cannot point outside the stage directory. + */ + public function testSymlinkPointingOutsideStageDirectory(): void { + // The same check should apply to symlinks in the stage directory that + // point outside of it. + $stage = $this->createStage(); + $stage->create(); + $stage->require(['ext-json:*']); + + $stage_dir = $stage->getStageDirectory(); + $parent_dir = dirname($stage_dir); + touch($parent_dir . '/hello.txt'); + // Relative symlinks must be made from their actual directory to be + // correctly evaluated. + chdir($stage_dir); + symlink('../hello.txt', 'fail.txt'); + + $result = ValidationResult::createError([ + t('The %which directory at %dir contains links that point outside the codebase, which is not supported. The first one is %file.', [ + '%which' => 'staging', + '%dir' => $stage_dir, + '%file' => $stage_dir . '/fail.txt', + ]), + ]); + try { + $stage->apply(); + $this->fail('Expected an exception, but none was thrown.'); + } + catch (StageEventException $e) { + $this->assertExpectedResultsFromException([$result], $e); + } + } + + /** + * Tests what happens when there is a symlink to a directory. + */ + public function testSymlinkToDirectory(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + mkdir($project_root . '/modules/custom'); + // Relative symlinks must be made from their actual directory to be + // correctly evaluated. + chdir($project_root . '/modules/custom'); + symlink('../example', 'example_module'); + + // Switch back to the Drupal root to ensure that the check isn't affected + // by which directory we happen to be in. + chdir($this->getDrupalRoot()); + $this->assertStatusCheckResults([]); + } + + /** + * Tests that symlinks are not supported on Windows, even if they're safe. + */ + public function testSymlinksNotAllowedOnWindows(): void { + $environment = $this->prophesize(EnvironmentInterface::class); + $environment->isWindows()->willReturn(TRUE); + $environment->setTimeLimit(Argument::type('int'))->willReturn(TRUE); + $this->container->set(EnvironmentInterface::class, $environment->reveal()); + + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + // Relative symlinks must be made from their actual directory to be + // correctly evaluated. + chdir($project_root); + symlink('composer.json', 'composer.link'); + + $result = ValidationResult::createError([ + t('The %which directory at %dir contains links, which is not supported on Windows. The first one is %file.', [ + '%which' => 'active', + '%dir' => $project_root, + '%file' => $project_root . '/composer.link', + ]), + ]); + $this->assertStatusCheckResults([$result]); + } + + /** + * Tests that unsupported links are excluded if they're under excluded paths. + * + * @depends testAbsoluteSymlinks + * + * @covers \Drupal\package_manager\PathExcluder\GitExcluder + * @covers \Drupal\package_manager\PathExcluder\NodeModulesExcluder + */ + public function testUnsupportedLinkUnderExcludedPath(): void { + $project_root = $this->container->get(PathLocator::class) + ->getProjectRoot(); + + // Create absolute symlinks (which are not supported by Composer Stager) in + // both `node_modules`, which is a regular directory, and `.git`, which is a + // hidden directory. + mkdir($project_root . '/node_modules'); + symlink($project_root . '/composer.json', $project_root . '/node_modules/composer.link'); + symlink($project_root . '/composer.json', $project_root . '/.git/composer.link'); + + $this->assertStatusCheckResults([]); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/TranslatableStringTest.php b/core/modules/package_manager/tests/src/Kernel/TranslatableStringTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4f7aaecec154843eb4b151472382009163a74678 --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/TranslatableStringTest.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\TranslatableStringAdapter; +use Drupal\package_manager\TranslatableStringFactory; +use PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface; + +/** + * @covers \Drupal\package_manager\TranslatableStringFactory + * @covers \Drupal\package_manager\TranslatableStringAdapter + * + * @group package_manager + */ +class TranslatableStringTest extends PackageManagerKernelTestBase { + + /** + * Tests various ways of creating a translatable string. + */ + public function testCreateTranslatableString(): void { + // Ensure that we have properly overridden Composer Stager's factory. + $factory = $this->container->get(TranslatableFactoryInterface::class); + $this->assertInstanceOf(TranslatableStringFactory::class, $factory); + + /** @var \Drupal\package_manager\TranslatableStringAdapter $string */ + $string = $factory->createTranslatableMessage('This string has no parameters.'); + $this->assertInstanceOf(TranslatableStringAdapter::class, $string); + $this->assertEmpty($string->getArguments()); + $this->assertEmpty($string->getOption('context')); + $this->assertSame('This string has no parameters.', (string) $string); + + $parameters = $factory->createTranslationParameters([ + '%name' => 'Slim Shady', + ]); + $string = $factory->createTranslatableMessage('My name is %name.', $parameters, 'outer space'); + $this->assertSame($parameters->getAll(), $string->getArguments()); + $this->assertSame('outer space', $string->getOption('context')); + $this->assertSame('My name is <em class="placeholder">Slim Shady</em>.', (string) $string); + } + +} diff --git a/core/modules/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php b/core/modules/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c18baf6b44545823837a2f2006d8b3d78d46b2ac --- /dev/null +++ b/core/modules/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php @@ -0,0 +1,265 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Kernel; + +use Drupal\package_manager\Event\PreApplyEvent; +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use Symfony\Component\Filesystem\Filesystem; + +/** + * Unit tests the file system permissions validator. + * + * This validator is tested functionally in Automatic Updates' build tests, + * since those give us control over the file system permissions. + * + * @see \Drupal\Tests\auto_updates\Build\CoreUpdateTest::assertReadOnlyFileSystemError() + * + * @covers \Drupal\package_manager\Validator\WritableFileSystemValidator + * @group package_manager + * @internal + */ +class WritableFileSystemValidatorTest extends PackageManagerKernelTestBase { + + /** + * Data provider for testWritable(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerWritable(): array { + // @see \Drupal\Tests\package_manager\Traits\ValidationTestTrait::resolvePlaceholdersInArrayValuesWithRealPaths() + $drupal_root_error = t('The Drupal directory "<PROJECT_ROOT>/web" is not writable.'); + $vendor_error = t('The vendor directory "<VENDOR_DIR>" is not writable.'); + $project_root_error = t('The project root directory "<PROJECT_ROOT>" is not writable.'); + $summary = t('The file system is not writable.'); + $writable_permission = 0777; + $non_writable_permission = 0550; + + return [ + 'root and vendor are writable, nested web root' => [ + $writable_permission, + $writable_permission, + $writable_permission, + 'web', + [], + ], + 'root writable, vendor not writable, nested web root' => [ + $writable_permission, + $writable_permission, + $non_writable_permission, + 'web', + [ + ValidationResult::createError([$vendor_error], $summary), + ], + ], + 'root not writable, vendor writable, nested web root' => [ + $non_writable_permission, + $non_writable_permission, + $writable_permission, + 'web', + [ + ValidationResult::createError([$drupal_root_error, $project_root_error], $summary), + ], + ], + 'nothing writable, nested web root' => [ + $non_writable_permission, + $non_writable_permission, + $non_writable_permission, + 'web', + [ + ValidationResult::createError([$drupal_root_error, $project_root_error, $vendor_error], $summary), + ], + ], + 'root and vendor are writable, non-nested web root' => [ + $writable_permission, + $writable_permission, + $writable_permission, + '', + [], + ], + 'root writable, vendor not writable, non-nested web root' => [ + $writable_permission, + $writable_permission, + $non_writable_permission, + '', + [ + ValidationResult::createError([$vendor_error], $summary), + ], + ], + 'root not writable, vendor writable, non-nested web root' => [ + $non_writable_permission, + $non_writable_permission, + $writable_permission, + '', + [ + ValidationResult::createError([$project_root_error], $summary), + ], + ], + 'nothing writable, non-nested web root' => [ + $non_writable_permission, + $non_writable_permission, + $non_writable_permission, + '', + [ + ValidationResult::createError([$project_root_error, $vendor_error], $summary), + ], + ], + ]; + } + + /** + * Tests the file system permissions validator. + * + * @param int $root_permissions + * The file permissions for the root folder. + * @param int $webroot_permissions + * The file permissions for the web root folder. + * @param int $vendor_permissions + * The file permissions for the vendor folder. + * @param string $webroot_relative_directory + * The web root path, relative to the project root, or an empty string if + * the web root and project root are the same. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerWritable + */ + public function testWritable(int $root_permissions, int $webroot_permissions, int $vendor_permissions, string $webroot_relative_directory, array $expected_results): void { + $this->setUpPermissions($root_permissions, $webroot_permissions, $vendor_permissions, $webroot_relative_directory); + + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + + /** + * Tests the file system permissions validator during pre-apply. + * + * @param int $root_permissions + * The file permissions for the root folder. + * @param int $webroot_permissions + * The file permissions for the web root folder. + * @param int $vendor_permissions + * The file permissions for the vendor folder. + * @param string $webroot_relative_directory + * The web root path, relative to the project root, or an empty string if + * the web root and project root are the same. + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * + * @dataProvider providerWritable + */ + public function testWritableDuringPreApply(int $root_permissions, int $webroot_permissions, int $vendor_permissions, string $webroot_relative_directory, array $expected_results): void { + $this->addEventTestListener( + function () use ($webroot_permissions, $root_permissions, $vendor_permissions, $webroot_relative_directory): void { + $this->setUpPermissions($root_permissions, $webroot_permissions, $vendor_permissions, $webroot_relative_directory); + + // During pre-apply we don't care whether the staging root is writable. + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + $this->assertTrue(chmod($path_locator->getStagingRoot(), 0550)); + }, + ); + + $this->assertResults($expected_results, PreApplyEvent::class); + } + + /** + * Sets the permissions of the test project's directories. + * + * @param int $root_permissions + * The permissions for the project root. + * @param int $web_root_permissions + * The permissions for the web root. + * @param int $vendor_permissions + * The permissions for the vendor directory. + * @param string $relative_web_root + * The web root path, relative to the project root, or an empty string if + * the web root and project root are the same. + */ + private function setUpPermissions(int $root_permissions, int $web_root_permissions, int $vendor_permissions, string $relative_web_root): void { + /** @var \Drupal\package_manager_bypass\MockPathLocator $path_locator */ + $path_locator = $this->container->get(PathLocator::class); + + $project_root = $web_root = $path_locator->getProjectRoot(); + $vendor_dir = $path_locator->getVendorDirectory(); + // Create the web root directory, if necessary. + if (!empty($relative_web_root)) { + $web_root .= '/' . $relative_web_root; + mkdir($web_root); + } + $path_locator->setPaths($project_root, $vendor_dir, $relative_web_root, $path_locator->getStagingRoot()); + + // We need to set the vendor directory and web root permissions first + // because they may be located inside the project root. + $this->assertTrue(chmod($vendor_dir, $vendor_permissions)); + if ($project_root !== $web_root) { + $this->assertTrue(chmod($web_root, $web_root_permissions)); + } + $this->assertTrue(chmod($project_root, $root_permissions)); + } + + /** + * Data provider for ::testStagingRootPermissions(). + * + * @return mixed[][] + * The test cases. + */ + public static function providerStagingRootPermissions(): array { + $writable_permission = 0777; + $non_writable_permission = 0550; + $summary = t('The file system is not writable.'); + return [ + 'writable stage root exists' => [ + $writable_permission, + [], + FALSE, + ], + 'write-protected stage root exists' => [ + $non_writable_permission, + [ + ValidationResult::createError([t('The stage root directory "<STAGE_ROOT>" is not writable.')], $summary), + ], + FALSE, + ], + 'stage root directory does not exist, parent directory not writable' => [ + $non_writable_permission, + [ + ValidationResult::createError([t('The stage root directory will not able to be created at "<STAGE_ROOT_PARENT>".')], $summary), + ], + TRUE, + ], + ]; + } + + /** + * Tests that the stage root's permissions are validated. + * + * @param int $permissions + * The file permissions to apply to the stage root directory, or its parent + * directory, depending on the value of $delete_staging_root. + * @param array $expected_results + * The expected validation results. + * @param bool $delete_staging_root + * Whether the stage root directory will exist at all. + * + * @dataProvider providerStagingRootPermissions + */ + public function testStagingRootPermissions(int $permissions, array $expected_results, bool $delete_staging_root): void { + $dir = $this->container->get(PathLocator::class) + ->getStagingRoot(); + + if ($delete_staging_root) { + $fs = new Filesystem(); + $fs->remove($dir); + $dir = dirname($dir); + } + $this->assertTrue(chmod($dir, $permissions)); + $this->assertStatusCheckResults($expected_results); + $this->assertResults($expected_results, PreCreateEvent::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/AssertPreconditionsTrait.php b/core/modules/package_manager/tests/src/Traits/AssertPreconditionsTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..c55bfebf56f461c530316124ddbca44d1548316a --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/AssertPreconditionsTrait.php @@ -0,0 +1,105 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Composer\Autoload\ClassLoader; + +/** + * Asserts preconditions for tests to function properly. + */ +trait AssertPreconditionsTrait { + + /** + * Invokes the test preconditions assertion before the first test is run. + * + * "Use" this trait on any Package Manager test class that directly extends a + * Core test class, i.e., any class that does NOT extend a test class in a + * Package Manager test namespace. If that class implements this method, too, + * be sure to call this first thing in it. + */ + public static function setUpBeforeClass(): void { + parent::setUpBeforeClass(); + static::failIfUnmetPreConditions('before'); + } + + /** + * Invokes the test preconditions assertion after each test run. + * + * This ensures that no test method leaves behind violations of test + * preconditions. This makes it trivial to discover broken tests. + */ + protected function tearDown(): void { + parent::tearDown(); + static::failIfUnmetPreConditions('after'); + } + + /** + * Asserts universal test preconditions before any setup is done. + * + * If these preconditions aren't met, automated tests will absolutely fail + * needlessly with misleading errors. In that case, there's no reason to even + * begin. + * + * Ordinarily, these preconditions would be asserted in + * ::assertPreConditions(), which PHPUnit provides for exactly this use case. + * Unfortunately, that method doesn't run until after ::setUp(), so our (many) + * tests with expensive, time-consuming setup routines wouldn't actually fail + * very early. + * + * @param string $when + * Either 'before' (before any test methods run) or 'after' (after any test + * method finishes). + * + * @see \PHPUnit\Framework\TestCase::assertPreConditions() + * @see \PHPUnit\Framework\TestCase::setUpBeforeClass() + * @see self::setupBeforeClass() + * @see self::tearDown() + */ + protected static function failIfUnmetPreConditions(string $when): void { + assert(in_array($when, ['before', 'after'], TRUE)); + static::assertNoFailureMarker($when); + } + + /** + * Asserts that there is no failure marker present. + * + * @param string $when + * Either 'before' (before any test methods run) or 'after' (after any test + * method finishes). + * + * @see \Drupal\package_manager\FailureMarker + */ + private static function assertNoFailureMarker(string $when): void { + // If the failure marker exists, it will be in the project root. The project + // root is defined as the directory containing the `vendor` directory. + // @see \Drupal\package_manager\FailureMarker::getPath() + $failure_marker = static::getProjectRoot() . '/PACKAGE_MANAGER_FAILURE.yml'; + if (file_exists($failure_marker)) { + $suffix = $when === 'before' + ? 'Remove it to continue.' + : 'This test method created this marker but failed to clean up after itself.'; + static::fail("The failure marker '$failure_marker' is present in the project. $suffix"); + } + } + + /** + * Returns the absolute path of the project root. + * + * @return string + * The absolute path of the project root. + * + * @see \Drupal\package_manager\PathLocator::getProjectRoot() + */ + private static function getProjectRoot(): string { + // This is tricky, because this method has to be static (since + // ::setUpBeforeClass is), so it can't just get the container from an + // instance member. + // Use reflection to extract the vendor directory from the class loader. + $class_loaders = ClassLoader::getRegisteredLoaders(); + $vendor_directory = key($class_loaders); + return dirname($vendor_directory); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/ComposerInstallersTrait.php b/core/modules/package_manager/tests/src/Traits/ComposerInstallersTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..b946e987af94609e61d94ddf94822b7d63fa4c0d --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/ComposerInstallersTrait.php @@ -0,0 +1,75 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Composer\InstalledVersions; +use Drupal\fixture_manipulator\FixtureManipulator; +use Drupal\package_manager\ComposerInspector; +use Symfony\Component\Process\Process; + +/** + * A utility for kernel tests that need to use 'composer/installers'. + * + * @internal + */ +trait ComposerInstallersTrait { + + /** + * Installs the composer/installers package. + * + * @param string $dir + * The fixture directory to install into. + */ + private function installComposerInstallers(string $dir): void { + $package_name = 'composer/installers'; + $this->assertTrue(InstalledVersions::isInstalled($package_name)); + + $repository = json_encode([ + 'type' => 'path', + 'url' => InstalledVersions::getInstallPath($package_name), + 'options' => [ + 'symlink' => FALSE, + 'versions' => [ + // Explicitly state the version contained by this path repository, + // otherwise Composer will infer the version based on the git clone or + // fall back to `dev-master`. + // @see https://getcomposer.org/doc/05-repositories.md#path + 'composer/installers' => InstalledVersions::getVersion($package_name), + ], + ], + ], JSON_UNESCAPED_SLASHES); + $working_dir_option = "--working-dir=$dir"; + (new Process(['composer', 'config', 'repo.composer-installers-real', $repository, $working_dir_option]))->mustRun(); + (new FixtureManipulator()) + ->addConfig(['allow-plugins.composer/installers' => TRUE]) + ->commitChanges($dir); + (new Process(['composer', 'require', 'composer/installers:@dev', $working_dir_option]))->mustRun(); + + // Use the default installer paths for Drupal core and extensions. + $this->setInstallerPaths([], $dir); + } + + /** + * Sets the installer paths config. + * + * @param array $installer_paths + * The installed paths. + * @param string $directory + * The fixture directory. + */ + private function setInstallerPaths(array $installer_paths, string $directory): void { + // Respect any existing installer paths. + $extra = $this->container->get(ComposerInspector::class) + ->getConfig('extra', $directory . '/composer.json'); + $existing_installer_paths = json_decode($extra, TRUE, flags: JSON_THROW_ON_ERROR)['installer-paths'] ?? []; + + (new FixtureManipulator()) + ->addConfig([ + 'extra.installer-paths' => $installer_paths + $existing_installer_paths, + ]) + ->commitChanges($directory); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/ComposerStagerTestTrait.php b/core/modules/package_manager/tests/src/Traits/ComposerStagerTestTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..9f76afd905813c71ec39c20554685f0053e91e62 --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/ComposerStagerTestTrait.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslatableInterface; +use PhpTuf\ComposerStager\API\Translation\Value\TranslationParametersInterface; + +/** + * Contains helper methods for testing Composer Stager interactions. + * + * @internal + * + * @property \Symfony\Component\DependencyInjection\ContainerInterface $container + */ +trait ComposerStagerTestTrait { + + /** + * Creates a Composer Stager translatable message. + * + * @param string $message + * A message containing optional placeholders corresponding to parameters (next). Example: + * ```php + * $message = 'Hello, %first_name %last_name.'; + * ``` + * @param \PhpTuf\ComposerStager\API\Translation\Value\TranslationParametersInterface|null $parameters + * Translation parameters. + * @param string|null $domain + * An arbitrary domain for grouping translations or null to use the default. See + * {@see \PhpTuf\ComposerStager\API\Translation\Service\DomainOptionsInterface}. + * + * @return \PhpTuf\ComposerStager\API\Translation\Value\TranslatableInterface + * A message that can be translated by Composer Stager. + */ + protected function createComposeStagerMessage( + string $message, + ?TranslationParametersInterface $parameters = NULL, + ?string $domain = NULL, + ): TranslatableInterface { + /** @var \PhpTuf\ComposerStager\API\Translation\Factory\TranslatableFactoryInterface $translatable_factory */ + $translatable_factory = $this->container->get(TranslatableFactoryInterface::class); + + return $translatable_factory->createTranslatableMessage($message, $parameters, $domain); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/FixtureManipulatorTrait.php b/core/modules/package_manager/tests/src/Traits/FixtureManipulatorTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..4d6939aa875f6ac48249aa0cc9aa836fb3628d78 --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/FixtureManipulatorTrait.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Drupal\fixture_manipulator\StageFixtureManipulator; + +/** + * A trait for common fixture manipulator functions. + */ +trait FixtureManipulatorTrait { + + /** + * Gets the stage fixture manipulator service. + * + * @return \Drupal\fixture_manipulator\StageFixtureManipulator|object|null + * The stage fixture manipulator service. + */ + protected function getStageFixtureManipulator() { + return $this->container->get(StageFixtureManipulator::class); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/FixtureUtilityTrait.php b/core/modules/package_manager/tests/src/Traits/FixtureUtilityTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..e2fc313b543453a5cae3468fdf3760304aafcd7c --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/FixtureUtilityTrait.php @@ -0,0 +1,83 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator; + +/** + * A utility for all things fixtures. + * + * @internal + */ +trait FixtureUtilityTrait { + + /** + * Mirrors a fixture directory to the given path. + * + * Files not in the source fixture directory will not be deleted from + * destination directory. After copying the files to the destination directory + * the files and folders will be converted so that can be used in the tests. + * The conversion includes: + * - Renaming '_git' directories to '.git' + * - Renaming files ending in '.info.yml.hide' to remove '.hide'. + * + * @param string $source_path + * The source path. + * @param string $destination_path + * The path to which the fixture files should be mirrored. + */ + protected static function copyFixtureFilesTo(string $source_path, string $destination_path): void { + (new Filesystem())->mirror($source_path, $destination_path, NULL, [ + 'override' => TRUE, + 'delete' => FALSE, + ]); + static::renameInfoYmlFiles($destination_path); + static::renameGitDirectories($destination_path); + } + + /** + * Renames all files that end with .info.yml.hide. + * + * @param string $dir + * The directory to be iterated through. + */ + protected static function renameInfoYmlFiles(string $dir): void { + // Construct the iterator. + $it = new RecursiveDirectoryIterator($dir, \RecursiveIteratorIterator::SELF_FIRST); + + // Loop through files and rename them. + foreach (new \RecursiveIteratorIterator($it) as $file) { + if ($file->getExtension() == 'hide') { + rename($file->getPathname(), $dir . DIRECTORY_SEPARATOR . + $file->getRelativePath() . DIRECTORY_SEPARATOR . str_replace(".hide", "", $file->getFilename())); + } + } + } + + /** + * Renames _git directories to .git. + * + * @param string $dir + * The directory to be iterated through. + */ + private static function renameGitDirectories(string $dir): void { + $iter = new \RecursiveIteratorIterator( + new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS), + \RecursiveIteratorIterator::SELF_FIRST, + \RecursiveIteratorIterator::CATCH_GET_CHILD + ); + /** @var \Symfony\Component\Finder\SplFileInfo $file */ + foreach ($iter as $file) { + if ($file->isDir() && $file->getFilename() === '_git' && $file->getRelativePathname()) { + rename( + $file->getPathname(), + $file->getPath() . DIRECTORY_SEPARATOR . '.git' + ); + } + } + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/InstalledPackagesListTrait.php b/core/modules/package_manager/tests/src/Traits/InstalledPackagesListTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..223fe7198082ca008a62b339c7205f0a2b0beec3 --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/InstalledPackagesListTrait.php @@ -0,0 +1,46 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Drupal\package_manager\InstalledPackage; +use Drupal\package_manager\InstalledPackagesList; + +/** + * A trait for comparing InstalledPackagesList objects. + * + * @internal + * This is an internal part of Package Manager and may be changed or removed + * at any time without warning. External code should not interact with this + * class. + */ +trait InstalledPackagesListTrait { + + /** + * Asserts that 2 installed package lists are equal. + * + * @param \Drupal\package_manager\InstalledPackagesList $expected_list + * The expected list. + * @param \Drupal\package_manager\InstalledPackagesList $actual_list + * The actual list. + */ + private function assertPackageListsEqual(InstalledPackagesList $expected_list, InstalledPackagesList $actual_list): void { + $expected_array = $expected_list->getArrayCopy(); + $actual_array = $actual_list->getArrayCopy(); + ksort($expected_array); + ksort($actual_array); + $this->assertSame(array_keys($expected_array), array_keys($actual_array)); + foreach ($expected_list as $package_name => $expected_package) { + $this->assertInstanceOf(InstalledPackage::class, $expected_package); + $actual_package = $actual_list[$package_name]; + $this->assertInstanceOf(InstalledPackage::class, $actual_package); + $this->assertSame($expected_package->name, $actual_package->name); + $this->assertSame($expected_package->version, $actual_package->version); + $this->assertSame($expected_package->path, $actual_package->path); + $this->assertSame($expected_package->type, $actual_package->type); + $this->assertSame($expected_package->getProjectName(), $actual_package->getProjectName()); + } + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/PackageManagerBypassTestTrait.php b/core/modules/package_manager/tests/src/Traits/PackageManagerBypassTestTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..797a84f8a4d3b815f097ddcdfbd6165e7e3041c3 --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/PackageManagerBypassTestTrait.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Core\StagerInterface; + +/** + * Common functions for testing using the package_manager_bypass module. + * + * @internal + */ +trait PackageManagerBypassTestTrait { + + /** + * Asserts the number of times an update was staged. + * + * @param int $attempted_times + * The expected number of times an update was staged. + */ + protected function assertUpdateStagedTimes(int $attempted_times): void { + /** @var \Drupal\package_manager_bypass\LoggingBeginner $beginner */ + $beginner = $this->container->get(BeginnerInterface::class); + $this->assertCount($attempted_times, $beginner->getInvocationArguments()); + + /** @var \Drupal\package_manager_bypass\NoOpStager $stager */ + $stager = $this->container->get(StagerInterface::class); + // If an update was attempted, then there will be at least two calls to the + // stager: one to change the runtime constraints in composer.json, and + // another to actually update the installed dependencies. If any dev + // packages (like `drupal/core-dev`) are installed, there may also be an + // additional call to change the dev constraints. + $this->assertGreaterThanOrEqual($attempted_times * 2, count($stager->getInvocationArguments())); + + /** @var \Drupal\package_manager_bypass\LoggingCommitter $committer */ + $committer = $this->container->get(CommitterInterface::class); + $this->assertEmpty($committer->getInvocationArguments()); + } + +} diff --git a/core/modules/package_manager/tests/src/Traits/ValidationTestTrait.php b/core/modules/package_manager/tests/src/Traits/ValidationTestTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..75f41f1a1568770e54d4b20c4e85757a6c90f47b --- /dev/null +++ b/core/modules/package_manager/tests/src/Traits/ValidationTestTrait.php @@ -0,0 +1,130 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Traits; + +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\KernelTests\KernelTestBase; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\ValidationResult; +use Drupal\Tests\BrowserTestBase; +use Drupal\Tests\UnitTestCase; + +/** + * Contains helpful methods for testing stage validators. + * + * @internal + */ +trait ValidationTestTrait { + + /** + * Asserts two validation result sets are equal. + * + * This assertion is sensitive to the order of results. For example, + * ['a', 'b'] is not equal to ['b', 'a']. + * + * @param \Drupal\package_manager\ValidationResult[] $expected_results + * The expected validation results. + * @param \Drupal\package_manager\ValidationResult[] $actual_results + * The actual validation results. + * @param \Drupal\package_manager\PathLocator|null $path_locator + * (optional) The path locator (when this trait is used in unit tests). + * @param string|null $stage_dir + * (optional) The stage directory. + */ + protected function assertValidationResultsEqual(array $expected_results, array $actual_results, ?PathLocator $path_locator = NULL, ?string $stage_dir = NULL): void { + if ($path_locator) { + assert(is_a(get_called_class(), UnitTestCase::class, TRUE)); + } + $expected_results = array_map( + function (array $result) use ($path_locator, $stage_dir): array { + $result['messages'] = $this->resolvePlaceholdersInArrayValuesWithRealPaths($result['messages'], $path_locator, $stage_dir); + return $result; + }, + $this->getValidationResultsAsArray($expected_results) + ); + $actual_results = $this->getValidationResultsAsArray($actual_results); + + self::assertSame($expected_results, $actual_results); + } + + /** + * Resolves <PROJECT_ROOT>, <VENDOR_DIR>, <STAGE_ROOT>, <STAGE_ROOT_PARENT>. + * + * @param array $subject + * An array with arbitrary keys, and values potentially containing the + * placeholders <PROJECT_ROOT>, <VENDOR_DIR>, <STAGE_ROOT>, or + * <STAGE_ROOT_PARENT>. <STAGE_DIR> is the placeholder for $stage_dir, if + * passed. + * @param \Drupal\package_manager\PathLocator|null $path_locator + * (optional) The path locator (when this trait is used in unit tests). + * @param string|null $stage_dir + * (optional) The stage directory. + * + * @return array + * The same array, with unchanged keys, and with the placeholders resolved. + */ + protected function resolvePlaceholdersInArrayValuesWithRealPaths(array $subject, ?PathLocator $path_locator = NULL, ?string $stage_dir = NULL): array { + if (!$path_locator) { + // Only kernel and browser tests have $this->container. + assert($this instanceof KernelTestBase || $this instanceof BrowserTestBase); + $path_locator = $this->container->get(PathLocator::class); + } + $subject = str_replace( + ['<PROJECT_ROOT>', '<VENDOR_DIR>', '<STAGE_ROOT>', '<STAGE_ROOT_PARENT>'], + [$path_locator->getProjectRoot(), $path_locator->getVendorDirectory(), $path_locator->getStagingRoot(), dirname($path_locator->getStagingRoot())], + $subject + ); + if ($stage_dir) { + $subject = str_replace(['<STAGE_DIR>'], [$stage_dir], $subject); + } + foreach ($subject as $message) { + if (str_contains($message, '<STAGE_DIR>')) { + throw new \LogicException("No stage directory passed to replace '<STAGE_DIR>' in message '$message'"); + } + } + return $subject; + } + + /** + * Gets an array representation of validation results for easy comparison. + * + * @param \Drupal\package_manager\ValidationResult[] $results + * An array of validation results. + * + * @return array + * An array of validation results details: + * - severity: (int) The severity code. + * - messages: (array) An array of strings. + * - summary: (string|null) A summary string if there is one or NULL if not. + */ + protected function getValidationResultsAsArray(array $results): array { + $string_translation_stub = NULL; + if (is_a(get_called_class(), UnitTestCase::class, TRUE)) { + assert($this instanceof UnitTestCase); + $string_translation_stub = $this->getStringTranslationStub(); + } + return array_values(array_map(static function (ValidationResult $result) use ($string_translation_stub) { + $messages = array_map(static function ($message) use ($string_translation_stub): string { + // Support data providers in unit tests using TranslatableMarkup. + if ($message instanceof TranslatableMarkup && is_a(get_called_class(), UnitTestCase::class, TRUE)) { + $message = new TranslatableMarkup($message->getUntranslatedString(), $message->getArguments(), $message->getOptions(), $string_translation_stub); + } + return (string) $message; + }, $result->messages); + + $summary = $result->summary; + if ($summary !== NULL) { + $summary = (string) $result->summary; + } + + return [ + 'severity' => $result->severity, + 'messages' => $messages, + 'summary' => $summary, + ]; + }, $results)); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/ExecutableFinderTest.php b/core/modules/package_manager/tests/src/Unit/ExecutableFinderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..811d7547e04eb34a09012650121a07b4ac315324 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/ExecutableFinderTest.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\ExecutableFinder; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface; + +/** + * @covers \Drupal\package_manager\ExecutableFinder + * @group package_manager + * @internal + */ +class ExecutableFinderTest extends UnitTestCase { + + /** + * Tests that the executable finder looks for paths in configuration. + */ + public function testCheckConfigurationForExecutablePath(): void { + $config_factory = $this->getConfigFactoryStub([ + 'package_manager.settings' => [ + 'executables' => [ + 'composer' => '/path/to/composer', + ], + ], + ]); + + $decorated = $this->prophesize(ExecutableFinderInterface::class); + $decorated->find('composer')->shouldNotBeCalled(); + $decorated->find('rsync')->shouldBeCalled(); + + $finder = new ExecutableFinder($decorated->reveal(), $config_factory); + $this->assertSame('/path/to/composer', $finder->find('composer')); + $finder->find('rsync'); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/InstalledPackageTest.php b/core/modules/package_manager/tests/src/Unit/InstalledPackageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5cd31fc3e0390df32a0479d86c2e434c8e08fe3c --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/InstalledPackageTest.php @@ -0,0 +1,67 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\InstalledPackage; +use Drupal\Tests\UnitTestCase; + +/** + * @coversDefaultClass \Drupal\package_manager\InstalledPackage + * + * @group package_manager + */ +class InstalledPackageTest extends UnitTestCase { + + /** + * @covers ::createFromArray + * + * @depends testMetapackageWithAPath + */ + public function testPathResolution(): void { + // Metapackages must be created without a path. + $package = InstalledPackage::createFromArray([ + 'name' => 'vendor/test', + 'type' => 'metapackage', + 'version' => '1.0.0', + 'path' => NULL, + ]); + $this->assertNull($package->path); + + // Paths should be converted to real paths. + $package = InstalledPackage::createFromArray([ + 'name' => 'vendor/test', + 'type' => 'library', + 'version' => '1.0.0', + 'path' => __DIR__ . '/..', + ]); + $this->assertSame(realpath(__DIR__ . '/..'), $package->path); + + // If we provide a path that cannot be resolved to a real path, it should + // raise an error. + $this->expectException(\TypeError::class); + InstalledPackage::createFromArray([ + 'name' => 'vendor/test', + 'type' => 'library', + 'version' => '1.0.0', + 'path' => $this->getRandomGenerator()->string(), + ]); + } + + /** + * @covers ::createFromArray + */ + public function testMetapackageWithAPath(): void { + $this->expectException(\AssertionError::class); + $this->expectExceptionMessage('Metapackage install path must be NULL.'); + + InstalledPackage::createFromArray([ + 'name' => 'vendor/test', + 'type' => 'metapackage', + 'version' => '1.0.0', + 'path' => __DIR__, + ]); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/InstalledPackagesListTest.php b/core/modules/package_manager/tests/src/Unit/InstalledPackagesListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca8c40212228ec122831d483663c0b87decacd5f --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/InstalledPackagesListTest.php @@ -0,0 +1,165 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\InstalledPackage; +use Drupal\package_manager\InstalledPackagesList; +use Drupal\Tests\UnitTestCase; + +/** + * @coversDefaultClass \Drupal\package_manager\InstalledPackagesList + * + * @group package_manager + */ +class InstalledPackagesListTest extends UnitTestCase { + + /** + * @covers ::offsetSet + * @covers ::offsetUnset + * @covers ::append + * @covers ::exchangeArray + * + * @testWith ["offsetSet", ["new", "thing"]] + * ["offsetUnset", ["existing"]] + * ["append", ["new thing"]] + * ["exchangeArray", [{"evil": "twin"}]] + */ + public function testImmutability(string $method, array $arguments): void { + $list = new InstalledPackagesList(['existing' => 'thing']); + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Installed package lists cannot be modified.'); + $list->$method(...$arguments); + } + + /** + * @covers ::getPackagesNotIn + * @covers ::getPackagesWithDifferentVersionsIn + */ + public function testPackageComparison(): void { + $active = new InstalledPackagesList([ + 'drupal/existing' => InstalledPackage::createFromArray([ + 'name' => 'drupal/existing', + 'version' => '1.0.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + 'drupal/updated' => InstalledPackage::createFromArray([ + 'name' => 'drupal/updated', + 'version' => '1.0.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + 'drupal/removed' => InstalledPackage::createFromArray([ + 'name' => 'drupal/removed', + 'version' => '1.0.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + ]); + $staged = new InstalledPackagesList([ + 'drupal/existing' => InstalledPackage::createFromArray([ + 'name' => 'drupal/existing', + 'version' => '1.0.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + 'drupal/updated' => InstalledPackage::createFromArray([ + 'name' => 'drupal/updated', + 'version' => '1.1.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + 'drupal/added' => InstalledPackage::createFromArray([ + 'name' => 'drupal/added', + 'version' => '1.0.0', + 'path' => __DIR__, + 'type' => 'drupal-module', + ]), + ]); + + $added = $staged->getPackagesNotIn($active)->getArrayCopy(); + $this->assertSame(['drupal/added'], array_keys($added)); + + $removed = $active->getPackagesNotIn($staged)->getArrayCopy(); + $this->assertSame(['drupal/removed'], array_keys($removed)); + + $updated = $active->getPackagesWithDifferentVersionsIn($staged)->getArrayCopy(); + $this->assertSame(['drupal/updated'], array_keys($updated)); + } + + /** + * @covers ::getCorePackages + */ + public function testCorePackages(): void { + $data = [ + 'drupal/core' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core', + 'version' => \Drupal::VERSION, + 'type' => 'drupal-core', + 'path' => __DIR__, + ]), + 'drupal/core-dev' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-dev', + 'version' => \Drupal::VERSION, + 'type' => 'metapackage', + 'path' => NULL, + ]), + 'drupal/core-dev-pinned' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-dev-pinned', + 'version' => \Drupal::VERSION, + 'type' => 'metapackage', + 'path' => NULL, + ]), + 'drupal/core-composer-scaffold' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-composer-scaffold', + 'version' => \Drupal::VERSION, + 'type' => 'composer-plugin', + 'path' => __DIR__, + ]), + 'drupal/core-project-message' => [ + 'name' => 'drupal/core-project-message', + 'version' => \Drupal::VERSION, + 'type' => 'composer-plugin', + 'path' => __DIR__, + ], + 'drupal/core-vendor-hardening' => InstalledPackage::createFromArray([ + 'name' => 'drupal/core-vendor-hardening', + 'version' => \Drupal::VERSION, + 'type' => 'composer-plugin', + 'path' => __DIR__, + ]), + 'drupal/not-core' => InstalledPackage::createFromArray([ + 'name' => 'drupal/not-core', + 'version' => '1.0.0', + 'type' => 'drupal-module', + 'path' => __DIR__, + ]), + ]; + + $list = new InstalledPackagesList($data); + $this->assertArrayNotHasKey('drupal/not-core', $list->getCorePackages()); + + // Tests that we don't get core packages intended for development when + // include_dev is set to FALSE. + $core_packages_no_dev = $list->getCorePackages(FALSE); + $this->assertArrayNotHasKey('drupal/core-dev', $core_packages_no_dev); + $this->assertArrayNotHasKey('drupal/core-dev-pinned', $core_packages_no_dev); + // We still get other packages as intended. + $this->assertArrayHasKey('drupal/core', $core_packages_no_dev); + + // If drupal/core-recommended is in the list, it should supersede + // drupal/core. + $this->assertArrayHasKey('drupal/core', $list->getCorePackages()); + $data['drupal/core-recommended'] = InstalledPackage::createFromArray([ + 'name' => 'drupal/core-recommended', + 'version' => \Drupal::VERSION, + 'type' => 'metapackage', + 'path' => NULL, + ]); + $list = new InstalledPackagesList($data); + $this->assertArrayNotHasKey('drupal/core', $list->getCorePackages()); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/LoggingBeginnerTest.php b/core/modules/package_manager/tests/src/Unit/LoggingBeginnerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..af84befb7dab63302967039cedd69d59484c29b2 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/LoggingBeginnerTest.php @@ -0,0 +1,58 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\package_manager\FileProcessOutputCallback; +use Drupal\package_manager\LoggingBeginner; +use Drupal\package_manager\ProcessOutputCallback; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Core\BeginnerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; + +/** + * @covers \Drupal\package_manager\LoggingBeginner + * @group package_manager + */ +class LoggingBeginnerTest extends UnitTestCase { + + public function testDecoratedBeginnerIsCalled(): void { + $decorated = $this->createMock(BeginnerInterface::class); + + $activeDir = $this->createMock(PathInterface::class); + $stagingDir = $this->createMock(PathInterface::class); + $stagingDir->expects($this->any()) + ->method('absolute') + ->willReturn('staging-dir'); + + $decorated->expects($this->once()) + ->method('begin') + ->with( + $activeDir, + $stagingDir, + NULL, + $this->isInstanceOf(FileProcessOutputCallback::class), + ); + + $config_factory = $this->getConfigFactoryStub([ + 'package_manager.settings' => ['log' => 'php://memory'], + ]); + $time = $this->createMock(TimeInterface::class); + $time->expects($this->atLeast(2)) + ->method('getCurrentMicroTime') + ->willReturnOnConsecutiveCalls(1, 2.5); + + $callback = new ProcessOutputCallback(); + + (new LoggingBeginner($decorated, $config_factory, $time)) + ->begin($activeDir, $stagingDir, callback: $callback); + + $this->assertSame([ + "### Beginning in staging-dir\n", + "### Finished in 1.500 seconds\n", + ], $callback->getOutput()); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/LoggingCommitterTest.php b/core/modules/package_manager/tests/src/Unit/LoggingCommitterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3d6ab55de0cf5c26252f35fd84852f8ab14179bb --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/LoggingCommitterTest.php @@ -0,0 +1,61 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\Component\Datetime\TimeInterface; +use Drupal\package_manager\FileProcessOutputCallback; +use Drupal\package_manager\LoggingCommitter; +use Drupal\package_manager\ProcessOutputCallback; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Core\CommitterInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; + +/** + * @covers \Drupal\package_manager\LoggingCommitter + * @group package_manager + */ +class LoggingCommitterTest extends UnitTestCase { + + public function testDecoratedCommitterIsCalled(): void { + $decorated = $this->createMock(CommitterInterface::class); + + $stagingDir = $this->createMock(PathInterface::class); + $stagingDir->expects($this->any()) + ->method('absolute') + ->willReturn('staging-dir'); + $activeDir = $this->createMock(PathInterface::class); + $activeDir->expects($this->any()) + ->method('absolute') + ->willReturn('active-dir'); + + $decorated->expects($this->once()) + ->method('commit') + ->with( + $stagingDir, + $activeDir, + NULL, + $this->isInstanceOf(FileProcessOutputCallback::class), + ); + + $config_factory = $this->getConfigFactoryStub([ + 'package_manager.settings' => ['log' => 'php://memory'], + ]); + $time = $this->createMock(TimeInterface::class); + $time->expects($this->atLeast(2)) + ->method('getCurrentMicroTime') + ->willReturnOnConsecutiveCalls(1, 2.5); + + $callback = new ProcessOutputCallback(); + + (new LoggingCommitter($decorated, $config_factory, $time)) + ->commit($stagingDir, $activeDir, callback: $callback); + + $this->assertSame([ + "### Committing changes from staging-dir to active-dir\n", + "### Finished in 1.500 seconds\n", + ], $callback->getOutput()); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/LoggingStagerTest.php b/core/modules/package_manager/tests/src/Unit/LoggingStagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f21577c348d398415728d603fd5141ce2a98fe03 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/LoggingStagerTest.php @@ -0,0 +1,51 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\FileProcessOutputCallback; +use Drupal\package_manager\LoggingStager; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Core\StagerInterface; +use PhpTuf\ComposerStager\API\Path\Value\PathInterface; +use PhpTuf\ComposerStager\API\Process\Service\OutputCallbackInterface; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * @covers \Drupal\package_manager\LoggingStager + * @group package_manager + */ +class LoggingStagerTest extends UnitTestCase { + + public function testDecoratedStagerIsCalled(): void { + $decorated = $this->createMock(StagerInterface::class); + + $activeDir = $this->createMock(PathInterface::class); + $stagingDir = $this->createMock(PathInterface::class); + $stagingDir->expects($this->any()) + ->method('absolute') + ->willReturn('staging-dir'); + + $original_callback = $this->createMock(OutputCallbackInterface::class); + $original_callback->expects($this->once()) + ->method('__invoke') + ->with(OutputTypeEnum::OUT, "### Staging '--version' in staging-dir\n"); + + $decorated->expects($this->once()) + ->method('stage') + ->with( + ['--version'], + $activeDir, + $stagingDir, + $this->isInstanceOf(FileProcessOutputCallback::class), + ); + + $config_factory = $this->getConfigFactoryStub([ + 'package_manager.settings' => ['log' => 'php://memory'], + ]); + $decorator = new LoggingStager($decorated, $config_factory); + $decorator->stage(['--version'], $activeDir, $stagingDir, callback: $original_callback); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/PathLocatorTest.php b/core/modules/package_manager/tests/src/Unit/PathLocatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..abaa5ef6e7b8db0b6d7d85754c9e70d73ab05d0c --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/PathLocatorTest.php @@ -0,0 +1,123 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\Core\File\FileSystemInterface; +use Drupal\package_manager\PathLocator; +use Drupal\Tests\UnitTestCase; + +/** + * @coversDefaultClass \Drupal\package_manager\PathLocator + * @group package_manager + * @internal + */ +class PathLocatorTest extends UnitTestCase { + + /** + * @covers ::getStagingRoot + */ + public function testStagingRoot(): void { + $config_factory = $this->getConfigFactoryStub([ + 'system.site' => [ + 'uuid' => '_my_site_id', + ], + ]); + $file_system = $this->prophesize(FileSystemInterface::class); + $file_system->getTempDirectory()->willReturn('/path/to/temp'); + + $path_locator = new PathLocator( + '/path/to/drupal', + $config_factory, + $file_system->reveal() + ); + $this->assertSame('/path/to/temp/.package_manager_my_site_id', $path_locator->getStagingRoot()); + } + + /** + * Data provider for ::testWebRoot(). + * + * @return string[][] + * Sets of arguments to pass to the test method. + */ + public static function providerWebRoot(): array { + // In certain sites (like those created by drupal/recommended-project), the + // web root is a subdirectory of the project, and exists next to the + // vendor directory. + return [ + 'recommended project' => [ + '/path/to/project/www', + '/path/to/project', + 'www', + ], + 'recommended project with trailing slash on app root' => [ + '/path/to/project/www/', + '/path/to/project', + 'www', + ], + 'recommended project with trailing slash on project root' => [ + '/path/to/project/www', + '/path/to/project/', + 'www', + ], + 'recommended project with trailing slashes' => [ + '/path/to/project/www/', + '/path/to/project/', + 'www', + ], + // In legacy projects (i.e., created by drupal/legacy-project), the + // web root is the project root. + 'legacy project' => [ + '/path/to/drupal', + '/path/to/drupal', + '', + ], + 'legacy project with trailing slash on app root' => [ + '/path/to/drupal/', + '/path/to/drupal', + '', + ], + 'legacy project with trailing slash on project root' => [ + '/path/to/drupal', + '/path/to/drupal/', + '', + ], + 'legacy project with trailing slashes' => [ + '/path/to/drupal/', + '/path/to/drupal/', + '', + ], + ]; + } + + /** + * Tests that the web root is computed correctly. + * + * @param string $app_root + * The absolute path of the Drupal root. + * @param string $project_root + * The absolute path of the project root. + * @param string $expected_web_root + * The value expected from getWebRoot(). + * + * @covers ::getWebRoot + * + * @dataProvider providerWebRoot + */ + public function testWebRoot(string $app_root, string $project_root, string $expected_web_root): void { + $path_locator = $this->getMockBuilder(PathLocator::class) + // Mock all methods except getWebRoot(). + ->onlyMethods(['getProjectRoot', 'getStagingRoot', 'getVendorDirectory']) + ->setConstructorArgs([ + $app_root, + $this->getConfigFactoryStub(), + $this->prophesize(FileSystemInterface::class)->reveal(), + ]) + ->getMock(); + + $path_locator->method('getProjectRoot')->willReturn($project_root); + $this->assertSame($expected_web_root, $path_locator->getWebRoot()); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/ProcessOutputCallbackTest.php b/core/modules/package_manager/tests/src/Unit/ProcessOutputCallbackTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b401fbd119cb8e477f578a3ad8d4ccfd09e820a9 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/ProcessOutputCallbackTest.php @@ -0,0 +1,133 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use ColinODell\PsrTestLogger\TestLogger; +use Drupal\package_manager\ProcessOutputCallback; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Process\Value\OutputTypeEnum; + +/** + * @covers \Drupal\package_manager\ProcessOutputCallback + * @group package_manager + */ +class ProcessOutputCallbackTest extends UnitTestCase { + + /** + * Tests what happens when the output buffer has invalid JSON. + */ + public function testInvalidJson(): void { + $callback = new ProcessOutputCallback(); + $callback(OutputTypeEnum::OUT, '{A string of invalid JSON! 😈'); + + $this->expectException(\JsonException::class); + $this->expectExceptionMessage('Syntax error'); + $callback->parseJsonOutput(); + } + + /** + * Tests what happens when there is error output only. + */ + public function testErrorOutputOnly(): void { + $callback = new ProcessOutputCallback(); + $logger = new TestLogger(); + $callback->setLogger($logger); + + $error_text = 'What happened?'; + $callback(OutputTypeEnum::ERR, $error_text); + + $this->assertSame([$error_text], $callback->getErrorOutput()); + // The error should not yet be logged. + $this->assertEmpty($logger->records); + + // There should be no output data, but calling getOutput() should log the + // error. + $this->assertSame([], $callback->getOutput()); + $this->assertNull($callback->parseJsonOutput()); + $this->assertTrue($logger->hasWarning($error_text)); + + // Resetting the callback should clear the error buffer but the log should + // still have the error from before. + $callback->reset(); + $this->assertTrue($logger->hasWarning($error_text)); + } + + /** + * Tests the full lifecycle of a ProcessOutputCallback object. + */ + public function testCallback(): void { + $callback = new ProcessOutputCallback(); + $logger = new TestLogger(); + $callback->setLogger($logger); + + // The buffers should initially be empty, and nothing should be logged. + $this->assertSame([], $callback->getOutput()); + $this->assertSame([], $callback->getErrorOutput()); + $this->assertNull($callback->parseJsonOutput()); + $this->assertEmpty($logger->records); + + // Send valid JSON data to the callback, one line at a time. + $data = [ + 'value' => 'I have value!', + 'another value' => 'I have another value!', + 'one' => 1, + ]; + $json = json_encode($data, JSON_PRETTY_PRINT); + // Ensure the JSON is a multi-line string. + $this->assertGreaterThan(1, substr_count($json, "\n")); + $expected_output = []; + foreach (explode("\n", $json) as $line) { + $callback(OutputTypeEnum::OUT, "$line\n"); + $expected_output[] = "$line\n"; + } + $this->assertSame($expected_output, $callback->getOutput()); + // Ensure that parseJsonOutput() can parse the data without errors. + $this->assertSame($data, $callback->parseJsonOutput()); + $this->assertSame([], $callback->getErrorOutput()); + $this->assertEmpty($logger->records); + + // If we send error output, it should be logged, but we should still be able + // to get the data we already sent. + $callback(OutputTypeEnum::ERR, 'Oh no, what happened?'); + $callback(OutputTypeEnum::ERR, 'Really what happened?!'); + $this->assertSame($data, $callback->parseJsonOutput()); + $expected_error = ['Oh no, what happened?', 'Really what happened?!']; + $this->assertSame($expected_error, $callback->getErrorOutput()); + $this->assertTrue($logger->hasWarning('Oh no, what happened?Really what happened?!')); + + // Send more output and error data to the callback; they should be appended + // to the data we previously sent. + $callback(OutputTypeEnum::OUT, '{}'); + $expected_output[] = '{}'; + $callback(OutputTypeEnum::ERR, 'new Error 1!'); + $callback(OutputTypeEnum::ERR, 'new Error 2!'); + $expected_error[] = 'new Error 1!'; + $expected_error[] = 'new Error 2!'; + // The output buffer will no longer be valid JSON, so don't try to parse it. + $this->assertSame($expected_output, $callback->getOutput()); + $this->assertSame($expected_error, $callback->getErrorOutput()); + $this->assertTrue($logger->hasWarning(implode('', $expected_error))); + // The previously logged error output should still be there. + $this->assertTrue($logger->hasWarning('Oh no, what happened?Really what happened?!')); + + // Clear all stored output and errors. + $callback->reset(); + $this->assertSame([], $callback->getOutput()); + $this->assertSame([], $callback->getErrorOutput()); + $this->assertNull($callback->parseJsonOutput()); + + // Send more output and error data. + $callback(OutputTypeEnum::OUT, 'Bonjour!'); + $callback(OutputTypeEnum::ERR, 'You continue to annoy me.'); + // We should now only see the stuff we just sent... + $this->assertSame(['Bonjour!'], $callback->getOutput()); + $this->assertSame(['You continue to annoy me.'], $callback->getErrorOutput()); + $this->assertTrue($logger->hasWarning('You continue to annoy me.')); + // ...but the previously logged errors should still be there. + $this->assertTrue($logger->hasWarning('Oh no, what happened?Really what happened?!new Error 1!new Error 2!')); + $this->assertTrue($logger->hasWarning('Oh no, what happened?Really what happened?!')); + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/RequireEventTraitTest.php b/core/modules/package_manager/tests/src/Unit/RequireEventTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..91d7acd321d680a3a41311e4af59085df1a47979 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/RequireEventTraitTest.php @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\Tests\UnitTestCase; + +/** + * @covers \Drupal\package_manager\Event\RequireEventTrait + * @group package_manager + * @internal + */ +class RequireEventTraitTest extends UnitTestCase { + + /** + * Tests that runtime and dev packages are keyed correctly. + * + * @param string[] $runtime_packages + * The runtime package constraints passed to the event constructor. + * @param string[] $dev_packages + * The dev package constraints passed to the event constructor. + * @param string[] $expected_runtime_packages + * The keyed runtime packages that should be returned by + * ::getRuntimePackages(). + * @param string[] $expected_dev_packages + * The keyed dev packages that should be returned by ::getDevPackages(). + * + * @dataProvider providerGetPackages + */ + public function testGetPackages(array $runtime_packages, array $dev_packages, array $expected_runtime_packages, array $expected_dev_packages): void { + $stage = $this->createMock('\Drupal\package_manager\StageBase'); + + $events = [ + '\Drupal\package_manager\Event\PostRequireEvent', + '\Drupal\package_manager\Event\PreRequireEvent', + ]; + foreach ($events as $event) { + /** @var \Drupal\package_manager\Event\RequireEventTrait $event */ + $event = new $event($stage, $runtime_packages, $dev_packages); + $this->assertSame($expected_runtime_packages, $event->getRuntimePackages()); + $this->assertSame($expected_dev_packages, $event->getDevPackages()); + } + } + + /** + * Data provider for testGetPackages(). + * + * @return mixed[] + * The test cases. + */ + public static function providerGetPackages(): array { + return [ + 'Package with constraint' => [ + ['drupal/new_package:^8.1'], + ['drupal/dev_package:^9'], + ['drupal/new_package' => '^8.1'], + ['drupal/dev_package' => '^9'], + ], + 'Package without constraint' => [ + ['drupal/new_package'], + ['drupal/dev_package'], + ['drupal/new_package' => '*'], + ['drupal/dev_package' => '*'], + ], + ]; + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/StageBaseTest.php b/core/modules/package_manager/tests/src/Unit/StageBaseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..456a0e83e07bcf93ab1b2028b1f70be41102d175 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/StageBaseTest.php @@ -0,0 +1,151 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\StageBase; +use Drupal\Tests\UnitTestCase; + +/** + * @coversDefaultClass \Drupal\package_manager\StageBase + * @group package_manager + * @internal + */ +class StageBaseTest extends UnitTestCase { + + /** + * @covers ::validateRequirements + * + * @param string|null $expected_exception + * The exception class that should be thrown, or NULL if there should not be + * any exception. + * @param string $requirement + * The requirement (package name and optional constraint) to validate. + * + * @dataProvider providerValidateRequirements + */ + public function testValidateRequirements(?string $expected_exception, string $requirement): void { + $reflector = new \ReflectionClass(StageBase::class); + $method = $reflector->getMethod('validateRequirements'); + + if ($expected_exception) { + $this->expectException($expected_exception); + } + else { + $this->assertNull($expected_exception); + } + + $method->invoke(NULL, [$requirement]); + } + + /** + * Data provider for testValidateRequirements. + * + * @return array[] + * The test cases. + */ + public static function providerValidateRequirements(): array { + return [ + // Valid requirements. + [NULL, 'vendor/package'], + [NULL, 'vendor/snake_case'], + [NULL, 'vendor/kebab-case'], + [NULL, 'vendor/with.dots'], + [NULL, '1vendor2/3package4'], + [NULL, 'vendor/package:1'], + [NULL, 'vendor/package:1.2'], + [NULL, 'vendor/package:1.2.3'], + [NULL, 'vendor/package:1.x'], + [NULL, 'vendor/package:^1'], + [NULL, 'vendor/package:~1'], + [NULL, 'vendor/package:>1'], + [NULL, 'vendor/package:<1'], + [NULL, 'vendor/package:>=1'], + [NULL, 'vendor/package:>1 <2'], + [NULL, 'vendor/package:1 || 2'], + [NULL, 'vendor/package:>=1,<1.1.0'], + [NULL, 'vendor/package:1a'], + [NULL, 'vendor/package:*'], + [NULL, 'vendor/package:dev-master'], + [NULL, 'vendor/package:*@dev'], + [NULL, 'vendor/package:@dev'], + [NULL, 'vendor/package:master@dev'], + [NULL, 'vendor/package:master@beta'], + [NULL, 'php'], + [NULL, 'php:8'], + [NULL, 'php:8.0'], + [NULL, 'php:^8.1'], + [NULL, 'php:~8.1'], + [NULL, 'php-64bit'], + [NULL, 'composer'], + [NULL, 'composer-plugin-api'], + [NULL, 'composer-plugin-api:1'], + [NULL, 'ext-json'], + [NULL, 'ext-json:1'], + [NULL, 'ext-pdo_mysql'], + [NULL, 'ext-pdo_mysql:1'], + [NULL, 'lib-curl'], + [NULL, 'lib-curl:1'], + [NULL, 'lib-curl-zlib'], + [NULL, 'lib-curl-zlib:1'], + + // Invalid requirements. + [\InvalidArgumentException::class, ''], + [\InvalidArgumentException::class, ' '], + [\InvalidArgumentException::class, '/'], + [\InvalidArgumentException::class, 'php8'], + [\InvalidArgumentException::class, 'package'], + [\InvalidArgumentException::class, 'vendor\package'], + [\InvalidArgumentException::class, 'vendor//package'], + [\InvalidArgumentException::class, 'vendor/package1 vendor/package2'], + [\InvalidArgumentException::class, 'vendor/package/extra'], + [\UnexpectedValueException::class, 'vendor/package:a'], + [\UnexpectedValueException::class, 'vendor/package:'], + [\UnexpectedValueException::class, 'vendor/package::'], + [\UnexpectedValueException::class, 'vendor/package::1'], + [\UnexpectedValueException::class, 'vendor/package:1:2'], + [\UnexpectedValueException::class, 'vendor/package:develop@dev@dev'], + [\UnexpectedValueException::class, 'vendor/package:develop@'], + [\InvalidArgumentException::class, 'vEnDor/pAcKaGe'], + [\InvalidArgumentException::class, '_vendor/package'], + [\InvalidArgumentException::class, '_vendor/_package'], + [\InvalidArgumentException::class, 'vendor_/package'], + [\InvalidArgumentException::class, '_vendor/package_'], + [\InvalidArgumentException::class, 'vendor/package-'], + [\InvalidArgumentException::class, 'php-'], + [\InvalidArgumentException::class, 'ext'], + [\InvalidArgumentException::class, 'lib'], + ]; + } + + /** + * @covers ::getType + */ + public function testTypeMustBeExplicitlyOverridden(): void { + $good_grandchild = new class () extends ChildStage { + + /** + * {@inheritdoc} + */ + // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable + protected string $type = 'package_manager:good_grandchild'; + + }; + $this->assertSame('package_manager:good_grandchild', $good_grandchild->getType()); + + $bad_grandchild = new class () extends ChildStage {}; + $this->expectException(\LogicException::class); + $this->expectExceptionMessage(get_class($bad_grandchild) . ' must explicitly override the $type property.'); + $bad_grandchild->getType(); + } + +} + +class ChildStage extends StageBase { + + public function __construct() {} + + protected string $type = 'package_manager:child'; + +} diff --git a/core/modules/package_manager/tests/src/Unit/StageNotInActiveValidatorTest.php b/core/modules/package_manager/tests/src/Unit/StageNotInActiveValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1506d5450b84edb81a061f16903b4a2a84895e95 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/StageNotInActiveValidatorTest.php @@ -0,0 +1,117 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\Event\PreCreateEvent; +use Drupal\package_manager\PathLocator; +use Drupal\package_manager\StageBase; +use Drupal\package_manager\ValidationResult; +use Drupal\package_manager\Validator\StageNotInActiveValidator; +use Drupal\Tests\package_manager\Traits\ValidationTestTrait; +use Drupal\Tests\UnitTestCase; +use PhpTuf\ComposerStager\API\Path\Value\PathListInterface; +use Symfony\Component\Filesystem\Path; + +/** + * @coversDefaultClass \Drupal\package_manager\Validator\StageNotInActiveValidator + * @group package_manager + * @internal + */ +class StageNotInActiveValidatorTest extends UnitTestCase { + use ValidationTestTrait; + + /** + * @covers ::validate + * + * @param \Drupal\package_manager\ValidationResult[] $expected + * The expected result. + * @param string $project_root + * The project root. + * @param string $staging_root + * The staging root. + * + * @dataProvider providerTestCheckNotInActive + */ + public function testCheckNotInActive(array $expected, string $project_root, string $staging_root): void { + $path_locator_prophecy = $this->prophesize(PathLocator::class); + $path_locator_prophecy->getProjectRoot()->willReturn(Path::canonicalize($project_root)); + $path_locator_prophecy->getStagingRoot()->willReturn(Path::canonicalize($staging_root)); + $path_locator_prophecy->getVendorDirectory()->willReturn('not used'); + $path_locator = $path_locator_prophecy->reveal(); + $stage = $this->prophesize(StageBase::class)->reveal(); + + $stage_not_in_active_validator = new StageNotInActiveValidator($path_locator); + $stage_not_in_active_validator->setStringTranslation($this->getStringTranslationStub()); + $event = new PreCreateEvent($stage, $this->createMock(PathListInterface::class)); + $stage_not_in_active_validator->validate($event); + $this->assertValidationResultsEqual($expected, $event->getResults(), $path_locator); + } + + /** + * Data provider for testCheckNotInActive(). + * + * @return mixed[] + * The test cases. + */ + public static function providerTestCheckNotInActive(): array { + $expected_symlink_validation_error = ValidationResult::createError([ + t('Stage directory is a subdirectory of the active directory.'), + ]); + + return [ + "Absolute paths which don't satisfy" => [ + [$expected_symlink_validation_error], + "/var/root", + "/var/root/xyz", + ], + "Absolute paths which satisfy" => [ + [], + "/var/root", + "/home/var/root", + ], + 'Stage with .. segments, outside active' => [ + [], + "/var/root/active", + "/var/root/active/../stage", + ], + 'Stage without .. segments, outside active' => [ + [], + "/var/root/active", + "/var/root/stage", + ], + 'Stage with .. segments, inside active' => [ + [$expected_symlink_validation_error], + "/var/root/active", + "/var/root/active/../active/stage", + ], + 'Stage without .. segments, inside active' => [ + [$expected_symlink_validation_error], + "/var/root/active", + "/var/root/active/stage", + ], + 'Stage with .. segments, outside active, active with .. segments' => [ + [], + "/var/root/active", + "/var/root/active/../stage", + ], + 'Stage without .. segments, outside active, active with .. segments' => [ + [], + "/var/root/random/../active", + "/var/root/stage", + ], + 'Stage with .. segments, inside active, active with .. segments' => [ + [$expected_symlink_validation_error], + "/var/root/random/../active", + "/var/root/active/../active/stage", + ], + 'Stage without .. segments, inside active, active with .. segments' => [ + [$expected_symlink_validation_error], + "/var/root/random/../active", + "/var/root/active/stage", + ], + ]; + } + +} diff --git a/core/modules/package_manager/tests/src/Unit/ValidationResultTest.php b/core/modules/package_manager/tests/src/Unit/ValidationResultTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5d87a5d1558f93cb3f7f7cff650237c422aa4ba0 --- /dev/null +++ b/core/modules/package_manager/tests/src/Unit/ValidationResultTest.php @@ -0,0 +1,175 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\package_manager\Unit; + +use Drupal\package_manager\ValidationResult; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\system\SystemManager; +use Drupal\Tests\UnitTestCase; + +/** + * @coversDefaultClass \Drupal\package_manager\ValidationResult + * @group package_manager + * @internal + */ +class ValidationResultTest extends UnitTestCase { + + /** + * @covers ::createWarning + * + * @dataProvider providerValidConstructorArguments + */ + public function testCreateWarningResult(array $messages, ?string $summary): void { + $summary = $summary ? t($summary) : NULL; + $result = ValidationResult::createWarning($messages, $summary); + $this->assertResultValid($result, $messages, $summary, SystemManager::REQUIREMENT_WARNING); + } + + /** + * @covers ::getOverallSeverity + */ + public function testOverallSeverity(): void { + // An error and a warning should be counted as an error. + $results = [ + ValidationResult::createError([t('Boo!')]), + ValidationResult::createWarning([t('Moo!')]), + ]; + $this->assertSame(SystemManager::REQUIREMENT_ERROR, ValidationResult::getOverallSeverity($results)); + + // If there are no results, but no errors, the results should be counted as + // a warning. + array_shift($results); + $this->assertSame(SystemManager::REQUIREMENT_WARNING, ValidationResult::getOverallSeverity($results)); + + // If there are just plain no results, we should get REQUIREMENT_OK. + array_shift($results); + $this->assertSame(SystemManager::REQUIREMENT_OK, ValidationResult::getOverallSeverity($results)); + } + + /** + * @covers ::createError + * + * @dataProvider providerValidConstructorArguments + */ + public function testCreateErrorResult(array $messages, ?string $summary): void { + $summary = $summary ? t($summary) : NULL; + $result = ValidationResult::createError($messages, $summary); + $this->assertResultValid($result, $messages, $summary, SystemManager::REQUIREMENT_ERROR); + } + + /** + * @covers ::createWarning + * + * @param string[] $messages + * The warning messages of the validation result. + * @param string $expected_exception_message + * The expected exception message. + * + * @dataProvider providerCreateExceptions + */ + public function testCreateWarningResultException(array $messages, string $expected_exception_message): void { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage($expected_exception_message); + ValidationResult::createWarning($messages, NULL); + } + + /** + * @covers ::createError + * + * @param string[] $messages + * The error messages of the validation result. + * @param string $expected_exception_message + * The expected exception message. + * + * @dataProvider providerCreateExceptions + */ + public function testCreateErrorResultException(array $messages, string $expected_exception_message): void { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage($expected_exception_message); + ValidationResult::createError($messages, NULL); + } + + /** + * Tests that the messages are asserted to be translatable. + * + * @testWith ["createError"] + * ["createWarning"] + */ + public function testMessagesMustBeTranslatable(string $method): void { + // When creating an error from a throwable, the message does not need to be + // translatable. + ValidationResult::createErrorFromThrowable(new \Exception('Burn it down.')); + + $this->expectException(\AssertionError::class); + $this->expectExceptionMessageMatches('/instanceof TranslatableMarkup/'); + ValidationResult::$method(['Not translatable!']); + } + + /** + * Data provider for test methods that test create exceptions. + * + * @return array[] + * The test cases. + */ + public static function providerCreateExceptions(): array { + return [ + '2 messages, no summary' => [ + [t('Something is wrong'), t('Something else is also wrong')], + 'If more than one message is provided, a summary is required.', + ], + 'no messages' => [ + [], + 'At least one message is required.', + ], + ]; + } + + /** + * Data provider for testCreateWarningResult(). + * + * @return mixed[] + * The test cases. + */ + public static function providerValidConstructorArguments(): array { + return [ + '1 message no summary' => [ + 'messages' => [t('Something is wrong')], + 'summary' => NULL, + ], + '2 messages has summary' => [ + 'messages' => [ + t('Something is wrong'), + t('Something else is also wrong'), + ], + 'summary' => 'This sums it up.', + ], + ]; + } + + /** + * Asserts a check result is valid. + * + * @param \Drupal\package_manager\ValidationResult $result + * The validation result to check. + * @param array $expected_messages + * The expected messages. + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary + * The expected summary or NULL if not summary is expected. + * @param int $severity + * The severity. + */ + protected function assertResultValid(ValidationResult $result, array $expected_messages, ?TranslatableMarkup $summary, int $severity): void { + $this->assertSame($expected_messages, $result->messages); + if ($summary === NULL) { + $this->assertNull($result->summary); + } + else { + $this->assertSame($summary->getUntranslatedString(), $result->summary + ->getUntranslatedString()); + } + $this->assertSame($severity, $result->severity); + } + +} diff --git a/core/modules/page_cache/page_cache.module b/core/modules/page_cache/page_cache.module deleted file mode 100644 index 7a4cb757ac9c2cf2e31e1e02a0ba6754de6745a1..0000000000000000000000000000000000000000 --- a/core/modules/page_cache/page_cache.module +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @file - * Caches responses for anonymous users, request and response policies allowing. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function page_cache_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.page_cache': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Internal Page Cache module caches pages for anonymous users in the database. For more information, see the <a href=":pagecache-documentation">online documentation for the Internal Page Cache module</a>.', [':pagecache-documentation' => 'https://www.drupal.org/documentation/modules/internal_page_cache']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Speeding up your site') . '</dt>'; - $output .= '<dd>' . t('Pages requested by anonymous users are stored the first time they are requested and then are reused. Depending on your site configuration and the amount of your web traffic tied to anonymous visitors, the caching system may significantly increase the speed of your site.') . '</dd>'; - $output .= '<dd>' . t('Pages are usually identical for all anonymous users, while they can be personalized for each authenticated user. This is why entire pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user.') . '</dd>'; - $output .= '<dd>' . t('To speed up your site for authenticated users, see the <a href=":dynamic_page_cache-help">Dynamic Page Cache module</a>.', [':dynamic_page_cache-help' => (\Drupal::moduleHandler()->moduleExists('dynamic_page_cache')) ? Url::fromRoute('help.page', ['name' => 'dynamic_page_cache'])->toString() : '#']) . '</p>'; - $output .= '<dt>' . t('Configuring the internal page cache') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":cache-settings">Performance page</a>, you can configure how long browsers and proxies may cache pages based on the Cache-Control header; this setting is ignored by the Internal Page Cache module, which caches pages permanently until invalidation, unless they carry an Expires header. There is no other configuration.', [':cache-settings' => Url::fromRoute('system.performance_settings')->toString()]) . '</dd>'; - $output .= '</dl>'; - - return $output; - } -} diff --git a/core/modules/page_cache/src/Hook/PageCacheHooks.php b/core/modules/page_cache/src/Hook/PageCacheHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b2b59bc6e13a4dbf0d3bf9535714784dd14dc638 --- /dev/null +++ b/core/modules/page_cache/src/Hook/PageCacheHooks.php @@ -0,0 +1,44 @@ +<?php + +namespace Drupal\page_cache\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for page_cache. + */ +class PageCacheHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.page_cache': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Internal Page Cache module caches pages for anonymous users in the database. For more information, see the <a href=":pagecache-documentation">online documentation for the Internal Page Cache module</a>.', [ + ':pagecache-documentation' => 'https://www.drupal.org/documentation/modules/internal_page_cache', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Speeding up your site') . '</dt>'; + $output .= '<dd>' . t('Pages requested by anonymous users are stored the first time they are requested and then are reused. Depending on your site configuration and the amount of your web traffic tied to anonymous visitors, the caching system may significantly increase the speed of your site.') . '</dd>'; + $output .= '<dd>' . t('Pages are usually identical for all anonymous users, while they can be personalized for each authenticated user. This is why entire pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user.') . '</dd>'; + $output .= '<dd>' . t('To speed up your site for authenticated users, see the <a href=":dynamic_page_cache-help">Dynamic Page Cache module</a>.', [ + ':dynamic_page_cache-help' => \Drupal::moduleHandler()->moduleExists('dynamic_page_cache') ? Url::fromRoute('help.page', [ + 'name' => 'dynamic_page_cache', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<dt>' . t('Configuring the internal page cache') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":cache-settings">Performance page</a>, you can configure how long browsers and proxies may cache pages based on the Cache-Control header; this setting is ignored by the Internal Page Cache module, which caches pages permanently until invalidation, unless they carry an Expires header. There is no other configuration.', [ + ':cache-settings' => Url::fromRoute('system.performance_settings')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/path/path.install b/core/modules/path/path.install index 78efdc997d06542fef129a3ced29eb9e0ba29463..6e4d9c370df935cb970464c5842a404d393d75b0 100644 --- a/core/modules/path/path.install +++ b/core/modules/path/path.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function path_update_last_removed() { +function path_update_last_removed(): int { return 8200; } diff --git a/core/modules/path/path.module b/core/modules/path/path.module deleted file mode 100644 index c307f7e6403c9b959198084c882c5a8c350a2541..0000000000000000000000000000000000000000 --- a/core/modules/path/path.module +++ /dev/null @@ -1,158 +0,0 @@ -<?php - -/** - * @file - * Enables users to rename URLs. - */ - -use Drupal\Core\Url; -use Drupal\Core\Entity\ContentEntityDeleteForm; -use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\path\PathAliasForm; -use Drupal\path\PathAliasListBuilder; - -/** - * Implements hook_help(). - */ -function path_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.path': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module <a href=":pathauto">Pathauto</a>. For more information, see the <a href=":path">online documentation for the Path module</a>.', [':path' => 'https://www.drupal.org/documentation/modules/path', ':pathauto' => 'https://www.drupal.org/project/pathauto']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating aliases') . '</dt>'; - $output .= '<dd>' . t('If you create or edit a taxonomy term you can add an alias (for example <em>music/jazz</em>) in the field "URL alias". When creating or editing content you can add an alias (for example <em>about-us/team</em>) under the section "URL path settings" in the field "URL alias". Aliases for any other path can be added through the page <a href=":aliases">URL aliases</a>. To add aliases a user needs the permission <a href=":permissions">Create and edit URL aliases</a>.', [':aliases' => Url::fromRoute('entity.path_alias.collection')->toString(), ':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'path'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Managing aliases') . '</dt>'; - $output .= '<dd>' . t('The Path module provides a way to search and view a <a href=":aliases">list of all aliases</a> that are in use on your website. Aliases can be added, edited and deleted through this list.', [':aliases' => Url::fromRoute('entity.path_alias.collection')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.path_alias.collection': - return '<p>' . t("An alias defines a different name for an existing URL path - for example, the alias 'about' for the URL path 'node/1'. A URL path can have multiple aliases.") . '</p>'; - - case 'entity.path_alias.add_form': - return '<p>' . t('Enter the path you wish to create the alias for, followed by the name of the new alias.') . '</p>'; - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function path_entity_type_alter(array &$entity_types) { - // @todo Remove the conditional once core fully supports "path_alias" as an - // optional module. See https://drupal.org/node/3092090. - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - if (isset($entity_types['path_alias'])) { - $entity_types['path_alias']->setFormClass('default', PathAliasForm::class); - $entity_types['path_alias']->setFormClass('delete', ContentEntityDeleteForm::class); - $entity_types['path_alias']->setHandlerClass('route_provider', ['html' => AdminHtmlRouteProvider::class]); - $entity_types['path_alias']->setListBuilderClass(PathAliasListBuilder::class); - $entity_types['path_alias']->setLinkTemplate('collection', '/admin/config/search/path'); - $entity_types['path_alias']->setLinkTemplate('add-form', '/admin/config/search/path/add'); - $entity_types['path_alias']->setLinkTemplate('edit-form', '/admin/config/search/path/edit/{path_alias}'); - $entity_types['path_alias']->setLinkTemplate('delete-form', '/admin/config/search/path/delete/{path_alias}'); - } -} - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function path_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ - if ($entity_type->id() === 'path_alias') { - $fields['langcode']->setDisplayOptions('form', [ - 'type' => 'language_select', - 'weight' => 0, - 'settings' => [ - 'include_locked' => FALSE, - ], - ]); - - $fields['path']->setDisplayOptions('form', [ - 'type' => 'string_textfield', - 'weight' => 5, - 'settings' => [ - 'size' => 45, - ], - ]); - - $fields['alias']->setDisplayOptions('form', [ - 'type' => 'string_textfield', - 'weight' => 10, - 'settings' => [ - 'size' => 45, - ], - ]); - } -} - -/** - * Implements hook_entity_base_field_info(). - */ -function path_entity_base_field_info(EntityTypeInterface $entity_type) { - if (in_array($entity_type->id(), ['taxonomy_term', 'node', 'media'], TRUE)) { - $fields['path'] = BaseFieldDefinition::create('path') - ->setLabel(t('URL alias')) - ->setTranslatable(TRUE) - ->setDisplayOptions('form', [ - 'type' => 'path', - 'weight' => 30, - ]) - ->setDisplayConfigurable('form', TRUE) - ->setComputed(TRUE); - - return $fields; - } -} - -/** - * Implements hook_entity_translation_create(). - */ -function path_entity_translation_create(ContentEntityInterface $translation) { - foreach ($translation->getFieldDefinitions() as $field_name => $field_definition) { - if ($field_definition->getType() === 'path' && $translation->get($field_name)->pid) { - // If there are values and a path ID, update the langcode and unset the - // path ID to save this as a new alias. - $translation->get($field_name)->langcode = $translation->language()->getId(); - $translation->get($field_name)->pid = NULL; - } - } -} - -/** - * Implements hook_field_widget_single_element_form_alter(). - */ -function path_field_widget_single_element_form_alter(&$element, FormStateInterface $form_state, $context) { - $field_definition = $context['items']->getFieldDefinition(); - $field_name = $field_definition->getName(); - $entity_type = $field_definition->getTargetEntityTypeId(); - $widget_name = $context['widget']->getPluginId(); - - if ($entity_type === 'path_alias') { - if (($field_name === 'path' || $field_name === 'alias') && $widget_name === 'string_textfield') { - $element['value']['#field_prefix'] = \Drupal::service('router.request_context')->getCompleteBaseUrl(); - } - - if ($field_name === 'langcode') { - $element['value']['#description'] = t('A path alias set for a specific language will always be used when displaying this page in that language, and takes precedence over path aliases set as <em>- Not specified -</em>.'); - $element['value']['#empty_value'] = LanguageInterface::LANGCODE_NOT_SPECIFIED; - $element['value']['#empty_option'] = t('- Not specified -'); - } - - if ($field_name === 'path') { - $element['value']['#description'] = t('Specify the existing path you wish to alias. For example: /node/28, /media/1, /taxonomy/term/1.'); - } - - if ($field_name === 'alias') { - $element['value']['#description'] = t('Specify an alternative path by which this data can be accessed. For example, type "/about" when writing an about page.'); - } - } -} diff --git a/core/modules/path/path.post_update.php b/core/modules/path/path.post_update.php index 5fcda0214e6a7a9b24577e955490839fa49b8d38..10397185598b1933de7f3c2e9eaa96ab66ac1a9d 100644 --- a/core/modules/path/path.post_update.php +++ b/core/modules/path/path.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function path_removed_post_updates() { +function path_removed_post_updates(): array { return [ 'path_post_update_create_language_content_settings' => '9.0.0', ]; diff --git a/core/modules/path/src/Hook/PathHooks.php b/core/modules/path/src/Hook/PathHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..dd242afbf175dcdb9ed1fdd16169feef14e646a8 --- /dev/null +++ b/core/modules/path/src/Hook/PathHooks.php @@ -0,0 +1,152 @@ +<?php + +namespace Drupal\path\Hook; + +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\path\PathAliasListBuilder; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; +use Drupal\Core\Entity\ContentEntityDeleteForm; +use Drupal\path\PathAliasForm; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for path. + */ +class PathHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.path': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module <a href=":pathauto">Pathauto</a>. For more information, see the <a href=":path">online documentation for the Path module</a>.', [ + ':path' => 'https://www.drupal.org/documentation/modules/path', + ':pathauto' => 'https://www.drupal.org/project/pathauto', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating aliases') . '</dt>'; + $output .= '<dd>' . t('If you create or edit a taxonomy term you can add an alias (for example <em>music/jazz</em>) in the field "URL alias". When creating or editing content you can add an alias (for example <em>about-us/team</em>) under the section "URL path settings" in the field "URL alias". Aliases for any other path can be added through the page <a href=":aliases">URL aliases</a>. To add aliases a user needs the permission <a href=":permissions">Create and edit URL aliases</a>.', [ + ':aliases' => Url::fromRoute('entity.path_alias.collection')->toString(), + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'path', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Managing aliases') . '</dt>'; + $output .= '<dd>' . t('The Path module provides a way to search and view a <a href=":aliases">list of all aliases</a> that are in use on your website. Aliases can be added, edited and deleted through this list.', [ + ':aliases' => Url::fromRoute('entity.path_alias.collection')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.path_alias.collection': + return '<p>' . t("An alias defines a different name for an existing URL path - for example, the alias 'about' for the URL path 'node/1'. A URL path can have multiple aliases.") . '</p>'; + + case 'entity.path_alias.add_form': + return '<p>' . t('Enter the path you wish to create the alias for, followed by the name of the new alias.') . '</p>'; + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // @todo Remove the conditional once core fully supports "path_alias" as an + // optional module. See https://drupal.org/node/3092090. + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + if (isset($entity_types['path_alias'])) { + $entity_types['path_alias']->setFormClass('default', PathAliasForm::class); + $entity_types['path_alias']->setFormClass('delete', ContentEntityDeleteForm::class); + $entity_types['path_alias']->setHandlerClass('route_provider', ['html' => AdminHtmlRouteProvider::class]); + $entity_types['path_alias']->setListBuilderClass(PathAliasListBuilder::class); + $entity_types['path_alias']->setLinkTemplate('collection', '/admin/config/search/path'); + $entity_types['path_alias']->setLinkTemplate('add-form', '/admin/config/search/path/add'); + $entity_types['path_alias']->setLinkTemplate('edit-form', '/admin/config/search/path/edit/{path_alias}'); + $entity_types['path_alias']->setLinkTemplate('delete-form', '/admin/config/search/path/delete/{path_alias}'); + } + } + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$fields, EntityTypeInterface $entity_type) { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ + if ($entity_type->id() === 'path_alias') { + $fields['langcode']->setDisplayOptions('form', [ + 'type' => 'language_select', + 'weight' => 0, + 'settings' => [ + 'include_locked' => FALSE, + ], + ]); + $fields['path']->setDisplayOptions('form', ['type' => 'string_textfield', 'weight' => 5, 'settings' => ['size' => 45]]); + $fields['alias']->setDisplayOptions('form', ['type' => 'string_textfield', 'weight' => 10, 'settings' => ['size' => 45]]); + } + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + if (in_array($entity_type->id(), ['taxonomy_term', 'node', 'media'], TRUE)) { + $fields['path'] = BaseFieldDefinition::create('path')->setLabel(t('URL alias'))->setTranslatable(TRUE)->setDisplayOptions('form', ['type' => 'path', 'weight' => 30])->setDisplayConfigurable('form', TRUE)->setComputed(TRUE); + return $fields; + } + } + + /** + * Implements hook_entity_translation_create(). + */ + #[Hook('entity_translation_create')] + public function entityTranslationCreate(ContentEntityInterface $translation) { + foreach ($translation->getFieldDefinitions() as $field_name => $field_definition) { + if ($field_definition->getType() === 'path' && $translation->get($field_name)->pid) { + // If there are values and a path ID, update the langcode and unset the + // path ID to save this as a new alias. + $translation->get($field_name)->langcode = $translation->language()->getId(); + $translation->get($field_name)->pid = NULL; + } + } + } + + /** + * Implements hook_field_widget_single_element_form_alter(). + */ + #[Hook('field_widget_single_element_form_alter')] + public function fieldWidgetSingleElementFormAlter(&$element, FormStateInterface $form_state, $context) { + $field_definition = $context['items']->getFieldDefinition(); + $field_name = $field_definition->getName(); + $entity_type = $field_definition->getTargetEntityTypeId(); + $widget_name = $context['widget']->getPluginId(); + if ($entity_type === 'path_alias') { + if (($field_name === 'path' || $field_name === 'alias') && $widget_name === 'string_textfield') { + $element['value']['#field_prefix'] = \Drupal::service('router.request_context')->getCompleteBaseUrl(); + } + if ($field_name === 'langcode') { + $element['value']['#description'] = t('A path alias set for a specific language will always be used when displaying this page in that language, and takes precedence over path aliases set as <em>- Not specified -</em>.'); + $element['value']['#empty_value'] = LanguageInterface::LANGCODE_NOT_SPECIFIED; + $element['value']['#empty_option'] = t('- Not specified -'); + } + if ($field_name === 'path') { + $element['value']['#description'] = t('Specify the existing path you wish to alias. For example: /node/28, /media/1, /taxonomy/term/1.'); + } + if ($field_name === 'alias') { + $element['value']['#description'] = t('Specify an alternative path by which this data can be accessed. For example, type "/about" when writing an about page.'); + } + } + } + +} diff --git a/core/modules/path/tests/modules/path_test_node_grants/path_test_node_grants.module b/core/modules/path/tests/modules/path_test_node_grants/path_test_node_grants.module deleted file mode 100644 index 369e8665f1fe65de53341ebea33cf77ea95ab74e..0000000000000000000000000000000000000000 --- a/core/modules/path/tests/modules/path_test_node_grants/path_test_node_grants.module +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for the Path test with node grants module. - */ - -declare(strict_types=1); - -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_node_grants(). - */ -function path_test_node_grants_node_grants(AccountInterface $account, $operation): array { - $grants = []; - return $grants; -} diff --git a/core/modules/path/tests/modules/path_test_node_grants/src/Hook/PathTestNodeGrantsHooks.php b/core/modules/path/tests/modules/path_test_node_grants/src/Hook/PathTestNodeGrantsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7576de8d0c49e72032c4762da4d0981d4eb42915 --- /dev/null +++ b/core/modules/path/tests/modules/path_test_node_grants/src/Hook/PathTestNodeGrantsHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\path_test_node_grants\Hook; + +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for path_test_node_grants. + */ +class PathTestNodeGrantsHooks { + + /** + * Implements hook_node_grants(). + */ + #[Hook('node_grants')] + public function nodeGrants(AccountInterface $account, $operation) : array { + $grants = []; + return $grants; + } + +} diff --git a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php index eefb3839b91c332a2565135b737feebf71640793..d5cc9759ab182f22442624a75beda5c642de91db 100644 --- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php +++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php @@ -93,7 +93,7 @@ public function testNodeCompleteUrlAlias(): void { /** * Checks the migration results. */ - protected function checkUrlMigration() { + protected function checkUrlMigration(): void { $id_map = $this->getMigration('d6_url_alias')->getIdMap(); // Test that the field exists. $conditions = [ diff --git a/core/modules/path_alias/path_alias.post_update.php b/core/modules/path_alias/path_alias.post_update.php index 5680a9fef40216699864ffa4f550ecdbd1a5db32..91399093cb2159d8c88ddbef7610a1bdd1ea462d 100644 --- a/core/modules/path_alias/path_alias.post_update.php +++ b/core/modules/path_alias/path_alias.post_update.php @@ -8,8 +8,18 @@ /** * Implements hook_removed_post_updates(). */ -function path_alias_removed_post_updates() { +function path_alias_removed_post_updates(): array { return [ 'path_alias_post_update_drop_path_alias_status_index' => '11.0.0', ]; } + +/** + * Update the path_alias_revision indices. + */ +function path_alias_post_update_update_path_alias_revision_indexes(): void { + /** @var \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface $update_manager */ + $update_manager = \Drupal::service('entity.definition_update_manager'); + $entity_type = $update_manager->getEntityType('path_alias'); + $update_manager->updateEntityType($entity_type); +} diff --git a/core/modules/path_alias/src/Entity/PathAlias.php b/core/modules/path_alias/src/Entity/PathAlias.php index aabbaaff1e1cae9b1b0aa4f91dd71bc528cb1628..6ace9f070708e494a0c468e0aab598da586f59b6 100644 --- a/core/modules/path_alias/src/Entity/PathAlias.php +++ b/core/modules/path_alias/src/Entity/PathAlias.php @@ -2,6 +2,7 @@ namespace Drupal\path_alias\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityPublishedTrait; use Drupal\Core\Entity\EntityStorageInterface; @@ -10,40 +11,41 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\path_alias\PathAliasInterface; +use Drupal\path_alias\PathAliasStorage; +use Drupal\path_alias\PathAliasStorageSchema; /** * Defines the path_alias entity class. - * - * @ContentEntityType( - * id = "path_alias", - * label = @Translation("URL alias"), - * label_collection = @Translation("URL aliases"), - * label_singular = @Translation("URL alias"), - * label_plural = @Translation("URL aliases"), - * label_count = @PluralTranslation( - * singular = "@count URL alias", - * plural = "@count URL aliases" - * ), - * handlers = { - * "storage" = "Drupal\path_alias\PathAliasStorage", - * "storage_schema" = "Drupal\path_alias\PathAliasStorageSchema", - * }, - * base_table = "path_alias", - * revision_table = "path_alias_revision", - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "published" = "status", - * }, - * admin_permission = "administer url aliases", - * list_cache_tags = { "route_match" }, - * constraints = { - * "UniquePathAlias" = {} - * } - * ) */ +#[ContentEntityType( + id: 'path_alias', + label: new TranslatableMarkup('URL alias'), + label_collection: new TranslatableMarkup('URL aliases'), + label_singular: new TranslatableMarkup('URL alias'), + label_plural: new TranslatableMarkup('URL aliases'), + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'published' => 'status', + ], + handlers: [ + 'storage' => PathAliasStorage::class, + 'storage_schema' => PathAliasStorageSchema::class, + ], + admin_permission: 'administer url aliases', + base_table: 'path_alias', + revision_table: 'path_alias_revision', + label_count: [ + 'singular' => '@count URL alias', + 'plural' => '@count URL aliases', + ], + list_cache_tags: ['route_match'], + constraints: [ + 'UniquePathAlias' => [], + ], +)] class PathAlias extends ContentEntityBase implements PathAliasInterface { use EntityPublishedTrait; diff --git a/core/modules/path_alias/src/PathAliasStorageSchema.php b/core/modules/path_alias/src/PathAliasStorageSchema.php index 7db7519dbf5bf606e9c187af4175cbc90e1926e5..d2bc87de1672251354dd523295ebe34f9e1d5de9 100644 --- a/core/modules/path_alias/src/PathAliasStorageSchema.php +++ b/core/modules/path_alias/src/PathAliasStorageSchema.php @@ -16,11 +16,16 @@ class PathAliasStorageSchema extends SqlContentEntityStorageSchema { protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) { $schema = parent::getEntitySchema($entity_type, $reset); $base_table = $this->storage->getBaseTable(); + $revision_table = $this->storage->getRevisionTable(); $schema[$base_table]['indexes'] += [ 'path_alias__alias_langcode_id_status' => ['alias', 'langcode', 'id', 'status'], 'path_alias__path_langcode_id_status' => ['path', 'langcode', 'id', 'status'], ]; + $schema[$revision_table]['indexes'] += [ + 'path_alias_revision__alias_langcode_id_status' => ['alias', 'langcode', 'id', 'status'], + 'path_alias_revision__path_langcode_id_status' => ['path', 'langcode', 'id', 'status'], + ]; // Unset the path_alias__status index as it is slower than the above // indexes and MySQL 5.7 chooses to use it even though it is suboptimal. diff --git a/core/modules/path_alias/tests/src/Functional/Update/PathAliasRevisionIndexesUpdatePathTest.php b/core/modules/path_alias/tests/src/Functional/Update/PathAliasRevisionIndexesUpdatePathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b3f7fe2a13488cb596eee4499d91a41b8c85eb16 --- /dev/null +++ b/core/modules/path_alias/tests/src/Functional/Update/PathAliasRevisionIndexesUpdatePathTest.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\path_alias\Functional\Update; + +use Drupal\FunctionalTests\Update\UpdatePathTestBase; + +/** + * Tests the update path for the path_alias_revision table indices. + * + * @group path_alias + */ +class PathAliasRevisionIndexesUpdatePathTest extends UpdatePathTestBase { + + /** + * {@inheritdoc} + */ + protected function setDatabaseDumpFiles(): void { + $this->databaseDumpFiles = [ + __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz', + ]; + } + + /** + * Tests the update path for the path_alias_revision table indices. + */ + public function testRunUpdates(): void { + $schema = \Drupal::database()->schema(); + + $this->assertFalse($schema->indexExists('path_alias_revision', 'path_alias_revision__alias_langcode_id_status')); + $this->assertFalse($schema->indexExists('path_alias_revision', 'path_alias_revision__path_langcode_id_status')); + + $this->runUpdates(); + + $this->assertTrue($schema->indexExists('path_alias_revision', 'path_alias_revision__alias_langcode_id_status')); + $this->assertTrue($schema->indexExists('path_alias_revision', 'path_alias_revision__path_langcode_id_status')); + } + +} diff --git a/core/modules/pgsql/pgsql.install b/core/modules/pgsql/pgsql.install index 1c505fbb35749e82f87fbda9308b6a6dde1d5e75..881e871bff73564052a178122bcac5e9d42ec71b 100644 --- a/core/modules/pgsql/pgsql.install +++ b/core/modules/pgsql/pgsql.install @@ -44,6 +44,6 @@ function pgsql_requirements() { /** * Implements hook_update_last_removed(). */ -function pgsql_update_last_removed() { +function pgsql_update_last_removed(): int { return 10101; } diff --git a/core/modules/pgsql/pgsql.module b/core/modules/pgsql/pgsql.module deleted file mode 100644 index 3f46f1bd46e51a3282b0fed186ae3ac2394c8c3a..0000000000000000000000000000000000000000 --- a/core/modules/pgsql/pgsql.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * The PostgreSQL module provides the connection between Drupal and a PostgreSQL database. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function pgsql_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.pgsql': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The PostgreSQL module provides the connection between Drupal and a PostgreSQL database. For more information, see the <a href=":pgsql">online documentation for the PostgreSQL module</a>.', [':pgsql' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/postgresql-module']) . '</p>'; - return $output; - - } -} diff --git a/core/modules/pgsql/src/Hook/PgsqlHooks.php b/core/modules/pgsql/src/Hook/PgsqlHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..11fe1d0c2b6260bf089c5601881f0a8e9ea6ce62 --- /dev/null +++ b/core/modules/pgsql/src/Hook/PgsqlHooks.php @@ -0,0 +1,29 @@ +<?php + +namespace Drupal\pgsql\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for pgsql. + */ +class PgsqlHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.pgsql': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The PostgreSQL module provides the connection between Drupal and a PostgreSQL database. For more information, see the <a href=":pgsql">online documentation for the PostgreSQL module</a>.', [ + ':pgsql' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/postgresql-module', + ]) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/phpass/phpass.module b/core/modules/phpass/phpass.module deleted file mode 100644 index 49fe0c43481a5755008dee774e958d528662dafe..0000000000000000000000000000000000000000 --- a/core/modules/phpass/phpass.module +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** - * @file - * Provides the password checking algorithm used prior to version 10.1.0. - */ - -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function phpass_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.phpass': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Password Compatibility module provides the password checking algorithm for user accounts created with Drupal prior to version 10.1.0. For more information, see the <a href=":phpass">online documentation for the Password Compatibility module</a>.', [':phpass' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/password-compatibility-module']) . '</p>'; - $output .= '<p>' . t('Drupal 10.1.0 and later use a different algorithm to compute the hashed password. This provides better security against brute-force attacks. The hashed passwords are different from the ones computed with Drupal versions before 10.1.0.') . '</p>'; - $output .= '<p>' . t('When the Password Compatibility module is installed, a user can log in with a username and password created before Drupal 10.1.0. The first time these credentials are used, a new hash is computed and saved. From then on, the user will be able to log in with the same username and password whether or not this module is installed.') . '</p>'; - $output .= '<p>' . t('Passwords created before Drupal 10.1.0 <strong>will not work</strong> unless they are used at least once while this module is installed. Make sure that you can log in before uninstalling this module.') . '</p>'; - return $output; - - } -} - -/** - * Implements hook_form_FORM_ID_alter() for system_modules_uninstall_confirm_form. - */ -function phpass_form_system_modules_uninstall_confirm_form_alter(array &$form, FormStateInterface $form_state): void { - $modules = \Drupal::keyValueExpirable('modules_uninstall') - ->get(\Drupal::currentUser()->id()); - if (!in_array('phpass', $modules)) { - return; - } - \Drupal::messenger()->addWarning(t('Make sure that you can log in before uninstalling the Password Compatibility module. For more information, see the <a href=":phpass">online documentation for the Password Compatibility module</a>.', [ - ':phpass' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/password-compatibility-module', - ])); -} diff --git a/core/modules/phpass/src/Hook/PhpassHooks.php b/core/modules/phpass/src/Hook/PhpassHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..1420e4e7b4a559e21c433d8e09b6179f18556c56 --- /dev/null +++ b/core/modules/phpass/src/Hook/PhpassHooks.php @@ -0,0 +1,47 @@ +<?php + +namespace Drupal\phpass\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for phpass. + */ +class PhpassHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.phpass': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Password Compatibility module provides the password checking algorithm for user accounts created with Drupal prior to version 10.1.0. For more information, see the <a href=":phpass">online documentation for the Password Compatibility module</a>.', [ + ':phpass' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/password-compatibility-module', + ]) . '</p>'; + $output .= '<p>' . t('Drupal 10.1.0 and later use a different algorithm to compute the hashed password. This provides better security against brute-force attacks. The hashed passwords are different from the ones computed with Drupal versions before 10.1.0.') . '</p>'; + $output .= '<p>' . t('When the Password Compatibility module is installed, a user can log in with a username and password created before Drupal 10.1.0. The first time these credentials are used, a new hash is computed and saved. From then on, the user will be able to log in with the same username and password whether or not this module is installed.') . '</p>'; + $output .= '<p>' . t('Passwords created before Drupal 10.1.0 <strong>will not work</strong> unless they are used at least once while this module is installed. Make sure that you can log in before uninstalling this module.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_form_FORM_ID_alter() for system_modules_uninstall_confirm_form. + */ + #[Hook('form_system_modules_uninstall_confirm_form_alter')] + public function formSystemModulesUninstallConfirmFormAlter(array &$form, FormStateInterface $form_state) : void { + $modules = \Drupal::keyValueExpirable('modules_uninstall')->get(\Drupal::currentUser()->id()); + if (!in_array('phpass', $modules)) { + return; + } + \Drupal::messenger()->addWarning(t('Make sure that you can log in before uninstalling the Password Compatibility module. For more information, see the <a href=":phpass">online documentation for the Password Compatibility module</a>.', [ + ':phpass' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/password-compatibility-module', + ])); + } + +} diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index 864f52dbfbe81619dbbd17dd9b89efaacfa36a5f..fd064c3d441069aaec076fce1bd6af9b91287c4c 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -2,78 +2,15 @@ /** * @file - * Responsive image display formatter for image fields. */ -use Drupal\Core\Url; use Drupal\Core\Template\Attribute; use Drupal\Core\Logger\RfcLogLevel; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\image\Entity\ImageStyle; use Drupal\responsive_image\Entity\ResponsiveImageStyle; use Drupal\responsive_image\ResponsiveImageStyleInterface; use Drupal\breakpoint\BreakpointInterface; -/** - * Implements hook_help(). - */ -function responsive_image_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.responsive_image': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Responsive Image module provides an image formatter that allows browsers to select which image file to display based on media queries or which image file types the browser supports, using the HTML 5 picture and source elements and/or the sizes, srcset and type attributes. For more information, see the <a href=":responsive_image">online documentation for the Responsive Image module</a>.', [':responsive_image' => 'https://www.drupal.org/documentation/modules/responsive_image']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Defining responsive image styles') . '</dt>'; - $output .= '<dd>' . t('By creating responsive image styles you define which options the browser has in selecting which image file to display. In most cases this means providing different image sizes based on the viewport size. On the <a href=":responsive_image_style">Responsive image styles</a> page, click <em>Add responsive image style</em> to create a new style. First choose a label, a fallback image style and a breakpoint group and click Save.', [':responsive_image_style' => Url::fromRoute('entity.responsive_image_style.collection')->toString()]) . '</dd>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Fallback image style') . '</dt>'; - $output .= '<dd>' . t('The fallback image style is typically the smallest size image you expect to appear in this space. The fallback image should only appear on a site if an error occurs.') . '</dd>'; - $output .= '<dt>' . t('Breakpoint groups: viewport sizing vs art direction') . '</dt>'; - $output .= '<dd>' . t('The breakpoint group typically only needs a single breakpoint with an empty media query in order to do <em>viewport sizing.</em> Multiple breakpoints are used for changing the crop or aspect ratio of images at different viewport sizes, which is often referred to as <em>art direction.</em> A new breakpoint group should be created for each aspect ratio to avoid content shift. Once you select a breakpoint group, you can choose which breakpoints to use for the responsive image style. By default, the option <em>do not use this breakpoint</em> is selected for each breakpoint. See the <a href=":breakpoint_help">help page of the Breakpoint module</a> for more information.', [':breakpoint_help' => Url::fromRoute('help.page', ['name' => 'breakpoint'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Breakpoint settings: sizes vs image styles') . '</dt>'; - $output .= '<dd>' . t('While you have the option to provide only one image style per breakpoint, the sizes attribute allows you to provide more options to browsers as to which image file it can display. If using sizes field and art direction, all selected image styles should use the same aspect ratio to avoid content shifting. Breakpoints are defined in the configuration files of the theme.') . '</dd>'; - $output .= '<dt>' . t('Sizes field') . '</dt>'; - $output .= '<dd>' . t('The sizes attribute paired with the srcset attribute provides information on how much space these images take up within the viewport at different browser breakpoints, but the aspect ratios should remain the same across those breakpoints. Once the sizes option is selected, you can let the browser know the size of this image in relation to the site layout, using the <em>Sizes</em> field. For a hero image that always fills the entire screen, you could simply enter 100vw, which means 100% of the viewport width. For an image that fills 90% of the screen for small viewports, but only fills 40% of the screen when the viewport is larger than 40em (typically 640px), you could enter "(min-width: 40em) 40vw, 90vw" in the Sizes field. The last item in the comma-separated list is the smallest viewport size: other items in the comma-separated list should have a media condition paired with an image width. <em>Media conditions</em> are similar to a media query, often a min-width paired with a viewport width using em or px units: e.g. (min-width: 640px) or (min-width: 40em). This is paired with the <em>image width</em> at that viewport size using px, em or vw units. The vw unit is viewport width and is used instead of a percentage because the percentage always refers to the width of the entire viewport.') . '</dd>'; - $output .= '<dt>' . t('Image styles for sizes') . '</dt>'; - $output .= '<dd>' . t('Below the Sizes field you can choose multiple image styles so the browser can choose the best image file size to fill the space defined in the Sizes field. Typically you will want to use image styles that resize your image to have options that range from the smallest px width possible for the space the image will appear in to the largest px width possible, with a variety of widths in between. You may want to provide image styles with widths that are 1.5x to 2x the space available in the layout to account for high resolution screens. Image styles can be defined on the <a href=":image_styles">Image styles page</a> that is provided by the <a href=":image_help">Image module</a>.', [':image_styles' => Url::fromRoute('entity.image_style.collection')->toString(), ':image_help' => Url::fromRoute('help.page', ['name' => 'image'])->toString()]) . '</dd>'; - $output .= '</dl></dd>'; - $output .= '<dt>' . t('Using responsive image styles in Image fields') . '</dt>'; - $output .= '<dd>' . t('After defining responsive image styles, you can use them in the display settings for your Image fields, so that the site displays responsive images using the HTML5 picture tag. Open the Manage display page for the entity type (content type, taxonomy vocabulary, etc.) that the Image field is attached to. Choose the format <em>Responsive image</em>, click the Edit icon, and select one of the responsive image styles that you have created. For general information on how to manage fields and their display see the <a href=":field_ui">Field UI module help page</a>. For background information about entities and fields see the <a href=":field_help">Field module help page</a>.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.responsive_image_style.collection': - return '<p>' . t('A responsive image style associates an image style with each breakpoint defined by your theme.') . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function responsive_image_theme() { - return [ - 'responsive_image' => [ - 'variables' => [ - 'uri' => NULL, - 'attributes' => [], - 'responsive_image_style_id' => [], - 'height' => NULL, - 'width' => NULL, - ], - ], - 'responsive_image_formatter' => [ - 'variables' => [ - 'item' => NULL, - 'item_attributes' => NULL, - 'url' => NULL, - 'responsive_image_style_id' => NULL, - ], - ], - ]; -} - /** * Prepares variables for responsive image formatter templates. * @@ -535,14 +472,3 @@ function _responsive_image_image_style_url($style_name, $path) { } return $file_url_generator->generateString($path); } - -/** - * Implements hook_library_info_alter(). - * - * Load responsive_image.js whenever ajax is added. - */ -function responsive_image_library_info_alter(array &$libraries, $module) { - if ($module === 'core' && isset($libraries['drupal.ajax'])) { - $libraries['drupal.ajax']['dependencies'][] = 'responsive_image/ajax'; - } -} diff --git a/core/modules/responsive_image/responsive_image.post_update.php b/core/modules/responsive_image/responsive_image.post_update.php index 8eee0eeaedab3dd46c3b6b55a69f0b7159e70db1..8c379a7e97f6632c39dc5196f89c7a91a5d3c216 100644 --- a/core/modules/responsive_image/responsive_image.post_update.php +++ b/core/modules/responsive_image/responsive_image.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function responsive_image_removed_post_updates() { +function responsive_image_removed_post_updates(): array { return [ 'responsive_image_post_update_recreate_dependencies' => '9.0.0', 'responsive_image_post_update_order_multiplier_numerically' => '11.0.0', diff --git a/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php b/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php index 31589a64a6511a8434979070ef7a19dc8ff4b7d0..dac2cec20df727200c2a70e98084e59dd8ad86d3 100644 --- a/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php +++ b/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php @@ -2,53 +2,57 @@ namespace Drupal\responsive_image\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityDeleteForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\image\Entity\ImageStyle; +use Drupal\responsive_image\ResponsiveImageStyleForm; use Drupal\responsive_image\ResponsiveImageStyleInterface; +use Drupal\responsive_image\ResponsiveImageStyleListBuilder; /** * Defines the responsive image style entity. - * - * @ConfigEntityType( - * id = "responsive_image_style", - * label = @Translation("Responsive image style"), - * label_collection = @Translation("Responsive image styles"), - * label_singular = @Translation("responsive image style"), - * label_plural = @Translation("responsive image styles"), - * label_count = @PluralTranslation( - * singular = "@count responsive image style", - * plural = "@count responsive image styles", - * ), - * handlers = { - * "list_builder" = "Drupal\responsive_image\ResponsiveImageStyleListBuilder", - * "form" = { - * "edit" = "Drupal\responsive_image\ResponsiveImageStyleForm", - * "add" = "Drupal\responsive_image\ResponsiveImageStyleForm", - * "delete" = "Drupal\Core\Entity\EntityDeleteForm", - * "duplicate" = "Drupal\responsive_image\ResponsiveImageStyleForm" - * } - * }, - * admin_permission = "administer responsive images", - * config_prefix = "styles", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "label", - * "image_style_mappings", - * "breakpoint_group", - * "fallback_image_style", - * }, - * links = { - * "edit-form" = "/admin/config/media/responsive-image-style/{responsive_image_style}", - * "duplicate-form" = "/admin/config/media/responsive-image-style/{responsive_image_style}/duplicate", - * "delete-form" = "/admin/config/media/responsive-image-style/{responsive_image_style}/delete", - * "collection" = "/admin/config/media/responsive-image-style", - * } - * ) */ +#[ConfigEntityType( + id: 'responsive_image_style', + label: new TranslatableMarkup('Responsive image style'), + label_collection: new TranslatableMarkup('Responsive image styles'), + label_singular: new TranslatableMarkup('responsive image style'), + label_plural: new TranslatableMarkup('responsive image styles'), + config_prefix: 'styles', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'list_builder' => ResponsiveImageStyleListBuilder::class, + 'form' => [ + 'edit' => ResponsiveImageStyleForm::class, + 'add' => ResponsiveImageStyleForm::class, + 'delete' => EntityDeleteForm::class, + 'duplicate' => ResponsiveImageStyleForm::class, + ], + ], + links: [ + 'edit-form' => '/admin/config/media/responsive-image-style/{responsive_image_style}', + 'duplicate-form' => '/admin/config/media/responsive-image-style/{responsive_image_style}/duplicate', + 'delete-form' => '/admin/config/media/responsive-image-style/{responsive_image_style}/delete', + 'collection' => '/admin/config/media/responsive-image-style', + ], + admin_permission: 'administer responsive images', + label_count: [ + 'singular' => '@count responsive image style', + 'plural' => '@count responsive image styles', + ], + config_export: [ + 'id', + 'label', + 'image_style_mappings', + 'breakpoint_group', + 'fallback_image_style', + ], +)] class ResponsiveImageStyle extends ConfigEntityBase implements ResponsiveImageStyleInterface { /** diff --git a/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php b/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..bbcd00167c7fee6910645751762dc8582cec5c89 --- /dev/null +++ b/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php @@ -0,0 +1,108 @@ +<?php + +namespace Drupal\responsive_image\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for responsive_image. + */ +class ResponsiveImageHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.responsive_image': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Responsive Image module provides an image formatter that allows browsers to select which image file to display based on media queries or which image file types the browser supports, using the HTML 5 picture and source elements and/or the sizes, srcset and type attributes. For more information, see the <a href=":responsive_image">online documentation for the Responsive Image module</a>.', [ + ':responsive_image' => 'https://www.drupal.org/documentation/modules/responsive_image', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Defining responsive image styles') . '</dt>'; + $output .= '<dd>' . t('By creating responsive image styles you define which options the browser has in selecting which image file to display. In most cases this means providing different image sizes based on the viewport size. On the <a href=":responsive_image_style">Responsive image styles</a> page, click <em>Add responsive image style</em> to create a new style. First choose a label, a fallback image style and a breakpoint group and click Save.', [ + ':responsive_image_style' => Url::fromRoute('entity.responsive_image_style.collection')->toString(), + ]) . '</dd>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Fallback image style') . '</dt>'; + $output .= '<dd>' . t('The fallback image style is typically the smallest size image you expect to appear in this space. The fallback image should only appear on a site if an error occurs.') . '</dd>'; + $output .= '<dt>' . t('Breakpoint groups: viewport sizing vs art direction') . '</dt>'; + $output .= '<dd>' . t('The breakpoint group typically only needs a single breakpoint with an empty media query in order to do <em>viewport sizing.</em> Multiple breakpoints are used for changing the crop or aspect ratio of images at different viewport sizes, which is often referred to as <em>art direction.</em> A new breakpoint group should be created for each aspect ratio to avoid content shift. Once you select a breakpoint group, you can choose which breakpoints to use for the responsive image style. By default, the option <em>do not use this breakpoint</em> is selected for each breakpoint. See the <a href=":breakpoint_help">help page of the Breakpoint module</a> for more information.', [ + ':breakpoint_help' => Url::fromRoute('help.page', [ + 'name' => 'breakpoint', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Breakpoint settings: sizes vs image styles') . '</dt>'; + $output .= '<dd>' . t('While you have the option to provide only one image style per breakpoint, the sizes attribute allows you to provide more options to browsers as to which image file it can display. If using sizes field and art direction, all selected image styles should use the same aspect ratio to avoid content shifting. Breakpoints are defined in the configuration files of the theme.') . '</dd>'; + $output .= '<dt>' . t('Sizes field') . '</dt>'; + $output .= '<dd>' . t('The sizes attribute paired with the srcset attribute provides information on how much space these images take up within the viewport at different browser breakpoints, but the aspect ratios should remain the same across those breakpoints. Once the sizes option is selected, you can let the browser know the size of this image in relation to the site layout, using the <em>Sizes</em> field. For a hero image that always fills the entire screen, you could simply enter 100vw, which means 100% of the viewport width. For an image that fills 90% of the screen for small viewports, but only fills 40% of the screen when the viewport is larger than 40em (typically 640px), you could enter "(min-width: 40em) 40vw, 90vw" in the Sizes field. The last item in the comma-separated list is the smallest viewport size: other items in the comma-separated list should have a media condition paired with an image width. <em>Media conditions</em> are similar to a media query, often a min-width paired with a viewport width using em or px units: e.g. (min-width: 640px) or (min-width: 40em). This is paired with the <em>image width</em> at that viewport size using px, em or vw units. The vw unit is viewport width and is used instead of a percentage because the percentage always refers to the width of the entire viewport.') . '</dd>'; + $output .= '<dt>' . t('Image styles for sizes') . '</dt>'; + $output .= '<dd>' . t('Below the Sizes field you can choose multiple image styles so the browser can choose the best image file size to fill the space defined in the Sizes field. Typically you will want to use image styles that resize your image to have options that range from the smallest px width possible for the space the image will appear in to the largest px width possible, with a variety of widths in between. You may want to provide image styles with widths that are 1.5x to 2x the space available in the layout to account for high resolution screens. Image styles can be defined on the <a href=":image_styles">Image styles page</a> that is provided by the <a href=":image_help">Image module</a>.', [ + ':image_styles' => Url::fromRoute('entity.image_style.collection')->toString(), + ':image_help' => Url::fromRoute('help.page', [ + 'name' => 'image', + ])->toString(), + ]) . '</dd>'; + $output .= '</dl></dd>'; + $output .= '<dt>' . t('Using responsive image styles in Image fields') . '</dt>'; + $output .= '<dd>' . t('After defining responsive image styles, you can use them in the display settings for your Image fields, so that the site displays responsive images using the HTML5 picture tag. Open the Manage display page for the entity type (content type, taxonomy vocabulary, etc.) that the Image field is attached to. Choose the format <em>Responsive image</em>, click the Edit icon, and select one of the responsive image styles that you have created. For general information on how to manage fields and their display see the <a href=":field_ui">Field UI module help page</a>. For background information about entities and fields see the <a href=":field_help">Field module help page</a>.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':field_help' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.responsive_image_style.collection': + return '<p>' . t('A responsive image style associates an image style with each breakpoint defined by your theme.') . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'responsive_image' => [ + 'variables' => [ + 'uri' => NULL, + 'attributes' => [], + 'responsive_image_style_id' => [], + 'height' => NULL, + 'width' => NULL, + ], + ], + 'responsive_image_formatter' => [ + 'variables' => [ + 'item' => NULL, + 'item_attributes' => NULL, + 'url' => NULL, + 'responsive_image_style_id' => NULL, + ], + ], + ]; + } + + /** + * Implements hook_library_info_alter(). + * + * Load responsive_image.js whenever ajax is added. + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(array &$libraries, $module) { + if ($module === 'core' && isset($libraries['drupal.ajax'])) { + $libraries['drupal.ajax']['dependencies'][] = 'responsive_image/ajax'; + } + } + +} diff --git a/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php b/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php index c496a45635d74b628087b3e1a7454f88f5c9272d..49fe15103e1d7dfbb736c454044a9e3bf92976dc 100644 --- a/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php +++ b/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php @@ -59,7 +59,7 @@ class ResponsiveImageFormatter extends ImageFormatterBase { * Constructs a ResponsiveImageFormatter object. * * @param string $plugin_id - * The plugin_id for the formatter. + * The plugin ID for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php index b8a734530394c6e6fee1717f8d5822527ea839ca..fc32540039eff40d470cf3f064143e898dc83338 100644 --- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php +++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php @@ -116,7 +116,7 @@ public function testResponsiveImageFieldFormattersEmptyStyle(): void { * @param bool $empty_styles * If true, the image style mappings will get empty image styles. */ - protected function addTestImageStyleMappings($empty_styles = FALSE) { + protected function addTestImageStyleMappings($empty_styles = FALSE): void { if ($empty_styles) { $this->responsiveImgStyle ->addImageStyleMapping('responsive_image_test_module.mobile', '1x', [ @@ -185,7 +185,7 @@ protected function addTestImageStyleMappings($empty_styles = FALSE) { * If true, use an empty string for image style names. * Defaults to false. */ - protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles = FALSE) { + protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles = FALSE): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); diff --git a/core/modules/rest/rest.install b/core/modules/rest/rest.install index 776f4591098c701f351cafaa8bdb1136b7424801..6a80d19f0f962eb6e90bcd2b82699251d87198b0 100644 --- a/core/modules/rest/rest.install +++ b/core/modules/rest/rest.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function rest_update_last_removed() { +function rest_update_last_removed(): int { return 8401; } diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module deleted file mode 100644 index 814d80441338fe37fb32a529e306d017de329181..0000000000000000000000000000000000000000 --- a/core/modules/rest/rest.module +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/** - * @file - * RESTful web services module. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function rest_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.rest': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The RESTful Web Services module provides a framework for exposing REST resources on your site. It provides support for content entity types such as the main site content, comments, content blocks, taxonomy terms, and user accounts, etc. (see the <a href=":field">Field module help page</a> for more information about entities). REST support for content items of the Node module is installed by default, and support for other types of content entities can be enabled. Other modules may add support for other types of REST resources. For more information, see the <a href=":rest">online documentation for the RESTful Web Services module</a>.', [':rest' => 'https://www.drupal.org/documentation/modules/rest', ':field' => (\Drupal::moduleHandler()->moduleExists('field')) ? Url::fromRoute('help.page', ['name' => 'field'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Installing supporting modules') . '</dt>'; - $output .= '<dd>' . t('In order to use REST on a website, you need to install modules that provide serialization and authentication services. You can use the Core module <a href=":serialization">serialization</a> for serialization and <a href=":basic_auth">HTTP Basic Authentication</a> for authentication, or install a contributed or custom module.', [':serialization' => (\Drupal::moduleHandler()->moduleExists('serialization')) ? Url::fromRoute('help.page', ['name' => 'serialization'])->toString() : 'https://www.drupal.org/docs/8/core/modules/serialization/overview', ':basic_auth' => (\Drupal::moduleHandler()->moduleExists('basic_auth')) ? Url::fromRoute('help.page', ['name' => 'basic_auth'])->toString() : 'https://www.drupal.org/docs/8/core/modules/basic_auth/overview']) . '</dd>'; - $output .= '<dt>' . t('Enabling REST support for an entity type') . '</dt>'; - $output .= '<dd>' . t('REST support for content types (provided by the <a href=":node">Node</a> module) is enabled by default. To enable support for other content entity types, you can use a <a href=":config" target="blank">process based on configuration editing</a> or the contributed <a href=":restui">REST UI module</a>.', [':node' => (\Drupal::moduleHandler()->moduleExists('node')) ? Url::fromRoute('help.page', ['name' => 'node'])->toString() : '#', ':config' => 'https://www.drupal.org/documentation/modules/rest', ':restui' => 'https://www.drupal.org/project/restui']) . '</dd>'; - $output .= '<dd>' . t('You will also need to grant anonymous users permission to perform each of the REST operations you want to be available, and set up authentication properly to authorize web requests.') . '</dd>'; - $output .= '<dt>' . t('General') . '</dt>'; - $output .= '<dd>' . t('The <a href=":rest-docs">RESTful Web Services</a> and <a href=":jsonapi-docs">JSON:API</a> modules serve similar purposes. <a href=":comparison">Read the comparison of the RESTFul Web Services and JSON:API modules</a> to determine the best choice for your site.', [ - ':rest-docs' => 'https://www.drupal.org/docs/8/core/modules/rest', - ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/json-api', - ':comparison' => 'https://www.drupal.org/docs/8/modules/jsonapi/jsonapi-vs-cores-rest-module', - ]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} diff --git a/core/modules/rest/rest.post_update.php b/core/modules/rest/rest.post_update.php index 970045a78ed2caca784ebb84ed9d751b44811eff..250c90b5bc78ca01398106a1893ff64d191357a9 100644 --- a/core/modules/rest/rest.post_update.php +++ b/core/modules/rest/rest.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function rest_removed_post_updates() { +function rest_removed_post_updates(): array { return [ 'rest_post_update_create_rest_resource_config_entities' => '9.0.0', 'rest_post_update_resource_granularity' => '9.0.0', diff --git a/core/modules/rest/src/Entity/RestResourceConfig.php b/core/modules/rest/src/Entity/RestResourceConfig.php index 027eb5e6c5f5eec41f4f0e1d059c15df3bdba124..2445fbf4a6d52502d6c42b2c55b0428de9781e82 100644 --- a/core/modules/rest/src/Entity/RestResourceConfig.php +++ b/core/modules/rest/src/Entity/RestResourceConfig.php @@ -2,6 +2,8 @@ namespace Drupal\rest\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection; @@ -9,30 +11,29 @@ /** * Defines a RestResourceConfig configuration entity class. - * - * @ConfigEntityType( - * id = "rest_resource_config", - * label = @Translation("REST resource configuration"), - * label_collection = @Translation("REST resource configurations"), - * label_singular = @Translation("REST resource configuration"), - * label_plural = @Translation("REST resource configurations"), - * label_count = @PluralTranslation( - * singular = "@count REST resource configuration", - * plural = "@count REST resource configurations", - * ), - * config_prefix = "resource", - * admin_permission = "administer rest resources", - * entity_keys = { - * "id" = "id" - * }, - * config_export = { - * "id", - * "plugin_id", - * "granularity", - * "configuration" - * } - * ) */ +#[ConfigEntityType( + id: 'rest_resource_config', + label: new TranslatableMarkup('REST resource configuration'), + label_collection: new TranslatableMarkup('REST resource configurations'), + label_singular: new TranslatableMarkup('REST resource configuration'), + label_plural: new TranslatableMarkup('REST resource configurations'), + config_prefix: 'resource', + entity_keys: [ + 'id' => 'id', + ], + admin_permission: 'administer rest resources', + label_count: [ + 'singular' => '@count REST resource configuration', + 'plural' => '@count REST resource configurations', + ], + config_export: [ + 'id', + 'plugin_id', + 'granularity', + 'configuration', + ], +)] class RestResourceConfig extends ConfigEntityBase implements RestResourceConfigInterface { /** diff --git a/core/modules/rest/src/Hook/RestHooks.php b/core/modules/rest/src/Hook/RestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e4dc99d9d604c00eeb73028541235a0790ec3e0b --- /dev/null +++ b/core/modules/rest/src/Hook/RestHooks.php @@ -0,0 +1,60 @@ +<?php + +namespace Drupal\rest\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for rest. + */ +class RestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.rest': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The RESTful Web Services module provides a framework for exposing REST resources on your site. It provides support for content entity types such as the main site content, comments, content blocks, taxonomy terms, and user accounts, etc. (see the <a href=":field">Field module help page</a> for more information about entities). REST support for content items of the Node module is installed by default, and support for other types of content entities can be enabled. Other modules may add support for other types of REST resources. For more information, see the <a href=":rest">online documentation for the RESTful Web Services module</a>.', [ + ':rest' => 'https://www.drupal.org/documentation/modules/rest', + ':field' => \Drupal::moduleHandler()->moduleExists('field') ? Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Installing supporting modules') . '</dt>'; + $output .= '<dd>' . t('In order to use REST on a website, you need to install modules that provide serialization and authentication services. You can use the Core module <a href=":serialization">serialization</a> for serialization and <a href=":basic_auth">HTTP Basic Authentication</a> for authentication, or install a contributed or custom module.', [ + ':serialization' => \Drupal::moduleHandler()->moduleExists('serialization') ? Url::fromRoute('help.page', [ + 'name' => 'serialization', + ])->toString() : 'https://www.drupal.org/docs/8/core/modules/serialization/overview', + ':basic_auth' => \Drupal::moduleHandler()->moduleExists('basic_auth') ? Url::fromRoute('help.page', [ + 'name' => 'basic_auth', + ])->toString() : 'https://www.drupal.org/docs/8/core/modules/basic_auth/overview', + ]) . '</dd>'; + $output .= '<dt>' . t('Enabling REST support for an entity type') . '</dt>'; + $output .= '<dd>' . t('REST support for content types (provided by the <a href=":node">Node</a> module) is enabled by default. To enable support for other content entity types, you can use a <a href=":config" target="blank">process based on configuration editing</a> or the contributed <a href=":restui">REST UI module</a>.', [ + ':node' => \Drupal::moduleHandler()->moduleExists('node') ? Url::fromRoute('help.page', [ + 'name' => 'node', + ])->toString() : '#', + ':config' => 'https://www.drupal.org/documentation/modules/rest', + ':restui' => 'https://www.drupal.org/project/restui', + ]) . '</dd>'; + $output .= '<dd>' . t('You will also need to grant anonymous users permission to perform each of the REST operations you want to be available, and set up authentication properly to authorize web requests.') . '</dd>'; + $output .= '<dt>' . t('General') . '</dt>'; + $output .= '<dd>' . t('The <a href=":rest-docs">RESTful Web Services</a> and <a href=":jsonapi-docs">JSON:API</a> modules serve similar purposes. <a href=":comparison">Read the comparison of the RESTFul Web Services and JSON:API modules</a> to determine the best choice for your site.', [ + ':rest-docs' => 'https://www.drupal.org/docs/8/core/modules/rest', + ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/json-api', + ':comparison' => 'https://www.drupal.org/docs/8/modules/jsonapi/jsonapi-vs-cores-rest-module', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/rest/src/Plugin/ResourceBase.php b/core/modules/rest/src/Plugin/ResourceBase.php index 0c64978df8b51408edfcd16979677682b7cd0424..b3951f8488b989ad108f879644c420886b2b6f79 100644 --- a/core/modules/rest/src/Plugin/ResourceBase.php +++ b/core/modules/rest/src/Plugin/ResourceBase.php @@ -46,7 +46,7 @@ abstract class ResourceBase extends PluginBase implements ContainerFactoryPlugin * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param array $serializer_formats diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php index 1072854fe52601ff8aad6f0695bffdc4b68950a8..feea15c5e7c543c5322b0004493c906fc23d6f49 100644 --- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php +++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php @@ -75,7 +75,7 @@ class EntityResource extends ResourceBase implements DependentPluginInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/rest/src/Plugin/views/display/RestExport.php b/core/modules/rest/src/Plugin/views/display/RestExport.php index b5394e335ac04adf77621286fb325c70bb18618a..8622300e6d761f7f0a3800b0076fba942ec5b5b3 100644 --- a/core/modules/rest/src/Plugin/views/display/RestExport.php +++ b/core/modules/rest/src/Plugin/views/display/RestExport.php @@ -108,7 +108,7 @@ class RestExport extends PathPluginBase implements ResponseDisplayPluginInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/rest/src/Plugin/views/row/DataEntityRow.php b/core/modules/rest/src/Plugin/views/row/DataEntityRow.php index e77ba33c7d8aed3bdcac9d99df351eb02bdd38eb..562e51c24ccf0f94b6a6ee0496bad5ae0ca8b38d 100644 --- a/core/modules/rest/src/Plugin/views/row/DataEntityRow.php +++ b/core/modules/rest/src/Plugin/views/row/DataEntityRow.php @@ -72,7 +72,7 @@ class DataEntityRow extends RowPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/rest/tests/modules/config_test_rest/config_test_rest.module b/core/modules/rest/tests/modules/config_test_rest/config_test_rest.module deleted file mode 100644 index 292b9ee440746c15d290166a4cc112450e160026..0000000000000000000000000000000000000000 --- a/core/modules/rest/tests/modules/config_test_rest/config_test_rest.module +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for testing REST module. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Access\AccessResultReasonInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_type_alter(). - */ -function config_test_rest_entity_type_alter(array &$entity_types) { - // Undo part of what config_test_entity_type_alter() did: remove this - // config_test_no_status entity type, because it uses the same entity class as - // the config_test entity type, which makes REST deserialization impossible. - unset($entity_types['config_test_no_status']); -} - -/** - * Implements hook_ENTITY_TYPE_access(). - */ -function config_test_rest_config_test_access(EntityInterface $entity, $operation, AccountInterface $account) { - // Add permission, so that EntityResourceTestBase's scenarios can test access - // being denied. By default, all access is always allowed for the config_test - // config entity. - $access_result = AccessResult::forbiddenIf(!$account->hasPermission('view config_test'))->cachePerPermissions(); - if (!$access_result->isAllowed() && $access_result instanceof AccessResultReasonInterface) { - $access_result->setReason("The 'view config_test' permission is required."); - } - return $access_result; -} diff --git a/core/modules/rest/tests/modules/config_test_rest/src/Hook/ConfigTestRestHooks.php b/core/modules/rest/tests/modules/config_test_rest/src/Hook/ConfigTestRestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..808c95082f776b05b37f725f249d37de60119e6c --- /dev/null +++ b/core/modules/rest/tests/modules/config_test_rest/src/Hook/ConfigTestRestHooks.php @@ -0,0 +1,44 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\config_test_rest\Hook; + +use Drupal\Core\Access\AccessResultReasonInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for config_test_rest. + */ +class ConfigTestRestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Undo part of what config_test_entity_type_alter() did: remove this + // config_test_no_status entity type, because it uses the same entity class as + // the config_test entity type, which makes REST deserialization impossible. + unset($entity_types['config_test_no_status']); + } + + /** + * Implements hook_ENTITY_TYPE_access(). + */ + #[Hook('config_test_access')] + public function configTestAccess(EntityInterface $entity, $operation, AccountInterface $account) { + // Add permission, so that EntityResourceTestBase's scenarios can test access + // being denied. By default, all access is always allowed for the config_test + // config entity. + $access_result = AccessResult::forbiddenIf(!$account->hasPermission('view config_test'))->cachePerPermissions(); + if (!$access_result->isAllowed() && $access_result instanceof AccessResultReasonInterface) { + $access_result->setReason("The 'view config_test' permission is required."); + } + return $access_result; + } + +} diff --git a/core/modules/rest/tests/modules/rest_test/rest_test.module b/core/modules/rest/tests/modules/rest_test/rest_test.module deleted file mode 100644 index e9268fced5a237958cb2841c558ac73c2d1e1749..0000000000000000000000000000000000000000 --- a/core/modules/rest/tests/modules/rest_test/rest_test.module +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for testing REST module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Access\AccessResult; - -/** - * Implements hook_entity_field_access(). - * - * @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::setUp() - */ -function rest_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPost() - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() - if ($field_definition->getName() === 'field_rest_test') { - switch ($operation) { - case 'view': - // Never ever allow this field to be viewed: this lets - // EntityResourceTestBase::testGet() test in a "vanilla" way. - return AccessResult::forbidden(); - - case 'edit': - return AccessResult::forbidden(); - } - } - - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet() - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() - if ($field_definition->getName() === 'field_rest_test_multivalue') { - switch ($operation) { - case 'view': - // Never ever allow this field to be viewed: this lets - // EntityResourceTestBase::testGet() test in a "vanilla" way. - return AccessResult::forbidden(); - } - } - - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet() - // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() - if ($field_definition->getName() === 'rest_test_validation') { - switch ($operation) { - case 'view': - // Never ever allow this field to be viewed: this lets - // EntityResourceTestBase::testGet() test in a "vanilla" way. - return AccessResult::forbidden(); - } - } - - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_base_field_info(). - */ -function rest_test_entity_base_field_info(EntityTypeInterface $entity_type) { - $fields = []; - $fields['rest_test_validation'] = BaseFieldDefinition::create('string') - ->setLabel(t('REST test validation field')) - ->setDescription(t('A text field with some special validations attached used for testing purposes')) - ->addConstraint('rest_test_validation'); - - return $fields; -} diff --git a/core/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php b/core/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7e2ba048cd5352b514bce90edd0e9ce72c1e75ef --- /dev/null +++ b/core/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php @@ -0,0 +1,74 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\rest_test\Hook; + +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for rest_test. + */ +class RestTestHooks { + + /** + * Implements hook_entity_field_access(). + * + * @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::setUp() + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPost() + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() + if ($field_definition->getName() === 'field_rest_test') { + switch ($operation) { + case 'view': + // Never ever allow this field to be viewed: this lets + // EntityResourceTestBase::testGet() test in a "vanilla" way. + return AccessResult::forbidden(); + + case 'edit': + return AccessResult::forbidden(); + } + } + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet() + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() + if ($field_definition->getName() === 'field_rest_test_multivalue') { + switch ($operation) { + case 'view': + // Never ever allow this field to be viewed: this lets + // EntityResourceTestBase::testGet() test in a "vanilla" way. + return AccessResult::forbidden(); + } + } + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet() + // @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPatch() + if ($field_definition->getName() === 'rest_test_validation') { + switch ($operation) { + case 'view': + // Never ever allow this field to be viewed: this lets + // EntityResourceTestBase::testGet() test in a "vanilla" way. + return AccessResult::forbidden(); + } + } + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + $fields = []; + $fields['rest_test_validation'] = BaseFieldDefinition::create('string')->setLabel(t('REST test validation field'))->setDescription(t('A text field with some special validations attached used for testing purposes'))->addConstraint('rest_test_validation'); + return $fields; + } + +} diff --git a/core/modules/rest/tests/modules/rest_test_views/rest_test_views.module b/core/modules/rest/tests/modules/rest_test_views/rest_test_views.module deleted file mode 100644 index 7aaa699b17908a44dd33161263b11ecf3aceb889..0000000000000000000000000000000000000000 --- a/core/modules/rest/tests/modules/rest_test_views/rest_test_views.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Test hook implementations for the REST views test module. - */ - -declare(strict_types=1); - -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_post_execute(). - */ -function rest_test_views_views_post_execute(ViewExecutable $view) { - // Attach a custom header to the test_data_export view. - if ($view->id() === 'test_serializer_display_entity') { - if ($value = \Drupal::state()->get('rest_test_views_set_header', FALSE)) { - $view->getResponse()->headers->set('Custom-Header', $value); - } - } - -} diff --git a/core/modules/rest/tests/modules/rest_test_views/src/Hook/RestTestViewsHooks.php b/core/modules/rest/tests/modules/rest_test_views/src/Hook/RestTestViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d7bc69f05e36c8676aaf335db86fd6d78d271e30 --- /dev/null +++ b/core/modules/rest/tests/modules/rest_test_views/src/Hook/RestTestViewsHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\rest_test_views\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for rest_test_views. + */ +class RestTestViewsHooks { + + /** + * Implements hook_views_post_execute(). + */ + #[Hook('views_post_execute')] + public function viewsPostExecute(ViewExecutable $view) { + // Attach a custom header to the test_data_export view. + if ($view->id() === 'test_serializer_display_entity') { + if ($value = \Drupal::state()->get('rest_test_views_set_header', FALSE)) { + $view->getResponse()->headers->set('Custom-Header', $value); + } + } + } + +} diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 9e9f7bb89910b23813276fdea34c32bd02405e64..bb717da2a69fe1165038810e3ced729618f7172f 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -1445,9 +1445,9 @@ protected function assertStoredEntityMatchesSentNormalization(array $sent_normal * A response may include more properties, we only need to ensure that all * items in the request exist in the response. * - * @param $expected + * @param array $expected * An array of expected values, may contain further nested arrays. - * @param $actual + * @param array $actual * The object to test. */ protected function assertEntityArraySubset($expected, $actual) { diff --git a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php index 1dfe440577c52576a6ffed5f0af089c08ab11dd1..f8b82e950088fafa20e0b32e57f0c206085bac3a 100644 --- a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php @@ -769,7 +769,7 @@ protected function getExpectedNormalizedEntity($fid = 1, $expected_filename = 'e * * @return \Psr\Http\Message\ResponseInterface */ - protected function fileRequest(Url $url, $file_contents, array $headers = []) { + protected function fileRequest(Url $url, $file_contents, array $headers = []): ResponseInterface { // Set the format for the response. $url->setOption('query', ['_format' => static::$format]); diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php index e0c5f40256aadb859316202423544fe0b5c51eee..01ffcc13905967787ed1548966bbbe55b69b0457 100644 --- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php +++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php @@ -207,7 +207,7 @@ public function testSerializerResponses(): void { * @param string $format * The new request format. */ - protected function addRequestWithFormat($format) { + protected function addRequestWithFormat($format): void { $request = \Drupal::request(); $request = clone $request; $request->setRequestFormat($format); diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php index ff15da36125615f2aecd05a5c91fbdc0c99e10ef..ccf958bf18c0af2a3200a5748138a6694712fafb 100644 --- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php +++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php @@ -158,7 +158,7 @@ public function testSiteMaintenance(): void { * @param string $format * The new request format. */ - protected function addRequestWithFormat($format) { + protected function addRequestWithFormat($format): void { $request = \Drupal::request(); $request = clone $request; $request->setRequestFormat($format); diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php index 81b9aba8817f046b3490eb2e55f4065fcdb089a9..3ce0238cfd7b9c2397bb5a5e674e918a98ce56e1 100644 --- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php +++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php @@ -30,6 +30,9 @@ class RequestHandlerTest extends KernelTestBase { */ protected $requestHandler; + /** + * {@inheritdoc} + */ protected static $modules = ['serialization', 'rest']; /** diff --git a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php index a6c0e88f3b25501bfa64f07e53330fd0819c5569..41ece0f90d2ac83daeb5b9643db3ccd0f4dbeb88 100644 --- a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php +++ b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php @@ -37,11 +37,6 @@ protected function setUp(): void { parent::setUp(); $container = new ContainerBuilder(); - - $request = $this->getMockBuilder('\Symfony\Component\HttpFoundation\Request') - ->disableOriginalConstructor() - ->getMock(); - $view = new View(['id' => 'test_view'], 'view'); $view_executable = $this->getMockBuilder('\Drupal\views\ViewExecutable') diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 0944c53dcfe154f3000d64d2d9d1ce57965387e5..49a42bb54832704fa724c5ceffd1195dae0731cb 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -2,56 +2,12 @@ /** * @file - * Enables site-wide keyword searching. */ use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Unicode; -use Drupal\block\BlockInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; use Drupal\search\SearchTextProcessorInterface; -/** - * Implements hook_help(). - */ -function search_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.search': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Search module provides the ability to set up search pages based on plugins provided by other modules. In Drupal core, there are two page-type plugins: the Content page type provides keyword searching for content managed by the Node module, and the Users page type provides keyword searching for registered users. Contributed modules may provide other page-type plugins. For more information, see the <a href=":search-module">online documentation for the Search module</a>.', [':search-module' => 'https://www.drupal.org/documentation/modules/search']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Configuring search pages') . '</dt>'; - $output .= '<dd>' . t('To configure search pages, visit the <a href=":search-settings">Search pages page</a>. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with <em>search</em>, and each will appear as a tab or local task link on the <a href=":search-url">search page</a>; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', [':search-settings' => Url::fromRoute('entity.search_page.collection')->toString(), ':search-url' => Url::fromRoute('search.view')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Managing the search index') . '</dt>'; - $output .= '<dd>' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during <em>cron</em> runs, so it requires a <a href=":cron">cron maintenance task</a> to be set up. There are also several settings affecting indexing that can be configured on the <a href=":search-settings">Search pages page</a>: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', [':cron' => Url::fromRoute('system.cron_settings')->toString(), ':search-settings' => Url::fromRoute('entity.search_page.collection')->toString()]) . '</dd>'; - $output .= '<dd>' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, installing or uninstalling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the <a href=":search-settings">Search pages page</a>. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', [':search-settings' => Url::fromRoute('entity.search_page.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Displaying the Search block') . '</dt>'; - $output .= '<dd>' . t('The Search module includes a block, which can be enabled and configured on the <a href=":blocks">Block layout page</a>, if you have the Block module installed; the default block title is Search, and it is the Search form block in the Forms category, if you wish to add another instance. The block is available to users with the <a href=":search_permission">Use search</a> permission, and it performs a search using the configured default search page.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#', ':search_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'search'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Searching your site') . '</dt>'; - $output .= '<dd>' . t('Users with <a href=":search_permission">Use search</a> permission can use the Search block and <a href=":search">Search page</a>. Users with the <a href=":node_permission">View published content</a> permission can use configured search pages of type <em>Content</em> to search for content containing exact keywords; in addition, users with <a href=":search_permission">Use advanced search</a> permission can use more complex search filtering. Users with the <a href=":user_permission">View user information</a> permission can use configured search pages of type <em>Users</em> to search for active users containing the keyword anywhere in the username, and users with the <a href=":user_permission">Administer users</a> permission can search for active and blocked users, by email address or username keyword.', [':search' => Url::fromRoute('search.view')->toString(), ':search_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'search'])->toString(), ':node_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'node'])->toString(), ':user_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'user'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Extending the Search module') . '</dt>'; - $output .= '<dd>' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as <a href=":porterstemmer_url">Porter Stemmer</a> for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as <a href=":solr_url">Apache Solr</a> or <a href=":sphinx_url">Sphinx</a>. There are also contributed modules that provide additional search pages. These and other <a href=":contrib-search">search-related contributed modules</a> can be downloaded by visiting Drupal.org.', [':contrib-search' => 'https://www.drupal.org/project/project_module?f[2]=im_vid_3%3A105', ':porterstemmer_url' => 'https://www.drupal.org/project/porterstemmer', ':solr_url' => 'https://www.drupal.org/project/apachesolr', ':sphinx_url' => 'https://www.drupal.org/project/sphinx']) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function search_theme() { - return [ - 'search_result' => [ - 'variables' => ['result' => NULL, 'plugin_id' => NULL], - 'file' => 'search.pages.inc', - ], - ]; -} - /** * Implements hook_theme_suggestions_HOOK(). */ @@ -68,20 +24,6 @@ function search_preprocess_block(&$variables) { } } -/** - * Implements hook_cron(). - * - * Fires updateIndex() in the plugins for all indexable active search pages, - * and cleans up dirty words. - */ -function search_cron() { - /** @var \Drupal\search\SearchPageRepositoryInterface $search_page_repository */ - $search_page_repository = \Drupal::service('search.search_page_repository'); - foreach ($search_page_repository->getIndexableSearchPages() as $entity) { - $entity->getPlugin()->updateIndex(); - } -} - /** * @defgroup search Search interface * @{ @@ -403,34 +345,3 @@ function _search_find_match_with_simplify($key, $text, $boundary, $langcode = NU // so they are Unicode-safe byte positions, not character positions. return trim(substr($text, $words[$start_index][1], $words[$end_index][1] - $words[$start_index][1])); } - -/** - * Implements hook_form_FORM_ID_alter() for the search_block_form form. - * - * Since the exposed form is a GET form, we don't want it to send the form - * tokens. However, you cannot make this happen in the form builder function - * itself, because the tokens are added to the form after the builder function - * is called. So, we have to do it in a form_alter. - * - * @see \Drupal\search\Form\SearchBlockForm - */ -function search_form_search_block_form_alter(&$form, FormStateInterface $form_state) { - $form['form_build_id']['#access'] = FALSE; - $form['form_token']['#access'] = FALSE; - $form['form_id']['#access'] = FALSE; -} - -/** - * Implements hook_ENTITY_TYPE_presave() for block entities. - */ -function search_block_presave(BlockInterface $block) { - // @see \Drupal\search\Plugin\Block\SearchBlock - if ($block->getPluginId() === 'search_form_block') { - $settings = $block->get('settings'); - if ($settings['page_id'] === '') { - @trigger_error('Saving a search block with an empty page ID is deprecated in drupal:11.1.0 and removed in drupal:12.0.0. To use the default search page, use NULL. See https://www.drupal.org/node/3463132', E_USER_DEPRECATED); - $settings['page_id'] = NULL; - $block->set('settings', $settings); - } - } -} diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc index a9e49ffc21a6b9900fe058bbdd4fddea08926ea2..afdb8fd635fa4c24530a37c3bf11e19daaaf4815 100644 --- a/core/modules/search/search.pages.inc +++ b/core/modules/search/search.pages.inc @@ -2,7 +2,6 @@ /** * @file - * User page callbacks for the Search module. */ use Drupal\Component\Utility\UrlHelper; diff --git a/core/modules/search/search.post_update.php b/core/modules/search/search.post_update.php index efb5152e59845fbc59f95b4670745787170f24d2..5efb9d3c3de8220d0d4809ceac9094df39b79ca1 100644 --- a/core/modules/search/search.post_update.php +++ b/core/modules/search/search.post_update.php @@ -11,7 +11,7 @@ /** * Implements hook_removed_post_updates(). */ -function search_removed_post_updates() { +function search_removed_post_updates(): array { return [ 'search_post_update_block_page' => '9.0.0', 'search_post_update_reindex_after_diacritics_rule_change' => '10.0.0', diff --git a/core/modules/search/src/Entity/SearchPage.php b/core/modules/search/src/Entity/SearchPage.php index d5eef74a9cf4845d533e46fe2fb6ca8b07d9731a..894da73bbac0259de6c6b8cefc10720ce2a3bfb4 100644 --- a/core/modules/search/src/Entity/SearchPage.php +++ b/core/modules/search/src/Entity/SearchPage.php @@ -2,62 +2,68 @@ namespace Drupal\search\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityDeleteForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityWithPluginCollectionInterface; +use Drupal\search\Form\SearchPageAddForm; +use Drupal\search\Form\SearchPageEditForm; use Drupal\search\Plugin\SearchIndexingInterface; use Drupal\search\Plugin\SearchPluginCollection; +use Drupal\search\SearchPageAccessControlHandler; use Drupal\search\SearchPageInterface; +use Drupal\search\SearchPageListBuilder; /** * Defines a configured search page. - * - * @ConfigEntityType( - * id = "search_page", - * label = @Translation("Search page"), - * label_collection = @Translation("Search pages"), - * label_singular = @Translation("search page"), - * label_plural = @Translation("search pages"), - * label_count = @PluralTranslation( - * singular = "@count search page", - * plural = "@count search pages", - * ), - * handlers = { - * "access" = "Drupal\search\SearchPageAccessControlHandler", - * "list_builder" = "Drupal\search\SearchPageListBuilder", - * "form" = { - * "add" = "Drupal\search\Form\SearchPageAddForm", - * "edit" = "Drupal\search\Form\SearchPageEditForm", - * "delete" = "Drupal\Core\Entity\EntityDeleteForm" - * } - * }, - * admin_permission = "administer search", - * links = { - * "edit-form" = "/admin/config/search/pages/manage/{search_page}", - * "delete-form" = "/admin/config/search/pages/manage/{search_page}/delete", - * "enable" = "/admin/config/search/pages/manage/{search_page}/enable", - * "disable" = "/admin/config/search/pages/manage/{search_page}/disable", - * "set-default" = "/admin/config/search/pages/manage/{search_page}/set-default", - * "collection" = "/admin/config/search/pages", - * }, - * config_prefix = "page", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "weight" = "weight", - * "status" = "status" - * }, - * config_export = { - * "id", - * "label", - * "path", - * "weight", - * "plugin", - * "configuration", - * } - * ) */ +#[ConfigEntityType( + id: 'search_page', + label: new TranslatableMarkup('Search page'), + label_collection: new TranslatableMarkup('Search pages'), + label_singular: new TranslatableMarkup('search page'), + label_plural: new TranslatableMarkup('search pages'), + config_prefix: 'page', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'weight' => 'weight', + 'status' => 'status', + ], + handlers: [ + 'access' => SearchPageAccessControlHandler::class, + 'list_builder' => SearchPageListBuilder::class, + 'form' => [ + 'add' => SearchPageAddForm::class, + 'edit' => SearchPageEditForm::class, + 'delete' => EntityDeleteForm::class, + ], + ], + links: [ + 'edit-form' => '/admin/config/search/pages/manage/{search_page}', + 'delete-form' => '/admin/config/search/pages/manage/{search_page}/delete', + 'enable' => '/admin/config/search/pages/manage/{search_page}/enable', + 'disable' => '/admin/config/search/pages/manage/{search_page}/disable', + 'set-default' => '/admin/config/search/pages/manage/{search_page}/set-default', + 'collection' => '/admin/config/search/pages', + ], + admin_permission: 'administer search', + label_count: [ + 'singular' => '@count search page', + 'plural' => '@count search pages', + ], + config_export: [ + 'id', + 'label', + 'path', + 'weight', + 'plugin', + 'configuration', + ], +)] class SearchPage extends ConfigEntityBase implements SearchPageInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/search/src/Hook/SearchHooks.php b/core/modules/search/src/Hook/SearchHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..dc507ce4504ce9b4e5fa4f9fec61a98a02a16ec0 --- /dev/null +++ b/core/modules/search/src/Hook/SearchHooks.php @@ -0,0 +1,137 @@ +<?php + +namespace Drupal\search\Hook; + +use Drupal\block\BlockInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for search. + */ +class SearchHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.search': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Search module provides the ability to set up search pages based on plugins provided by other modules. In Drupal core, there are two page-type plugins: the Content page type provides keyword searching for content managed by the Node module, and the Users page type provides keyword searching for registered users. Contributed modules may provide other page-type plugins. For more information, see the <a href=":search-module">online documentation for the Search module</a>.', [':search-module' => 'https://www.drupal.org/documentation/modules/search']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Configuring search pages') . '</dt>'; + $output .= '<dd>' . t('To configure search pages, visit the <a href=":search-settings">Search pages page</a>. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with <em>search</em>, and each will appear as a tab or local task link on the <a href=":search-url">search page</a>; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', [ + ':search-settings' => Url::fromRoute('entity.search_page.collection')->toString(), + ':search-url' => Url::fromRoute('search.view')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Managing the search index') . '</dt>'; + $output .= '<dd>' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during <em>cron</em> runs, so it requires a <a href=":cron">cron maintenance task</a> to be set up. There are also several settings affecting indexing that can be configured on the <a href=":search-settings">Search pages page</a>: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', [ + ':cron' => Url::fromRoute('system.cron_settings')->toString(), + ':search-settings' => Url::fromRoute('entity.search_page.collection')->toString(), + ]) . '</dd>'; + $output .= '<dd>' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, installing or uninstalling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the <a href=":search-settings">Search pages page</a>. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', [ + ':search-settings' => Url::fromRoute('entity.search_page.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Displaying the Search block') . '</dt>'; + $output .= '<dd>' . t('The Search module includes a block, which can be enabled and configured on the <a href=":blocks">Block layout page</a>, if you have the Block module installed; the default block title is Search, and it is the Search form block in the Forms category, if you wish to add another instance. The block is available to users with the <a href=":search_permission">Use search</a> permission, and it performs a search using the configured default search page.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ':search_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'search', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Searching your site') . '</dt>'; + $output .= '<dd>' . t('Users with <a href=":search_permission">Use search</a> permission can use the Search block and <a href=":search">Search page</a>. Users with the <a href=":node_permission">View published content</a> permission can use configured search pages of type <em>Content</em> to search for content containing exact keywords; in addition, users with <a href=":search_permission">Use advanced search</a> permission can use more complex search filtering. Users with the <a href=":user_permission">View user information</a> permission can use configured search pages of type <em>Users</em> to search for active users containing the keyword anywhere in the username, and users with the <a href=":user_permission">Administer users</a> permission can search for active and blocked users, by email address or username keyword.', [ + ':search' => Url::fromRoute('search.view')->toString(), + ':search_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'search', + ])->toString(), + ':node_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'node', + ])->toString(), + ':user_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'user', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Extending the Search module') . '</dt>'; + $output .= '<dd>' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as <a href=":porterstemmer_url">Porter Stemmer</a> for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as <a href=":solr_url">Apache Solr</a> or <a href=":sphinx_url">Sphinx</a>. There are also contributed modules that provide additional search pages. These and other <a href=":contrib-search">search-related contributed modules</a> can be downloaded by visiting Drupal.org.', [ + ':contrib-search' => 'https://www.drupal.org/project/project_module?f[2]=im_vid_3%3A105', + ':porterstemmer_url' => 'https://www.drupal.org/project/porterstemmer', + ':solr_url' => 'https://www.drupal.org/project/apachesolr', + ':sphinx_url' => 'https://www.drupal.org/project/sphinx', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'search_result' => [ + 'variables' => [ + 'result' => NULL, + 'plugin_id' => NULL, + ], + 'file' => 'search.pages.inc', + ], + ]; + } + + /** + * Implements hook_cron(). + * + * Fires updateIndex() in the plugins for all indexable active search pages, + * and cleans up dirty words. + */ + #[Hook('cron')] + public function cron() { + /** @var \Drupal\search\SearchPageRepositoryInterface $search_page_repository */ + $search_page_repository = \Drupal::service('search.search_page_repository'); + foreach ($search_page_repository->getIndexableSearchPages() as $entity) { + $entity->getPlugin()->updateIndex(); + } + } + + /** + * Implements hook_form_FORM_ID_alter() for the search_block_form form. + * + * Since the exposed form is a GET form, we don't want it to send the form + * tokens. However, you cannot make this happen in the form builder function + * itself, because the tokens are added to the form after the builder function + * is called. So, we have to do it in a form_alter. + * + * @see \Drupal\search\Form\SearchBlockForm + */ + #[Hook('form_search_block_form_alter')] + public function formSearchBlockFormAlter(&$form, FormStateInterface $form_state) : void { + $form['form_build_id']['#access'] = FALSE; + $form['form_token']['#access'] = FALSE; + $form['form_id']['#access'] = FALSE; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for block entities. + */ + #[Hook('block_presave')] + public function blockPresave(BlockInterface $block) { + // @see \Drupal\search\Plugin\Block\SearchBlock + if ($block->getPluginId() === 'search_form_block') { + $settings = $block->get('settings'); + if ($settings['page_id'] === '') { + @trigger_error('Saving a search block with an empty page ID is deprecated in drupal:11.1.0 and removed in drupal:12.0.0. To use the default search page, use NULL. See https://www.drupal.org/node/3463132', E_USER_DEPRECATED); + $settings['page_id'] = NULL; + $block->set('settings', $settings); + } + } + } + +} diff --git a/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php b/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php index 5730ce5e949aac3f224fd07808c7231a05aa73ef..80010dce2a961ff9e386f286cd4a482dc765b2e2 100644 --- a/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php +++ b/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php @@ -35,7 +35,7 @@ class EntitySearchPage extends EntityConfigBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\plugin\MigrationInterface $migration diff --git a/core/modules/search/src/Plugin/views/argument/Search.php b/core/modules/search/src/Plugin/views/argument/Search.php index daa4f3e9ac1a401e364763580432d05dea26a730..9a47b172a002b92d19955289dfd3d86d16d09f54 100644 --- a/core/modules/search/src/Plugin/views/argument/Search.php +++ b/core/modules/search/src/Plugin/views/argument/Search.php @@ -36,7 +36,7 @@ class Search extends ArgumentPluginBase { /** * The search score. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $search_score; /** diff --git a/core/modules/search/src/Plugin/views/filter/Search.php b/core/modules/search/src/Plugin/views/filter/Search.php index 4f9d3f88d85829c41f3e379eb3dc2099aeda07c0..2ef4e43c818253deff75a7ef259a7e8b3f0acd30 100644 --- a/core/modules/search/src/Plugin/views/filter/Search.php +++ b/core/modules/search/src/Plugin/views/filter/Search.php @@ -49,7 +49,7 @@ class Search extends FilterPluginBase { /** * The search score. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $search_score; /** diff --git a/core/modules/search/src/SearchQuery.php b/core/modules/search/src/SearchQuery.php index 8370caa281222bce7aaffacb202d97b6f15efb00..78c0f9461d84c85da55f8e1824d10ece3566b3df 100644 --- a/core/modules/search/src/SearchQuery.php +++ b/core/modules/search/src/SearchQuery.php @@ -177,7 +177,7 @@ class SearchQuery extends SelectExtender { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $relevance_count = 0; /** diff --git a/core/modules/search/tests/modules/search_date_query_alter/search_date_query_alter.module b/core/modules/search/tests/modules/search_date_query_alter/search_date_query_alter.module deleted file mode 100644 index a09af99a2536bbff51db0d61964ab484e4287097..0000000000000000000000000000000000000000 --- a/core/modules/search/tests/modules/search_date_query_alter/search_date_query_alter.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Adds date conditions to node searches. - */ - -declare(strict_types=1); - -use Drupal\Core\Database\Query\AlterableInterface; - -/** - * Implements hook_query_TAG_alter(). - * - * Tags search_$type with $type node_search. - */ -function search_date_query_alter_query_search_node_search_alter(AlterableInterface $query) { - // Start date Sat, 19 Mar 2016 00:00:00 GMT. - $query->condition('n.created', 1458345600, '>='); - // End date Sun, 20 Mar 2016 00:00:00 GMT. - $query->condition('n.created', 1458432000, '<'); -} diff --git a/core/modules/search/tests/modules/search_date_query_alter/src/Hook/SearchDateQueryAlterHooks.php b/core/modules/search/tests/modules/search_date_query_alter/src/Hook/SearchDateQueryAlterHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f599df199ed99cb7f9618a4d910b53e80af8abcd --- /dev/null +++ b/core/modules/search/tests/modules/search_date_query_alter/src/Hook/SearchDateQueryAlterHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\search_date_query_alter\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for search_date_query_alter. + */ +class SearchDateQueryAlterHooks { + + /** + * Implements hook_query_TAG_alter(). + * + * Tags search_$type with $type node_search. + */ + #[Hook('query_search_node_search_alter')] + public function querySearchNodeSearchAlter(AlterableInterface $query) { + // Start date Sat, 19 Mar 2016 00:00:00 GMT. + $query->condition('n.created', 1458345600, '>='); + // End date Sun, 20 Mar 2016 00:00:00 GMT. + $query->condition('n.created', 1458432000, '<'); + } + +} diff --git a/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module b/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module deleted file mode 100644 index 780d0fdbba2f3c04734962458ace9ddb8262f16c..0000000000000000000000000000000000000000 --- a/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @file - * Tests the preprocessing of search text. - * - * Preprocessing is tested when the language code is passed to the preprocess - * hook and also when with alternate verb forms for the stemming test. - */ - -declare(strict_types=1); - -/** - * Implements hook_search_preprocess(). - */ -function search_langcode_test_search_preprocess($text, $langcode = NULL) { - if (isset($langcode) && $langcode == 'en') { - // Add the alternate verb forms for the word "testing". - if ($text == 'we are testing') { - $text .= ' test tested'; - } - // Prints the langcode for testPreprocessLangcode() and adds some - // extra text. - else { - \Drupal::messenger()->addStatus('Langcode Preprocess Test: ' . $langcode); - $text .= 'Additional text'; - } - } - // Prints the langcode for testPreprocessLangcode(). - elseif (isset($langcode)) { - \Drupal::messenger()->addStatus('Langcode Preprocess Test: ' . $langcode); - - // Preprocessing for the excerpt test. - if ($langcode == 'ex') { - $text = str_replace('finding', 'find', $text); - $text = str_replace('finds', 'find', $text); - $text = str_replace('dic', ' dependency injection container', $text); - $text = str_replace('hypertext markup language', 'html', $text); - } - } - - return $text; -} diff --git a/core/modules/search/tests/modules/search_langcode_test/src/Hook/SearchLangcodeTestHooks.php b/core/modules/search/tests/modules/search_langcode_test/src/Hook/SearchLangcodeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6b09bde12a95ea795fc8d071c03b75eb9e28a8fc --- /dev/null +++ b/core/modules/search/tests/modules/search_langcode_test/src/Hook/SearchLangcodeTestHooks.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\search_langcode_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for search_langcode_test. + */ +class SearchLangcodeTestHooks { + + /** + * Implements hook_search_preprocess(). + */ + #[Hook('search_preprocess')] + public function searchPreprocess($text, $langcode = NULL) { + if (isset($langcode) && $langcode == 'en') { + // Add the alternate verb forms for the word "testing". + if ($text == 'we are testing') { + $text .= ' test tested'; + } + else { + \Drupal::messenger()->addStatus('Langcode Preprocess Test: ' . $langcode); + $text .= 'Additional text'; + } + } + elseif (isset($langcode)) { + \Drupal::messenger()->addStatus('Langcode Preprocess Test: ' . $langcode); + // Preprocessing for the excerpt test. + if ($langcode == 'ex') { + $text = str_replace('finding', 'find', $text); + $text = str_replace('finds', 'find', $text); + $text = str_replace('dic', ' dependency injection container', $text); + $text = str_replace('hypertext markup language', 'html', $text); + } + } + return $text; + } + +} diff --git a/core/modules/search/tests/modules/search_query_alter/search_query_alter.module b/core/modules/search/tests/modules/search_query_alter/search_query_alter.module deleted file mode 100644 index 1d68476f8fb278d58e872b586966811cbd55fede..0000000000000000000000000000000000000000 --- a/core/modules/search/tests/modules/search_query_alter/search_query_alter.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Test module that alters search queries. - */ - -declare(strict_types=1); - -use Drupal\Core\Database\Query\AlterableInterface; - -/** - * Implements hook_query_TAG_alter(). - * - * Tags search_$type with $type node_search. - */ -function search_query_alter_query_search_node_search_alter(AlterableInterface $query) { - // For testing purposes, restrict the query to node type 'article' only. - $query->condition('n.type', 'article'); -} diff --git a/core/modules/search/tests/modules/search_query_alter/src/Hook/SearchQueryAlterHooks.php b/core/modules/search/tests/modules/search_query_alter/src/Hook/SearchQueryAlterHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..90486b5a17aed1596d938d0656a9c5fd90164500 --- /dev/null +++ b/core/modules/search/tests/modules/search_query_alter/src/Hook/SearchQueryAlterHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\search_query_alter\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for search_query_alter. + */ +class SearchQueryAlterHooks { + + /** + * Implements hook_query_TAG_alter(). + * + * Tags search_$type with $type node_search. + */ + #[Hook('query_search_node_search_alter')] + public function querySearchNodeSearchAlter(AlterableInterface $query) { + // For testing purposes, restrict the query to node type 'article' only. + $query->condition('n.type', 'article'); + } + +} diff --git a/core/modules/search/tests/src/Functional/SearchCommentTest.php b/core/modules/search/tests/src/Functional/SearchCommentTest.php index 84bbf9e18d05b72da16750f3a597f210551a123f..c407307b670611eefc83712a8393793956dfbb45 100644 --- a/core/modules/search/tests/src/Functional/SearchCommentTest.php +++ b/core/modules/search/tests/src/Functional/SearchCommentTest.php @@ -302,7 +302,7 @@ public function testSearchResultsCommentAccess(): void { /** * Set permissions for role. */ - public function setRolePermissions($rid, $access_comments = FALSE, $search_content = TRUE) { + public function setRolePermissions($rid, $access_comments = FALSE, $search_content = TRUE): void { $permissions = [ 'access comments' => $access_comments, 'search content' => $search_content, diff --git a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php index fef0e4baa7b3f3f7aee2c40c1c64e0410fb797ab..d354fc4570c2819dac0154069547e490033f82be 100644 --- a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php +++ b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php @@ -384,7 +384,7 @@ public function testRouteProtection(): void { * @param bool $enable * Whether the enable link is expected. */ - protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable) { + protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable): void { if ($edit) { $this->assertSession()->linkByHrefExists("admin/config/search/pages/manage/$id"); } @@ -433,7 +433,7 @@ protected function assertDefaultSearch($expected, string $message = ''): void { * @param string $entity_id * The search page entity ID to enable. */ - protected function setDefaultThroughUi($entity_id) { + protected function setDefaultThroughUi($entity_id): void { $this->drupalGet('admin/config/search/pages'); preg_match('|href="([^"]+' . $entity_id . '/set-default[^"]+)"|', $this->getSession()->getPage()->getContent(), $matches); diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php index 4b065fd11af92058ca6f9df7932b00979db2c16d..3b386b3b897de72581e06575b66048a7b41b6894 100644 --- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php +++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php @@ -13,6 +13,9 @@ */ class MigrateSearchSettingsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['search']; /** diff --git a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php index 73df371295e302621e6ae98f82e2424ec15b5d78..76c9551966f218fa92516212f5c11da919b2984e 100644 --- a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php +++ b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php @@ -76,8 +76,6 @@ public function testSearchExcerpt(): void { * word. */ public function testSearchExcerptSimplified(): void { - $start_time = microtime(TRUE); - // cSpell:disable $lorem1 = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero.'; $lorem2 = 'Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci.'; diff --git a/core/modules/search/tests/src/Kernel/SearchMatchTest.php b/core/modules/search/tests/src/Kernel/SearchMatchTest.php index e4c14521b2b3b0e16689b78cf620b23d7590a5b5..42fae8ec073324d8befe03e166c6c3db55707c1b 100644 --- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php +++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php @@ -50,7 +50,7 @@ public function testMatching(): void { /** * Set up a small index of items to test against. */ - public function _setup() { + public function _setup(): void { $this->config('search.settings')->set('index.minimum_word_size', 3)->save(); $search_index = \Drupal::service('search.index'); @@ -106,7 +106,7 @@ public function getText2($n) { /** * Run predefine queries looking for indexed terms. */ - public function _testQueries() { + public function _testQueries(): void { // Note: OR queries that include short words in OR groups are only accepted // if the ORed terms are ANDed with at least one long word in the rest of // the query. Examples: @@ -225,7 +225,7 @@ public function _testQueries() { * * Verify if a query produces the correct results. */ - public function _testQueryMatching($query, $set, $results) { + public function _testQueryMatching($query, $set, $results): void { // Get result IDs. $found = []; foreach ($set as $item) { @@ -243,7 +243,7 @@ public function _testQueryMatching($query, $set, $results) { * * Verify if a query produces normalized, monotonous scores. */ - public function _testQueryScores($query, $set, $results) { + public function _testQueryScores($query, $set, $results): void { // Get result scores. $scores = []; foreach ($set as $item) { diff --git a/core/modules/serialization/serialization.install b/core/modules/serialization/serialization.install index 0529e296f1a6641e1cd76bd2d49a97a9a88c4c27..3114e7a3e615bb09d068231a0336345265259bb0 100644 --- a/core/modules/serialization/serialization.install +++ b/core/modules/serialization/serialization.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function serialization_update_last_removed() { +function serialization_update_last_removed(): int { return 8401; } diff --git a/core/modules/serialization/serialization.module b/core/modules/serialization/serialization.module deleted file mode 100644 index 07c8bb2a7405f1b159bdaa7346656a3367a7cb76..0000000000000000000000000000000000000000 --- a/core/modules/serialization/serialization.module +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/** - * @file - * Provides a service for (de)serializing data to/from formats such as JSON and XML. - */ - -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function serialization_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.serialization': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON and XML.') . '</p>'; - $output .= '<p>' . t('Serialization is the process of converting data structures like arrays and objects into a string. This allows the data to be represented in a way that is easy to exchange and store (for example, for transmission over the Internet or for storage in a local file system). These representations can then be deserialized to get back to the original data structures.') . '</p>'; - $output .= '<p>' . t('The serializer splits this process into two parts. Normalization converts an object to a normalized array structure. Encoding takes that array and converts it to a string.') . '</p>'; - $output .= '<p>' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as <a href=":rest">REST</a>.', [':rest' => (\Drupal::moduleHandler()->moduleExists('rest')) ? Url::fromRoute('help.page', ['name' => 'rest'])->toString() : '#']) . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":doc_url">online documentation for the Serialization module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/serialization']) . '</p>'; - return $output; - } -} diff --git a/core/modules/serialization/serialization.post_update.php b/core/modules/serialization/serialization.post_update.php index 2690271023f13cb5547a85d15f47e14cbc5dd1d8..bd09e3644ea85b79bb96e19beeb69bd5ba4aac90 100644 --- a/core/modules/serialization/serialization.post_update.php +++ b/core/modules/serialization/serialization.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function serialization_removed_post_updates() { +function serialization_removed_post_updates(): array { return [ 'serialization_post_update_delete_settings' => '10.0.0', ]; diff --git a/core/modules/serialization/src/Hook/SerializationHooks.php b/core/modules/serialization/src/Hook/SerializationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e2d6b36244f90d35f9b175a8347e684fd4b66f65 --- /dev/null +++ b/core/modules/serialization/src/Hook/SerializationHooks.php @@ -0,0 +1,36 @@ +<?php + +namespace Drupal\serialization\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for serialization. + */ +class SerializationHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.serialization': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON and XML.') . '</p>'; + $output .= '<p>' . t('Serialization is the process of converting data structures like arrays and objects into a string. This allows the data to be represented in a way that is easy to exchange and store (for example, for transmission over the Internet or for storage in a local file system). These representations can then be deserialized to get back to the original data structures.') . '</p>'; + $output .= '<p>' . t('The serializer splits this process into two parts. Normalization converts an object to a normalized array structure. Encoding takes that array and converts it to a string.') . '</p>'; + $output .= '<p>' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as <a href=":rest">REST</a>.', [ + ':rest' => \Drupal::moduleHandler()->moduleExists('rest') ? Url::fromRoute('help.page', [ + 'name' => 'rest', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":doc_url">online documentation for the Serialization module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/serialization']) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module b/core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module deleted file mode 100644 index 700c5bd0f56ce9d84aaafec62377040e2da11679..0000000000000000000000000000000000000000 --- a/core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/** - * @file - * Test support module for entity serialization tests. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; - -/** - * Implements hook_entity_field_access_alter(). - * - * Overrides some default access control to support testing. - * - * @see Drupal\serialization\Tests\EntitySerializationTest::testUserNormalize() - */ -function entity_serialization_test_entity_field_access_alter(array &$grants, array $context) { - // Override default access control from UserAccessControlHandler to allow - // access to 'pass' field for the test user. - if ($context['field_definition']->getName() == 'pass' && $context['account']->getAccountName() == 'serialization_test_user') { - $grants[':default'] = AccessResult::allowed()->inheritCacheability($grants[':default'])->addCacheableDependency($context['items']->getEntity()); - } -} diff --git a/core/modules/serialization/tests/modules/entity_serialization_test/src/Hook/EntitySerializationTestHooks.php b/core/modules/serialization/tests/modules/entity_serialization_test/src/Hook/EntitySerializationTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4015befa54cb36cf2124f48b5bc1230b8ad25261 --- /dev/null +++ b/core/modules/serialization/tests/modules/entity_serialization_test/src/Hook/EntitySerializationTestHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_serialization_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_serialization_test. + */ +class EntitySerializationTestHooks { + + /** + * Implements hook_entity_field_access_alter(). + * + * Overrides some default access control to support testing. + * + * @see Drupal\serialization\Tests\EntitySerializationTest::testUserNormalize() + */ + #[Hook('entity_field_access_alter')] + public function entityFieldAccessAlter(array &$grants, array $context) { + // Override default access control from UserAccessControlHandler to allow + // access to 'pass' field for the test user. + if ($context['field_definition']->getName() == 'pass' && $context['account']->getAccountName() == 'serialization_test_user') { + $grants[':default'] = AccessResult::allowed()->inheritCacheability($grants[':default'])->addCacheableDependency($context['items']->getEntity()); + } + } + +} diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php index 819d91383beb8905a516e206c3baabf5f13912ca..3e8da705c831a228ae31bb7ccfd74671df0b9a94 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php @@ -122,7 +122,7 @@ public function testNormalizeWithAccountContext(): void { /** * Creates a mock content entity. * - * @param $definitions + * @param array $definitions * The properties the will be returned. * * @return \PHPUnit\Framework\MockObject\MockObject diff --git a/core/modules/settings_tray/settings_tray.install b/core/modules/settings_tray/settings_tray.install index c1d43355c998d543c5521188640cf0f3963e9616..3aeabf00e6b45c81c6f261bbbc787acd2fcd162e 100644 --- a/core/modules/settings_tray/settings_tray.install +++ b/core/modules/settings_tray/settings_tray.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function settings_tray_install() { +function settings_tray_install(): void { // \Drupal\Core\Menu\ContextualLinkManager caches per-group definitions // without associating the cache tag that would allow them to be cleared // by its clearCachedDefinitions() implementation that is automatically diff --git a/core/modules/settings_tray/settings_tray.module b/core/modules/settings_tray/settings_tray.module index 35a4466575673c036d9ac579bf8f3a11a0e4d254..409b18e0a389a3ac85c8975550fa1ba5adcab264 100644 --- a/core/modules/settings_tray/settings_tray.module +++ b/core/modules/settings_tray/settings_tray.module @@ -2,58 +2,10 @@ /** * @file - * Allows configuring blocks and other configuration from the site front-end. */ -use Drupal\Core\Url; -use Drupal\Core\Asset\AttachedAssetsInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Language\LanguageInterface; use Drupal\block\Entity\Block; use Drupal\block\BlockInterface; -use Drupal\settings_tray\Block\BlockEntitySettingTrayForm; - -/** - * Implements hook_help(). - */ -function settings_tray_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.settings_tray': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Settings Tray module allows users with the <a href=":administer_block_permission">Administer blocks</a> and <a href=":contextual_permission">Use contextual links</a> permissions to edit blocks without visiting a separate page. For more information, see the <a href=":handbook_url">online documentation for the Settings Tray module</a>.', [':handbook_url' => 'https://www.drupal.org/documentation/modules/settings_tray', ':administer_block_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'block'])->toString(), ':contextual_permission' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'contextual'])->toString()]) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Editing blocks in place') . '</dt>'; - $output .= '<dd>'; - $output .= '<p>' . t('To edit blocks in place, either click the <strong>Edit</strong> button in the toolbar and then click on the block, or choose "Quick edit" from the block\'s contextual link. (See the <a href=":contextual">Contextual Links module help</a> for more information about how to use contextual links.)', [':contextual' => Url::fromRoute('help.page', ['name' => 'contextual'])->toString()]) . '</p>'; - $output .= '<p>' . t('The Settings Tray for the block will open in a sidebar, with a compact form for configuring what the block shows.') . '</p>'; - $output .= '<p>' . t('Save the form and the changes will be immediately visible on the page.') . '</p>'; - $output .= '</dd>'; - $output .= '</dl>'; - return ['#markup' => $output]; - } -} - -/** - * Implements hook_contextual_links_view_alter(). - * - * Change Configure Blocks into off_canvas links. - */ -function settings_tray_contextual_links_view_alter(&$element, $items) { - if (isset($element['#links']['settings-trayblock-configure'])) { - // Place settings_tray link first. - $settings_tray_link = $element['#links']['settings-trayblock-configure']; - unset($element['#links']['settings-trayblock-configure']); - $element['#links'] = ['settings-trayblock-configure' => $settings_tray_link] + $element['#links']; - - // If this is content block change title to avoid duplicate "Quick Edit". - if (isset($element['#links']['block-contentblock-edit'])) { - $element['#links']['settings-trayblock-configure']['title'] = t('Quick edit settings'); - } - - $element['#attached']['library'][] = 'core/drupal.dialog.off_canvas'; - } -} /** * Checks if a block has overrides. @@ -72,35 +24,6 @@ function _settings_tray_has_block_overrides(BlockInterface $block) { return \Drupal::config($block->getEntityType()->getConfigPrefix() . '.' . $block->id())->hasOverrides(); } -/** - * Implements hook_block_view_alter(). - */ -function settings_tray_block_view_alter(array &$build) { - if (isset($build['#contextual_links']['block'])) { - // Ensure that contextual links vary by whether the block has config overrides - // or not. - // @see _contextual_links_to_id() - $build['#contextual_links']['block']['metadata']['has_overrides'] = _settings_tray_has_block_overrides($build['#block']) ? 1 : 0; - } - - // Force a new 'data-contextual-id' attribute on blocks when this module is - // enabled so as not to reuse stale data cached client-side. - // @todo Remove when https://www.drupal.org/node/2773591 is fixed. - $build['#contextual_links']['settings_tray'] = [ - 'route_parameters' => [], - ]; -} - -/** - * Implements hook_entity_type_build(). - */ -function settings_tray_entity_type_build(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['block'] - ->setFormClass('settings_tray', BlockEntitySettingTrayForm::class) - ->setLinkTemplate('settings_tray-form', '/admin/structure/block/manage/{block}/settings-tray'); -} - /** * Implements hook_preprocess_HOOK() for block templates. */ @@ -127,63 +50,3 @@ function settings_tray_preprocess_block(&$variables) { } } } - -/** - * Implements hook_toolbar_alter(). - * - * Alters the 'contextual' toolbar tab if it exists (meaning the user is allowed - * to use contextual links) and if they can administer blocks. - * - * @todo Remove the "administer blocks" requirement in - * https://www.drupal.org/node/2822965. - * - * @see contextual_toolbar() - */ -function settings_tray_toolbar_alter(&$items) { - $items['contextual']['#cache']['contexts'][] = 'user.permissions'; - if (isset($items['contextual']['tab']) && \Drupal::currentUser()->hasPermission('administer blocks')) { - $items['contextual']['#weight'] = -1000; - $items['contextual']['#attached']['library'][] = 'settings_tray/drupal.settings_tray'; - $items['contextual']['tab']['#attributes']['data-drupal-settingstray'] = 'toggle'; - - // Set a class on items to mark whether they should be active in edit mode. - // @todo Create a dynamic method for modules to set their own items. - // https://www.drupal.org/node/2784589. - $edit_mode_items = ['contextual']; - foreach ($items as $key => $item) { - if (!in_array($key, $edit_mode_items) && (!isset($items[$key]['#wrapper_attributes']['class']) || !in_array('hidden', $items[$key]['#wrapper_attributes']['class']))) { - $items[$key]['#wrapper_attributes']['class'][] = 'edit-mode-inactive'; - } - } - } -} - -/** - * Implements hook_block_alter(). - * - * Ensures every block plugin definition has an 'settings_tray' form specified. - * - * @see \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck - */ -function settings_tray_block_alter(&$definitions) { - foreach ($definitions as &$definition) { - // If a block plugin does not define its own 'settings_tray' form, use the - // plugin class itself. - if (!isset($definition['forms']['settings_tray'])) { - $definition['forms']['settings_tray'] = $definition['class']; - } - } -} - -/** - * Implements hook_css_alter(). - */ -function settings_tray_css_alter(&$css, AttachedAssetsInterface $assets, LanguageInterface $language) { - // @todo Remove once conditional ordering is introduced in - // https://www.drupal.org/node/1945262. - $path = \Drupal::service('extension.list.module')->getPath('settings_tray') . '/css/settings_tray.theme.css'; - if (isset($css[$path])) { - // Use 200 to come after CSS_AGGREGATE_THEME. - $css[$path]['group'] = 200; - } -} diff --git a/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e6e196335cce152682dd20354cb6e7c363ae5799 --- /dev/null +++ b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php @@ -0,0 +1,159 @@ +<?php + +namespace Drupal\settings_tray\Hook; + +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\settings_tray\Block\BlockEntitySettingTrayForm; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for settings_tray. + */ +class SettingsTrayHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.settings_tray': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Settings Tray module allows users with the <a href=":administer_block_permission">Administer blocks</a> and <a href=":contextual_permission">Use contextual links</a> permissions to edit blocks without visiting a separate page. For more information, see the <a href=":handbook_url">online documentation for the Settings Tray module</a>.', [ + ':handbook_url' => 'https://www.drupal.org/documentation/modules/settings_tray', + ':administer_block_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'block', + ])->toString(), + ':contextual_permission' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'contextual', + ])->toString(), + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Editing blocks in place') . '</dt>'; + $output .= '<dd>'; + $output .= '<p>' . t('To edit blocks in place, either click the <strong>Edit</strong> button in the toolbar and then click on the block, or choose "Quick edit" from the block\'s contextual link. (See the <a href=":contextual">Contextual Links module help</a> for more information about how to use contextual links.)', [ + ':contextual' => Url::fromRoute('help.page', [ + 'name' => 'contextual', + ])->toString(), + ]) . '</p>'; + $output .= '<p>' . t('The Settings Tray for the block will open in a sidebar, with a compact form for configuring what the block shows.') . '</p>'; + $output .= '<p>' . t('Save the form and the changes will be immediately visible on the page.') . '</p>'; + $output .= '</dd>'; + $output .= '</dl>'; + return ['#markup' => $output]; + } + } + + /** + * Implements hook_contextual_links_view_alter(). + * + * Change Configure Blocks into off_canvas links. + */ + #[Hook('contextual_links_view_alter')] + public function contextualLinksViewAlter(&$element, $items) { + if (isset($element['#links']['settings-trayblock-configure'])) { + // Place settings_tray link first. + $settings_tray_link = $element['#links']['settings-trayblock-configure']; + unset($element['#links']['settings-trayblock-configure']); + $element['#links'] = ['settings-trayblock-configure' => $settings_tray_link] + $element['#links']; + // If this is content block change title to avoid duplicate "Quick Edit". + if (isset($element['#links']['block-contentblock-edit'])) { + $element['#links']['settings-trayblock-configure']['title'] = t('Quick edit settings'); + } + $element['#attached']['library'][] = 'core/drupal.dialog.off_canvas'; + } + } + + /** + * Implements hook_block_view_alter(). + */ + #[Hook('block_view_alter')] + public function blockViewAlter(array &$build) { + if (isset($build['#contextual_links']['block'])) { + // Ensure that contextual links vary by whether the block has config overrides + // or not. + // @see _contextual_links_to_id() + $build['#contextual_links']['block']['metadata']['has_overrides'] = _settings_tray_has_block_overrides($build['#block']) ? 1 : 0; + } + // Force a new 'data-contextual-id' attribute on blocks when this module is + // enabled so as not to reuse stale data cached client-side. + // @todo Remove when https://www.drupal.org/node/2773591 is fixed. + $build['#contextual_links']['settings_tray'] = ['route_parameters' => []]; + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['block']->setFormClass('settings_tray', BlockEntitySettingTrayForm::class)->setLinkTemplate('settings_tray-form', '/admin/structure/block/manage/{block}/settings-tray'); + } + + /** + * Implements hook_toolbar_alter(). + * + * Alters the 'contextual' toolbar tab if it exists (meaning the user is allowed + * to use contextual links) and if they can administer blocks. + * + * @todo Remove the "administer blocks" requirement in + * https://www.drupal.org/node/2822965. + * + * @see contextual_toolbar() + */ + #[Hook('toolbar_alter')] + public function toolbarAlter(&$items) { + $items['contextual']['#cache']['contexts'][] = 'user.permissions'; + if (isset($items['contextual']['tab']) && \Drupal::currentUser()->hasPermission('administer blocks')) { + $items['contextual']['#weight'] = -1000; + $items['contextual']['#attached']['library'][] = 'settings_tray/drupal.settings_tray'; + $items['contextual']['tab']['#attributes']['data-drupal-settingstray'] = 'toggle'; + // Set a class on items to mark whether they should be active in edit mode. + // @todo Create a dynamic method for modules to set their own items. + // https://www.drupal.org/node/2784589. + $edit_mode_items = ['contextual']; + foreach ($items as $key => $item) { + if (!in_array($key, $edit_mode_items) && (!isset($items[$key]['#wrapper_attributes']['class']) || !in_array('hidden', $items[$key]['#wrapper_attributes']['class']))) { + $items[$key]['#wrapper_attributes']['class'][] = 'edit-mode-inactive'; + } + } + } + } + + /** + * Implements hook_block_alter(). + * + * Ensures every block plugin definition has an 'settings_tray' form specified. + * + * @see \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck + */ + #[Hook('block_alter')] + public function blockAlter(&$definitions) { + foreach ($definitions as &$definition) { + // If a block plugin does not define its own 'settings_tray' form, use the + // plugin class itself. + if (!isset($definition['forms']['settings_tray'])) { + $definition['forms']['settings_tray'] = $definition['class']; + } + } + } + + /** + * Implements hook_css_alter(). + */ + #[Hook('css_alter')] + public function cssAlter(&$css, AttachedAssetsInterface $assets, LanguageInterface $language) { + // @todo Remove once conditional ordering is introduced in + // https://www.drupal.org/node/1945262. + $path = \Drupal::service('extension.list.module')->getPath('settings_tray') . '/css/settings_tray.theme.css'; + if (isset($css[$path])) { + // Use 200 to come after CSS_AGGREGATE_THEME. + $css[$path]['group'] = 200; + } + } + +} diff --git a/core/modules/settings_tray/tests/modules/settings_tray_test_css/settings_tray_test_css.module b/core/modules/settings_tray/tests/modules/settings_tray_test_css/settings_tray_test_css.module deleted file mode 100644 index 3edfb898b56d3a9f90cf3e915839f778b05a824b..0000000000000000000000000000000000000000 --- a/core/modules/settings_tray/tests/modules/settings_tray_test_css/settings_tray_test_css.module +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Module for attaching CSS during tests. - * - * CSS pointer-events properties cause testing errors. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments(). - */ -function settings_tray_test_css_page_attachments(array &$attachments) { - // Unconditionally attach an asset to the page. - $attachments['#attached']['library'][] = 'settings_tray_test_css/drupal.css_fix'; -} diff --git a/core/modules/settings_tray/tests/modules/settings_tray_test_css/src/Hook/SettingsTrayTestCssHooks.php b/core/modules/settings_tray/tests/modules/settings_tray_test_css/src/Hook/SettingsTrayTestCssHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..277d7e3b6ec00526ebc82d5f45956fc6317ebc81 --- /dev/null +++ b/core/modules/settings_tray/tests/modules/settings_tray_test_css/src/Hook/SettingsTrayTestCssHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\settings_tray_test_css\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for settings_tray_test_css. + */ +class SettingsTrayTestCssHooks { + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$attachments) { + // Unconditionally attach an asset to the page. + $attachments['#attached']['library'][] = 'settings_tray_test_css/drupal.css_fix'; + } + +} diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 6940b9e4fdef0381ac4338930ad97e7bc114ad78..85eb9eadcf1d99b05a5cec293ab9fe1f5049aa3d 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -58,7 +58,7 @@ public function testBlocks(): void { /** * Tests opening off-canvas dialog by click blocks and elements in the blocks. */ - protected function doTestBlocks($theme, $block_plugin, $new_page_text, $element_selector, $label_selector, $button_text, $toolbar_item, $permissions) { + protected function doTestBlocks($theme, $block_plugin, $new_page_text, $element_selector, $label_selector, $button_text, $toolbar_item, $permissions): void { if ($permissions) { $this->grantPermissions(Role::load(Role::AUTHENTICATED_ID), $permissions); } diff --git a/core/modules/shortcut/shortcut.api.php b/core/modules/shortcut/shortcut.api.php index abdf357cd8af245334b6243c374b7b6e95b5bf36..949afb2d8f75bc4c30192cda94b37adb5a098e77 100644 --- a/core/modules/shortcut/shortcut.api.php +++ b/core/modules/shortcut/shortcut.api.php @@ -1,5 +1,11 @@ <?php +/** + * @file + */ + +use Drupal\Core\Session\AccountInterface; + /** * @file * Hooks provided by the Shortcut module. @@ -31,7 +37,7 @@ * The name of the shortcut set that this module recommends for that user, if * there is one. */ -function hook_shortcut_default_set(\Drupal\Core\Session\AccountInterface $account) { +function hook_shortcut_default_set(AccountInterface $account) { // Use a special set of default shortcuts for administrators only. $roles = \Drupal::entityTypeManager()->getStorage('user_role')->loadByProperties(['is_admin' => TRUE]); $user_admin_roles = array_intersect(array_keys($roles), $account->getRoles()); diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install index bb61278a54a03459cfd783fbea7c9d5635a9182f..5f1dd604c3527fd20e41ea906a92629111c6035c 100644 --- a/core/modules/shortcut/shortcut.install +++ b/core/modules/shortcut/shortcut.install @@ -49,7 +49,7 @@ function shortcut_schema() { /** * Implements hook_install(). */ -function shortcut_install() { +function shortcut_install(): void { // Theme settings are not configuration entities and cannot depend on modules // so to set a module-specific setting, we need to set it with logic. if (\Drupal::service('theme_handler')->themeExists('claro')) { @@ -63,7 +63,7 @@ function shortcut_install() { /** * Implements hook_uninstall(). */ -function shortcut_uninstall() { +function shortcut_uninstall(): void { // Theme settings are not configuration entities and cannot depend on modules // so to unset a module-specific setting, we need to unset it with logic. if (\Drupal::service('theme_handler')->themeExists('claro')) { diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 44ee73483044992d0e3d7c4c819dc66fc13fec7f..2b5ef4b8cf63bea9b6c5ec02b7fb1fd3cdf86ad6 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -2,49 +2,15 @@ /** * @file - * Allows users to manage customizable lists of shortcut links. */ use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Access\AccessResult; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheableMetadata; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; use Drupal\shortcut\ShortcutSetInterface; -/** - * Implements hook_help(). - */ -function shortcut_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.shortcut': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Shortcut module allows users to create sets of <em>shortcut</em> links to commonly-visited pages of the site. Shortcuts are contained within <em>sets</em>. Each user with <em>Select any shortcut set</em> permission can select a shortcut set created by anyone at the site. For more information, see the <a href=":shortcut">online documentation for the Shortcut module</a>.', [':shortcut' => 'https://www.drupal.org/docs/8/core/modules/shortcut']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl><dt>' . t('Administering shortcuts') . '</dt>'; - $output .= '<dd>' . t('Users with the <em>Administer shortcuts</em> permission can manage shortcut sets and edit the shortcuts within sets from the <a href=":shortcuts">Shortcuts administration page</a>.', [':shortcuts' => Url::fromRoute('entity.shortcut_set.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Choosing shortcut sets') . '</dt>'; - $output .= '<dd>' . t('Users with permission to switch shortcut sets can choose a shortcut set to use from the Shortcuts tab of their user account page.') . '</dd>'; - $output .= '<dt>' . t('Adding and removing shortcuts') . '</dt>'; - $output .= '<dd>' . t('The Shortcut module creates an add/remove link for each page on your site; the link lets you add or remove the current page from the currently-enabled set of shortcuts (if your theme displays it and you have permission to edit your shortcut set). The core Claro administration theme displays this link next to the page title, as a gray or yellow star. If you click on the gray star, you will add that page to your preferred set of shortcuts. If the page is already part of your shortcut set, the link will be a yellow star, and will allow you to remove the current page from your shortcut set.') . '</dd>'; - $output .= '<dt>' . t('Displaying shortcuts') . '</dt>'; - $output .= '<dd>' . t('You can display your shortcuts by enabling the <em>Shortcuts</em> block on the <a href=":blocks">Blocks administration page</a>. Certain administrative modules also display your shortcuts; for example, the core <a href=":toolbar-help">Toolbar module</a> provides a corresponding menu link.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#', ':toolbar-help' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? Url::fromRoute('help.page', ['name' => 'toolbar'])->toString() : '#']) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.shortcut_set.collection': - case 'shortcut.set_add': - case 'entity.shortcut_set.edit_form': - $user = \Drupal::currentUser(); - if ($user->hasPermission('access shortcuts') && $user->hasPermission('switch shortcut sets')) { - $output = '<p>' . t('Define which shortcut set you are using on the <a href=":shortcut-link">Shortcuts tab</a> of your account page.', [':shortcut-link' => Url::fromRoute('shortcut.set_switch', ['user' => $user->id()])->toString()]) . '</p>'; - return $output; - } - } -} - /** * Access callback for editing a shortcut set. * @@ -256,81 +222,3 @@ function shortcut_preprocess_page_title(&$variables) { ]; } } - -/** - * Implements hook_toolbar(). - */ -function shortcut_toolbar() { - $user = \Drupal::currentUser(); - - $items = []; - $items['shortcuts'] = [ - '#cache' => [ - 'contexts' => [ - 'user.permissions', - ], - ], - ]; - - if ($user->hasPermission('access shortcuts')) { - $shortcut_set = \Drupal::entityTypeManager() - ->getStorage('shortcut_set') - ->getDisplayedToUser($user); - - $items['shortcuts'] += [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'link', - '#title' => t('Shortcuts'), - '#url' => $shortcut_set->toUrl('collection'), - '#attributes' => [ - 'title' => t('Shortcuts'), - 'class' => ['toolbar-icon', 'toolbar-icon-shortcut'], - ], - ], - 'tray' => [ - '#heading' => t('User-defined shortcuts'), - 'children' => [ - '#lazy_builder' => ['shortcut.lazy_builders:lazyLinks', []], - '#create_placeholder' => TRUE, - '#cache' => [ - 'keys' => ['shortcut_set_toolbar_links'], - 'contexts' => ['user'], - ], - '#lazy_builder_preview' => [ - '#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link"> </a>', - ], - ], - ], - '#weight' => -10, - '#attached' => [ - 'library' => [ - 'shortcut/drupal.shortcut', - ], - ], - ]; - } - - return $items; -} - -/** - * Implements hook_themes_installed(). - */ -function shortcut_themes_installed($theme_list) { - // Theme settings are not configuration entities and cannot depend on modules - // so to set a module-specific setting, we need to set it with logic. - if (in_array('claro', $theme_list, TRUE)) { - \Drupal::configFactory()->getEditable("claro.settings") - ->set('third_party_settings.shortcut.module_link', TRUE) - ->save(TRUE); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete(). - */ -function shortcut_user_delete(EntityInterface $entity) { - // Clean up shortcut set mapping of removed user account. - \Drupal::entityTypeManager()->getStorage('shortcut_set')->unassignUser($entity); -} diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 3d591b3ada3e86e5b95919319dd54e1c3e676d59..826fd5dfeec178a78cb3ed42ff966dfca71c388a 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -2,58 +2,64 @@ namespace Drupal\shortcut\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\link\LinkItemInterface; +use Drupal\shortcut\Form\ShortcutDeleteForm; +use Drupal\shortcut\ShortcutAccessControlHandler; +use Drupal\shortcut\ShortcutForm; use Drupal\shortcut\ShortcutInterface; /** * Defines the shortcut entity class. * * @property \Drupal\link\LinkItemInterface $link - * - * @ContentEntityType( - * id = "shortcut", - * label = @Translation("Shortcut link"), - * label_collection = @Translation("Shortcut links"), - * label_singular = @Translation("shortcut link"), - * label_plural = @Translation("shortcut links"), - * label_count = @PluralTranslation( - * singular = "@count shortcut link", - * plural = "@count shortcut links", - * ), - * bundle_label = @Translation("Shortcut set"), - * handlers = { - * "access" = "Drupal\shortcut\ShortcutAccessControlHandler", - * "form" = { - * "default" = "Drupal\shortcut\ShortcutForm", - * "add" = "Drupal\shortcut\ShortcutForm", - * "edit" = "Drupal\shortcut\ShortcutForm", - * "delete" = "Drupal\shortcut\Form\ShortcutDeleteForm" - * }, - * }, - * base_table = "shortcut", - * data_table = "shortcut_field_data", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "shortcut_set", - * "label" = "title", - * "langcode" = "langcode", - * }, - * links = { - * "canonical" = "/admin/config/user-interface/shortcut/link/{shortcut}", - * "delete-form" = "/admin/config/user-interface/shortcut/link/{shortcut}/delete", - * "edit-form" = "/admin/config/user-interface/shortcut/link/{shortcut}", - * }, - * list_cache_tags = { "config:shortcut_set_list" }, - * bundle_entity_type = "shortcut_set" - * ) */ +#[ContentEntityType( + id: 'shortcut', + label: new TranslatableMarkup('Shortcut link'), + label_collection: new TranslatableMarkup('Shortcut links'), + label_singular: new TranslatableMarkup('shortcut link'), + label_plural: new TranslatableMarkup('shortcut links'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'shortcut_set', + 'label' => 'title', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => ShortcutAccessControlHandler::class, + 'form' => [ + 'default' => ShortcutForm::class, + 'add' => ShortcutForm::class, + 'edit' => ShortcutForm::class, + 'delete' => ShortcutDeleteForm::class, + ], + ], + links: [ + 'canonical' => '/admin/config/user-interface/shortcut/link/{shortcut}', + 'delete-form' => '/admin/config/user-interface/shortcut/link/{shortcut}/delete', + 'edit-form' => '/admin/config/user-interface/shortcut/link/{shortcut}', + ], + bundle_entity_type: 'shortcut_set', + bundle_label: new TranslatableMarkup('Shortcut set'), + base_table: 'shortcut', + data_table: 'shortcut_field_data', + translatable: TRUE, + label_count: [ + 'singular' => '@count shortcut link', + 'plural' => '@count shortcut links', + ], + list_cache_tags: [ + 'config:shortcut_set_list', + ], +)] class Shortcut extends ContentEntityBase implements ShortcutInterface { /** diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index 33c28b3bbb4a255c0c96cd328b71364129e0dd12..20bcecb73bea0cfd17afc1b88507cdb7df60439f 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -2,53 +2,59 @@ namespace Drupal\shortcut\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\shortcut\Form\SetCustomize; +use Drupal\shortcut\Form\ShortcutSetDeleteForm; +use Drupal\shortcut\ShortcutSetAccessControlHandler; +use Drupal\shortcut\ShortcutSetForm; use Drupal\shortcut\ShortcutSetInterface; +use Drupal\shortcut\ShortcutSetListBuilder; +use Drupal\shortcut\ShortcutSetStorage; /** * Defines the Shortcut set configuration entity. - * - * @ConfigEntityType( - * id = "shortcut_set", - * label = @Translation("Shortcut set"), - * label_collection = @Translation("Shortcut sets"), - * label_singular = @Translation("shortcut set"), - * label_plural = @Translation("shortcut sets"), - * label_count = @PluralTranslation( - * singular = "@count shortcut set", - * plural = "@count shortcut sets", - * ), - * handlers = { - * "storage" = "Drupal\shortcut\ShortcutSetStorage", - * "access" = "Drupal\shortcut\ShortcutSetAccessControlHandler", - * "list_builder" = "Drupal\shortcut\ShortcutSetListBuilder", - * "form" = { - * "default" = "Drupal\shortcut\ShortcutSetForm", - * "add" = "Drupal\shortcut\ShortcutSetForm", - * "edit" = "Drupal\shortcut\ShortcutSetForm", - * "customize" = "Drupal\shortcut\Form\SetCustomize", - * "delete" = "Drupal\shortcut\Form\ShortcutSetDeleteForm" - * } - * }, - * config_prefix = "set", - * bundle_of = "shortcut", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * links = { - * "customize-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/customize", - * "delete-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete", - * "edit-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}", - * "collection" = "/admin/config/user-interface/shortcut", - * }, - * config_export = { - * "id", - * "label", - * } - * ) */ +#[ConfigEntityType( + id: 'shortcut_set', + label: new TranslatableMarkup('Shortcut set'), + label_collection: new TranslatableMarkup('Shortcut sets'), + label_singular: new TranslatableMarkup('shortcut set'), + label_plural: new TranslatableMarkup('shortcut sets'), + config_prefix: 'set', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], handlers: [ + 'storage' => ShortcutSetStorage::class, + 'access' => ShortcutSetAccessControlHandler::class, + 'list_builder' => ShortcutSetListBuilder::class, + 'form' => [ + 'default' => ShortcutSetForm::class, + 'add' => ShortcutSetForm::class, + 'edit' => ShortcutSetForm::class, + 'customize' => SetCustomize::class, + 'delete' => ShortcutSetDeleteForm::class, + ], + ], + links: [ + 'customize-form' => '/admin/config/user-interface/shortcut/manage/{shortcut_set}/customize', + 'delete-form' => '/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete', + 'edit-form' => '/admin/config/user-interface/shortcut/manage/{shortcut_set}', + 'collection' => '/admin/config/user-interface/shortcut', + ], + bundle_of: 'shortcut', + label_count: [ + 'singular' => '@count shortcut set', + 'plural' => '@count shortcut sets', + ], + config_export: [ + 'id', + 'label', + ], +)] class ShortcutSet extends ConfigEntityBundleBase implements ShortcutSetInterface { /** diff --git a/core/modules/shortcut/src/Hook/ShortcutHooks.php b/core/modules/shortcut/src/Hook/ShortcutHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d74b4978b2d77df03a5f70477ae1ec79df2153f9 --- /dev/null +++ b/core/modules/shortcut/src/Hook/ShortcutHooks.php @@ -0,0 +1,135 @@ +<?php + +namespace Drupal\shortcut\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for shortcut. + */ +class ShortcutHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.shortcut': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Shortcut module allows users to create sets of <em>shortcut</em> links to commonly-visited pages of the site. Shortcuts are contained within <em>sets</em>. Each user with <em>Select any shortcut set</em> permission can select a shortcut set created by anyone at the site. For more information, see the <a href=":shortcut">online documentation for the Shortcut module</a>.', [':shortcut' => 'https://www.drupal.org/docs/8/core/modules/shortcut']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl><dt>' . t('Administering shortcuts') . '</dt>'; + $output .= '<dd>' . t('Users with the <em>Administer shortcuts</em> permission can manage shortcut sets and edit the shortcuts within sets from the <a href=":shortcuts">Shortcuts administration page</a>.', [ + ':shortcuts' => Url::fromRoute('entity.shortcut_set.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Choosing shortcut sets') . '</dt>'; + $output .= '<dd>' . t('Users with permission to switch shortcut sets can choose a shortcut set to use from the Shortcuts tab of their user account page.') . '</dd>'; + $output .= '<dt>' . t('Adding and removing shortcuts') . '</dt>'; + $output .= '<dd>' . t('The Shortcut module creates an add/remove link for each page on your site; the link lets you add or remove the current page from the currently-enabled set of shortcuts (if your theme displays it and you have permission to edit your shortcut set). The core Claro administration theme displays this link next to the page title, as a gray or yellow star. If you click on the gray star, you will add that page to your preferred set of shortcuts. If the page is already part of your shortcut set, the link will be a yellow star, and will allow you to remove the current page from your shortcut set.') . '</dd>'; + $output .= '<dt>' . t('Displaying shortcuts') . '</dt>'; + $output .= '<dd>' . t('You can display your shortcuts by enabling the <em>Shortcuts</em> block on the <a href=":blocks">Blocks administration page</a>. Certain administrative modules also display your shortcuts; for example, the core <a href=":toolbar-help">Toolbar module</a> provides a corresponding menu link.', [ + ':blocks' => \Drupal::moduleHandler()->moduleExists('block') ? Url::fromRoute('block.admin_display')->toString() : '#', + ':toolbar-help' => \Drupal::moduleHandler()->moduleExists('toolbar') ? Url::fromRoute('help.page', [ + 'name' => 'toolbar', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.shortcut_set.collection': + case 'shortcut.set_add': + case 'entity.shortcut_set.edit_form': + $user = \Drupal::currentUser(); + if ($user->hasPermission('access shortcuts') && $user->hasPermission('switch shortcut sets')) { + $output = '<p>' . t('Define which shortcut set you are using on the <a href=":shortcut-link">Shortcuts tab</a> of your account page.', [ + ':shortcut-link' => Url::fromRoute('shortcut.set_switch', [ + 'user' => $user->id(), + ])->toString(), + ]) . '</p>'; + return $output; + } + } + } + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + $user = \Drupal::currentUser(); + $items = []; + $items['shortcuts'] = ['#cache' => ['contexts' => ['user.permissions']]]; + if ($user->hasPermission('access shortcuts')) { + $shortcut_set = \Drupal::entityTypeManager()->getStorage('shortcut_set')->getDisplayedToUser($user); + $items['shortcuts'] += [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'link', + '#title' => t('Shortcuts'), + '#url' => $shortcut_set->toUrl('collection'), + '#attributes' => [ + 'title' => t('Shortcuts'), + 'class' => [ + 'toolbar-icon', + 'toolbar-icon-shortcut', + ], + ], + ], + 'tray' => [ + '#heading' => t('User-defined shortcuts'), + 'children' => [ + '#lazy_builder' => [ + 'shortcut.lazy_builders:lazyLinks', + [], + ], + '#create_placeholder' => TRUE, + '#cache' => [ + 'keys' => [ + 'shortcut_set_toolbar_links', + ], + 'contexts' => [ + 'user', + ], + ], + '#lazy_builder_preview' => [ + '#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link"> </a>', + ], + ], + ], + '#weight' => -10, + '#attached' => [ + 'library' => [ + 'shortcut/drupal.shortcut', + ], + ], + ]; + } + return $items; + } + + /** + * Implements hook_themes_installed(). + */ + #[Hook('themes_installed')] + public function themesInstalled($theme_list) { + // Theme settings are not configuration entities and cannot depend on modules + // so to set a module-specific setting, we need to set it with logic. + if (in_array('claro', $theme_list, TRUE)) { + \Drupal::configFactory()->getEditable("claro.settings")->set('third_party_settings.shortcut.module_link', TRUE)->save(TRUE); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete(). + */ + #[Hook('user_delete')] + public function userDelete(EntityInterface $entity) { + // Clean up shortcut set mapping of removed user account. + \Drupal::entityTypeManager()->getStorage('shortcut_set')->unassignUser($entity); + } + +} diff --git a/core/modules/shortcut/src/Plugin/migrate/destination/ShortcutSetUsers.php b/core/modules/shortcut/src/Plugin/migrate/destination/ShortcutSetUsers.php index acad12e210cf40b86d28f077fa5d079c8b6534d0..9cb25c3265ee2c739cf21f3f91eb51cc96854513 100644 --- a/core/modules/shortcut/src/Plugin/migrate/destination/ShortcutSetUsers.php +++ b/core/modules/shortcut/src/Plugin/migrate/destination/ShortcutSetUsers.php @@ -30,7 +30,7 @@ class ShortcutSetUsers extends DestinationBase implements ContainerFactoryPlugin * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php index eb42cda886796e8bd0257cab1fa634cc6707514f..5bc39839e49d478a100e17c6ae53431fb1259a57 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php @@ -428,7 +428,7 @@ public function testShortcutLinkOrder(): void { /** * Tests the 'access shortcuts' permission for shortcut set administration. */ - private function verifyAccessShortcutsPermissionForEditPages() { + private function verifyAccessShortcutsPermissionForEditPages(): void { // Create a user with customize links and switch sets permissions but // without the 'access shortcuts' permission. $test_permissions = [ diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php index 5ef1ab7f619952c5a44028b2382a87c5fc711142..5b7c773e757b651b67bf1aae67c88901e13ff01a 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php @@ -68,7 +68,7 @@ protected function getNewEntityValues($langcode) { return ['title' => [['value' => $this->randomMachineName()]]] + parent::getNewEntityValues($langcode); } - protected function doTestBasicTranslation() { + protected function doTestBasicTranslation(): void { parent::doTestBasicTranslation(); $storage = $this->container->get('entity_type.manager') @@ -91,7 +91,7 @@ protected function doTestBasicTranslation() { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); @@ -112,7 +112,7 @@ protected function doTestTranslationEdit() { /** * Tests the basic translation workflow. */ - protected function doTestTranslationChanged() { + protected function doTestTranslationChanged(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php index 086f464b8d9deefd1adda6b08d75e5760e700543..8bcb6fc86278efa22c83f8709145e63a83e98f7c 100644 --- a/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php +++ b/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php @@ -13,6 +13,9 @@ */ class ShortcutClaroIntegrationTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/sqlite/sqlite.module b/core/modules/sqlite/sqlite.module deleted file mode 100644 index 227d26db3cd35304149246667fd1da79519a7bb1..0000000000000000000000000000000000000000 --- a/core/modules/sqlite/sqlite.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * The SQLite module provides the connection between Drupal and a SQLite database. - */ - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function sqlite_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.sqlite': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The SQLite module provides the connection between Drupal and a SQLite database. For more information, see the <a href=":sqlite">online documentation for the SQLite module</a>.', [':sqlite' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/sqlite-module']) . '</p>'; - return $output; - - } -} diff --git a/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php b/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php index 8e6d06b6fe2f2fbf55bfc2b489868b429a63458a..53c2fa0c1fe0f45dd57ffb10e5be232d11434234 100644 --- a/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php +++ b/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php @@ -2,6 +2,7 @@ namespace Drupal\sqlite\Driver\Database\sqlite; +use Drupal\Component\Utility\FilterArray; use Drupal\Core\Database\Connection as DatabaseConnection; use Drupal\Core\Database\DatabaseNotFoundException; use Drupal\Core\Database\ExceptionHandler; @@ -246,7 +247,7 @@ public static function sqlFunctionGreatest() { */ public static function sqlFunctionLeast() { // Remove all NULL, FALSE and empty strings values but leaves 0 (zero) values. - $values = array_filter(func_get_args(), 'strlen'); + $values = FilterArray::removeEmptyStrings(func_get_args()); return count($values) < 1 ? NULL : min($values); } diff --git a/core/modules/sqlite/src/Hook/SqliteHooks.php b/core/modules/sqlite/src/Hook/SqliteHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d0a6e384fcb4cd0a9b898afacbd9d90e315d5880 --- /dev/null +++ b/core/modules/sqlite/src/Hook/SqliteHooks.php @@ -0,0 +1,29 @@ +<?php + +namespace Drupal\sqlite\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for sqlite. + */ +class SqliteHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.sqlite': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The SQLite module provides the connection between Drupal and a SQLite database. For more information, see the <a href=":sqlite">online documentation for the SQLite module</a>.', [ + ':sqlite' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/sqlite-module', + ]) . '</p>'; + return $output; + } + } + +} diff --git a/core/modules/syslog/src/Hook/SyslogHooks.php b/core/modules/syslog/src/Hook/SyslogHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6862392d5a489277f24ae012ba8c69542ce1908a --- /dev/null +++ b/core/modules/syslog/src/Hook/SyslogHooks.php @@ -0,0 +1,69 @@ +<?php + +namespace Drupal\syslog\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Link; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for syslog. + */ +class SyslogHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.syslog': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href=":syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href="http://php.net/manual/function.openlog.php">openlog</a> and <a href="http://php.net/manual/function.syslog.php">syslog</a> functions.', [':syslog' => 'https://www.drupal.org/documentation/modules/syslog']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Logging for UNIX, Linux, and Mac OS X') . '</dt>'; + $output .= '<dd>' . t('On UNIX, Linux, and Mac OS X, you will find the configuration in the file <em>/etc/syslog.conf</em>, or in <em>/etc/rsyslog.conf</em> or in the directory <em>/etc/rsyslog.d</em>. These files define the routing configuration. Messages can be flagged with the codes <code>LOG_LOCAL0</code> through <code>LOG_LOCAL7</code>. For information on Syslog facilities, severity levels, and how to set up <em>syslog.conf</em> or <em>rsyslog.conf</em>, see the <em>syslog.conf</em> or <em>rsyslog.conf</em> manual page on your command line.') . '</dd>'; + $output .= '<dt>' . t('Logging for Microsoft Windows') . '</dt>'; + $output .= '<dd>' . t('On Microsoft Windows, messages are always sent to the Event Log using the code <code>LOG_USER</code>.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_system_logging_settings_alter')] + public function formSystemLoggingSettingsAlter(&$form, FormStateInterface $form_state) : void { + $config = \Drupal::configFactory()->getEditable('syslog.settings'); + $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . Link::fromTextAndUrl(t('More information'), Url::fromRoute('help.page', ['name' => 'syslog']))->toString() . '.' : NULL; + $form['syslog_identity'] = [ + '#type' => 'textfield', + '#title' => t('Syslog identity'), + '#default_value' => $config->get('identity'), + '#description' => t('A string that will be prepended to every message logged to Syslog. If you have multiple sites logging to the same Syslog log file, a unique identity per site makes it easy to tell the log entries apart.') . $help, + ]; + if (defined('LOG_LOCAL0')) { + $form['syslog_facility'] = [ + '#type' => 'select', + '#title' => t('Syslog facility'), + '#default_value' => $config->get('facility'), + '#options' => syslog_facility_list(), + '#description' => t('Depending on the system configuration, Syslog and other logging tools use this code to identify or filter messages from within the entire system log.') . $help, + ]; + } + $form['syslog_format'] = [ + '#type' => 'textarea', + '#title' => t('Syslog format'), + '#default_value' => $config->get('format'), + '#required' => TRUE, + '#description' => t('Specify the format of the syslog entry. Available variables are: <dl><dt><code>!base_url</code></dt><dd>Base URL of the site.</dd><dt><code>!timestamp</code></dt><dd>Unix timestamp of the log entry.</dd><dt><code>!type</code></dt><dd>The category to which this message belongs.</dd><dt><code>!ip</code></dt><dd>IP address of the user triggering the message.</dd><dt><code>!request_uri</code></dt><dd>The requested URI.</dd><dt><code>!referer</code></dt><dd>HTTP Referer if available.</dd><dt><code>!severity</code></dt><dd>The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).</dd><dt><code>!uid</code></dt><dd>User ID.</dd><dt><code>!link</code></dt><dd>A link to associate with the message.</dd><dt><code>!message</code></dt><dd>The message to store in the log.</dd></dl>'), + ]; + $form['#submit'][] = 'syslog_logging_settings_submit'; + } + +} diff --git a/core/modules/syslog/syslog.install b/core/modules/syslog/syslog.install index 2219bd507f2ba8564942b9645f60aa1debff56a3..b204bf432db7d36099308f93ba3830ba92304849 100644 --- a/core/modules/syslog/syslog.install +++ b/core/modules/syslog/syslog.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function syslog_install() { +function syslog_install(): void { // The default facility setting depends on the operating system, so it needs // to be set dynamically during installation. \Drupal::configFactory()->getEditable('syslog.settings')->set('facility', defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER)->save(); @@ -17,6 +17,6 @@ function syslog_install() { /** * Implements hook_update_last_removed(). */ -function syslog_update_last_removed() { +function syslog_update_last_removed(): int { return 8400; } diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module index 2ecdd2c8de15b24833088b82f4adab840b51c52c..140f3065ccd742684e144a7a24f2be96a08fc78c 100644 --- a/core/modules/syslog/syslog.module +++ b/core/modules/syslog/syslog.module @@ -2,65 +2,9 @@ /** * @file - * Redirects logging messages to syslog. */ -use Drupal\Core\Link; -use Drupal\Core\Url; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function syslog_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.syslog': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href=":syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href="http://php.net/manual/function.openlog.php">openlog</a> and <a href="http://php.net/manual/function.syslog.php">syslog</a> functions.', [':syslog' => 'https://www.drupal.org/documentation/modules/syslog']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Logging for UNIX, Linux, and Mac OS X') . '</dt>'; - $output .= '<dd>' . t('On UNIX, Linux, and Mac OS X, you will find the configuration in the file <em>/etc/syslog.conf</em>, or in <em>/etc/rsyslog.conf</em> or in the directory <em>/etc/rsyslog.d</em>. These files define the routing configuration. Messages can be flagged with the codes <code>LOG_LOCAL0</code> through <code>LOG_LOCAL7</code>. For information on Syslog facilities, severity levels, and how to set up <em>syslog.conf</em> or <em>rsyslog.conf</em>, see the <em>syslog.conf</em> or <em>rsyslog.conf</em> manual page on your command line.') . '</dd>'; - $output .= '<dt>' . t('Logging for Microsoft Windows') . '</dt>'; - $output .= '<dd>' . t('On Microsoft Windows, messages are always sent to the Event Log using the code <code>LOG_USER</code>.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function syslog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) { - $config = \Drupal::configFactory()->getEditable('syslog.settings'); - $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . Link::fromTextAndUrl(t('More information'), Url::fromRoute('help.page', ['name' => 'syslog']))->toString() . '.' : NULL; - $form['syslog_identity'] = [ - '#type' => 'textfield', - '#title' => t('Syslog identity'), - '#default_value' => $config->get('identity'), - '#description' => t('A string that will be prepended to every message logged to Syslog. If you have multiple sites logging to the same Syslog log file, a unique identity per site makes it easy to tell the log entries apart.') . $help, - ]; - if (defined('LOG_LOCAL0')) { - $form['syslog_facility'] = [ - '#type' => 'select', - '#title' => t('Syslog facility'), - '#default_value' => $config->get('facility'), - '#options' => syslog_facility_list(), - '#description' => t('Depending on the system configuration, Syslog and other logging tools use this code to identify or filter messages from within the entire system log.') . $help, - ]; - } - $form['syslog_format'] = [ - '#type' => 'textarea', - '#title' => t('Syslog format'), - '#default_value' => $config->get('format'), - '#required' => TRUE, - '#description' => t('Specify the format of the syslog entry. Available variables are: <dl><dt><code>!base_url</code></dt><dd>Base URL of the site.</dd><dt><code>!timestamp</code></dt><dd>Unix timestamp of the log entry.</dd><dt><code>!type</code></dt><dd>The category to which this message belongs.</dd><dt><code>!ip</code></dt><dd>IP address of the user triggering the message.</dd><dt><code>!request_uri</code></dt><dd>The requested URI.</dd><dt><code>!referer</code></dt><dd>HTTP Referer if available.</dd><dt><code>!severity</code></dt><dd>The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).</dd><dt><code>!uid</code></dt><dd>User ID.</dd><dt><code>!link</code></dt><dd>A link to associate with the message.</dd><dt><code>!message</code></dt><dd>The message to store in the log.</dd></dl>'), - ]; - - $form['#submit'][] = 'syslog_logging_settings_submit'; -} /** * Form submission handler for system_logging_settings(). diff --git a/core/modules/syslog/tests/src/Kernel/SyslogTest.php b/core/modules/syslog/tests/src/Kernel/SyslogTest.php index 15ff370d96e19b7246bcdba658d8119d141f8170..c3d85e71900a0595e998897937d90431d6c835f8 100644 --- a/core/modules/syslog/tests/src/Kernel/SyslogTest.php +++ b/core/modules/syslog/tests/src/Kernel/SyslogTest.php @@ -17,6 +17,9 @@ */ class SyslogTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['syslog', 'syslog_test']; /** diff --git a/core/modules/system/src/Entity/Action.php b/core/modules/system/src/Entity/Action.php index d683bdbc443752590c3b3256bad04dc0f4a03d87..46cebac0ffaf04982f84c522c23cd5295594fe82 100644 --- a/core/modules/system/src/Entity/Action.php +++ b/core/modules/system/src/Entity/Action.php @@ -2,6 +2,8 @@ namespace Drupal\system\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Component\Plugin\ConfigurableInterface; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Component\Plugin\PluginManagerInterface; @@ -13,31 +15,30 @@ /** * Defines the configured action entity. - * - * @ConfigEntityType( - * id = "action", - * label = @Translation("Action"), - * label_collection = @Translation("Actions"), - * label_singular = @Translation("action"), - * label_plural = @Translation("actions"), - * label_count = @PluralTranslation( - * singular = "@count action", - * plural = "@count actions", - * ), - * admin_permission = "administer actions", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "label", - * "type", - * "plugin", - * "configuration", - * } - * ) */ +#[ConfigEntityType( + id: 'action', + label: new TranslatableMarkup('Action'), + label_collection: new TranslatableMarkup('Actions'), + label_singular: new TranslatableMarkup('action'), + label_plural: new TranslatableMarkup('actions'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + admin_permission: 'administer actions', + label_count: [ + 'singular' => '@count action', + 'plural' => '@count actions', + ], + config_export: [ + 'id', + 'label', + 'type', + 'plugin', + 'configuration', + ], +)] class Action extends ConfigEntityBase implements ActionConfigEntityInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/system/src/Entity/Menu.php b/core/modules/system/src/Entity/Menu.php index 546aa34a86e93032ed1945a66c5a8b37a7f3764f..9beb4d29694b56fd191d7087acf0962e63cdcecd 100644 --- a/core/modules/system/src/Entity/Menu.php +++ b/core/modules/system/src/Entity/Menu.php @@ -2,40 +2,43 @@ namespace Drupal\system\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\system\MenuAccessControlHandler; use Drupal\system\MenuInterface; +use Drupal\system\MenuStorage; /** * Defines the Menu configuration entity class. - * - * @ConfigEntityType( - * id = "menu", - * label = @Translation("Menu"), - * label_collection = @Translation("Menus"), - * label_singular = @Translation("menu"), - * label_plural = @Translation("menus"), - * label_count = @PluralTranslation( - * singular = "@count menu", - * plural = "@count menus", - * ), - * handlers = { - * "access" = "Drupal\system\MenuAccessControlHandler", - * "storage" = "Drupal\system\MenuStorage", - * }, - * admin_permission = "administer menu", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "label", - * "description", - * "locked", - * } - * ) */ +#[ConfigEntityType( + id: 'menu', + label: new TranslatableMarkup('Menu'), + label_collection: new TranslatableMarkup('Menus'), + label_singular: new TranslatableMarkup('menu'), + label_plural: new TranslatableMarkup('menus'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => MenuAccessControlHandler::class, + 'storage' => MenuStorage::class, + ], + admin_permission: 'administer menu', + label_count: [ + 'singular' => '@count menu', + 'plural' => '@count menus', + ], + config_export: [ + 'id', + 'label', + 'description', + 'locked', + ], +)] class Menu extends ConfigEntityBase implements MenuInterface { /** diff --git a/core/modules/system/src/Hook/SystemHooks.php b/core/modules/system/src/Hook/SystemHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..242844830defae215a3ecd1fd52187358435fe71 --- /dev/null +++ b/core/modules/system/src/Hook/SystemHooks.php @@ -0,0 +1,540 @@ +<?php + +namespace Drupal\system\Hook; + +use Drupal\Core\StreamWrapper\StreamWrapperManager; +use Drupal\Core\StreamWrapper\LocalStream; +use Drupal\Core\Site\Settings; +use Drupal\Core\Link; +use Drupal\Core\Entity\ContentEntityTypeInterface; +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Component\Render\PlainTextOutput; +use Drupal\Core\Queue\QueueGarbageCollectionInterface; +use Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory; +use Drupal\Core\Cache\Cache; +use Drupal\Core\Extension\Extension; +use Drupal\Component\Gettext\PoItem; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Routing\StackedRouteMatchInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for system. + */ +class SystemHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.system': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The System module is integral to the site: it provides user interfaces for many core systems and settings, as well as the basic administrative menu structure. For more information, see the <a href=":system">online documentation for the System module</a>.', [':system' => 'https://www.drupal.org/documentation/modules/system']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing modules') . '</dt>'; + $output .= '<dd>' . t('Users with appropriate permission can install and uninstall modules from the <a href=":modules">Extend page</a>. Depending on which distribution or installation profile you choose when you install your site, several modules are installed and others are provided but not installed. Each module provides a discrete set of features; modules may be installed or uninstalled depending on the needs of the site. Many additional modules contributed by members of the Drupal community are available for download from the <a href=":drupal-modules">Drupal.org module page</a>. Note that uninstalling a module is a destructive action: when you uninstall a module, you will permanently lose all data connected to the module.', [ + ':modules' => Url::fromRoute('system.modules_list')->toString(), + ':drupal-modules' => 'https://www.drupal.org/project/modules', + ]) . '</dd>'; + $output .= '<dt>' . t('Managing themes') . '</dt>'; + $output .= '<dd>' . t('Users with appropriate permission can install and uninstall themes on the <a href=":themes">Appearance page</a>. Themes determine the design and presentation of your site. Depending on which distribution or installation profile you choose when you install your site, a default theme is installed, and possibly a different theme for administration pages. Other themes are provided but not installed, and additional contributed themes are available at the <a href=":drupal-themes">Drupal.org theme page</a>.', [ + ':themes' => Url::fromRoute('system.themes_page')->toString(), + ':drupal-themes' => 'https://www.drupal.org/project/themes', + ]) . '</dd>'; + $output .= '<dt>' . t('Disabling drag-and-drop functionality') . '</dt>'; + $output .= '<dd>' . t('The default drag-and-drop user interface for ordering tables in the administrative interface presents a challenge for some users, including users of screen readers and other assistive technology. The drag-and-drop interface can be disabled in a table by clicking a link labeled "Show row weights" above the table. The replacement interface allows users to order the table by choosing numerical weights instead of dragging table rows.') . '</dd>'; + $output .= '<dt>' . t('Configuring basic site settings') . '</dt>'; + $output .= '<dd>' . t('The System module provides pages for managing basic site configuration, including <a href=":date-time-settings">Date and time formats</a> and <a href=":site-info">Basic site settings</a> (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main <a href=":config">Configuration page</a>.', [ + ':date-time-settings' => Url::fromRoute('entity.date_format.collection')->toString(), + ':site-info' => Url::fromRoute('system.site_information_settings')->toString(), + ':config' => Url::fromRoute('system.admin_config')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Checking site status') . '</dt>'; + $output .= '<dd>' . t('The <a href=":status">Status report</a> provides an overview of the configuration, status, and health of your site. Review this report to make sure there are not any problems to address, and to find information about the software your site and web server are using.', [':status' => Url::fromRoute('system.status')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Using maintenance mode') . '</dt>'; + $output .= '<dd>' . t('When you are performing site maintenance, you can prevent non-administrative users (including anonymous visitors) from viewing your site by putting it in <a href=":maintenance-mode">Maintenance mode</a>. This will prevent unauthorized users from making changes to the site while you are performing maintenance, or from seeing a broken site while updates are in progress.', [ + ':maintenance-mode' => Url::fromRoute('system.site_maintenance_mode')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring for performance') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":performance-page">Performance page</a>, the site can be configured to aggregate CSS and JavaScript files, making the total request size smaller. Note that, for small- to medium-sized websites, the <a href=":page-cache">Internal Page Cache module</a> should be installed so that pages are efficiently cached and reused for anonymous users. Finally, for websites of all sizes, the <a href=":dynamic-page-cache">Dynamic Page Cache module</a> should also be installed so that the non-personalized parts of pages are efficiently cached (for all users).', [ + ':performance-page' => Url::fromRoute('system.performance_settings')->toString(), + ':page-cache' => \Drupal::moduleHandler()->moduleExists('page_cache') ? Url::fromRoute('help.page', [ + 'name' => 'page_cache', + ])->toString() : '#', + ':dynamic-page-cache' => \Drupal::moduleHandler()->moduleExists('dynamic_page_cache') ? Url::fromRoute('help.page', [ + 'name' => 'dynamic_page_cache', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring cron') . '</dt>'; + $output .= '<dd>' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis; these operations are known as <em>cron</em> tasks. On the <a href=":cron">Cron page</a>, you can configure cron to run periodically as part of server responses by installing the <em>Automated Cron</em> module, or you can turn this off and trigger cron from an outside process on your web server. You can verify the status of cron tasks by visiting the <a href=":status">Status report page</a>. For more information, see the <a href=":handbook">online documentation for configuring cron jobs</a>.', [ + ':status' => Url::fromRoute('system.status')->toString(), + ':handbook' => 'https://www.drupal.org/docs/administering-a-drupal-site/cron-automated-tasks/cron-automated-tasks-overview', + ':cron' => Url::fromRoute('system.cron_settings')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring the file system') . '</dt>'; + $output .= '<dd>' . t('Your site has several file directories, which are used to store and process uploaded and generated files. The <em>public</em> file directory, which is configured in your settings.php file, is the default place for storing uploaded files. Links to files in this directory contain the direct file URL, so when the files are requested, the web server will send them directly without invoking your site code. This means that the files can be downloaded by anyone with the file URL, so requests are not access-controlled but they are efficient. The <em>private</em> file directory, also configured in your settings.php file and ideally located outside the site web root, is access controlled. Links to files in this directory are not direct, so requests to these files are mediated by your site code. This means that your site can check file access permission for each file before deciding to fulfill the request, so the requests are more secure, but less efficient. You should only use the private storage for files that need access control, not for files like your site logo and background images used on every page. The <em>temporary</em> file directory is used internally by your site code for various operations, and is configured on the <a href=":file-system">File system settings</a> page. You can also see the configured public and private file directories on this page, and choose whether public or private should be the default for uploaded files.', [ + ':file-system' => Url::fromRoute('system.file_system_settings')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring the image toolkit') . '</dt>'; + $output .= '<dd>' . t('On the <a href=":toolkit">Image toolkit page</a>, you can select and configure the PHP toolkit used to manipulate images. Depending on which distribution or installation profile you choose when you install your site, the GD2 toolkit and possibly others are included; other toolkits may be provided by contributed modules.', [ + ':toolkit' => Url::fromRoute('system.image_toolkit_settings')->toString(), + ]) . '</dd>'; + if (\Drupal::currentUser()->hasPermission('administer site configuration')) { + $output .= '<dt id="security-advisories">' . t('Critical security advisories') . '</dt>'; + $output .= '<dd>' . t('The System module displays highly critical and time-sensitive security announcements to site administrators. Some security announcements will be displayed until a critical security update is installed. Announcements that are not associated with a specific release will appear for a fixed period of time. <a href=":handbook">More information on critical security advisories</a>.', [ + ':handbook' => 'https://www.drupal.org/docs/updating-drupal/responding-to-critical-security-update-advisories', + ]) . '</dd>'; + $output .= '<dd>' . t('Only the most highly critical security announcements will be shown. <a href=":advisories-list">View all security announcements</a>.', [':advisories-list' => 'https://www.drupal.org/security']) . '</dd>'; + } + $output .= '</dl>'; + return $output; + + case 'system.admin_index': + return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>'; + + case 'system.themes_page': + $output = '<p>' . t('Set and configure the default theme for your website. Alternative <a href=":themes">themes</a> are available.', [':themes' => 'https://www.drupal.org/project/themes']) . '</p>'; + if (\Drupal::moduleHandler()->moduleExists('block')) { + $output .= '<p>' . t('You can place blocks for each theme on the <a href=":blocks">block layout</a> page.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; + } + return $output; + + case 'system.theme_settings_theme': + $theme_list = \Drupal::service('theme_handler')->listInfo(); + $theme = $theme_list[$route_match->getParameter('theme')]; + return '<p>' . t('These options control the display settings for the %name theme. When your site is displayed using this theme, these settings will be used.', ['%name' => $theme->info['name']]) . '</p>'; + + case 'system.theme_settings': + return '<p>' . t('Control default display settings for your site, across all themes. Use theme-specific settings to override these defaults.') . '</p>'; + + case 'system.modules_list': + $output = '<p>' . t('Add <a href=":modules">contributed modules</a> to extend your site\'s functionality.', [':modules' => 'https://www.drupal.org/project/modules']) . '</p>'; + if (!\Drupal::moduleHandler()->moduleExists('update')) { + $output .= '<p>' . t('Regularly review available updates and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time a module is updated. Install the <a href=":update-manager">Update Manager module</a> to update modules and themes.', [ + ':update-php' => Url::fromRoute('system.db_update')->toString(), + ':update-manager' => Url::fromRoute('system.modules_list', [], [ + 'fragment' => 'module-update', + ])->toString(), + ]) . '</p>'; + } + return $output; + + case 'system.modules_uninstall': + return '<p>' . t('The uninstall process removes all data related to a module.') . '</p>'; + + case 'entity.block.edit_form': + if (($block = $route_match->getParameter('block')) && $block->getPluginId() == 'system_powered_by_block') { + return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>'; + } + break; + + case 'block.admin_add': + if ($route_match->getParameter('plugin_id') == 'system_powered_by_block') { + return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>'; + } + break; + + case 'system.site_maintenance_mode': + if (\Drupal::currentUser()->id() == 1) { + return '<p>' . t('Use maintenance mode when making major updates, particularly if the updates could disrupt visitors or the update process. Examples include upgrading, importing or exporting content, modifying a theme, modifying content types, and making backups.') . '</p>'; + } + break; + + case 'system.status': + return '<p>' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on Drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the <a href=\":system-requirements\">system requirements.</a>", [':system-requirements' => 'https://www.drupal.org/docs/system-requirements']) . '</p>'; + } + } + + /** + * @} End of "defgroup authorize". + */ + + /** + * Implements hook_updater_info(). + */ + #[Hook('updater_info')] + public function updaterInfo() { + return [ + 'module' => [ + 'class' => 'Drupal\Core\Updater\Module', + 'name' => t('Update modules'), + 'weight' => 0, + ], + 'theme' => [ + 'class' => 'Drupal\Core\Updater\Theme', + 'name' => t('Update themes'), + 'weight' => 0, + ], + ]; + } + + /** + * Implements hook_filetransfer_info(). + */ + #[Hook('filetransfer_info')] + public function filetransferInfo() { + $backends = []; + // This is the default, will be available on most systems. + if (function_exists('ftp_connect')) { + $backends['ftp'] = ['title' => t('FTP'), 'class' => 'Drupal\Core\FileTransfer\FTP', 'weight' => 0]; + } + // SSH2 lib connection is only available if the proper PHP extension is + // installed. + if (function_exists('ssh2_connect')) { + $backends['ssh'] = ['title' => t('SSH'), 'class' => 'Drupal\Core\FileTransfer\SSH', 'weight' => 20]; + } + return $backends; + } + + /** + * Implements hook_page_attachments(). + * + * @see template_preprocess_maintenance_page() + * @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$page) { + _system_page_attachments($page); + } + + /** + * Implements hook_js_settings_build(). + * + * Sets values for the core/drupal.ajax library, which just depends on the + * active theme but no other request-dependent values. + */ + #[Hook('js_settings_build')] + public function jsSettingsBuild(&$settings, AttachedAssetsInterface $assets) { + // Generate the values for the core/drupal.ajax library. + // We need to send ajaxPageState settings for core/drupal.ajax if: + // - ajaxPageState is being loaded in this Response, in which case it will + // already exist at $settings['ajaxPageState'] (because the core/drupal.ajax + // library definition specifies a placeholder 'ajaxPageState' setting). + // - core/drupal.ajax already has been loaded and hence this is an AJAX + // Response in which we must send the list of extra asset libraries that are + // being added in this AJAX Response. + /** @var \Drupal\Core\Asset\LibraryDependencyResolver $library_dependency_resolver */ + $library_dependency_resolver = \Drupal::service('library.dependency_resolver'); + if (isset($settings['ajaxPageState']) || in_array('core/drupal.ajax', $library_dependency_resolver->getLibrariesWithDependencies($assets->getAlreadyLoadedLibraries()))) { + // Provide the page with information about the theme that's used, so that + // a later AJAX request can be rendered using the same theme. + // @see \Drupal\Core\Theme\AjaxBasePageNegotiator + $theme_key = \Drupal::theme()->getActiveTheme()->getName(); + $settings['ajaxPageState']['theme'] = $theme_key; + } + } + + /** + * Implements hook_js_settings_alter(). + * + * Sets values which depend on the current request, like core/drupalSettings + * as well as theme_token ajax state. + */ + #[Hook('js_settings_alter')] + public function jsSettingsAlter(&$settings, AttachedAssetsInterface $assets) { + // As this is being output in the final response always use the main request. + $request = \Drupal::requestStack()->getMainRequest(); + $current_query = $request->query->all(); + // Let output path processors set a prefix. + /** @var \Drupal\Core\PathProcessor\OutboundPathProcessorInterface $path_processor */ + $path_processor = \Drupal::service('path_processor_manager'); + $options = ['prefix' => '']; + $path_processor->processOutbound('/', $options); + $pathPrefix = $options['prefix']; + $route_match = \Drupal::routeMatch(); + if ($route_match instanceof StackedRouteMatchInterface) { + $route_match = $route_match->getMasterRouteMatch(); + } + $current_path = $route_match->getRouteName() ? Url::fromRouteMatch($route_match)->getInternalPath() : ''; + $current_path_is_admin = \Drupal::service('router.admin_context')->isAdminRoute($route_match->getRouteObject()); + $path_settings = [ + 'baseUrl' => $request->getBaseUrl() . '/', + 'pathPrefix' => $pathPrefix, + 'currentPath' => $current_path, + 'currentPathIsAdmin' => $current_path_is_admin, + 'isFront' => \Drupal::service('path.matcher')->isFrontPage(), + 'currentLanguage' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(), + ]; + if (!empty($current_query)) { + ksort($current_query); + $path_settings['currentQuery'] = (object) $current_query; + } + // Only set core/drupalSettings values that haven't been set already. + foreach ($path_settings as $key => $value) { + if (!isset($settings['path'][$key])) { + $settings['path'][$key] = $value; + } + } + if (!isset($settings['pluralDelimiter'])) { + $settings['pluralDelimiter'] = PoItem::DELIMITER; + } + // Add the theme token to ajaxPageState, ensuring the database is available + // before doing so. Also add the loaded libraries to ajaxPageState. + /** @var \Drupal\Core\Asset\LibraryDependencyResolver $library_dependency_resolver */ + $library_dependency_resolver = \Drupal::service('library.dependency_resolver'); + if (isset($settings['ajaxPageState']) || in_array('core/drupal.ajax', $library_dependency_resolver->getLibrariesWithDependencies($assets->getAlreadyLoadedLibraries()))) { + if (!defined('MAINTENANCE_MODE')) { + // The theme token is only validated when the theme requested is not the + // default, so don't generate it unless necessary. + // @see \Drupal\Core\Theme\AjaxBasePageNegotiator::determineActiveTheme() + $active_theme_key = \Drupal::theme()->getActiveTheme()->getName(); + if ($active_theme_key !== \Drupal::service('theme_handler')->getDefault()) { + $settings['ajaxPageState']['theme_token'] = \Drupal::csrfToken()->get($active_theme_key); + } + } + // Provide the page with information about the individual asset libraries + // used, information not otherwise available when aggregation is enabled. + $minimal_libraries = $library_dependency_resolver->getMinimalRepresentativeSubset(array_unique(array_merge($assets->getLibraries(), $assets->getAlreadyLoadedLibraries()))); + sort($minimal_libraries); + $settings['ajaxPageState']['libraries'] = implode(',', $minimal_libraries); + } + } + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + // Remove page-top and page-bottom from the blocks UI since they are reserved for + // modules to populate from outside the blocks system. + if ($type == 'theme') { + $info['regions_hidden'][] = 'page_top'; + $info['regions_hidden'][] = 'page_bottom'; + } + } + + /** + * Implements hook_cron(). + * + * Remove older rows from flood, batch cache and expirable keyvalue tables. Also + * ensure files directories have .htaccess files. + */ + #[Hook('cron')] + public function cron() { + // Clean up the flood. + \Drupal::flood()->garbageCollection(); + foreach (Cache::getBins() as $cache_backend) { + $cache_backend->garbageCollection(); + } + // Clean up the expirable key value database store. + if (\Drupal::service('keyvalue.expirable.database') instanceof KeyValueDatabaseExpirableFactory) { + \Drupal::service('keyvalue.expirable.database')->garbageCollection(); + } + // Clean up any garbage in the queue service. + $queue_worker_manager = \Drupal::service('plugin.manager.queue_worker'); + $queue_factory = \Drupal::service('queue'); + foreach (array_keys($queue_worker_manager->getDefinitions()) as $queue_name) { + $queue = $queue_factory->get($queue_name); + if ($queue instanceof QueueGarbageCollectionInterface) { + $queue->garbageCollection(); + } + } + // Ensure that all of Drupal's standard directories (e.g., the public files + // directory and config directory) have appropriate .htaccess files. + \Drupal::service('file.htaccess_writer')->ensure(); + if (\Drupal::config('system.advisories')->get('enabled')) { + // Fetch the security advisories so that they will be pre-fetched during + // _system_advisories_requirements() and system_page_top(). + /** @var \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher $fetcher */ + $fetcher = \Drupal::service('system.sa_fetcher'); + $fetcher->getSecurityAdvisories(); + } + } + + /** + * Implements hook_mail(). + */ + #[Hook('mail')] + public function mail($key, &$message, $params) { + $token_service = \Drupal::token(); + $context = $params['context']; + $subject = PlainTextOutput::renderFromHtml($token_service->replace($context['subject'], $context)); + $body = $token_service->replace($context['message'], $context); + $message['subject'] .= str_replace(["\r", "\n"], '', $subject); + $message['body'][] = $body; + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['date_format']->setFormClass('add', 'Drupal\system\Form\DateFormatAddForm')->setFormClass('edit', 'Drupal\system\Form\DateFormatEditForm')->setFormClass('delete', 'Drupal\system\Form\DateFormatDeleteForm')->setListBuilderClass('Drupal\system\DateFormatListBuilder')->setLinkTemplate('edit-form', '/admin/config/regional/date-time/formats/manage/{date_format}')->setLinkTemplate('delete-form', '/admin/config/regional/date-time/formats/manage/{date_format}/delete')->setLinkTemplate('collection', '/admin/config/regional/date-time/formats'); + } + + /** + * Implements hook_block_view_BASE_BLOCK_ID_alter(). + */ + #[Hook('block_view_system_main_block_alter')] + public function blockViewSystemMainBlockAlter(array &$build, BlockPluginInterface $block) { + // Contextual links on the system_main block would basically duplicate the + // tabs/local tasks, so reduce the clutter. + unset($build['#contextual_links']); + } + + /** + * Implements hook_query_TAG_alter() for entity reference selection handlers. + */ + #[Hook('query_entity_reference_alter')] + public function queryEntityReferenceAlter(AlterableInterface $query) { + $handler = $query->getMetadata('entity_reference_selection_handler'); + $handler->entityQueryAlter($query); + } + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(&$type) { + if (isset($type['page'])) { + $type['page']['#theme_wrappers']['off_canvas_page_wrapper'] = ['#weight' => -1000]; + } + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled($modules) { + // @todo Remove this when modules are able to maintain their revision metadata + // keys. + // @see https://www.drupal.org/project/drupal/issues/3074333 + if (!in_array('workspaces', $modules, TRUE)) { + return; + } + $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); + foreach ($entity_definition_update_manager->getEntityTypes() as $entity_type) { + if ($entity_type instanceof ContentEntityTypeInterface && $entity_type->hasRevisionMetadataKey('workspace')) { + $entity_type->setRevisionMetadataKey('workspace', NULL); + $entity_definition_update_manager->updateEntityType($entity_type); + } + } + } + + /** + * Implements hook_library_info_alter(). + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(&$libraries, $extension) { + // If Claro is the admin theme but not the active theme, grant Claro the + // ability to override the toolbar library with its own assets. + if ($extension === 'toolbar' && _system_is_claro_admin_and_not_active()) { + require_once DRUPAL_ROOT . '/core/themes/claro/claro.theme'; + claro_system_module_invoked_library_info_alter($libraries, $extension); + } + } + + /** + * Implements hook_theme_registry_alter(). + */ + #[Hook('theme_registry_alter')] + public function themeRegistryAlter(array &$theme_registry) { + // If Claro is the admin theme but not the active theme, use Claro's toolbar + // templates. + if (_system_is_claro_admin_and_not_active()) { + require_once DRUPAL_ROOT . '/core/themes/claro/claro.theme'; + claro_system_module_invoked_theme_registry_alter($theme_registry); + } + } + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop() { + /** @var \Drupal\Core\Routing\AdminContext $admin_context */ + $admin_context = \Drupal::service('router.admin_context'); + if ($admin_context->isAdminRoute() && \Drupal::currentUser()->hasPermission('administer site configuration')) { + $route_match = \Drupal::routeMatch(); + $route_name = $route_match->getRouteName(); + if ($route_name !== 'system.status' && \Drupal::config('system.advisories')->get('enabled')) { + /** @var \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher $fetcher */ + $fetcher = \Drupal::service('system.sa_fetcher'); + $advisories = $fetcher->getSecurityAdvisories(FALSE); + if ($advisories) { + $messenger = \Drupal::messenger(); + $display_as_errors = FALSE; + $links = []; + foreach ($advisories as $advisory) { + // To ensure that all the advisory messages are grouped together on + // the page, they must all be warnings or all be errors. If any + // advisories are not public service announcements, then display all + // the messages as errors because security advisories already tied to + // a specific release are immediately actionable by upgrading to a + // secure version of a project. + $display_as_errors = $display_as_errors ? TRUE : !$advisory->isPsa(); + $links[] = new Link($advisory->getTitle(), Url::fromUri($advisory->getUrl())); + } + foreach ($links as $link) { + $display_as_errors ? $messenger->addError($link) : $messenger->addWarning($link); + } + if (\Drupal::moduleHandler()->moduleExists('help')) { + $help_link = t('(<a href=":system-help">What are critical security announcements?</a>)', [ + ':system-help' => Url::fromRoute('help.page', [ + 'name' => 'system', + ], [ + 'fragment' => 'security-advisories', + ])->toString(), + ]); + $display_as_errors ? $messenger->addError($help_link) : $messenger->addWarning($help_link); + } + } + } + } + } + + /** + * Implements hook_file_download(). + */ + #[Hook('file_download')] + public function fileDownload($uri) { + $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager'); + $scheme = $stream_wrapper_manager->getScheme($uri); + if ($stream_wrapper_manager->isValidScheme($scheme)) { + $target = $stream_wrapper_manager->getTarget($uri); + if ($target !== FALSE) { + if (!in_array($scheme, Settings::get('file_sa_core_2023_005_schemes', []))) { + if (DIRECTORY_SEPARATOR !== '/') { + $class = $stream_wrapper_manager->getClass($scheme); + if (is_subclass_of($class, LocalStream::class)) { + $target = str_replace(DIRECTORY_SEPARATOR, '/', $target); + } + } + $parts = explode('/', $target); + if (array_intersect($parts, ['.', '..'])) { + return -1; + } + } + } + } + $core_schemes = ['public', 'private', 'temporary']; + $additional_public_schemes = array_diff(Settings::get('file_additional_public_schemes', []), $core_schemes); + if ($additional_public_schemes) { + $scheme = StreamWrapperManager::getScheme($uri); + if (in_array($scheme, $additional_public_schemes, TRUE)) { + return ['Cache-Control' => 'public']; + } + } + } + + /** + * Implements hook_archiver_info_alter(). + */ + #[Hook('archiver_info_alter')] + public function archiverInfoAlter(&$info) { + if (!class_exists(\ZipArchive::class)) { + // PHP Zip extension is missing. + unset($info['Zip']); + } + } + +} diff --git a/core/modules/system/src/Hook/SystemTokensHooks.php b/core/modules/system/src/Hook/SystemTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c28da24e8e55a597ba91e9431bc9c0dca05b42ca --- /dev/null +++ b/core/modules/system/src/Hook/SystemTokensHooks.php @@ -0,0 +1,209 @@ +<?php + +namespace Drupal\system\Hook; + +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\Core\Url; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for system. + */ +class SystemTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $types['site'] = [ + 'name' => t("Site information"), + 'description' => t("Tokens for site-wide settings and other global information."), + ]; + $types['date'] = ['name' => t("Dates"), 'description' => t("Tokens related to times and dates.")]; + // Site-wide global tokens. + $site['name'] = ['name' => t("Name"), 'description' => t("The name of the site.")]; + $site['slogan'] = ['name' => t("Slogan"), 'description' => t("The slogan of the site.")]; + $site['mail'] = [ + 'name' => t("Email"), + 'description' => t("The administrative email address for the site."), + ]; + $site['base-url'] = [ + 'name' => t("Base URL"), + 'description' => t("The base URL of the site, currently: @base_url", [ + '@base_url' => \Drupal::service('router.request_context')->getCompleteBaseUrl(), + ]), + ]; + $site['base-path'] = [ + 'name' => t("Base path"), + 'description' => t("The base path of the site, currently: @base_path", [ + '@base_path' => \Drupal::request()->getBasePath(), + ]), + ]; + $site['url'] = [ + 'name' => t("URL"), + 'description' => t("The URL of the site's front page with the language prefix, if it exists."), + ]; + $site['url-brief'] = [ + 'name' => t("URL (brief)"), + 'description' => t("The URL of the site's front page without the protocol."), + ]; + $site['login-url'] = [ + 'name' => t("Login page"), + 'description' => t("The URL of the site's login page."), + ]; + /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */ + $date_formatter = \Drupal::service('date.formatter'); + // Date related tokens. + $request_time = \Drupal::time()->getRequestTime(); + $date['short'] = [ + 'name' => t("Short format"), + 'description' => t("The current date in 'short' format. (%date)", [ + '%date' => $date_formatter->format($request_time, 'short'), + ]), + ]; + $date['medium'] = [ + 'name' => t("Medium format"), + 'description' => t("The current date in 'medium' format. (%date)", [ + '%date' => $date_formatter->format($request_time, 'medium'), + ]), + ]; + $date['long'] = [ + 'name' => t("Long format"), + 'description' => t("The current date in 'long' format. (%date)", [ + '%date' => $date_formatter->format($request_time, 'long'), + ]), + ]; + $date['custom'] = [ + 'name' => t("Custom format"), + 'description' => t('The current date in a custom format. See <a href="https://www.php.net/manual/datetime.format.php#refsect1-datetime.format-parameters">the PHP documentation</a> for details.'), + ]; + $date['since'] = [ + 'name' => t("Time-since"), + 'description' => t("The current date in 'time-since' format. (%date)", [ + '%date' => $date_formatter->formatTimeDiffSince($request_time - 360), + ]), + ]; + $date['raw'] = [ + 'name' => t("Raw timestamp"), + 'description' => t("The current date in UNIX timestamp format (%date)", [ + '%date' => $request_time, + ]), + ]; + return ['types' => $types, 'tokens' => ['site' => $site, 'date' => $date]]; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + $url_options = ['absolute' => TRUE]; + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = NULL; + } + $replacements = []; + if ($type == 'site') { + foreach ($tokens as $name => $original) { + switch ($name) { + case 'name': + $config = \Drupal::config('system.site'); + $bubbleable_metadata->addCacheableDependency($config); + $site_name = $config->get('name'); + $replacements[$original] = $site_name; + break; + + case 'slogan': + $config = \Drupal::config('system.site'); + $bubbleable_metadata->addCacheableDependency($config); + $slogan = $config->get('slogan'); + $build = ['#markup' => $slogan]; + // @todo Fix in https://www.drupal.org/node/2577827 + $replacements[$original] = \Drupal::service('renderer')->renderInIsolation($build); + break; + + case 'mail': + $config = \Drupal::config('system.site'); + $bubbleable_metadata->addCacheableDependency($config); + $replacements[$original] = $config->get('mail'); + break; + + case 'base-url': + $bubbleable_metadata->addCacheContexts(['url.site']); + $replacements[$original] = \Drupal::service('router.request_context')->getCompleteBaseUrl(); + break; + + case 'base-path': + $bubbleable_metadata->addCacheContexts(['url.site']); + $replacements[$original] = \Drupal::request()->getBasePath(); + break; + + case 'url': + /** @var \Drupal\Core\GeneratedUrl $result */ + $result = Url::fromRoute('<front>', [], $url_options)->toString(TRUE); + $bubbleable_metadata->addCacheableDependency($result); + $replacements[$original] = $result->getGeneratedUrl(); + break; + + case 'url-brief': + /** @var \Drupal\Core\GeneratedUrl $result */ + $result = Url::fromRoute('<front>', [], $url_options)->toString(TRUE); + $bubbleable_metadata->addCacheableDependency($result); + $replacements[$original] = preg_replace(['!^https?://!', '!/$!'], '', $result->getGeneratedUrl()); + break; + + case 'login-url': + /** @var \Drupal\Core\GeneratedUrl $result */ + $result = Url::fromRoute('user.page', [], $url_options)->toString(TRUE); + $bubbleable_metadata->addCacheableDependency($result); + $replacements[$original] = $result->getGeneratedUrl(); + break; + } + } + } + elseif ($type == 'date') { + if (empty($data['date'])) { + $date = \Drupal::time()->getRequestTime(); + // We depend on the current request time, so the tokens are not cacheable + // at all. + $bubbleable_metadata->setCacheMaxAge(0); + } + else { + $date = $data['date']; + } + foreach ($tokens as $name => $original) { + switch ($name) { + case 'short': + case 'medium': + case 'long': + $date_format = DateFormat::load($name); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($date, $name, '', NULL, $langcode); + break; + + case 'since': + $replacements[$original] = \Drupal::service('date.formatter')->formatTimeDiffSince($date, ['langcode' => $langcode]); + $bubbleable_metadata->setCacheMaxAge(0); + break; + + case 'raw': + $replacements[$original] = $date; + break; + } + } + if ($created_tokens = $token_service->findWithPrefix($tokens, 'custom')) { + foreach ($created_tokens as $name => $original) { + $replacements[$original] = \Drupal::service('date.formatter')->format($date, 'custom', $name, NULL, $langcode); + } + } + } + return $replacements; + } + +} diff --git a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php index 560afe5f57d4193ebf82ffe73b12ed2b5e17f618..e60cddd7d0811e316161280512125f5dc18093b8 100644 --- a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php @@ -36,7 +36,7 @@ class SystemBrandingBlock extends BlockBase implements ContainerFactoryPluginInt * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory diff --git a/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php b/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php index f57d4eb643e8b2d2631a4f6f643addc53e1f9569..6fcdbafcc18f3b3f5f3ca96c08ade5c3a28f6233 100644 --- a/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php @@ -39,7 +39,7 @@ class SystemBreadcrumbBlock extends BlockBase implements ContainerFactoryPluginI * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface $breadcrumb_manager diff --git a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php index 8918d4b2afaee87f0dabe737cd3ab1cf0973a795..762594f228374efa831eb20326a27e873cf1d562 100644 --- a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php @@ -49,7 +49,7 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree diff --git a/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php b/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php index 5c0f4ad48f6c2a7fe6212928fbb844864f4765ab..3ed8129a6f0d83a0588798e45bede9179fa44bf2 100644 --- a/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php +++ b/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php @@ -40,7 +40,7 @@ class CurrentThemeCondition extends ConditionPluginBase implements ContainerFact * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Theme\ThemeManagerInterface $theme_manager diff --git a/core/modules/system/src/Plugin/Condition/RequestPath.php b/core/modules/system/src/Plugin/Condition/RequestPath.php index 7e6aa074d7f8355063c41f8752a3230333ce4e73..eb53cf7c67e66e59ad57c763b59361f9fd6dac51 100644 --- a/core/modules/system/src/Plugin/Condition/RequestPath.php +++ b/core/modules/system/src/Plugin/Condition/RequestPath.php @@ -64,7 +64,7 @@ class RequestPath extends ConditionPluginBase implements ContainerFactoryPluginI * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. */ diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php index 433b968adaee363526e99ca0b2fe731b8c052746..d340981377db0c396d64b0fbecba98a94d78f5b3 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php +++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php @@ -76,7 +76,7 @@ class GDToolkit extends ImageToolkitBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface $operation_manager diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index b9fa2f7c32ecf97d3dafdbe5f6cdcb9b1a61cd62..dc5961b2e254f35619121d3074c59450c5cbdb6e 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -2,7 +2,6 @@ /** * @file - * Admin page callbacks for the system module. */ use Drupal\Component\Utility\Html; diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 102d873634399263a0d9b9bf23b631129b04d8a0..5b921ee4696a4d1c6602b34a68976919d5719c1a 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1465,10 +1465,14 @@ function system_requirements($phase) { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); $module_list = []; - $module_handler->invokeAllWith( - 'update_last_removed', - function (callable $hook, string $module) use (&$module_list, $update_registry, $module_extension_list) { - $last_removed = $hook(); + // hook_update_last_removed() is a procedural hook hook because we + // do not have classes loaded that would be needed. + // Simply inlining the old hook mechanism is better than making + // ModuleInstaller::invoke() public. + foreach ($module_handler->getModuleList() as $module => $extension) { + $function = $module . '_update_last_removed'; + if (function_exists($function)) { + $last_removed = $function(); if ($last_removed && $last_removed > $update_registry->getInstalledVersion($module)) { /** @var \Drupal\Core\Extension\Extension $module_info */ @@ -1480,7 +1484,7 @@ function (callable $hook, string $module) use (&$module_list, $update_registry, ]; } } - ); + } // If user module is in the list then only show a specific message for // Drupal core. @@ -1614,7 +1618,7 @@ function (callable $hook, string $module) use (&$module_list, $update_registry, /** * Implements hook_install(). */ -function system_install() { +function system_install(): void { // Populate the cron key state variable. $cron_key = Crypt::randomBytesBase64(55); \Drupal::state()->set('system.cron_key', $cron_key); @@ -1657,10 +1661,17 @@ function system_schema() { /** * Implements hook_update_last_removed(). */ -function system_update_last_removed() { +function system_update_last_removed(): int { return 10201; } +/** + * Invalidate container because the module handler has changed. + */ +function system_update_11100(): void { + \Drupal::service('kernel')->invalidateContainer(); +} + /** * Display requirements from security advisories. * diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4798cb7d819342c17def768ee0863ec4e67748e4..27b24765ac984f2664395ae93c9d3d69e3dc9704 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2,12 +2,9 @@ /** * @file - * Configuration system that lets administrators modify the workings of the site. */ use Drupal\Component\FileSecurity\FileSecurity; -use Drupal\Component\Gettext\PoItem; -use Drupal\Component\Render\PlainTextOutput; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Access\AccessResult; use Drupal\Core\Asset\AttachedAssetsInterface; @@ -62,100 +59,10 @@ */ const REGIONS_ALL = 'all'; -/** - * Implements hook_help(). - */ -function system_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.system': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The System module is integral to the site: it provides user interfaces for many core systems and settings, as well as the basic administrative menu structure. For more information, see the <a href=":system">online documentation for the System module</a>.', [':system' => 'https://www.drupal.org/documentation/modules/system']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing modules') . '</dt>'; - $output .= '<dd>' . t('Users with appropriate permission can install and uninstall modules from the <a href=":modules">Extend page</a>. Depending on which distribution or installation profile you choose when you install your site, several modules are installed and others are provided but not installed. Each module provides a discrete set of features; modules may be installed or uninstalled depending on the needs of the site. Many additional modules contributed by members of the Drupal community are available for download from the <a href=":drupal-modules">Drupal.org module page</a>. Note that uninstalling a module is a destructive action: when you uninstall a module, you will permanently lose all data connected to the module.', [':modules' => Url::fromRoute('system.modules_list')->toString(), ':drupal-modules' => 'https://www.drupal.org/project/modules']) . '</dd>'; - $output .= '<dt>' . t('Managing themes') . '</dt>'; - $output .= '<dd>' . t('Users with appropriate permission can install and uninstall themes on the <a href=":themes">Appearance page</a>. Themes determine the design and presentation of your site. Depending on which distribution or installation profile you choose when you install your site, a default theme is installed, and possibly a different theme for administration pages. Other themes are provided but not installed, and additional contributed themes are available at the <a href=":drupal-themes">Drupal.org theme page</a>.', [':themes' => Url::fromRoute('system.themes_page')->toString(), ':drupal-themes' => 'https://www.drupal.org/project/themes']) . '</dd>'; - $output .= '<dt>' . t('Disabling drag-and-drop functionality') . '</dt>'; - $output .= '<dd>' . t('The default drag-and-drop user interface for ordering tables in the administrative interface presents a challenge for some users, including users of screen readers and other assistive technology. The drag-and-drop interface can be disabled in a table by clicking a link labeled "Show row weights" above the table. The replacement interface allows users to order the table by choosing numerical weights instead of dragging table rows.') . '</dd>'; - $output .= '<dt>' . t('Configuring basic site settings') . '</dt>'; - $output .= '<dd>' . t('The System module provides pages for managing basic site configuration, including <a href=":date-time-settings">Date and time formats</a> and <a href=":site-info">Basic site settings</a> (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main <a href=":config">Configuration page</a>.', [':date-time-settings' => Url::fromRoute('entity.date_format.collection')->toString(), ':site-info' => Url::fromRoute('system.site_information_settings')->toString(), ':config' => Url::fromRoute('system.admin_config')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Checking site status') . '</dt>'; - $output .= '<dd>' . t('The <a href=":status">Status report</a> provides an overview of the configuration, status, and health of your site. Review this report to make sure there are not any problems to address, and to find information about the software your site and web server are using.', [':status' => Url::fromRoute('system.status')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Using maintenance mode') . '</dt>'; - $output .= '<dd>' . t('When you are performing site maintenance, you can prevent non-administrative users (including anonymous visitors) from viewing your site by putting it in <a href=":maintenance-mode">Maintenance mode</a>. This will prevent unauthorized users from making changes to the site while you are performing maintenance, or from seeing a broken site while updates are in progress.', [':maintenance-mode' => Url::fromRoute('system.site_maintenance_mode')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring for performance') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":performance-page">Performance page</a>, the site can be configured to aggregate CSS and JavaScript files, making the total request size smaller. Note that, for small- to medium-sized websites, the <a href=":page-cache">Internal Page Cache module</a> should be installed so that pages are efficiently cached and reused for anonymous users. Finally, for websites of all sizes, the <a href=":dynamic-page-cache">Dynamic Page Cache module</a> should also be installed so that the non-personalized parts of pages are efficiently cached (for all users).', [':performance-page' => Url::fromRoute('system.performance_settings')->toString(), ':page-cache' => (\Drupal::moduleHandler()->moduleExists('page_cache')) ? Url::fromRoute('help.page', ['name' => 'page_cache'])->toString() : '#', ':dynamic-page-cache' => (\Drupal::moduleHandler()->moduleExists('dynamic_page_cache')) ? Url::fromRoute('help.page', ['name' => 'dynamic_page_cache'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Configuring cron') . '</dt>'; - $output .= '<dd>' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis; these operations are known as <em>cron</em> tasks. On the <a href=":cron">Cron page</a>, you can configure cron to run periodically as part of server responses by installing the <em>Automated Cron</em> module, or you can turn this off and trigger cron from an outside process on your web server. You can verify the status of cron tasks by visiting the <a href=":status">Status report page</a>. For more information, see the <a href=":handbook">online documentation for configuring cron jobs</a>.', [':status' => Url::fromRoute('system.status')->toString(), ':handbook' => 'https://www.drupal.org/docs/administering-a-drupal-site/cron-automated-tasks/cron-automated-tasks-overview', ':cron' => Url::fromRoute('system.cron_settings')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring the file system') . '</dt>'; - $output .= '<dd>' . t('Your site has several file directories, which are used to store and process uploaded and generated files. The <em>public</em> file directory, which is configured in your settings.php file, is the default place for storing uploaded files. Links to files in this directory contain the direct file URL, so when the files are requested, the web server will send them directly without invoking your site code. This means that the files can be downloaded by anyone with the file URL, so requests are not access-controlled but they are efficient. The <em>private</em> file directory, also configured in your settings.php file and ideally located outside the site web root, is access controlled. Links to files in this directory are not direct, so requests to these files are mediated by your site code. This means that your site can check file access permission for each file before deciding to fulfill the request, so the requests are more secure, but less efficient. You should only use the private storage for files that need access control, not for files like your site logo and background images used on every page. The <em>temporary</em> file directory is used internally by your site code for various operations, and is configured on the <a href=":file-system">File system settings</a> page. You can also see the configured public and private file directories on this page, and choose whether public or private should be the default for uploaded files.', [':file-system' => Url::fromRoute('system.file_system_settings')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring the image toolkit') . '</dt>'; - $output .= '<dd>' . t('On the <a href=":toolkit">Image toolkit page</a>, you can select and configure the PHP toolkit used to manipulate images. Depending on which distribution or installation profile you choose when you install your site, the GD2 toolkit and possibly others are included; other toolkits may be provided by contributed modules.', [':toolkit' => Url::fromRoute('system.image_toolkit_settings')->toString()]) . '</dd>'; - if (\Drupal::currentUser()->hasPermission('administer site configuration')) { - $output .= '<dt id="security-advisories">' . t('Critical security advisories') . '</dt>'; - $output .= '<dd>' . t('The System module displays highly critical and time-sensitive security announcements to site administrators. Some security announcements will be displayed until a critical security update is installed. Announcements that are not associated with a specific release will appear for a fixed period of time. <a href=":handbook">More information on critical security advisories</a>.', [':handbook' => 'https://www.drupal.org/docs/updating-drupal/responding-to-critical-security-update-advisories']) . '</dd>'; - $output .= '<dd>' . t('Only the most highly critical security announcements will be shown. <a href=":advisories-list">View all security announcements</a>.', [':advisories-list' => 'https://www.drupal.org/security']) . '</dd>'; - } - $output .= '</dl>'; - return $output; - - case 'system.admin_index': - return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>'; - - case 'system.themes_page': - $output = '<p>' . t('Set and configure the default theme for your website. Alternative <a href=":themes">themes</a> are available.', [':themes' => 'https://www.drupal.org/project/themes']) . '</p>'; - if (\Drupal::moduleHandler()->moduleExists('block')) { - $output .= '<p>' . t('You can place blocks for each theme on the <a href=":blocks">block layout</a> page.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; - } - return $output; - - case 'system.theme_settings_theme': - $theme_list = \Drupal::service('theme_handler')->listInfo(); - $theme = $theme_list[$route_match->getParameter('theme')]; - return '<p>' . t('These options control the display settings for the %name theme. When your site is displayed using this theme, these settings will be used.', ['%name' => $theme->info['name']]) . '</p>'; - - case 'system.theme_settings': - return '<p>' . t('Control default display settings for your site, across all themes. Use theme-specific settings to override these defaults.') . '</p>'; - - case 'system.modules_list': - $output = '<p>' . t('Add <a href=":modules">contributed modules</a> to extend your site\'s functionality.', [':modules' => 'https://www.drupal.org/project/modules']) . '</p>'; - if (!\Drupal::moduleHandler()->moduleExists('update')) { - $output .= '<p>' . t('Regularly review available updates and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time a module is updated. Install the <a href=":update-manager">Update Manager module</a> to update modules and themes.', [':update-php' => Url::fromRoute('system.db_update')->toString(), ':update-manager' => Url::fromRoute('system.modules_list', [], ['fragment' => 'module-update'])->toString()]) . '</p>'; - } - return $output; - - case 'system.modules_uninstall': - return '<p>' . t('The uninstall process removes all data related to a module.') . '</p>'; - - case 'entity.block.edit_form': - if (($block = $route_match->getParameter('block')) && $block->getPluginId() == 'system_powered_by_block') { - return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>'; - } - break; - - case 'block.admin_add': - if ($route_match->getParameter('plugin_id') == 'system_powered_by_block') { - return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>'; - } - break; - - case 'system.site_maintenance_mode': - if (\Drupal::currentUser()->id() == 1) { - return '<p>' . t('Use maintenance mode when making major updates, particularly if the updates could disrupt visitors or the update process. Examples include upgrading, importing or exporting content, modifying a theme, modifying content types, and making backups.') . '</p>'; - } - break; - - case 'system.status': - return '<p>' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on Drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the <a href=\":system-requirements\">system requirements.</a>", [':system-requirements' => 'https://www.drupal.org/docs/system-requirements']) . '</p>'; - } -} - /** * Implements hook_theme(). */ -function system_theme() { +function system_theme(): array { return array_merge(drupal_common_theme(), [ // Normally theme suggestion templates are only picked up when they are in // themes. We explicitly define theme suggestions here so that the block @@ -528,62 +435,13 @@ function system_authorized_batch_process() { return batch_process($finish_url->setAbsolute()->toString(), $process_url); } -/** - * @} End of "defgroup authorize". - */ - -/** - * Implements hook_updater_info(). - */ -function system_updater_info() { - return [ - 'module' => [ - 'class' => 'Drupal\Core\Updater\Module', - 'name' => t('Update modules'), - 'weight' => 0, - ], - 'theme' => [ - 'class' => 'Drupal\Core\Updater\Theme', - 'name' => t('Update themes'), - 'weight' => 0, - ], - ]; -} - -/** - * Implements hook_filetransfer_info(). - */ -function system_filetransfer_info() { - $backends = []; - - // This is the default, will be available on most systems. - if (function_exists('ftp_connect')) { - $backends['ftp'] = [ - 'title' => t('FTP'), - 'class' => 'Drupal\Core\FileTransfer\FTP', - 'weight' => 0, - ]; - } - - // SSH2 lib connection is only available if the proper PHP extension is - // installed. - if (function_exists('ssh2_connect')) { - $backends['ssh'] = [ - 'title' => t('SSH'), - 'class' => 'Drupal\Core\FileTransfer\SSH', - 'weight' => 20, - ]; - } - return $backends; -} - /** * Implements hook_page_attachments(). * * @see template_preprocess_maintenance_page() * @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter */ -function system_page_attachments(array &$page) { +function _system_page_attachments(array &$page) { // Ensure the same CSS is loaded in template_preprocess_maintenance_page(). $page['#attached']['library'][] = 'system/base'; if (\Drupal::service('router.admin_context')->isAdminRoute()) { @@ -672,104 +530,6 @@ function system_page_attachments(array &$page) { } } -/** - * Implements hook_js_settings_build(). - * - * Sets values for the core/drupal.ajax library, which just depends on the - * active theme but no other request-dependent values. - */ -function system_js_settings_build(&$settings, AttachedAssetsInterface $assets) { - // Generate the values for the core/drupal.ajax library. - // We need to send ajaxPageState settings for core/drupal.ajax if: - // - ajaxPageState is being loaded in this Response, in which case it will - // already exist at $settings['ajaxPageState'] (because the core/drupal.ajax - // library definition specifies a placeholder 'ajaxPageState' setting). - // - core/drupal.ajax already has been loaded and hence this is an AJAX - // Response in which we must send the list of extra asset libraries that are - // being added in this AJAX Response. - /** @var \Drupal\Core\Asset\LibraryDependencyResolver $library_dependency_resolver */ - $library_dependency_resolver = \Drupal::service('library.dependency_resolver'); - if (isset($settings['ajaxPageState']) || in_array('core/drupal.ajax', $library_dependency_resolver->getLibrariesWithDependencies($assets->getAlreadyLoadedLibraries()))) { - // Provide the page with information about the theme that's used, so that - // a later AJAX request can be rendered using the same theme. - // @see \Drupal\Core\Theme\AjaxBasePageNegotiator - $theme_key = \Drupal::theme()->getActiveTheme()->getName(); - $settings['ajaxPageState']['theme'] = $theme_key; - } -} - -/** - * Implements hook_js_settings_alter(). - * - * Sets values which depend on the current request, like core/drupalSettings - * as well as theme_token ajax state. - */ -function system_js_settings_alter(&$settings, AttachedAssetsInterface $assets) { - // As this is being output in the final response always use the main request. - $request = \Drupal::requestStack()->getMainRequest(); - $current_query = $request->query->all(); - - // Let output path processors set a prefix. - /** @var \Drupal\Core\PathProcessor\OutboundPathProcessorInterface $path_processor */ - $path_processor = \Drupal::service('path_processor_manager'); - $options = ['prefix' => '']; - $path_processor->processOutbound('/', $options); - $pathPrefix = $options['prefix']; - - $route_match = \Drupal::routeMatch(); - if ($route_match instanceof StackedRouteMatchInterface) { - $route_match = $route_match->getMasterRouteMatch(); - } - $current_path = $route_match->getRouteName() ? Url::fromRouteMatch($route_match)->getInternalPath() : ''; - $current_path_is_admin = \Drupal::service('router.admin_context')->isAdminRoute($route_match->getRouteObject()); - $path_settings = [ - 'baseUrl' => $request->getBaseUrl() . '/', - 'pathPrefix' => $pathPrefix, - 'currentPath' => $current_path, - 'currentPathIsAdmin' => $current_path_is_admin, - 'isFront' => \Drupal::service('path.matcher')->isFrontPage(), - 'currentLanguage' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(), - ]; - if (!empty($current_query)) { - ksort($current_query); - $path_settings['currentQuery'] = (object) $current_query; - } - - // Only set core/drupalSettings values that haven't been set already. - foreach ($path_settings as $key => $value) { - if (!isset($settings['path'][$key])) { - $settings['path'][$key] = $value; - } - } - if (!isset($settings['pluralDelimiter'])) { - $settings['pluralDelimiter'] = PoItem::DELIMITER; - } - // Add the theme token to ajaxPageState, ensuring the database is available - // before doing so. Also add the loaded libraries to ajaxPageState. - /** @var \Drupal\Core\Asset\LibraryDependencyResolver $library_dependency_resolver */ - $library_dependency_resolver = \Drupal::service('library.dependency_resolver'); - if (isset($settings['ajaxPageState']) || in_array('core/drupal.ajax', $library_dependency_resolver->getLibrariesWithDependencies($assets->getAlreadyLoadedLibraries()))) { - if (!defined('MAINTENANCE_MODE')) { - // The theme token is only validated when the theme requested is not the - // default, so don't generate it unless necessary. - // @see \Drupal\Core\Theme\AjaxBasePageNegotiator::determineActiveTheme() - $active_theme_key = \Drupal::theme()->getActiveTheme()->getName(); - if ($active_theme_key !== \Drupal::service('theme_handler')->getDefault()) { - $settings['ajaxPageState']['theme_token'] = \Drupal::csrfToken() - ->get($active_theme_key); - } - } - // Provide the page with information about the individual asset libraries - // used, information not otherwise available when aggregation is enabled. - $minimal_libraries = $library_dependency_resolver->getMinimalRepresentativeSubset(array_unique(array_merge( - $assets->getLibraries(), - $assets->getAlreadyLoadedLibraries() - ))); - sort($minimal_libraries); - $settings['ajaxPageState']['libraries'] = implode(',', $minimal_libraries); - } -} - /** * Implements hook_preprocess_HOOK() for block templates. */ @@ -889,18 +649,6 @@ function system_sort_themes($a, $b) { return strcasecmp($a->info['name'], $b->info['name']); } -/** - * Implements hook_system_info_alter(). - */ -function system_system_info_alter(&$info, Extension $file, $type) { - // Remove page-top and page-bottom from the blocks UI since they are reserved for - // modules to populate from outside the blocks system. - if ($type == 'theme') { - $info['regions_hidden'][] = 'page_top'; - $info['regions_hidden'][] = 'page_bottom'; - } -} - /** * Gets the name of the default region for a given theme. * @@ -938,126 +686,6 @@ function system_admin_compact_mode() { return \Drupal::request()->cookies->get('Drupal_visitor_admin_compact_mode', \Drupal::config('system.site')->get('admin_compact_mode')); } -/** - * Implements hook_cron(). - * - * Remove older rows from flood, batch cache and expirable keyvalue tables. Also - * ensure files directories have .htaccess files. - */ -function system_cron() { - // Clean up the flood. - \Drupal::flood()->garbageCollection(); - - foreach (Cache::getBins() as $cache_backend) { - $cache_backend->garbageCollection(); - } - - // Clean up the expirable key value database store. - if (\Drupal::service('keyvalue.expirable.database') instanceof KeyValueDatabaseExpirableFactory) { - \Drupal::service('keyvalue.expirable.database')->garbageCollection(); - } - - // Clean up any garbage in the queue service. - $queue_worker_manager = \Drupal::service('plugin.manager.queue_worker'); - $queue_factory = \Drupal::service('queue'); - - foreach (array_keys($queue_worker_manager->getDefinitions()) as $queue_name) { - $queue = $queue_factory->get($queue_name); - - if ($queue instanceof QueueGarbageCollectionInterface) { - $queue->garbageCollection(); - } - } - - // Ensure that all of Drupal's standard directories (e.g., the public files - // directory and config directory) have appropriate .htaccess files. - \Drupal::service('file.htaccess_writer')->ensure(); - - if (\Drupal::config('system.advisories')->get('enabled')) { - // Fetch the security advisories so that they will be pre-fetched during - // _system_advisories_requirements() and system_page_top(). - /** @var \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher $fetcher */ - $fetcher = \Drupal::service('system.sa_fetcher'); - $fetcher->getSecurityAdvisories(); - } -} - -/** - * Implements hook_mail(). - */ -function system_mail($key, &$message, $params) { - $token_service = \Drupal::token(); - - $context = $params['context']; - - $subject = PlainTextOutput::renderFromHtml($token_service->replace($context['subject'], $context)); - $body = $token_service->replace($context['message'], $context); - - $message['subject'] .= str_replace(["\r", "\n"], '', $subject); - $message['body'][] = $body; -} - -/** - * Implements hook_entity_type_build(). - */ -function system_entity_type_build(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['date_format'] - ->setFormClass('add', 'Drupal\system\Form\DateFormatAddForm') - ->setFormClass('edit', 'Drupal\system\Form\DateFormatEditForm') - ->setFormClass('delete', 'Drupal\system\Form\DateFormatDeleteForm') - ->setListBuilderClass('Drupal\system\DateFormatListBuilder') - ->setLinkTemplate('edit-form', '/admin/config/regional/date-time/formats/manage/{date_format}') - ->setLinkTemplate('delete-form', '/admin/config/regional/date-time/formats/manage/{date_format}/delete') - ->setLinkTemplate('collection', '/admin/config/regional/date-time/formats'); -} - -/** - * Implements hook_block_view_BASE_BLOCK_ID_alter(). - */ -function system_block_view_system_main_block_alter(array &$build, BlockPluginInterface $block) { - // Contextual links on the system_main block would basically duplicate the - // tabs/local tasks, so reduce the clutter. - unset($build['#contextual_links']); -} - -/** - * Implements hook_query_TAG_alter() for entity reference selection handlers. - */ -function system_query_entity_reference_alter(AlterableInterface $query) { - $handler = $query->getMetadata('entity_reference_selection_handler'); - $handler->entityQueryAlter($query); -} - -/** - * Implements hook_element_info_alter(). - */ -function system_element_info_alter(&$type) { - if (isset($type['page'])) { - $type['page']['#theme_wrappers']['off_canvas_page_wrapper'] = ['#weight' => -1000]; - } -} - -/** - * Implements hook_modules_uninstalled(). - */ -function system_modules_uninstalled($modules) { - // @todo Remove this when modules are able to maintain their revision metadata - // keys. - // @see https://www.drupal.org/project/drupal/issues/3074333 - if (!in_array('workspaces', $modules, TRUE)) { - return; - } - - $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); - foreach ($entity_definition_update_manager->getEntityTypes() as $entity_type) { - if ($entity_type instanceof ContentEntityTypeInterface && $entity_type->hasRevisionMetadataKey('workspace')) { - $entity_type->setRevisionMetadataKey('workspace', NULL); - $entity_definition_update_manager->updateEntityType($entity_type); - } - } -} - /** * Determines if Claro is the admin theme but not the active theme. * @@ -1070,18 +698,6 @@ function _system_is_claro_admin_and_not_active() { return $active_theme !== 'claro' && $admin_theme === 'claro'; } -/** - * Implements hook_library_info_alter(). - */ -function system_library_info_alter(&$libraries, $extension) { - // If Claro is the admin theme but not the active theme, grant Claro the - // ability to override the toolbar library with its own assets. - if ($extension === 'toolbar' && _system_is_claro_admin_and_not_active()) { - require_once DRUPAL_ROOT . '/core/themes/claro/claro.theme'; - claro_system_module_invoked_library_info_alter($libraries, $extension); - } -} - /** * Implements hook_preprocess_toolbar(). */ diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 73ebac84e190800b641c59ea37adc5940b615179..fffe4fbe83580a29cffff8a55e9b2505b911ab8a 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function system_removed_post_updates() { +function system_removed_post_updates(): array { return [ 'system_post_update_recalculate_configuration_entity_dependencies' => '9.0.0', 'system_post_update_add_region_to_entity_displays' => '9.0.0', diff --git a/core/modules/system/system.theme.inc b/core/modules/system/system.theme.inc index fc88b4155642e4987fa4b02596083c18705bc68b..b7a1259e4017f6bcbc3e91c54f970d3e19180687 100644 --- a/core/modules/system/system.theme.inc +++ b/core/modules/system/system.theme.inc @@ -2,7 +2,6 @@ /** * @file - * Preprocess functions for the System module. */ use Drupal\Core\Url; diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc deleted file mode 100644 index 1938f83d2ee8865d0c1e1b3b7c843def4953f69a..0000000000000000000000000000000000000000 --- a/core/modules/system/system.tokens.inc +++ /dev/null @@ -1,220 +0,0 @@ -<?php - -/** - * @file - * Builds placeholder replacement tokens system-wide data. - * - * This file handles tokens for the global 'site' and 'date' tokens. - */ - -use Drupal\Core\Url; -use Drupal\Core\Datetime\Entity\DateFormat; -use Drupal\Core\Render\BubbleableMetadata; - -/** - * Implements hook_token_info(). - */ -function system_token_info() { - $types['site'] = [ - 'name' => t("Site information"), - 'description' => t("Tokens for site-wide settings and other global information."), - ]; - $types['date'] = [ - 'name' => t("Dates"), - 'description' => t("Tokens related to times and dates."), - ]; - - // Site-wide global tokens. - $site['name'] = [ - 'name' => t("Name"), - 'description' => t("The name of the site."), - ]; - $site['slogan'] = [ - 'name' => t("Slogan"), - 'description' => t("The slogan of the site."), - ]; - $site['mail'] = [ - 'name' => t("Email"), - 'description' => t("The administrative email address for the site."), - ]; - $site['base-url'] = [ - 'name' => t("Base URL"), - 'description' => t("The base URL of the site, currently: @base_url", - [ - '@base_url' => \Drupal::service('router.request_context')->getCompleteBaseUrl(), - ]), - ]; - $site['base-path'] = [ - 'name' => t("Base path"), - 'description' => t("The base path of the site, currently: @base_path", ['@base_path' => \Drupal::request()->getBasePath()]), - ]; - $site['url'] = [ - 'name' => t("URL"), - 'description' => t("The URL of the site's front page with the language prefix, if it exists."), - ]; - $site['url-brief'] = [ - 'name' => t("URL (brief)"), - 'description' => t("The URL of the site's front page without the protocol."), - ]; - $site['login-url'] = [ - 'name' => t("Login page"), - 'description' => t("The URL of the site's login page."), - ]; - - /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */ - $date_formatter = \Drupal::service('date.formatter'); - - // Date related tokens. - $request_time = \Drupal::time()->getRequestTime(); - $date['short'] = [ - 'name' => t("Short format"), - 'description' => t("The current date in 'short' format. (%date)", ['%date' => $date_formatter->format($request_time, 'short')]), - ]; - $date['medium'] = [ - 'name' => t("Medium format"), - 'description' => t("The current date in 'medium' format. (%date)", ['%date' => $date_formatter->format($request_time, 'medium')]), - ]; - $date['long'] = [ - 'name' => t("Long format"), - 'description' => t("The current date in 'long' format. (%date)", ['%date' => $date_formatter->format($request_time, 'long')]), - ]; - $date['custom'] = [ - 'name' => t("Custom format"), - 'description' => t('The current date in a custom format. See <a href="https://www.php.net/manual/datetime.format.php#refsect1-datetime.format-parameters">the PHP documentation</a> for details.'), - ]; - $date['since'] = [ - 'name' => t("Time-since"), - 'description' => t("The current date in 'time-since' format. (%date)", ['%date' => $date_formatter->formatTimeDiffSince($request_time - 360)]), - ]; - $date['raw'] = [ - 'name' => t("Raw timestamp"), - 'description' => t("The current date in UNIX timestamp format (%date)", ['%date' => $request_time]), - ]; - - return [ - 'types' => $types, - 'tokens' => [ - 'site' => $site, - 'date' => $date, - ], - ]; -} - -/** - * Implements hook_tokens(). - */ -function system_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $token_service = \Drupal::token(); - - $url_options = ['absolute' => TRUE]; - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = NULL; - } - $replacements = []; - - if ($type == 'site') { - foreach ($tokens as $name => $original) { - switch ($name) { - case 'name': - $config = \Drupal::config('system.site'); - $bubbleable_metadata->addCacheableDependency($config); - $site_name = $config->get('name'); - $replacements[$original] = $site_name; - break; - - case 'slogan': - $config = \Drupal::config('system.site'); - $bubbleable_metadata->addCacheableDependency($config); - $slogan = $config->get('slogan'); - $build = [ - '#markup' => $slogan, - ]; - // @todo Fix in https://www.drupal.org/node/2577827 - $replacements[$original] = \Drupal::service('renderer')->renderInIsolation($build); - break; - - case 'mail': - $config = \Drupal::config('system.site'); - $bubbleable_metadata->addCacheableDependency($config); - $replacements[$original] = $config->get('mail'); - break; - - case 'base-url': - $bubbleable_metadata->addCacheContexts(['url.site']); - $replacements[$original] = \Drupal::service('router.request_context')->getCompleteBaseUrl(); - break; - - case 'base-path': - $bubbleable_metadata->addCacheContexts(['url.site']); - $replacements[$original] = \Drupal::request()->getBasePath(); - break; - - case 'url': - /** @var \Drupal\Core\GeneratedUrl $result */ - $result = Url::fromRoute('<front>', [], $url_options)->toString(TRUE); - $bubbleable_metadata->addCacheableDependency($result); - $replacements[$original] = $result->getGeneratedUrl(); - break; - - case 'url-brief': - /** @var \Drupal\Core\GeneratedUrl $result */ - $result = Url::fromRoute('<front>', [], $url_options)->toString(TRUE); - $bubbleable_metadata->addCacheableDependency($result); - $replacements[$original] = preg_replace(['!^https?://!', '!/$!'], '', $result->getGeneratedUrl()); - break; - - case 'login-url': - /** @var \Drupal\Core\GeneratedUrl $result */ - $result = Url::fromRoute('user.page', [], $url_options)->toString(TRUE); - $bubbleable_metadata->addCacheableDependency($result); - $replacements[$original] = $result->getGeneratedUrl(); - break; - } - } - } - - elseif ($type == 'date') { - if (empty($data['date'])) { - $date = \Drupal::time()->getRequestTime(); - // We depend on the current request time, so the tokens are not cacheable - // at all. - $bubbleable_metadata->setCacheMaxAge(0); - } - else { - $date = $data['date']; - } - - foreach ($tokens as $name => $original) { - switch ($name) { - case 'short': - case 'medium': - case 'long': - $date_format = DateFormat::load($name); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($date, $name, '', NULL, $langcode); - break; - - case 'since': - $replacements[$original] = \Drupal::service('date.formatter')->formatTimeDiffSince($date, ['langcode' => $langcode]); - $bubbleable_metadata->setCacheMaxAge(0); - break; - - case 'raw': - $replacements[$original] = $date; - break; - } - } - - if ($created_tokens = $token_service->findWithPrefix($tokens, 'custom')) { - foreach ($created_tokens as $name => $original) { - $replacements[$original] = \Drupal::service('date.formatter')->format($date, 'custom', $name, NULL, $langcode); - } - } - } - - return $replacements; -} diff --git a/core/modules/system/tests/modules/advisory_feed_test/advisory_feed_test.module b/core/modules/system/tests/modules/advisory_feed_test/advisory_feed_test.module deleted file mode 100644 index 2d7341da5f60c15a2c4ea420a212952b196324d3..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/advisory_feed_test/advisory_feed_test.module +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @file - * Module for testing the display of security advisories. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - */ -function advisory_feed_test_system_info_alter(&$info, Extension $file) { - // Alter the 'generic_module1_test' module to use the 'generic_module1_project' - // project name. This ensures that for an extension where the 'name' and - // the 'project' properties do not match, 'project' is used for matching - // 'project' in the JSON feed. - $system_info = [ - 'generic_module1_test' => [ - 'project' => 'generic_module1_project', - 'version' => '8.x-1.1', - 'hidden' => FALSE, - ], - 'generic_module2_test' => [ - 'project' => 'generic_module2_project', - 'version' => '8.x-1.1', - 'hidden' => FALSE, - ], - ]; - if (!empty($system_info[$file->getName()])) { - foreach ($system_info[$file->getName()] as $key => $value) { - $info[$key] = $value; - } - } -} diff --git a/core/modules/system/tests/modules/advisory_feed_test/src/Hook/AdvisoryFeedTestHooks.php b/core/modules/system/tests/modules/advisory_feed_test/src/Hook/AdvisoryFeedTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..48aa82e01996a343c04268379897b1ea96bfbda0 --- /dev/null +++ b/core/modules/system/tests/modules/advisory_feed_test/src/Hook/AdvisoryFeedTestHooks.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\advisory_feed_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for advisory_feed_test. + */ +class AdvisoryFeedTestHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file) { + // Alter the 'generic_module1_test' module to use the 'generic_module1_project' + // project name. This ensures that for an extension where the 'name' and + // the 'project' properties do not match, 'project' is used for matching + // 'project' in the JSON feed. + $system_info = [ + 'generic_module1_test' => [ + 'project' => 'generic_module1_project', + 'version' => '8.x-1.1', + 'hidden' => FALSE, + ], + 'generic_module2_test' => [ + 'project' => 'generic_module2_project', + 'version' => '8.x-1.1', + 'hidden' => FALSE, + ], + ]; + if (!empty($system_info[$file->getName()])) { + foreach ($system_info[$file->getName()] as $key => $value) { + $info[$key] = $value; + } + } + } + +} diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module index db95c4e05af5a593e6bb8cc0648e11d6d6dcdf5c..3adcaacf29d07fa47abd7f77291e3439b1096316 100644 --- a/core/modules/system/tests/modules/common_test/common_test.module +++ b/core/modules/system/tests/modules/common_test/common_test.module @@ -7,40 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Asset\AttachedAssetsInterface; -use Drupal\Core\Language\LanguageInterface; - -/** - * Implements hook_TYPE_alter(). - */ -function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { - // Alter first argument. - if (is_array($data)) { - $data['foo'] = 'Drupal'; - } - elseif (is_object($data)) { - $data->foo = 'Drupal'; - } - // Alter second argument, if present. - if (isset($arg2)) { - if (is_array($arg2)) { - $arg2['foo'] = 'Drupal'; - } - elseif (is_object($arg2)) { - $arg2->foo = 'Drupal'; - } - } - // Try to alter third argument, if present. - if (isset($arg3)) { - if (is_array($arg3)) { - $arg3['foo'] = 'Drupal'; - } - elseif (is_object($arg3)) { - $arg3->foo = 'Drupal'; - } - } -} - /** * Implements hook_TYPE_alter(). * @@ -75,18 +41,6 @@ function olivero_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { } } -/** - * Implements hook_TYPE_alter(). - * - * This is to verify that - * \Drupal::moduleHandler()->alter(array(TYPE1, TYPE2), ...) allows - * hook_module_implements_alter() to affect the order in which module - * implementations are executed. - */ -function block_drupal_alter_foo_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { - $data['foo'] .= ' block'; -} - /** * Implements hook_module_implements_alter(). * @@ -105,20 +59,6 @@ function common_test_module_implements_alter(&$implementations, $hook) { } } -/** - * Implements hook_theme(). - */ -function common_test_theme() { - return [ - 'common_test_foo' => [ - 'variables' => ['foo' => 'foo', 'bar' => 'bar'], - ], - 'common_test_render_element' => [ - 'render element' => 'foo', - ], - ]; -} - /** * Implements MODULE_preprocess(). * @@ -142,134 +82,3 @@ function common_test_preprocess_common_test_render_element(&$variables) { } $variables['#attached']['library'][] = 'test/specific_preprocess'; } - -/** - * Implements hook_library_info_build(). - */ -function common_test_library_info_build() { - $libraries = []; - if (\Drupal::state()->get('common_test.library_info_build_test')) { - $libraries['dynamic_library'] = [ - 'version' => '1.0', - 'css' => [ - 'base' => [ - 'common_test.css' => [], - ], - ], - ]; - } - return $libraries; -} - -/** - * Implements hook_library_info_alter(). - */ -function common_test_library_info_alter(&$libraries, $module) { - if ($module === 'core' && isset($libraries['loadjs'])) { - // Change the version of loadjs to 0.0. - $libraries['loadjs']['version'] = '0.0'; - // Make loadjs depend on jQuery Form to test library dependencies. - $libraries['loadjs']['dependencies'][] = 'core/internal.jquery.form'; - } - - // Alter the dynamically registered library definition. - if ($module === 'common_test' && isset($libraries['dynamic_library'])) { - $libraries['dynamic_library']['dependencies'] = [ - 'core/jquery', - ]; - } -} - -/** - * Implements hook_cron(). - * - * System module should handle if a module does not catch an exception and keep - * cron going. - * - * @see common_test_cron_helper() - */ -function common_test_cron() { - throw new Exception('Uncaught exception'); -} - -/** - * Implements hook_page_attachments(). - * - * @see \Drupal\system\Tests\Common\PageRenderTest::assertPageRenderHookExceptions() - */ -function common_test_page_attachments(array &$page) { - $page['#attached']['library'][] = 'core/foo'; - $page['#attached']['library'][] = 'core/bar'; - $page['#cache']['tags'] = ['example']; - $page['#cache']['contexts'] = ['user.permissions']; - - if (\Drupal::state()->get('common_test.hook_page_attachments.descendant_attached', FALSE)) { - $page['content']['#attached']['library'][] = 'core/jquery'; - } - - if (\Drupal::state()->get('common_test.hook_page_attachments.render_array', FALSE)) { - $page['something'] = [ - '#markup' => 'test', - ]; - } - - if (\Drupal::state()->get('common_test.hook_page_attachments.early_rendering', FALSE)) { - // Do some early rendering. - $element = ['#markup' => '123']; - \Drupal::service('renderer')->render($element); - } -} - -/** - * Implements hook_page_attachments_alter(). - * - * @see \Drupal\system\Tests\Common\PageRenderTest::assertPageRenderHookExceptions() - */ -function common_test_page_attachments_alter(array &$page) { - // Remove a library that was added in common_test_page_attachments(), to test - // that this hook can do what it claims to do. - if (isset($page['#attached']['library']) && ($index = array_search('core/bar', $page['#attached']['library'])) && $index !== FALSE) { - unset($page['#attached']['library'][$index]); - } - $page['#attached']['library'][] = 'core/baz'; - $page['#cache']['tags'] = ['example']; - $page['#cache']['contexts'] = ['user.permissions']; - - if (\Drupal::state()->get('common_test.hook_page_attachments_alter.descendant_attached', FALSE)) { - $page['content']['#attached']['library'][] = 'core/jquery'; - } - - if (\Drupal::state()->get('common_test.hook_page_attachments_alter.render_array', FALSE)) { - $page['something'] = [ - '#markup' => 'test', - ]; - } -} - -/** - * Implements hook_js_alter(). - * - * @see \Drupal\KernelTests\Core\Asset\AttachedAssetsTest::testAlter() - */ -function common_test_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { - // Attach alter.js above tableselect.js. - $alter_js = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js'; - if (array_key_exists($alter_js, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) { - $javascript[$alter_js]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1; - } -} - -/** - * Implements hook_js_settings_alter(). - * - * @see \Drupal\system\Tests\Common\JavaScriptTest::testHeaderSetting() - */ -function common_test_js_settings_alter(&$settings, AttachedAssetsInterface $assets) { - // Modify an existing setting. - if (array_key_exists('pluralDelimiter', $settings)) { - $settings['pluralDelimiter'] = '☃'; - } - - // Add a setting. - $settings['foo'] = 'bar'; -} diff --git a/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php b/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..bbd1a6328792a0760cbf115c12db6e8c2aed586b --- /dev/null +++ b/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php @@ -0,0 +1,197 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\common_test\Hook; + +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for common_test. + */ +class CommonTestHooks { + + /** + * Implements hook_TYPE_alter(). + */ + #[Hook('drupal_alter_alter')] + public function drupalAlterAlter(&$data, &$arg2 = NULL, &$arg3 = NULL) { + // Alter first argument. + if (is_array($data)) { + $data['foo'] = 'Drupal'; + } + elseif (is_object($data)) { + $data->foo = 'Drupal'; + } + // Alter second argument, if present. + if (isset($arg2)) { + if (is_array($arg2)) { + $arg2['foo'] = 'Drupal'; + } + elseif (is_object($arg2)) { + $arg2->foo = 'Drupal'; + } + } + // Try to alter third argument, if present. + if (isset($arg3)) { + if (is_array($arg3)) { + $arg3['foo'] = 'Drupal'; + } + elseif (is_object($arg3)) { + $arg3->foo = 'Drupal'; + } + } + } + + /** + * Implements hook_TYPE_alter(). + * + * This is to verify that + * \Drupal::moduleHandler()->alter(array(TYPE1, TYPE2), ...) allows + * hook_module_implements_alter() to affect the order in which module + * implementations are executed. + */ + #[Hook('drupal_alter_foo_alter', module: 'block')] + public function blockDrupalAlterFooAlter(&$data, &$arg2 = NULL, &$arg3 = NULL) { + $data['foo'] .= ' block'; + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'common_test_foo' => [ + 'variables' => [ + 'foo' => 'foo', + 'bar' => 'bar', + ], + ], + 'common_test_render_element' => [ + 'render element' => 'foo', + ], + ]; + } + + /** + * Implements hook_library_info_build(). + */ + #[Hook('library_info_build')] + public function libraryInfoBuild() { + $libraries = []; + if (\Drupal::state()->get('common_test.library_info_build_test')) { + $libraries['dynamic_library'] = ['version' => '1.0', 'css' => ['base' => ['common_test.css' => []]]]; + } + return $libraries; + } + + /** + * Implements hook_library_info_alter(). + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(&$libraries, $module) { + if ($module === 'core' && isset($libraries['loadjs'])) { + // Change the version of loadjs to 0.0. + $libraries['loadjs']['version'] = '0.0'; + // Make loadjs depend on jQuery Form to test library dependencies. + $libraries['loadjs']['dependencies'][] = 'core/internal.jquery.form'; + } + // Alter the dynamically registered library definition. + if ($module === 'common_test' && isset($libraries['dynamic_library'])) { + $libraries['dynamic_library']['dependencies'] = ['core/jquery']; + } + } + + /** + * Implements hook_cron(). + * + * System module should handle if a module does not catch an exception and keep + * cron going. + * + * @see common_test_cron_helper() + */ + #[Hook('cron')] + public function cron() { + throw new \Exception('Uncaught exception'); + } + + /** + * Implements hook_page_attachments(). + * + * @see \Drupal\system\Tests\Common\PageRenderTest::assertPageRenderHookExceptions() + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$page) { + $page['#attached']['library'][] = 'core/foo'; + $page['#attached']['library'][] = 'core/bar'; + $page['#cache']['tags'] = ['example']; + $page['#cache']['contexts'] = ['user.permissions']; + if (\Drupal::state()->get('common_test.hook_page_attachments.descendant_attached', FALSE)) { + $page['content']['#attached']['library'][] = 'core/jquery'; + } + if (\Drupal::state()->get('common_test.hook_page_attachments.render_array', FALSE)) { + $page['something'] = ['#markup' => 'test']; + } + if (\Drupal::state()->get('common_test.hook_page_attachments.early_rendering', FALSE)) { + // Do some early rendering. + $element = ['#markup' => '123']; + \Drupal::service('renderer')->render($element); + } + } + + /** + * Implements hook_page_attachments_alter(). + * + * @see \Drupal\system\Tests\Common\PageRenderTest::assertPageRenderHookExceptions() + */ + #[Hook('page_attachments_alter')] + public function pageAttachmentsAlter(array &$page) { + // Remove a library that was added in common_test_page_attachments(), to test + // that this hook can do what it claims to do. + if (isset($page['#attached']['library']) && ($index = array_search('core/bar', $page['#attached']['library'])) && $index !== FALSE) { + unset($page['#attached']['library'][$index]); + } + $page['#attached']['library'][] = 'core/baz'; + $page['#cache']['tags'] = ['example']; + $page['#cache']['contexts'] = ['user.permissions']; + if (\Drupal::state()->get('common_test.hook_page_attachments_alter.descendant_attached', FALSE)) { + $page['content']['#attached']['library'][] = 'core/jquery'; + } + if (\Drupal::state()->get('common_test.hook_page_attachments_alter.render_array', FALSE)) { + $page['something'] = ['#markup' => 'test']; + } + } + + /** + * Implements hook_js_alter(). + * + * @see \Drupal\KernelTests\Core\Asset\AttachedAssetsTest::testAlter() + */ + #[Hook('js_alter')] + public function jsAlter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) { + // Attach alter.js above tableselect.js. + $alter_js = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js'; + if (array_key_exists($alter_js, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) { + $javascript[$alter_js]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1; + } + } + + /** + * Implements hook_js_settings_alter(). + * + * @see \Drupal\system\Tests\Common\JavaScriptTest::testHeaderSetting() + */ + #[Hook('js_settings_alter')] + public function jsSettingsAlter(&$settings, AttachedAssetsInterface $assets) { + // Modify an existing setting. + if (array_key_exists('pluralDelimiter', $settings)) { + $settings['pluralDelimiter'] = '☃'; + } + // Add a setting. + $settings['foo'] = 'bar'; + } + +} diff --git a/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module b/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module deleted file mode 100644 index fbaa815fb8aec6f597f77820dfd4753ea1067e0b..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Helper module for the testCronExceptions in addition to common_test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_cron(). - * - * Function common_test_cron() throws an exception, but the execution should - * reach this function as well. - * - * @see common_test_cron() - */ -function common_test_cron_helper_cron() { - \Drupal::state()->set('common_test.cron', 'success'); -} diff --git a/core/modules/system/tests/modules/common_test_cron_helper/src/Hook/CommonTestCronHelperHooks.php b/core/modules/system/tests/modules/common_test_cron_helper/src/Hook/CommonTestCronHelperHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..024669c3da7225c5004087c6082097431b1d19a6 --- /dev/null +++ b/core/modules/system/tests/modules/common_test_cron_helper/src/Hook/CommonTestCronHelperHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\common_test_cron_helper\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for common_test_cron_helper. + */ +class CommonTestCronHelperHooks { + + /** + * Implements hook_cron(). + * + * Function common_test_cron() throws an exception, but the execution should + * reach this function as well. + * + * @see common_test_cron() + */ + #[Hook('cron')] + public function cron() { + \Drupal::state()->set('common_test.cron', 'success'); + } + +} diff --git a/core/modules/system/tests/modules/container_rebuild_test/src/TestController.php b/core/modules/system/tests/modules/container_rebuild_test/src/TestController.php index 0b2fa1adcbdc408415e14e44b5911d7738f87f42..bc7704eb45dccaeb667e4479561ac91e7dee6729 100644 --- a/core/modules/system/tests/modules/container_rebuild_test/src/TestController.php +++ b/core/modules/system/tests/modules/container_rebuild_test/src/TestController.php @@ -38,7 +38,7 @@ public function showModuleInfo(string $module, string $function) { else { $module_message .= 'not installed'; } - $function_message = $function . ': ' . var_export(function_exists($function), TRUE); + $function_message = $function . ': ' . var_export(\Drupal::moduleHandler()->hasImplementations($function, $module), TRUE); return [ '#theme' => 'item_list', diff --git a/core/modules/system/tests/modules/css_disable_transitions_test/css_disable_transitions_test.module b/core/modules/system/tests/modules/css_disable_transitions_test/css_disable_transitions_test.module deleted file mode 100644 index a67362edaa1ae73b4fe6748fb8224c4a9fd50eec..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/css_disable_transitions_test/css_disable_transitions_test.module +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * @file - * Helper module for disabling animations in tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments(). - */ -function css_disable_transitions_test_page_attachments(array &$attachments) { - // Unconditionally attach an asset to the page. - $attachments['#attached']['library'][] = 'css_disable_transitions_test/testing.css_disable_transitions_test'; -} diff --git a/core/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php b/core/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a48fe1d4e89998d9e8afc85b4d44303f28662076 --- /dev/null +++ b/core/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\css_disable_transitions_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for css_disable_transitions_test. + */ +class CssDisableTransitionsTestHooks { + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$attachments) { + // Unconditionally attach an asset to the page. + $attachments['#attached']['library'][] = 'css_disable_transitions_test/testing.css_disable_transitions_test'; + } + +} diff --git a/core/modules/system/tests/modules/database_test/database_test.module b/core/modules/system/tests/modules/database_test/database_test.module deleted file mode 100644 index 45e8dbe5afdff4bb47f5cf20bb12956d075caa7e..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/database_test/database_test.module +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -/** - * @file - * Database test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Database\Query\AlterableInterface; - -/** - * Implements hook_query_alter(). - */ -function database_test_query_alter(AlterableInterface $query) { - - if ($query->hasTag('database_test_alter_add_range')) { - $query->range(0, 2); - } - - if ($query->hasTag('database_test_alter_add_join')) { - $people_alias = $query->join('test', 'people', "[test_task].[pid] = [%alias].[id]"); - $query->addField($people_alias, 'name', 'name'); - $query->condition($people_alias . '.id', 2); - } - - if ($query->hasTag('database_test_alter_change_conditional')) { - $conditions =& $query->conditions(); - $conditions[0]['value'] = 2; - } - - if ($query->hasTag('database_test_alter_change_fields')) { - $fields =& $query->getFields(); - unset($fields['age']); - } - - if ($query->hasTag('database_test_alter_change_expressions')) { - $expressions =& $query->getExpressions(); - $expressions['double_age']['expression'] = '[age]*3'; - } -} - -/** - * Implements hook_query_TAG_alter(). - * - * Called by DatabaseTestCase::testAlterRemoveRange. - */ -function database_test_query_database_test_alter_remove_range_alter(AlterableInterface $query) { - $query->range(); -} diff --git a/core/modules/system/tests/modules/database_test/src/Hook/DatabaseTestHooks.php b/core/modules/system/tests/modules/database_test/src/Hook/DatabaseTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2c01f000426a8dac1c868b72ea9d8e9aa4b59b1e --- /dev/null +++ b/core/modules/system/tests/modules/database_test/src/Hook/DatabaseTestHooks.php @@ -0,0 +1,52 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\database_test\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for database_test. + */ +class DatabaseTestHooks { + + /** + * Implements hook_query_alter(). + */ + #[Hook('query_alter')] + public function queryAlter(AlterableInterface $query) { + if ($query->hasTag('database_test_alter_add_range')) { + $query->range(0, 2); + } + if ($query->hasTag('database_test_alter_add_join')) { + $people_alias = $query->join('test', 'people', "[test_task].[pid] = [%alias].[id]"); + $query->addField($people_alias, 'name', 'name'); + $query->condition($people_alias . '.id', 2); + } + if ($query->hasTag('database_test_alter_change_conditional')) { + $conditions =& $query->conditions(); + $conditions[0]['value'] = 2; + } + if ($query->hasTag('database_test_alter_change_fields')) { + $fields =& $query->getFields(); + unset($fields['age']); + } + if ($query->hasTag('database_test_alter_change_expressions')) { + $expressions =& $query->getExpressions(); + $expressions['double_age']['expression'] = '[age]*3'; + } + } + + /** + * Implements hook_query_TAG_alter(). + * + * Called by DatabaseTestCase::testAlterRemoveRange. + */ + #[Hook('query_database_test_alter_remove_range_alter')] + public function queryDatabaseTestAlterRemoveRangeAlter(AlterableInterface $query) { + $query->range(); + } + +} diff --git a/core/modules/system/tests/modules/decoupled_menus_test/decoupled_menus_test.module b/core/modules/system/tests/modules/decoupled_menus_test/decoupled_menus_test.module deleted file mode 100644 index bbe6cb1052dd84550876c91dbab3ff5c26da96d4..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/decoupled_menus_test/decoupled_menus_test.module +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @file - * Support module for decoupled_menus endpoint in tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function decoupled_menus_test_menu_links_discovered_alter(&$links) { - // Sets a custom link relation type on a menu item. - // @see https://tools.ietf.org/id/draft-pot-authentication-link-01.html - $links['user.page']['options']['attributes']['rel'] = 'authenticated-as'; -} diff --git a/core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php b/core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2e3ae6c12ef2f7ed7963ad12bde5b281fef51a26 --- /dev/null +++ b/core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\decoupled_menus_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for decoupled_menus_test. + */ +class DecoupledMenusTestHooks { + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(&$links) { + // Sets a custom link relation type on a menu item. + // @see https://tools.ietf.org/id/draft-pot-authentication-link-01.html + $links['user.page']['options']['attributes']['rel'] = 'authenticated-as'; + } + +} diff --git a/core/modules/system/tests/modules/delay_cache_tags_invalidation/delay_cache_tags_invalidation.module b/core/modules/system/tests/modules/delay_cache_tags_invalidation/delay_cache_tags_invalidation.module deleted file mode 100644 index 1c47ca4a0da93e31eb9ae4d8c94cdd8697e45459..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/delay_cache_tags_invalidation/delay_cache_tags_invalidation.module +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -/** - * @file - * Functions to test delayed cache tags invalidation. - */ - -declare(strict_types=1); - -use Drupal\Core\Cache\Cache; -use Drupal\entity_test\Entity\EntityTest; -use Drupal\user\Entity\User; -use Drupal\user\UserInterface; - -/** - * Implements hook_ENTITY_TYPE_insert(). - */ -function delay_cache_tags_invalidation_entity_test_insert(EntityTest $entity) { - if (\Drupal::state()->get('delay_cache_tags_invalidation_exception')) { - throw new \Exception('Abort entity save to trigger transaction rollback.'); - } - - // Read the pre-transaction cache writes. - // @see \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::testEntitySave() - \Drupal::state()->set(__FUNCTION__ . '__pretransaction_foobar', \Drupal::cache()->get('test_cache_pretransaction_foobar')); - \Drupal::state()->set(__FUNCTION__ . '__pretransaction_entity_test_list', \Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); - - // Write during the transaction. - \Drupal::cache()->set(__FUNCTION__ . '__during_transaction_foobar', 'something', Cache::PERMANENT, ['foobar']); - \Drupal::cache()->set(__FUNCTION__ . '__during_transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); - - // Trigger a nested entity save and hence a nested transaction. - User::create([ - 'name' => 'john doe', - 'status' => 1, - ])->save(); -} - -/** - * Implements hook_ENTITY_TYPE_insert(). - */ -function delay_cache_tags_invalidation_user_insert(UserInterface $entity) { - if ($entity->getAccountName() === 'john doe') { - // Read the in-transaction cache writes. - // @see delay_cache_tags_invalidation_entity_test_insert() - \Drupal::state()->set(__FUNCTION__ . '__during_transaction_foobar', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar')); - \Drupal::state()->set(__FUNCTION__ . '__during_transaction_entity_test_list', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list')); - } -} diff --git a/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..d7ad7c9af75b337528c12076cbc590fa8799b036 --- /dev/null +++ b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\delay_cache_tags_invalidation\Hook; + +use Drupal\user\UserInterface; +use Drupal\user\Entity\User; +use Drupal\Core\Cache\Cache; +use Drupal\entity_test\Entity\EntityTest; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for delay_cache_tags_invalidation. + */ +class DelayCacheTagsInvalidationHooks { + + /** + * Implements hook_ENTITY_TYPE_insert(). + */ + #[Hook('entity_test_insert')] + public function entityTestInsert(EntityTest $entity) { + if (\Drupal::state()->get('delay_cache_tags_invalidation_exception')) { + throw new \Exception('Abort entity save to trigger transaction rollback.'); + } + // Read the pre-transaction cache writes. + // @see \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::testEntitySave() + \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pretransaction_foobar', \Drupal::cache()->get('test_cache_pretransaction_foobar')); + \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pretransaction_entity_test_list', \Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); + // Write during the transaction. + \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_foobar', 'something', Cache::PERMANENT, ['foobar']); + \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); + // Trigger a nested entity save and hence a nested transaction. + User::create(['name' => 'john doe', 'status' => 1])->save(); + } + + /** + * Implements hook_ENTITY_TYPE_insert(). + */ + #[Hook('user_insert')] + public function userInsert(UserInterface $entity) { + if ($entity->getAccountName() === 'john doe') { + // Read the in-transaction cache writes. + // @see delay_cache_tags_invalidation_entity_test_insert() + \Drupal::state()->set('delay_cache_tags_invalidation_user_insert' . '__during_transaction_foobar', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar')); + \Drupal::state()->set('delay_cache_tags_invalidation_user_insert' . '__during_transaction_entity_test_list', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list')); + } + } + +} diff --git a/core/modules/system/tests/modules/dependency_version_test/dependency_version_test.module b/core/modules/system/tests/modules/dependency_version_test/dependency_version_test.module deleted file mode 100644 index 924d9ec9ee1c48e9a3293509df733bd2f13c8291..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/dependency_version_test/dependency_version_test.module +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/** - * @file - * Module for testing the dependency version comparisons. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - */ -function dependency_version_test_system_info_alter(&$info, Extension $file, $type) { - // Simulate that the core version for Views module contains the string '8.x'. - if ($file->getName() == 'views') { - $info['version'] = '9.8.x-dev'; - } - - // Make the test_module require Views 9.2, which should be compatible with - // core version 9.8.x-dev from above. - if ($file->getName() == 'test_module') { - $info['dependencies'] = ['drupal:views (>=9.2)']; - } - -} diff --git a/core/modules/system/tests/modules/dependency_version_test/src/Hook/DependencyVersionTestHooks.php b/core/modules/system/tests/modules/dependency_version_test/src/Hook/DependencyVersionTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2e468e53ffffc4a08c691e49840057f7ca9007cc --- /dev/null +++ b/core/modules/system/tests/modules/dependency_version_test/src/Hook/DependencyVersionTestHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\dependency_version_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for dependency_version_test. + */ +class DependencyVersionTestHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + // Simulate that the core version for Views module contains the string '8.x'. + if ($file->getName() == 'views') { + $info['version'] = '9.8.x-dev'; + } + // Make the test_module require Views 9.2, which should be compatible with + // core version 9.8.x-dev from above. + if ($file->getName() == 'test_module') { + $info['dependencies'] = ['drupal:views (>=9.2)']; + } + } + +} diff --git a/core/modules/system/tests/modules/deprecated_module_test/deprecated_module_test.module b/core/modules/system/tests/modules/deprecated_module_test/deprecated_module_test.module deleted file mode 100644 index 79044a7c10fc8d32631a6baf451a52bccefd0036..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/deprecated_module_test/deprecated_module_test.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Deprecated module test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - */ -function deprecated_module_test_system_info_alter(array &$info, Extension $file, $type) { - // Make the 'deprecated_module_contrib' look like it isn't part of core. - if ($type === 'module' && $info['name'] === 'Deprecated module contrib') { - $file->origin = 'sites/all'; - } -} diff --git a/core/modules/system/tests/modules/deprecated_module_test/src/Hook/DeprecatedModuleTestHooks.php b/core/modules/system/tests/modules/deprecated_module_test/src/Hook/DeprecatedModuleTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c4129261c964ec5f37a9f346a45edf46b7b715f1 --- /dev/null +++ b/core/modules/system/tests/modules/deprecated_module_test/src/Hook/DeprecatedModuleTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\deprecated_module_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for deprecated_module_test. + */ +class DeprecatedModuleTestHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(array &$info, Extension $file, $type) { + // Make the 'deprecated_module_contrib' look like it isn't part of core. + if ($type === 'module' && $info['name'] === 'Deprecated module contrib') { + $file->origin = 'sites/all'; + } + } + +} diff --git a/core/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.module b/core/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.module deleted file mode 100644 index 1309c3b9b7b4cf2078f65bbb204ea8128ed2202d..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * This is a test module for deprecated twig templates. - */ - -declare(strict_types=1); - -/** - * Implements hook_theme(). - */ -function deprecated_twig_template_theme() { - return [ - 'deprecated_template' => [ - 'variables' => [ - 'message' => NULL, - ], - 'deprecated' => 'The "deprecated-template.html.twig" template is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another template instead. See https://www.example.com', - ], - ]; -} diff --git a/core/modules/system/tests/modules/deprecated_twig_template/src/Hook/DeprecatedTwigTemplateHooks.php b/core/modules/system/tests/modules/deprecated_twig_template/src/Hook/DeprecatedTwigTemplateHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..73a4106209c98baed68197195fa1dd5c82e8df6b --- /dev/null +++ b/core/modules/system/tests/modules/deprecated_twig_template/src/Hook/DeprecatedTwigTemplateHooks.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\deprecated_twig_template\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for deprecated_twig_template. + */ +class DeprecatedTwigTemplateHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'deprecated_template' => [ + 'variables' => [ + 'message' => NULL, + ], + 'deprecated' => 'The "deprecated-template.html.twig" template is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another template instead. See https://www.example.com', + ], + ]; + } + +} diff --git a/core/modules/system/tests/modules/deprecation_hook_attribute_test/deprecation_hook_attribute_test.info.yml b/core/modules/system/tests/modules/deprecation_hook_attribute_test/deprecation_hook_attribute_test.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..5d33084a5390df6a15e5f34ff35013470fc0c64a --- /dev/null +++ b/core/modules/system/tests/modules/deprecation_hook_attribute_test/deprecation_hook_attribute_test.info.yml @@ -0,0 +1,5 @@ +name: 'Deprecation test' +type: module +description: 'Support module for testing deprecation behaviors.' +package: Testing +version: VERSION diff --git a/core/modules/system/tests/modules/deprecation_hook_attribute_test/src/Hook/DeprecationHookAttributeTestHooks.php b/core/modules/system/tests/modules/deprecation_hook_attribute_test/src/Hook/DeprecationHookAttributeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..da1f96c81071c85df0f6037585fe24223cc73952 --- /dev/null +++ b/core/modules/system/tests/modules/deprecation_hook_attribute_test/src/Hook/DeprecationHookAttributeTestHooks.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\deprecation_hook_attribute_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Implements hooks for the deprecation hook attribute test. + */ +class DeprecationHookAttributeTestHooks { + + /** + * Implements hook_deprecated_hook(). + */ + #[Hook('deprecated_hook')] + public function deprecatedHook($arg): mixed { + return $arg; + } + + /** + * Implements hook_deprecated_alter_alter(). + */ + #[Hook('deprecated_alter_alter')] + public function deprecatedAlterAlterFirst(&$data, $context1, $context2): void { + $data = [$context1, $context2]; + } + +} diff --git a/core/modules/system/tests/modules/element_info_test/element_info_test.module b/core/modules/system/tests/modules/element_info_test/element_info_test.module deleted file mode 100644 index 20e5c171cafee8b3a8d6aa8e33c40cd0d751709b..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/element_info_test/element_info_test.module +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * @file - * Element info test. - */ - -declare(strict_types=1); - -use Drupal\element_info_test\ElementInfoTestNumberBuilder; - -/** - * Implements hook_element_info_alter(). - */ -function element_info_test_element_info_alter(array &$info) { - $info['number'] += ['#pre_render' => []]; - /* @see \Drupal\KernelTests\Core\Render\Element\WeightTest::testProcessWeightSelectMax() */ - $info['number']['#pre_render'][] = [ElementInfoTestNumberBuilder::class, 'preRender']; -} - -/** - * Implements hook_element_plugin_alter(). - */ -function element_info_test_element_plugin_alter(array &$definitions) { - if (\Drupal::state()->get('hook_element_plugin_alter:remove_weight', FALSE)) { - unset($definitions['weight']); - } -} diff --git a/core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php b/core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c7ff010deacc8ccffe83ad8f912fee91c91f66a2 --- /dev/null +++ b/core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\element_info_test\Hook; + +use Drupal\element_info_test\ElementInfoTestNumberBuilder; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for element_info_test. + */ +class ElementInfoTestHooks { + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(array &$info) { + $info['number'] += ['#pre_render' => []]; + /* @see \Drupal\KernelTests\Core\Render\Element\WeightTest::testProcessWeightSelectMax() */ + $info['number']['#pre_render'][] = [ElementInfoTestNumberBuilder::class, 'preRender']; + } + + /** + * Implements hook_element_plugin_alter(). + */ + #[Hook('element_plugin_alter')] + public function elementPluginAlter(array &$definitions) { + if (\Drupal::state()->get('hook_element_plugin_alter:remove_weight', FALSE)) { + unset($definitions['weight']); + } + } + +} diff --git a/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module b/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module deleted file mode 100644 index c7b4c81b01f8ec8704736e9166054f4f7a849927..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module +++ /dev/null @@ -1,409 +0,0 @@ -<?php - -/** - * @file - * Test module for the Entity CRUD API. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; - -/** - * Implements hook_entity_create(). - */ -function entity_crud_hook_test_entity_create(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_create() for block entities. - */ -function entity_crud_hook_test_block_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for comment entities. - */ -function entity_crud_hook_test_comment_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for file entities. - */ -function entity_crud_hook_test_file_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for node entities. - */ -function entity_crud_hook_test_node_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_create() for user entities. - */ -function entity_crud_hook_test_user_create() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_presave(). - */ -function entity_crud_hook_test_entity_presave(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for block entities. - */ -function entity_crud_hook_test_block_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for comment entities. - */ -function entity_crud_hook_test_comment_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for file entities. - */ -function entity_crud_hook_test_file_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for node entities. - */ -function entity_crud_hook_test_node_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_presave() for user entities. - */ -function entity_crud_hook_test_user_presave() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_insert(). - */ -function entity_crud_hook_test_entity_insert(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for block entities. - */ -function entity_crud_hook_test_block_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for comment entities. - */ -function entity_crud_hook_test_comment_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for file entities. - */ -function entity_crud_hook_test_file_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for node entities. - */ -function entity_crud_hook_test_node_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for user entities. - */ -function entity_crud_hook_test_user_insert() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_preload(). - */ -function entity_crud_hook_test_entity_preload(array $entities, $type) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $type); -} - -/** - * Implements hook_entity_load(). - */ -function entity_crud_hook_test_entity_load(array $entities, $type) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $type); -} - -/** - * Implements hook_ENTITY_TYPE_load() for block entities. - */ -function entity_crud_hook_test_block_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for comment entities. - */ -function entity_crud_hook_test_comment_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for file entities. - */ -function entity_crud_hook_test_file_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for node entities. - */ -function entity_crud_hook_test_node_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_load() for user entities. - */ -function entity_crud_hook_test_user_load() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_update(). - */ -function entity_crud_hook_test_entity_update(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_update() for block entities. - */ -function entity_crud_hook_test_block_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for comment entities. - */ -function entity_crud_hook_test_comment_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for file entities. - */ -function entity_crud_hook_test_file_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for node entities. - */ -function entity_crud_hook_test_node_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_update() for user entities. - */ -function entity_crud_hook_test_user_update() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_predelete(). - */ -function entity_crud_hook_test_entity_predelete(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for block entities. - */ -function entity_crud_hook_test_block_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for comment entities. - */ -function entity_crud_hook_test_comment_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for file entities. - */ -function entity_crud_hook_test_file_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for node entities. - */ -function entity_crud_hook_test_node_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for user entities. - */ -function entity_crud_hook_test_user_predelete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_entity_delete(). - */ -function entity_crud_hook_test_entity_delete(EntityInterface $entity) { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called for type ' . $entity->getEntityTypeId()); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for block entities. - */ -function entity_crud_hook_test_block_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for comment entities. - */ -function entity_crud_hook_test_comment_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for file entities. - */ -function entity_crud_hook_test_file_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for node entities. - */ -function entity_crud_hook_test_node_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities. - */ -function entity_crud_hook_test_taxonomy_term_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for taxonomy_vocabulary entities. - */ -function entity_crud_hook_test_taxonomy_vocabulary_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for user entities. - */ -function entity_crud_hook_test_user_delete() { - $GLOBALS['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); -} diff --git a/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php b/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..df236b8060a344899e145eccfcc87c8531bdd590 --- /dev/null +++ b/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php @@ -0,0 +1,471 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_crud_hook_test\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_crud_hook_test. + */ +class EntityCrudHookTestHooks { + + /** + * Implements hook_entity_create(). + */ + #[Hook('entity_create')] + public function entityCreate(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_create' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_create() for block entities. + */ + #[Hook('block_create')] + public function blockCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for comment entities. + */ + #[Hook('comment_create')] + public function commentCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for file entities. + */ + #[Hook('file_create')] + public function fileCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for node entities. + */ + #[Hook('node_create')] + public function nodeCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_create')] + public function taxonomyTermCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_create')] + public function taxonomyVocabularyCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_create' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_create() for user entities. + */ + #[Hook('user_create')] + public function userCreate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_create' . ' called'; + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_presave' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_presave() for block entities. + */ + #[Hook('block_presave')] + public function blockPresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for comment entities. + */ + #[Hook('comment_presave')] + public function commentPresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for file entities. + */ + #[Hook('file_presave')] + public function filePresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for node entities. + */ + #[Hook('node_presave')] + public function nodePresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_presave')] + public function taxonomyTermPresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_presave')] + public function taxonomyVocabularyPresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_presave' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for user entities. + */ + #[Hook('user_presave')] + public function userPresave() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_presave' . ' called'; + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_insert' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for block entities. + */ + #[Hook('block_insert')] + public function blockInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for comment entities. + */ + #[Hook('comment_insert')] + public function commentInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for file entities. + */ + #[Hook('file_insert')] + public function fileInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for node entities. + */ + #[Hook('node_insert')] + public function nodeInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_insert')] + public function taxonomyTermInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_insert')] + public function taxonomyVocabularyInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_insert' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_insert() for user entities. + */ + #[Hook('user_insert')] + public function userInsert() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_insert' . ' called'; + } + + /** + * Implements hook_entity_preload(). + */ + #[Hook('entity_preload')] + public function entityPreload(array $entities, $type) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_preload' . ' called for type ' . $type; + } + + /** + * Implements hook_entity_load(). + */ + #[Hook('entity_load')] + public function entityLoad(array $entities, $type) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_load' . ' called for type ' . $type; + } + + /** + * Implements hook_ENTITY_TYPE_load() for block entities. + */ + #[Hook('block_load')] + public function blockLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for comment entities. + */ + #[Hook('comment_load')] + public function commentLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for file entities. + */ + #[Hook('file_load')] + public function fileLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for node entities. + */ + #[Hook('node_load')] + public function nodeLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_load')] + public function taxonomyTermLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_load')] + public function taxonomyVocabularyLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_load' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_load() for user entities. + */ + #[Hook('user_load')] + public function userLoad() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_load' . ' called'; + } + + /** + * Implements hook_entity_update(). + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_update' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_update() for block entities. + */ + #[Hook('block_update')] + public function blockUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for comment entities. + */ + #[Hook('comment_update')] + public function commentUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for file entities. + */ + #[Hook('file_update')] + public function fileUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for node entities. + */ + #[Hook('node_update')] + public function nodeUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_update')] + public function taxonomyTermUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_update')] + public function taxonomyVocabularyUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_update' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_update() for user entities. + */ + #[Hook('user_update')] + public function userUpdate() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_update' . ' called'; + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_predelete' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for block entities. + */ + #[Hook('block_predelete')] + public function blockPredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for comment entities. + */ + #[Hook('comment_predelete')] + public function commentPredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for file entities. + */ + #[Hook('file_predelete')] + public function filePredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for node entities. + */ + #[Hook('node_predelete')] + public function nodePredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_predelete')] + public function taxonomyTermPredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_predelete')] + public function taxonomyVocabularyPredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_predelete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for user entities. + */ + #[Hook('user_predelete')] + public function userPredelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_predelete' . ' called'; + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_delete' . ' called for type ' . $entity->getEntityTypeId(); + } + + /** + * Implements hook_ENTITY_TYPE_delete() for block entities. + */ + #[Hook('block_delete')] + public function blockDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for comment entities. + */ + #[Hook('comment_delete')] + public function commentDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for file entities. + */ + #[Hook('file_delete')] + public function fileDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for node entities. + */ + #[Hook('node_delete')] + public function nodeDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_delete')] + public function taxonomyTermDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_delete')] + public function taxonomyVocabularyDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_delete' . ' called'; + } + + /** + * Implements hook_ENTITY_TYPE_delete() for user entities. + */ + #[Hook('user_delete')] + public function userDelete() { + $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_delete' . ' called'; + } + +} diff --git a/core/modules/system/tests/modules/entity_reference_test/entity_reference_test.module b/core/modules/system/tests/modules/entity_reference_test/entity_reference_test.module deleted file mode 100644 index 1ad183dd0078b214e6e02b9e13a6406cc4f922fc..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_reference_test/entity_reference_test.module +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** - * @file - * Helper module for the Entity Reference tests. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; - -/** - * Implements hook_entity_base_field_info(). - */ -function entity_reference_test_entity_base_field_info(EntityTypeInterface $entity_type) { - $fields = []; - - if ($entity_type->id() === 'entity_test') { - $fields['user_role'] = BaseFieldDefinition::create('entity_reference') - ->setLabel(t('User role')) - ->setDescription(t('The role of the associated user.')) - ->setSetting('target_type', 'user_role') - ->setSetting('handler', 'default'); - } - - return $fields; -} - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function entity_reference_test_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) { - if ($entity_type->id() === 'entity_test') { - // Allow user_id field to use configurable widget. - $fields['user_id'] - ->setSetting('handler', 'default') - ->setDisplayOptions('form', [ - 'type' => 'entity_reference_autocomplete', - 'weight' => 0, - ]) - ->setDisplayConfigurable('form', TRUE); - } -} diff --git a/core/modules/system/tests/modules/entity_reference_test/src/Hook/EntityReferenceTestHooks.php b/core/modules/system/tests/modules/entity_reference_test/src/Hook/EntityReferenceTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..be7ee5b4c1490a523ca779e3a5cb480ce78bf17a --- /dev/null +++ b/core/modules/system/tests/modules/entity_reference_test/src/Hook/EntityReferenceTestHooks.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_reference_test\Hook; + +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_reference_test. + */ +class EntityReferenceTestHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + $fields = []; + if ($entity_type->id() === 'entity_test') { + $fields['user_role'] = BaseFieldDefinition::create('entity_reference')->setLabel(t('User role'))->setDescription(t('The role of the associated user.'))->setSetting('target_type', 'user_role')->setSetting('handler', 'default'); + } + return $fields; + } + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$fields, EntityTypeInterface $entity_type) { + if ($entity_type->id() === 'entity_test') { + // Allow user_id field to use configurable widget. + $fields['user_id']->setSetting('handler', 'default')->setDisplayOptions('form', ['type' => 'entity_reference_autocomplete', 'weight' => 0])->setDisplayConfigurable('form', TRUE); + } + } + +} diff --git a/core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module b/core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module deleted file mode 100644 index eb1342fe3883420ba566a7184a9d3c71468fd054..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module +++ /dev/null @@ -1,104 +0,0 @@ -<?php - -/** - * @file - * Test module for the entity API providing a bundle field. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\Field\FieldDefinition; -use Drupal\entity_test\FieldStorageDefinition; -use Drupal\entity_test\Entity\EntityTestMulRev; - -/** - * Implements hook_entity_type_alter(). - */ -function entity_schema_test_entity_type_alter(array &$entity_types) { - // Allow a test to tell us whether or not to alter the entity type. - if (\Drupal::state()->get('entity_schema_update')) { - $entity_type = $entity_types['entity_test_update']; - if ($entity_type instanceof ContentEntityTypeInterface) { - $entity_type->set('translatable', TRUE); - $entity_type->set('data_table', 'entity_test_update_data'); - // Update the keys with a revision ID. - $keys = $entity_type->getKeys(); - $keys['revision'] = 'revision_id'; - $entity_type->set('entity_keys', $keys); - - $entity_type->setRevisionMetadataKey('revision_log_message', 'revision_log'); - } - } -} - -/** - * Implements hook_entity_base_field_info(). - */ -function entity_schema_test_entity_base_field_info(EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'entity_test_update') { - $definitions['custom_base_field'] = BaseFieldDefinition::create('string') - ->setName('custom_base_field') - ->setLabel(t('A custom base field')); - if (\Drupal::state()->get('entity_schema_update')) { - $definitions += EntityTestMulRev::baseFieldDefinitions($entity_type); - // And add a revision log. - $definitions['revision_log'] = BaseFieldDefinition::create('string_long') - ->setLabel(t('Revision log message')) - ->setDescription(t('The log entry explaining the changes in this revision.')) - ->setRevisionable(TRUE); - } - return $definitions; - } -} - -/** - * Implements hook_entity_field_storage_info(). - */ -function entity_schema_test_entity_field_storage_info(EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'entity_test_update') { - $definitions['custom_bundle_field'] = FieldStorageDefinition::create('string') - ->setName('custom_bundle_field') - ->setLabel(t('A custom bundle field')) - ->setRevisionable(TRUE) - ->setTargetEntityTypeId($entity_type->id()); - return $definitions; - } -} - -/** - * Implements hook_entity_bundle_field_info(). - */ -function entity_schema_test_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle) { - if ($entity_type->id() == 'entity_test_update' && $bundle == 'custom') { - /** @var \Drupal\Core\Field\FieldStorageDefinitionInterface $custom_bundle_field_storage */ - $custom_bundle_field_storage = entity_schema_test_entity_field_storage_info($entity_type)['custom_bundle_field']; - $definitions[$custom_bundle_field_storage->getName()] = FieldDefinition::createFromFieldStorageDefinition($custom_bundle_field_storage); - return $definitions; - } -} - -/** - * Implements hook_entity_bundle_create(). - */ -function entity_schema_test_entity_bundle_create($entity_type_id, $bundle) { - if ($entity_type_id == 'entity_test_update' && $bundle == 'custom') { - $field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($entity_type_id, $bundle); - // Notify the entity storage that we just created a new field. - \Drupal::service('field_definition.listener')->onFieldDefinitionCreate($field_definitions['custom_bundle_field']); - } -} - -/** - * Implements hook_entity_bundle_delete(). - */ -function entity_schema_test_entity_bundle_delete($entity_type_id, $bundle) { - if ($entity_type_id == 'entity_test_update' && $bundle == 'custom') { - $field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($entity_type_id, $bundle); - // Notify the entity storage that our field is gone. - \Drupal::service('field_definition.listener')->onFieldDefinitionDelete($field_definitions['custom_bundle_field']); - \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionDelete($field_definitions['custom_bundle_field']->getFieldStorageDefinition()); - } -} diff --git a/core/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php b/core/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..620bca0a9e6f9281215199cb73c16a576f44e247 --- /dev/null +++ b/core/modules/system/tests/modules/entity_schema_test/src/Hook/EntitySchemaTestHooks.php @@ -0,0 +1,105 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_schema_test\Hook; + +use Drupal\Core\Field\FieldDefinition; +use Drupal\entity_test\FieldStorageDefinition; +use Drupal\entity_test\Entity\EntityTestMulRev; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\ContentEntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_schema_test. + */ +class EntitySchemaTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Allow a test to tell us whether or not to alter the entity type. + if (\Drupal::state()->get('entity_schema_update')) { + $entity_type = $entity_types['entity_test_update']; + if ($entity_type instanceof ContentEntityTypeInterface) { + $entity_type->set('translatable', TRUE); + $entity_type->set('data_table', 'entity_test_update_data'); + // Update the keys with a revision ID. + $keys = $entity_type->getKeys(); + $keys['revision'] = 'revision_id'; + $entity_type->set('entity_keys', $keys); + $entity_type->setRevisionMetadataKey('revision_log_message', 'revision_log'); + } + } + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'entity_test_update') { + $definitions['custom_base_field'] = BaseFieldDefinition::create('string')->setName('custom_base_field')->setLabel(t('A custom base field')); + if (\Drupal::state()->get('entity_schema_update')) { + $definitions += EntityTestMulRev::baseFieldDefinitions($entity_type); + // And add a revision log. + $definitions['revision_log'] = BaseFieldDefinition::create('string_long')->setLabel(t('Revision log message'))->setDescription(t('The log entry explaining the changes in this revision.'))->setRevisionable(TRUE); + } + return $definitions; + } + } + + /** + * Implements hook_entity_field_storage_info(). + */ + #[Hook('entity_field_storage_info')] + public function entityFieldStorageInfo(EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'entity_test_update') { + $definitions['custom_bundle_field'] = FieldStorageDefinition::create('string')->setName('custom_bundle_field')->setLabel(t('A custom bundle field'))->setRevisionable(TRUE)->setTargetEntityTypeId($entity_type->id()); + return $definitions; + } + } + + /** + * Implements hook_entity_bundle_field_info(). + */ + #[Hook('entity_bundle_field_info')] + public function entityBundleFieldInfo(EntityTypeInterface $entity_type, $bundle) { + if ($entity_type->id() == 'entity_test_update' && $bundle == 'custom') { + /** @var \Drupal\Core\Field\FieldStorageDefinitionInterface $custom_bundle_field_storage */ + $custom_bundle_field_storage = $this->entityFieldStorageInfo($entity_type)['custom_bundle_field']; + $definitions[$custom_bundle_field_storage->getName()] = FieldDefinition::createFromFieldStorageDefinition($custom_bundle_field_storage); + return $definitions; + } + } + + /** + * Implements hook_entity_bundle_create(). + */ + #[Hook('entity_bundle_create')] + public function entityBundleCreate($entity_type_id, $bundle) { + if ($entity_type_id == 'entity_test_update' && $bundle == 'custom') { + $field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($entity_type_id, $bundle); + // Notify the entity storage that we just created a new field. + \Drupal::service('field_definition.listener')->onFieldDefinitionCreate($field_definitions['custom_bundle_field']); + } + } + + /** + * Implements hook_entity_bundle_delete(). + */ + #[Hook('entity_bundle_delete')] + public function entityBundleDelete($entity_type_id, $bundle) { + if ($entity_type_id == 'entity_test_update' && $bundle == 'custom') { + $field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($entity_type_id, $bundle); + // Notify the entity storage that our field is gone. + \Drupal::service('field_definition.listener')->onFieldDefinitionDelete($field_definitions['custom_bundle_field']); + \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionDelete($field_definitions['custom_bundle_field']->getFieldStorageDefinition()); + } + } + +} diff --git a/core/modules/system/tests/modules/entity_test/entity_test.install b/core/modules/system/tests/modules/entity_test/entity_test.install index 7527384356fe00a40ed735a2ebebf6a38610514c..667b630fc9c4d1fca494b512de8c8a6cc1a265f9 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.install +++ b/core/modules/system/tests/modules/entity_test/entity_test.install @@ -13,7 +13,7 @@ /** * Implements hook_install(). */ -function entity_test_install() { +function entity_test_install(): void { foreach (entity_test_entity_types() as $entity_type) { // Auto-create fields for testing. FieldStorageConfig::create([ diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index 707b304fdc558fd884d543a5e3bd27ba6e56d2ba..387830f246432015ea2bc9aa022dcd5e128a0402 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -7,21 +7,9 @@ declare(strict_types=1); -use Drupal\Component\Render\FormattableMarkup; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Database\Query\AlterableInterface; -use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\FieldableEntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Entity\Entity\EntityFormDisplay; -use Drupal\Core\Url; /** * Filter that limits test entity list to revisable ones. @@ -73,6 +61,7 @@ function entity_test_entity_types($filter = NULL) { if ($filter === ENTITY_TEST_TYPES_ROUTING) { $types[] = 'entity_test_base_field_display'; $types[] = 'entity_test_string_id'; + $types[] = 'entity_test_uuid_id'; $types[] = 'entity_test_no_id'; $types[] = 'entity_test_mul_with_bundle'; } @@ -82,111 +71,6 @@ function entity_test_entity_types($filter = NULL) { return array_combine($types, $types); } -/** - * Implements hook_entity_type_alter(). - */ -function entity_test_entity_type_alter(array &$entity_types) { - $state = \Drupal::state(); - - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - foreach (entity_test_entity_types() as $entity_type) { - // Optionally specify a translation handler for testing translations. - if ($state->get('entity_test.translation')) { - $translation = $entity_types[$entity_type]->get('translation'); - $translation[$entity_type] = TRUE; - $entity_types[$entity_type]->set('translation', $translation); - } - } - - // Allow entity_test_rev tests to override the entity type definition. - $entity_types['entity_test_rev'] = $state->get('entity_test_rev.entity_type', $entity_types['entity_test_rev']); - $entity_types['entity_test_revpub'] = $state->get('entity_test_revpub.entity_type', $entity_types['entity_test_revpub']); - - // Enable the entity_test_new only when needed. - if (!$state->get('entity_test_new')) { - unset($entity_types['entity_test_new']); - } - else { - // Allow tests to override the entity type definition. - $entity_types['entity_test_new'] = \Drupal::state()->get('entity_test_new.entity_type', $entity_types['entity_test_new']); - } - - $entity_test_definition = $entity_types['entity_test']; - $entity_test_definition->set('entity_keys', $state->get('entity_test.entity_keys', []) + $entity_test_definition->getKeys()); - - // Allow tests to alter the permission granularity of entity_test_mul. - $entity_types['entity_test_mul']->set('permission_granularity', \Drupal::state()->get('entity_test_mul.permission_granularity', 'entity_type')); -} - -/** - * Implements hook_entity_base_field_info(). - */ -function entity_test_entity_base_field_info(EntityTypeInterface $entity_type) { - $fields = []; - - if ($entity_type->id() === 'entity_test' && \Drupal::state()->get('entity_test.internal_field')) { - $fields['internal_string_field'] = BaseFieldDefinition::create('string') - ->setLabel('Internal field') - ->setInternal(TRUE); - } - if ($entity_type->id() === 'entity_test_mul' && \Drupal::state()->get('entity_test.required_default_field')) { - $fields['required_default_field'] = BaseFieldDefinition::create('string') - ->setLabel('Required field with default value') - ->setRequired(TRUE) - ->setDefaultValue('this is a default value'); - } - if ($entity_type->id() === 'entity_test_mul' && \Drupal::state()->get('entity_test.required_multi_default_field')) { - $fields['required_multi_default_field'] = BaseFieldDefinition::create('string') - ->setLabel('Required field with default value') - ->setRequired(TRUE) - ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED) - ->setDefaultValue([ - ['value' => 'this is the first default field item'], - ['value' => 'this is the second default value'], - ['value' => 'you get the idea...'], - ]); - } - if ($entity_type->id() == 'entity_test_mulrev' && \Drupal::state()->get('entity_test.field_test_item')) { - $fields['field_test_item'] = BaseFieldDefinition::create('field_test') - ->setLabel(t('Field test')) - ->setDescription(t('A field test.')) - ->setRevisionable(TRUE) - ->setTranslatable(TRUE); - } - if ($entity_type->id() == 'entity_test_mulrev' && \Drupal::state()->get('entity_test.multi_column')) { - $fields['description'] = BaseFieldDefinition::create('shape') - ->setLabel(t('Some custom description')) - ->setTranslatable(TRUE); - } - - return $fields; -} - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function entity_test_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) { - $state = \Drupal::state(); - if ($entity_type->id() == 'entity_test_mulrev' && ($names = $state->get('entity_test.field_definitions.translatable'))) { - foreach ($names as $name => $value) { - $fields[$name]->setTranslatable($value); - } - } - if ($entity_type->id() == 'node' && $state->get('entity_test.node_remove_status_field')) { - unset($fields['status']); - } - if ($entity_type->id() == 'entity_test' && $state->get('entity_test.remove_name_field')) { - unset($fields['name']); - } - // In 8001 we are assuming that a new definition with multiple cardinality has - // been deployed. - // @todo Remove this if we end up using state definitions at runtime. See - // https://www.drupal.org/node/2554235. - if ($entity_type->id() == 'entity_test' && $state->get('entity_test.db_updates.entity_definition_updates') == 8001) { - $fields['user_id']->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); - } -} - /** * Creates a new bundle for entity_test entities. * @@ -224,128 +108,6 @@ function entity_test_delete_bundle($bundle, $entity_type = 'entity_test') { \Drupal::service('entity_bundle.listener')->onBundleDelete($bundle, $entity_type); } -/** - * Implements hook_entity_bundle_info(). - */ -function entity_test_entity_bundle_info() { - $bundles = []; - $entity_types = \Drupal::entityTypeManager()->getDefinitions(); - foreach ($entity_types as $entity_type_id => $entity_type) { - if ($entity_type->getProvider() == 'entity_test' && !in_array($entity_type_id, ['entity_test_with_bundle', 'entity_test_mul_with_bundle'], TRUE)) { - $bundles[$entity_type_id] = \Drupal::state()->get($entity_type_id . '.bundles', [$entity_type_id => ['label' => 'Entity Test Bundle']]); - } - } - return $bundles; -} - -/** - * Implements hook_entity_bundle_info_alter(). - */ -function entity_test_entity_bundle_info_alter(&$bundles) { - $entity_info = \Drupal::entityTypeManager()->getDefinitions(); - $state = \Drupal::state(); - foreach ($bundles as $entity_type_id => &$all_bundle_info) { - if ($entity_info[$entity_type_id]->getProvider() == 'entity_test') { - if ($state->get('entity_test.translation') && $entity_info[$entity_type_id]->isTranslatable()) { - foreach ($all_bundle_info as $bundle_name => &$bundle_info) { - $bundle_info['translatable'] = TRUE; - if ($state->get('entity_test.untranslatable_fields.default_translation_affected')) { - $bundle_info['untranslatable_fields.default_translation_affected'] = TRUE; - } - } - } - } - } -} - -/** - * Implements hook_entity_view_mode_info_alter(). - */ -function entity_test_entity_view_mode_info_alter(&$view_modes) { - $entity_info = \Drupal::entityTypeManager()->getDefinitions(); - foreach ($entity_info as $entity_type => $info) { - if ($entity_info[$entity_type]->getProvider() == 'entity_test' && !isset($view_modes[$entity_type])) { - $view_modes[$entity_type] = [ - 'full' => [ - 'label' => t('Full object'), - 'status' => TRUE, - 'cache' => TRUE, - ], - 'teaser' => [ - 'label' => t('Teaser'), - 'status' => TRUE, - 'cache' => TRUE, - ], - ]; - } - } -} - -/** - * Implements hook_entity_form_mode_info_alter(). - */ -function entity_test_entity_form_mode_info_alter(&$form_modes) { - $entity_info = \Drupal::entityTypeManager()->getDefinitions(); - foreach ($entity_info as $entity_type => $info) { - if ($entity_info[$entity_type]->getProvider() == 'entity_test') { - $form_modes[$entity_type]['compact'] = [ - 'label' => t('Compact version'), - 'status' => TRUE, - ]; - } - } -} - -/** - * Implements hook_ENTITY_TYPE_view_mode_alter(). - */ -function entity_test_entity_test_view_mode_alter(string &$view_mode, EntityInterface $entity): void { - if ($view_mode == 'entity_test.vm_alter_test') { - $view_mode = 'entity_test.vm_alter_full'; - } -} - -/** - * Implements hook_entity_extra_field_info(). - */ -function entity_test_entity_extra_field_info() { - $extra['entity_test']['bundle_with_extra_fields'] = [ - 'display' => [ - // Note: those extra fields do not currently display anything, they are - // just used in \Drupal\Tests\field_ui\Kernel\EntityDisplayTest to test - // the behavior of entity display objects. - 'display_extra_field' => [ - 'label' => t('Display extra field'), - 'description' => t('An extra field on the display side.'), - 'weight' => 5, - 'visible' => TRUE, - ], - 'display_extra_field_hidden' => [ - 'label' => t('Display extra field (hidden)'), - 'description' => t('An extra field on the display side, hidden by default.'), - 'visible' => FALSE, - ], - ], - ]; - - return $extra; -} - -/** - * Implements hook_form_BASE_FORM_ID_alter(). - */ -function entity_test_form_entity_test_form_alter(&$form) { - switch (\Drupal::state()->get('entity_test.form.validate.test')) { - case 'form-level': - $form['#validate'][] = 'entity_test_form_entity_test_form_validate'; - $form['#validate'][] = 'entity_test_form_entity_test_form_validate_check'; - break; - - case 'button-level': - $form['actions']['submit']['#validate'][] = 'entity_test_form_entity_test_form_validate'; - } -} - /** * Validation handler for the entity_test entity form. */ @@ -362,293 +124,6 @@ function entity_test_form_entity_test_form_validate_check(array &$form, FormStat } } -/** - * Implements hook_form_BASE_FORM_ID_alter(). - */ -function entity_test_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $langcode = $form_state->getFormObject()->getFormLangcode($form_state); - \Drupal::state()->set('entity_test.form_langcode', $langcode); -} - -/** - * Implements hook_ENTITY_TYPE_insert() for 'entity_test'. - */ -function entity_test_entity_test_insert($entity) { - if ($entity->name->value == 'fail_insert') { - throw new Exception("Test exception rollback."); - } -} - -/** - * Implements hook_entity_insert(). - */ -function entity_test_entity_insert(EntityInterface $entity) { - if ($entity->getEntityTypeId() == 'entity_test_mulrev' && $entity->label() == 'EntityLoadedRevisionTest') { - $entity->setNewRevision(FALSE); - $entity->save(); - } -} - -/** - * Implements hook_entity_update(). - */ -function entity_test_entity_update(EntityInterface $entity) { - if ($entity instanceof ContentEntityInterface) { - \Drupal::state()->set('entity_test.loadedRevisionId', $entity->getLoadedRevisionId()); - } -} - -/** - * Implements hook_entity_field_access(). - * - * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() - */ -function entity_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - if ($field_definition->getName() == 'field_test_text') { - if ($items) { - if ($items->value == 'no access value') { - return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); - } - elseif ($items->value == 'custom cache tag value') { - return AccessResult::allowed()->addCacheableDependency($items->getEntity())->addCacheTags(['entity_test_access:field_test_text']); - } - elseif ($operation == 'edit' && $items->value == 'no edit access value') { - return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); - } - } - } - if ($field = \Drupal::state()->get('views_field_access_test-field')) { - if ($field_definition->getName() === $field) { - $result = AccessResult::allowedIfHasPermission($account, 'view test entity field'); - // For test purposes we want to actively deny access. - if ($result->isNeutral()) { - $result = AccessResult::forbidden(); - } - return $result; - } - } - - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_field_access_alter(). - * - * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() - */ -function entity_test_entity_field_access_alter(array &$grants, array $context) { - if ($context['field_definition']->getName() == 'field_test_text' && $context['items']->value == 'access alter value') { - $grants[':default'] = AccessResult::forbidden()->inheritCacheability($grants[':default'])->addCacheableDependency($context['items']->getEntity()); - } -} - -/** - * Implements hook_entity_form_mode_alter(). - */ -function entity_test_entity_form_mode_alter(&$form_mode, EntityInterface $entity) { - if ($entity->getEntityTypeId() === 'entity_test' && $entity->get('name')->value === 'compact_form_mode') { - $form_mode = 'compact'; - } -} - -/** - * Implements hook_entity_form_display_alter(). - */ -function entity_test_entity_form_display_alter(EntityFormDisplay $form_display, $context) { - // Make the field_test_text field 42 characters for entity_test_mul. - if ($context['entity_type'] == 'entity_test') { - if ($component_options = $form_display->getComponent('field_test_text')) { - $component_options['settings']['size'] = 42; - $form_display->setComponent('field_test_text', $component_options); - } - } -} - -/** - * Implements hook_entity_presave(). - */ -function entity_test_entity_presave(EntityInterface $entity) { - if (isset($GLOBALS['entity_test_throw_exception'])) { - throw new Exception('Entity presave exception', 1); - } - - if ($entity->getEntityType()->id() == 'entity_view_display') { - $entity->setThirdPartySetting('entity_test', 'foo', 'bar'); - } -} - -/** - * Implements hook_entity_predelete(). - */ -function entity_test_entity_predelete(EntityInterface $entity) { - if (isset($GLOBALS['entity_test_throw_exception'])) { - throw new Exception('Entity predelete exception', 2); - } -} - -/** - * Implements hook_entity_operation_alter(). - */ -function entity_test_entity_operation_alter(array &$operations, EntityInterface $entity) { - $valid_entity_type_ids = [ - 'user_role', - 'block', - ]; - if (in_array($entity->getEntityTypeId(), $valid_entity_type_ids)) { - if (\Drupal::service('router.route_provider')->getRouteByName("entity.{$entity->getEntityTypeId()}.test_operation")) { - $operations['test_operation'] = [ - 'title' => new FormattableMarkup('Test Operation: @label', ['@label' => $entity->label()]), - 'url' => Url::fromRoute("entity.{$entity->getEntityTypeId()}.test_operation", [$entity->getEntityTypeId() => $entity->id()]), - 'weight' => 50, - ]; - } - } -} - -/** - * Implements hook_entity_translation_create(). - */ -function entity_test_entity_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_entity_translation_insert(). - */ -function entity_test_entity_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_entity_translation_delete(). - */ -function entity_test_entity_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul'. - */ -function entity_test_entity_test_mul_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul'. - */ -function entity_test_entity_test_mul_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mul'. - */ -function entity_test_entity_test_mul_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul_changed'. - */ -function entity_test_entity_test_mul_changed_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_changed_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul_changed'. - */ -function entity_test_entity_test_mul_changed_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_changed_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_delete(). - */ -function entity_test_entity_test_mul_changed_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_changed_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_create(). - */ -function entity_test_entity_test_mulrev_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_insert(). - */ -function entity_test_entity_test_mulrev_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mulrev'. - */ -function entity_test_entity_test_mulrev_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mulrev_changed'. - */ -function entity_test_entity_test_mulrev_changed_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_changed_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mulrev'. - */ -function entity_test_entity_test_mulrev_changed_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_changed_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_delete(). - */ -function entity_test_entity_test_mulrev_changed_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mulrev_changed_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul_langcode_key'. - */ -function entity_test_entity_test_mul_langcode_key_translation_create(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_langcode_key_translation_create', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul_langcode_key'. - */ -function entity_test_entity_test_mul_langcode_key_translation_insert(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_langcode_key_translation_insert', $translation->language()->getId()); -} - -/** - * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mul_langcode_key'. - */ -function entity_test_entity_test_mul_langcode_key_translation_delete(EntityInterface $translation) { - _entity_test_record_hooks('entity_test_mul_langcode_key_translation_delete', $translation->language()->getId()); -} - -/** - * Implements hook_entity_revision_create(). - */ -function entity_test_entity_revision_create(EntityInterface $new_revision, EntityInterface $entity, $keep_untranslatable_fields) { - _entity_test_record_hooks('entity_revision_create', ['new_revision' => $new_revision, 'entity' => $entity, 'keep_untranslatable_fields' => $keep_untranslatable_fields]); -} - -/** - * Implements hook_ENTITY_TYPE_revision_create() for 'entity_test_mulrev'. - */ -function entity_test_entity_test_mulrev_revision_create(EntityInterface $new_revision, EntityInterface $entity, $keep_untranslatable_fields) { - if ($new_revision->get('name')->value == 'revision_create_test_it') { - $new_revision->set('name', 'revision_create_test_it_altered'); - } - _entity_test_record_hooks('entity_test_mulrev_revision_create', ['new_revision' => $new_revision, 'entity' => $entity, 'keep_untranslatable_fields' => $keep_untranslatable_fields]); -} - /** * Field default value callback. * @@ -695,138 +170,3 @@ function _entity_test_record_hooks($hook, $data) { $hooks[$hook] = $data; $state->set($key, $hooks); } - -/** - * Implements hook_entity_prepare_view(). - */ -function entity_test_entity_prepare_view($entity_type, array $entities, array $displays) { - if ($entity_type == 'entity_test') { - foreach ($entities as $entity) { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - - // Add field item attributes on field_test_text if it exists. - // See \Drupal\Tests\system\Functional\Entity\EntityViewControllerTest::testFieldItemAttributes(). - if ($entity->hasField('field_test_text') && $displays[$entity->bundle()]->getComponent('field_test_text')) { - foreach ($entity->get('field_test_text') as $item) { - $item->_attributes += [ - 'data-field-item-attr' => 'foobar', - 'property' => 'schema:text', - ]; - } - } - - // Add an item attribute on daterange fields if they exist. - $fields = $entity->getFieldDefinitions(); - foreach ($fields as $field) { - if ($field->getType() === 'daterange') { - $item = $entity->get($field->getName()); - $item->_attributes += ['data-field-item-attr' => 'foobar']; - } - } - } - } -} - -/** - * Implements hook_entity_display_build_alter(). - */ -function entity_test_entity_display_build_alter(&$build, $context) { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - $entity = $context['entity']; - if ($entity->getEntityTypeId() == 'entity_test' && $entity->bundle() == 'display_build_alter_bundle') { - $build['entity_display_build_alter']['#markup'] = 'Content added in hook_entity_display_build_alter for entity id ' . $entity->id(); - } -} - -/** - * Implements hook_entity_access(). - */ -function entity_test_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - // Only apply to the 'entity_test' entities. - if ($entity->getEntityType()->getProvider() != 'entity_test') { - return AccessResult::neutral(); - } - \Drupal::state()->set('entity_test_entity_access', TRUE); - - // Attempt to allow access to entities with the title forbid_access, - // this will be overridden by - // \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess(). - if ($entity->label() == 'forbid_access') { - return AccessResult::allowed(); - } - - // Create specific labels to allow or deny access based on certain test - // conditions. - // @see \Drupal\KernelTests\Core\Entity\EntityAccessControlHandlerTest - if ($entity->label() == 'Accessible') { - return AccessResult::allowed(); - } - if ($entity->label() == 'Inaccessible') { - return AccessResult::forbidden(); - } - - // Uncacheable because the access result depends on a State key-value pair and - // might therefore change at any time. - $condition = \Drupal::state()->get("entity_test_entity_access.{$operation}." . $entity->id(), FALSE); - return AccessResult::allowedIf($condition)->setCacheMaxAge(0); -} - -/** - * Implements hook_ENTITY_TYPE_access() for 'entity_test'. - */ -function entity_test_entity_test_access(EntityInterface $entity, $operation, AccountInterface $account) { - \Drupal::state()->set('entity_test_entity_test_access', TRUE); - - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_create_access(). - */ -function entity_test_entity_create_access(AccountInterface $account, $context, $entity_bundle) { - \Drupal::state()->set('entity_test_entity_create_access', TRUE); - \Drupal::state()->set('entity_test_entity_create_access_context', $context); - - if ($entity_bundle === 'forbidden_access_bundle') { - // We need to cover a case in which a bundle is specifically forbidden - // from creation (as opposed to neutral access). - return AccessResult::forbidden(); - } - - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_ENTITY_TYPE_create_access() for 'entity_test'. - */ -function entity_test_entity_test_create_access(AccountInterface $account, $context, $entity_bundle) { - \Drupal::state()->set('entity_test_entity_test_create_access', TRUE); - - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_query_entity_test_access_alter(). - */ -function entity_test_query_entity_test_access_alter(AlterableInterface $query) { - if (!\Drupal::state()->get('entity_test_query_access')) { - return; - } - - /** @var \Drupal\Core\Database\Query\Select|\Drupal\Core\Database\Query\AlterableInterface $query */ - if (!\Drupal::currentUser()->hasPermission('view all entity_test_query_access entities')) { - $query->condition('entity_test_query_access.name', 'published entity'); - } -} - -/** - * Implements hook_ENTITY_TYPE_form_mode_alter(). - */ -function entity_test_entity_test_form_mode_alter(&$form_mode, EntityInterface $entity): void { - if ($entity->getEntityTypeId() === 'entity_test' && $entity->get('name')->value === 'test_entity_type_form_mode_alter') { - $form_mode = 'compact'; - } -} diff --git a/core/modules/system/tests/modules/entity_test/entity_test.views.inc b/core/modules/system/tests/modules/entity_test/entity_test.views.inc deleted file mode 100644 index 51693229608f06e9a655e2de4ff639325f682808..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test/entity_test.views.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * @file - * Include file for test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_views_data_alter(). - */ -function entity_test_views_data_alter(&$data) { - $data['entity_test']['name_alias'] = $data['entity_test']['name']; - $data['entity_test']['name_alias']['field']['real field'] = 'name'; -} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntitySerializedField.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntitySerializedField.php index 032cdca806c1c1a32449aaf35bc4b9b254ca49af..d4f33a497f63be817332724eae31e2d37534b33b 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntitySerializedField.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntitySerializedField.php @@ -4,30 +4,31 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; /** * Defines a test class for testing fields with a serialized column. - * - * @ContentEntityType( - * id = "entity_test_serialized_field", - * label = @Translation("Test serialized fields"), - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name" - * }, - * base_table = "entity_test_serialized_fields", - * persistent_cache = FALSE, - * serialized_field_property_names = { - * "serialized_long" = { - * "value" - * } - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_serialized_field', + label: new TranslatableMarkup('Test serialized fields'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + base_table: 'entity_test_serialized_fields', + additional: [ + 'serialized_field_property_names' => [ + 'serialized_long' => ['value'], + ], + ], +)] class EntitySerializedField extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php index dfd5ea398e9d10aa9decfeeeed7cd960b397e7f7..2afedb543ef3cc45aec7c58a8be61b83b03e39c6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php @@ -4,55 +4,60 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestListBuilder; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\entity_test\EntityTestViewsData; use Drupal\user\EntityOwnerInterface; use Drupal\user\UserInterface; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test", - * label = @Translation("Test entity"), - * handlers = { - * "list_builder" = "Drupal\entity_test\EntityTestListBuilder", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * "views_data" = "Drupal\entity_test\EntityTestViewsData" - * }, - * base_table = "entity_test", - * admin_permission = "administer entity_test content", - * persistent_cache = FALSE, - * list_cache_contexts = { "entity_test_view_grants" }, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "canonical" = "/entity_test/{entity_test}", - * "add-form" = "/entity_test/add", - * "edit-form" = "/entity_test/manage/{entity_test}/edit", - * "delete-form" = "/entity_test/delete/entity_test/{entity_test}", - * }, - * field_ui_base_route = "entity.entity_test.admin_form", - * ) - * - * Note that this entity type annotation intentionally omits the "create" link - * template. See https://www.drupal.org/node/2293697. */ +#[ContentEntityType( + id: 'entity_test', + label: new TranslatableMarkup('Test entity'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'list_builder' => EntityTestListBuilder::class, + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'route_provider' => ['html' => DefaultHtmlRouteProvider::class], + 'views_data' => EntityTestViewsData::class, + ], + links: [ + 'canonical' => '/entity_test/{entity_test}', + 'add-form' => '/entity_test/add', + 'edit-form' => '/entity_test/manage/{entity_test}/edit', + 'delete-form' => '/entity_test/delete/entity_test/{entity_test}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test', + field_ui_base_route: 'entity.entity_test.admin_form', + list_cache_contexts: [ + 'entity_test_view_grants', + ], +)] class EntityTest extends ContentEntityBase implements EntityOwnerInterface { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAddPage.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAddPage.php index c4ae5473aa480e9879243cf01ead7699e9550dfc..da2226e32e778fcc52a6033dfa0544614e5e71ac 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAddPage.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAddPage.php @@ -4,34 +4,38 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestForm; + /** * Test entity class routes. - * - * @ContentEntityType( - * id = "entity_test_add_page", - * label = @Translation("Entity test route add page"), - * handlers = { - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * admin_permission = "administer entity_test content", - * base_table = "entity_test_add_page", - * render_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * }, - * links = { - * "add-page" = "/entity_test_add_page/{user}/add", - * "add-form" = "/entity_test_add_page/add/{user}/form", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_add_page', + label: new TranslatableMarkup('Entity test route add page'), + render_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + handlers: [ + 'form' => [ + 'default' => EntityTestForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-page' => '/entity_test_add_page/{user}/add', + 'add-form' => '/entity_test_add_page/add/{user}/form', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_add_page', +)] class EntityTestAddPage extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php index 8977ba4338299f425fae9ee182d5621719e9f2f7..70dc4327870cfa7a428d1e58eef4821b83e11aae 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php @@ -4,42 +4,48 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; + /** * Defines a test entity type with administrative routes. - * - * @ContentEntityType( - * id = "entity_test_admin_routes", - * label = @Translation("Test entity - admin routes"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_admin_routes", - * data_table = "entity_test_admin_routes_property_data", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "canonical" = "/entity_test_admin_routes/manage/{entity_test_admin_routes}", - * "edit-form" = "/entity_test_admin_routes/manage/{entity_test_admin_routes}/edit", - * "delete-form" = "/entity_test/delete/entity_test_admin_routes/{entity_test_admin_routes}", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_admin_routes', + label: new TranslatableMarkup('Test entity - admin routes'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => ['html' => AdminHtmlRouteProvider::class], + ], + links: [ + 'canonical' => '/entity_test_admin_routes/manage/{entity_test_admin_routes}', + 'edit-form' => '/entity_test_admin_routes/manage/{entity_test_admin_routes}/edit', + 'delete-form' => '/entity_test/delete/entity_test_admin_routes/{entity_test_admin_routes}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_admin_routes', + data_table: 'entity_test_admin_routes_property_data', + translatable: TRUE, +)] class EntityTestAdminRoutes extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php index afdae49f4507827110574716ca7027c020039f40..2474ceecab57f8a92b214f26af08c8462a22af32 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php @@ -4,43 +4,43 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestForm; use Drupal\entity_test\FieldStorageDefinition; /** * Defines a test entity class for base fields display. - * - * @ContentEntityType( - * id = "entity_test_base_field_display", - * label = @Translation("Test entity - base field display"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_base_field_display", - * admin_permission = "administer entity_test content", - * entity_keys = { - * "id" = "id", - * "label" = "name", - * "uuid" = "uuid", - * "bundle" = "type", - * "langcode" = "langcode", - * }, - * links = { - * "canonical" = "/entity_test_base_field_display/{entity_test_base_field_display}/edit", - * "add-form" = "/entity_test_base_field_display/add", - * "edit-form" = "/entity_test_base_field_display/manage/{entity_test_base_field_display}", - * "delete-form" = "/entity_test/delete/entity_test_base_field_display/{entity_test_base_field_display}/edit", - * }, - * field_ui_base_route = "entity.entity_test_base_field_display.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_base_field_display', + label: new TranslatableMarkup('Test entity - base field display'), + entity_keys: [ + 'id' => 'id', + 'label' => 'name', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'form' => ['default' => EntityTestForm::class], + 'route_provider' => ['html' => DefaultHtmlRouteProvider::class], + ], + links: [ + 'canonical' => '/entity_test_base_field_display/{entity_test_base_field_display}/edit', + 'add-form' => '/entity_test_base_field_display/add', + 'edit-form' => '/entity_test_base_field_display/manage/{entity_test_base_field_display}', + 'delete-form' => '/entity_test/delete/entity_test_base_field_display/{entity_test_base_field_display}/edit', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_base_field_display', + field_ui_base_route: 'entity.entity_test_base_field_display.admin_form', +)] class EntityTestBaseFieldDisplay extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php index 7e039ac32430b739ac8aca47d05f8181e9ea6047..053d3fcb9cb4c64b32ab044b80ca23da110884e6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php @@ -4,41 +4,45 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\BundleEntityFormBase; +use Drupal\Core\Entity\EntityAccessControlHandler; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\Core\Entity\EntityDescriptionInterface; /** * Defines the Test entity bundle configuration entity. - * - * @ConfigEntityType( - * id = "entity_test_bundle", - * label = @Translation("Test entity bundle"), - * handlers = { - * "access" = "\Drupal\Core\Entity\EntityAccessControlHandler", - * "form" = { - * "default" = "\Drupal\Core\Entity\BundleEntityFormBase", - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * admin_permission = "administer entity_test_bundle content", - * config_prefix = "entity_test_bundle", - * bundle_of = "entity_test_with_bundle", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "label", - * "description", - * }, - * links = { - * "add-form" = "/entity_test_bundle/add", - * } - * ) */ +#[ConfigEntityType( + id: 'entity_test_bundle', + label: new TranslatableMarkup('Test entity bundle'), + config_prefix: 'entity_test_bundle', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => EntityAccessControlHandler::class, + 'form' => [ + 'default' => BundleEntityFormBase::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_bundle/add', + ], + admin_permission: 'administer entity_test_bundle content', + bundle_of: 'entity_test_with_bundle', + config_export: [ + 'id', + 'label', + 'description', + ], +)] class EntityTestBundle extends ConfigEntityBundleBase implements EntityDescriptionInterface { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php index a59d264194a6ea661195c3c08c236a14890f6822..bd3367d6df397708e76a54822f2a05b4c970f627 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php @@ -4,26 +4,30 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestForm; + /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_cache", - * label = @Translation("Test entity with field cache"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * }, - * }, - * base_table = "entity_test_cache", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type" - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_cache', + label: new TranslatableMarkup('Test entity with field cache'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + ], + ], + base_table: 'entity_test_cache', +)] class EntityTestCache extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php index dc34902c87785d61a3821c7428e559f80bd11214..be31e8066604c0f8d5566c20e8e55c2707b35fc3 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php @@ -4,33 +4,35 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\EntityTestForm; /** * Defines a test class for testing composite constraints. - * - * @ContentEntityType( - * id = "entity_test_composite_constraint", - * label = @Translation("Test entity constraints with composite constraint"), - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name" - * }, - * handlers = { - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * } - * }, - * base_table = "entity_test_composite_constraint", - * persistent_cache = FALSE, - * constraints = { - * "EntityTestComposite" = {}, - * "EntityTestEntityLevel" = {}, - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_composite_constraint', + label: new TranslatableMarkup('Test entity constraints with composite constraint'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + handlers: [ + 'form' => [ + 'default' => EntityTestForm::class, + ], + ], + base_table: 'entity_test_composite_constraint', + constraints: [ + 'EntityTestComposite' => [], + 'EntityTestEntityLevel' => [], + ], +)] class EntityTestCompositeConstraint extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php index fa0674298c43f55ee608fce01a9e3cbbd4912745..14ed8bc2b9f810cdf8bf1615144e7252081f9d62 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php @@ -4,10 +4,12 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Field\FieldDefinition; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestViewsData; use Drupal\entity_test\FieldStorageDefinition; use Drupal\entity_test\Plugin\Field\ComputedReferenceTestFieldItemList; use Drupal\entity_test\Plugin\Field\ComputedTestBundleFieldItemList; @@ -16,23 +18,22 @@ /** * An entity used for testing computed bundle field values. - * - * @ContentEntityType( - * id = "entity_test_comp_bund_fld", - * label = @Translation("Entity Test computed bundle field"), - * base_table = "entity_test_comp_bund_fld", - * handlers = { - * "views_data" = "Drupal\entity_test\EntityTestViewsData" - * }, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "label" = "name", - * "bundle" = "type", - * }, - * admin_permission = "administer entity_test content", - * ) */ +#[ContentEntityType( + id: 'entity_test_comp_bund_fld', + label: new TranslatableMarkup('Entity Test computed bundle field'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'label' => 'name', + 'bundle' => 'type', + ], + handlers: [ + 'views_data' => EntityTestViewsData::class, + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_comp_bund_fld', +)] class EntityTestComputedBundleField extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedField.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedField.php index 93785bfa8b8f241490c68efaad72d71dd9a647e8..83d925a9028d0f454b52afb5e041e3434d0de458 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedField.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedField.php @@ -4,9 +4,11 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestViewsData; use Drupal\entity_test\Plugin\Field\ComputedReferenceTestFieldItemList; use Drupal\entity_test\Plugin\Field\ComputedTestCacheableIntegerItemList; use Drupal\entity_test\Plugin\Field\ComputedTestCacheableStringItemList; @@ -14,25 +16,24 @@ /** * An entity used for testing computed field values. - * - * @ContentEntityType( - * id = "entity_test_computed_field", - * label = @Translation("Entity Test computed field"), - * base_table = "entity_test_computed_field", - * handlers = { - * "views_data" = "Drupal\entity_test\EntityTestViewsData" - * }, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "label" = "name", - * }, - * admin_permission = "administer entity_test content", - * links = { - * "canonical" = "/entity_test_computed_field/{entity_test_computed_field}", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_computed_field', + label: new TranslatableMarkup('Entity Test computed field'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'label' => 'name', + ], + handlers: [ + 'views_data' => EntityTestViewsData::class, + ], + links: [ + 'canonical' => '/entity_test_computed_field/{entity_test_computed_field}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_computed_field', +)] class EntityTestComputedField extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraintViolation.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraintViolation.php index 7e2f4f48969708b293d4240fa9c5a34fdc4a0fa0..6d21eb2278fdab5032ecb2b9fb688c1fb89711f0 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraintViolation.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraintViolation.php @@ -4,30 +4,32 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestForm; /** * Defines the test entity class for testing entity constraint violations. - * - * @ContentEntityType( - * id = "entity_test_constraint_violation", - * label = @Translation("Test entity constraint violation"), - * handlers = { - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * } - * }, - * base_table = "entity_test_constraint_violation", - * persistent_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name" - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_constraint_violation', + label: new TranslatableMarkup('Test entity constraint violation'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + handlers: [ + 'form' => [ + 'default' => EntityTestForm::class, + ], + ], + base_table: 'entity_test_constraint_violation', +)] class EntityTestConstraintViolation extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php index 0cfdd24fcb0b389119c083d5fc004ae2ed392d9f..ab8214fa444843b81ddbd4146547aa2644d59409 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php @@ -4,6 +4,8 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityChangedInterface; @@ -11,23 +13,22 @@ /** * Defines a test class for testing the definition of entity level constraints. - * - * @ContentEntityType( - * id = "entity_test_constraints", - * label = @Translation("Test entity constraints"), - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name" - * }, - * base_table = "entity_test_constraints", - * persistent_cache = FALSE, - * constraints = { - * "NotNull" = {} - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_constraints', + label: new TranslatableMarkup('Test entity constraints'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + base_table: 'entity_test_constraints', + constraints: [ + 'NotNull' => [], + ], +)] class EntityTestConstraints extends EntityTest implements EntityChangedInterface { use EntityChangedTrait; diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultAccess.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultAccess.php index bcb8a34fbc732afad78ce3d0afdf621898196c91..a977e8cb1a3457f6aa4c80dc68198ff292320e2f 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultAccess.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultAccess.php @@ -4,19 +4,21 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; + /** * Defines a test entity class with no access control handler. - * - * @ContentEntityType( - * id = "entity_test_default_access", - * label = @Translation("Test entity with default access"), - * base_table = "entity_test_default_access", - * entity_keys = { - * "id" = "id", - * "bundle" = "type" - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_default_access', + label: new TranslatableMarkup('Test entity with default access'), + entity_keys: [ + 'id' => 'id', + 'bundle' => 'type', + ], + base_table: 'entity_test_default_access', +)] class EntityTestDefaultAccess extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultValue.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultValue.php index ed5d214c04a49da18e17a05e58f2266d8556afbd..3d5aaca9080cad20031acc29ed98f33fc6cef0a4 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultValue.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultValue.php @@ -4,24 +4,25 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; /** * Defines a test entity class for testing default values. - * - * @ContentEntityType( - * id = "entity_test_default_value", - * label = @Translation("Test entity for default values"), - * base_table = "entity_test_default_value", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "langcode" = "langcode" - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_default_value', + label: new TranslatableMarkup('Test entity for default values'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'langcode' => 'langcode', + ], + base_table: 'entity_test_default_value', +)] class EntityTestDefaultValue extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php index 45879565529c407ca79d0c9ddc3e7fda058f1fa1..247e659e54c8fb2e4fddcdeb3a5e714c4141bb83 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php @@ -4,25 +4,26 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; /** * Test entity class. - * - * @ContentEntityType( - * id = "entity_test_external", - * label = @Translation("Entity test external"), - * base_table = "entity_test_external", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * }, - * links = { - * "canonical" = "/entity_test_external/{entity_test_external}" - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_external', + label: new TranslatableMarkup('Entity test external'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + ], + links: [ + 'canonical' => '/entity_test_external/{entity_test_external}', + ], + base_table: 'entity_test_external', +)] class EntityTestExternal extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php index 9c06a5842892edd486f0b39bcb74355070cf29f1..7d3e145243ab7b01e4a45382fa9469cf5ee95907 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php @@ -4,40 +4,47 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_field_methods", - * label = @Translation("Test entity - field methods and data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_field_methods", - * data_table = "entity_test_field_methods_property", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_field_methods', + label: new TranslatableMarkup('Test entity - field methods and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_field_methods', + data_table: 'entity_test_field_methods_property', + translatable: TRUE, +)] class EntityTestFieldMethods extends EntityTestMul { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php index 98e3f7ee19ea26d3c100f0ceefbfda507560f7a6..87e9a48e611ec59dc3a44dbb439d54ec438f95ca 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php @@ -4,22 +4,23 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; /** * Defines a test entity class for testing default values. - * - * @ContentEntityType( - * id = "entity_test_field_override", - * label = @Translation("Test entity field overrides"), - * base_table = "entity_test_field_override", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type" - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_field_override', + label: new TranslatableMarkup('Test entity field overrides'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + ], + base_table: 'entity_test_field_override', +)] class EntityTestFieldOverride extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php index eb8ed9bcac312d05b7d39f8ebe3f1a004592a37a..f86fa46067c8f3cbecfc45b181fbb9a917f9aada 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php @@ -4,27 +4,31 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; + /** * Test entity class. - * - * @ContentEntityType( - * id = "entity_test_label", - * label = @Translation("Entity Test label"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder" - * }, - * base_table = "entity_test_label", - * render_cache = FALSE, - * entity_keys = { - * "uuid" = "uuid", - * "id" = "id", - * "label" = "name", - * "bundle" = "type", - * "langcode" = "langcode", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_label', + label: new TranslatableMarkup('Entity Test label'), + render_cache: FALSE, + entity_keys: [ + 'uuid' => 'uuid', + 'id' => 'id', + 'label' => 'name', + 'bundle' => 'type', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'view_builder' => TestViewBuilder::class, + ], + base_table: 'entity_test_label', +)] class EntityTestLabel extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMapField.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMapField.php index ed995b210d4fdefb1debb562873161ac5c1bd6b2..fd9698ade4cad70574d0dce0f8d2216e81eb61fd 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMapField.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMapField.php @@ -4,25 +4,26 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; /** * An entity used for testing map base field values. - * - * @ContentEntityType( - * id = "entity_test_map_field", - * label = @Translation("Entity Test map field"), - * base_table = "entity_test_map_field", - * entity_keys = { - * "uuid" = "uuid", - * "id" = "id", - * "label" = "name", - * "langcode" = "langcode", - * }, - * admin_permission = "administer entity_test content", - * ) */ +#[ContentEntityType( + id: 'entity_test_map_field', + label: new TranslatableMarkup('Entity Test map field'), + entity_keys: [ + 'uuid' => 'uuid', + 'id' => 'id', + 'label' => 'name', + 'langcode' => 'langcode', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_map_field', +)] class EntityTestMapField extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php index 03a070e09672aeb939c0176585598f5359b165ad..8eb4e89808cd7aaa8d428685ccb9eb0bdce27820 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php @@ -4,47 +4,52 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mul", - * label = @Translation("Test entity - data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mul", - * data_table = "entity_test_mul_property_data", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "add-page" = "/entity_test_mul/add", - * "add-form" = "/entity_test_mul/add/{type}", - * "canonical" = "/entity_test_mul/manage/{entity_test_mul}", - * "edit-form" = "/entity_test_mul/manage/{entity_test_mul}/edit", - * "delete-form" = "/entity_test/delete/entity_test_mul/{entity_test_mul}", - * }, - * field_ui_base_route = "entity.entity_test_mul.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_mul', + label: new TranslatableMarkup('Test entity - data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => ['html' => DefaultHtmlRouteProvider::class], + ], + links: [ + 'add-page' => '/entity_test_mul/add', + 'add-form' => '/entity_test_mul/add/{type}', + 'canonical' => '/entity_test_mul/manage/{entity_test_mul}', + 'edit-form' => '/entity_test_mul/manage/{entity_test_mul}/edit', + 'delete-form' => '/entity_test/delete/entity_test_mul/{entity_test_mul}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_mul', + data_table: 'entity_test_mul_property_data', + translatable: TRUE, + field_ui_base_route: 'entity.entity_test_mul.admin_form', +)] class EntityTestMul extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulBundle.php index 3ed9577a1d7634317e038ab215fd9c562b88ad18..8debeb0aa3efeb52ea06f4ef5e2137298bb7e81f 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulBundle.php @@ -4,40 +4,44 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\BundleEntityFormBase; +use Drupal\Core\Entity\EntityAccessControlHandler; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\Core\Entity\EntityDescriptionInterface; /** * Defines the Test entity mul bundle configuration entity. - * - * @ConfigEntityType( - * id = "entity_test_mul_bundle", - * label = @Translation("Test entity multilingual bundle"), - * handlers = { - * "access" = "\Drupal\Core\Entity\EntityAccessControlHandler", - * "form" = { - * "default" = "\Drupal\Core\Entity\BundleEntityFormBase", - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * admin_permission = "administer entity_test_mul_with_bundle content", - * bundle_of = "entity_test_mul_with_bundle", - * entity_keys = { - * "id" = "id", - * "label" = "label" - * }, - * config_export = { - * "id", - * "label", - * "description", - * }, - * links = { - * "add-form" = "/entity_test_mul_bundle/add", - * } - * ) */ +#[ConfigEntityType( + id: 'entity_test_mul_bundle', + label: new TranslatableMarkup('Test entity multilingual bundle'), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + ], + handlers: [ + 'access' => EntityAccessControlHandler::class, + 'form' => [ + 'default' => BundleEntityFormBase::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_mul_bundle/add', + ], + admin_permission: 'administer entity_test_mul_with_bundle content', + bundle_of: 'entity_test_mul_with_bundle', + config_export: [ + 'id', + 'label', + 'description', + ], +)] class EntityTestMulBundle extends ConfigEntityBundleBase implements EntityDescriptionInterface { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php index 9b497762df5acc047a881b6ccc6e79701de12720..bfb0f6b10adeae21b9168807804b762b1274ee94 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php @@ -4,48 +4,55 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityChangedInterface; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mul_changed", - * label = @Translation("Test entity - multiple changed and data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * "views_data" = "Drupal\views\EntityViewsData" - * }, - * base_table = "entity_test_mul_changed", - * data_table = "entity_test_mul_changed_property", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode" - * }, - * links = { - * "add-form" = "/entity_test_mul_changed/add", - * "canonical" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}", - * "edit-form" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}/edit", - * "delete-form" = "/entity_test/delete/entity_test_mul_changed/{entity_test_mul_changed}", - * }, - * field_ui_base_route = "entity.entity_test_mul_changed.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_changed', + label: new TranslatableMarkup('Test entity - multiple changed and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + 'views_data' => EntityViewsData::class, + ], + links: [ + 'add-form' => '/entity_test_mul_changed/add', + 'canonical' => '/entity_test_mul_changed/manage/{entity_test_mul_changed}', + 'edit-form' => '/entity_test_mul_changed/manage/{entity_test_mul_changed}/edit', + 'delete-form' => '/entity_test/delete/entity_test_mul_changed/{entity_test_mul_changed}', + ], + base_table: 'entity_test_mul_changed', + data_table: 'entity_test_mul_changed_property', + translatable: TRUE, + field_ui_base_route: 'entity.entity_test_mul_changed.admin_form', +)] class EntityTestMulChanged extends EntityTestMul implements EntityChangedInterface { use EntityChangedTrait; diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulDefaultValue.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulDefaultValue.php index f19500719bf10afcc201f77a426b1ec8eeea408c..828032e8682c41655fe7dd2efd9500cf0627c5de 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulDefaultValue.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulDefaultValue.php @@ -4,42 +4,48 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mul_default_value", - * label = @Translation("Test entity - multiple default value and data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData" - * }, - * base_table = "entity_test_mul_default_value", - * data_table = "entity_test_mul_default_value_property_data", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode" - * }, - * links = { - * "canonical" = "/entity_test_mul_default_value/manage/{entity_test_mul_default_value}", - * "edit-form" = "/entity_test_mul_default_value/manage/{entity_test_mul_default_value}", - * "delete-form" = "/entity_test/delete/entity_test_mul_default_value/{entity_test_mul_default_value}", - * }, - * field_ui_base_route = "entity.entity_test_mul.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_default_value', + label: new TranslatableMarkup('Test entity - multiple default value and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + ], + links: [ + 'canonical' => '/entity_test_mul_default_value/manage/{entity_test_mul_default_value}', + 'edit-form' => '/entity_test_mul_default_value/manage/{entity_test_mul_default_value}', + 'delete-form' => '/entity_test/delete/entity_test_mul_default_value/{entity_test_mul_default_value}', + ], + base_table: 'entity_test_mul_default_value', + data_table: 'entity_test_mul_default_value_property_data', + translatable: TRUE, + field_ui_base_route: 'entity.entity_test_mul.admin_form', +)] class EntityTestMulDefaultValue extends EntityTestMul { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php index 2316c6db9f8bdf1995916ecc2f632fd92e3157e7..a536f72bcd4f8f1acf9d5cf53f22a0549bb11a10 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php @@ -4,45 +4,52 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; + /** * Defines a test entity class using a custom langcode entity key. - * - * @ContentEntityType( - * id = "entity_test_mul_langcode_key", - * label = @Translation("Test entity - data table - langcode key"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mul_langcode_key", - * data_table = "entity_test_mul_langcode_key_field_data", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "custom_langcode_key", - * "default_langcode" = "custom_default_langcode_key", - * }, - * links = { - * "add-form" = "/entity_test_mul_langcode_key/add", - * "canonical" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}", - * "edit-form" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}/edit", - * "delete-form" = "/entity_test/delete/entity_test_mul_langcode_key/{entity_test_mul_langcode_key}", - * }, - * field_ui_base_route = "entity.entity_test_mul_langcode_key.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_langcode_key', + label: new TranslatableMarkup('Test entity - data table - langcode key'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'custom_langcode_key', + 'default_langcode' => 'custom_default_langcode_key', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_mul_langcode_key/add', + 'canonical' => '/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}', + 'edit-form' => '/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}/edit', + 'delete-form' => '/entity_test/delete/entity_test_mul_langcode_key/{entity_test_mul_langcode_key}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_mul_langcode_key', + data_table: 'entity_test_mul_langcode_key_field_data', translatable: TRUE, + field_ui_base_route: 'entity.entity_test_mul_langcode_key.admin_form', +)] class EntityTestMulLangcodeKey extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php index b147853fcd19af373c1532f5b80878e571e5fd3f..58e0072e0fd7ef500dd8aac90b07644df5282bfc 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php @@ -4,51 +4,56 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mulrev", - * label = @Translation("Test entity - mul revisions and data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mulrev", - * data_table = "entity_test_mulrev_property_data", - * revision_table = "entity_test_mulrev_revision", - * revision_data_table = "entity_test_mulrev_property_revision", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * show_revision_ui = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "revision" = "revision_id", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "add-form" = "/entity_test_mulrev/add", - * "canonical" = "/entity_test_mulrev/manage/{entity_test_mulrev}", - * "delete-form" = "/entity_test/delete/entity_test_mulrev/{entity_test_mulrev}", - * "edit-form" = "/entity_test_mulrev/manage/{entity_test_mulrev}/edit", - * "revision" = "/entity_test_mulrev/{entity_test_mulrev}/revision/{entity_test_mulrev_revision}/view", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_mulrev', + label: new TranslatableMarkup('Test entity - mul revisions and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'revision' => 'revision_id', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => ['html' => DefaultHtmlRouteProvider::class], + ], + links: [ + 'add-form' => '/entity_test_mulrev/add', + 'canonical' => '/entity_test_mulrev/manage/{entity_test_mulrev}', + 'delete-form' => '/entity_test/delete/entity_test_mulrev/{entity_test_mulrev}', + 'edit-form' => '/entity_test_mulrev/manage/{entity_test_mulrev}/edit', + 'revision' => '/entity_test_mulrev/{entity_test_mulrev}/revision/{entity_test_mulrev_revision}/view', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_mulrev', + data_table: 'entity_test_mulrev_property_data', + revision_table: 'entity_test_mulrev_revision', + revision_data_table: 'entity_test_mulrev_property_revision', + translatable: TRUE, + show_revision_ui: TRUE, +)] class EntityTestMulRev extends EntityTestRev { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php index f965884a6dd9db5686f2221bde2945d14465d38a..e88e6714e637f16b5816581068ba7c8c130a2329 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php @@ -4,49 +4,56 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mulrev_changed", - * label = @Translation("Test entity - mul changed revisions and data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * "views_data" = "Drupal\views\EntityViewsData" - * }, - * base_table = "entity_test_mulrev_changed", - * data_table = "entity_test_mulrev_changed_property", - * revision_table = "entity_test_mulrev_changed_revision", - * revision_data_table = "entity_test_mulrev_changed_property_revision", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "revision" = "revision_id", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "add-form" = "/entity_test_mulrev_changed/add", - * "canonical" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}", - * "delete-form" = "/entity_test/delete/entity_test_mulrev_changed/{entity_test_mulrev_changed}", - * "edit-form" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}/edit", - * "revision" = "/entity_test_mulrev_changed/{entity_test_mulrev_changed}/revision/{entity_test_mulrev_changed_revision}/view", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_mulrev_changed', + label: new TranslatableMarkup('Test entity - mul changed revisions and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'revision' => 'revision_id', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + 'views_data' => EntityViewsData::class, + ], + links: [ + 'add-form' => '/entity_test_mulrev_changed/add', + 'canonical' => '/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}', + 'delete-form' => '/entity_test/delete/entity_test_mulrev_changed/{entity_test_mulrev_changed}', + 'edit-form' => '/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}/edit', + 'revision' => '/entity_test_mulrev_changed/{entity_test_mulrev_changed}/revision/{entity_test_mulrev_changed_revision}/view', + ], + base_table: 'entity_test_mulrev_changed', + data_table: 'entity_test_mulrev_changed_property', + revision_table: 'entity_test_mulrev_changed_revision', + revision_data_table: 'entity_test_mulrev_changed_property_revision', + translatable: TRUE, +)] class EntityTestMulRevChanged extends EntityTestMulChanged { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php index 8b97ae48235bf8485b20e30c9f4975b04651a751..4b0eb399546753afd115f1c95ccd74259a4c660b 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php @@ -4,33 +4,34 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\RevisionLogEntityTrait; use Drupal\Core\Entity\RevisionLogInterface; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mulrev_changed_rev", - * label = @Translation("Test entity - revisions log and data table"), - * base_table = "entity_test_mulrev_changed_revlog", - * revision_table = "entity_test_mulrev_changed_revlog_revision", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "revision" = "revision_id", - * "label" = "name", - * "langcode" = "langcode", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message" - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_mulrev_changed_rev', + label: new TranslatableMarkup('Test entity - revisions log and data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'revision' => 'revision_id', + 'label' => 'name', + 'langcode' => 'langcode', + ], + base_table: 'entity_test_mulrev_changed_revlog', + revision_table: 'entity_test_mulrev_changed_revlog_revision', + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ], +)] class EntityTestMulRevChangedWithRevisionLog extends EntityTestMulRevChanged implements RevisionLogInterface { use RevisionLogEntityTrait; diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php index 68757f50da670e9faf14790f142dd05f642bba16..412c60e9ae9164ecfb8d668fc3ebdc5549e72f23 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php @@ -4,55 +4,63 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Form\DeleteMultipleForm; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityPublishedInterface; use Drupal\Core\Entity\EntityPublishedTrait; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mulrevpub", - * label = @Translation("Test entity - revisions, data table, and published interface"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm", - * "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm" - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mulrevpub", - * data_table = "entity_test_mulrevpub_property_data", - * revision_table = "entity_test_mulrevpub_revision", - * revision_data_table = "entity_test_mulrevpub_property_revision", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * show_revision_ui = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "revision" = "revision_id", - * "label" = "name", - * "langcode" = "langcode", - * "published" = "status", - * }, - * links = { - * "add-form" = "/entity_test_mulrevpub/add", - * "canonical" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}", - * "delete-form" = "/entity_test/delete/entity_test_mulrevpub/{entity_test_mulrevpub}", - * "delete-multiple-form" = "/entity_test/delete", - * "edit-form" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}/edit", - * "revision" = "/entity_test_mulrevpub/{entity_test_mulrevpub}/revision/{entity_test_mulrevpub_revision}/view", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_mulrevpub', + label: new TranslatableMarkup('Test entity - revisions, data table, and published interface'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'revision' => 'revision_id', + 'label' => 'name', + 'langcode' => 'langcode', + 'published' => 'status', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + 'delete-multiple-confirm' => DeleteMultipleForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_mulrevpub/add', + 'canonical' => '/entity_test_mulrevpub/manage/{entity_test_mulrevpub}', + 'delete-form' => '/entity_test/delete/entity_test_mulrevpub/{entity_test_mulrevpub}', + 'delete-multiple-form' => '/entity_test/delete', + 'edit-form' => '/entity_test_mulrevpub/manage/{entity_test_mulrevpub}/edit', + 'revision' => '/entity_test_mulrevpub/{entity_test_mulrevpub}/revision/{entity_test_mulrevpub_revision}/view', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_mulrevpub', + data_table: 'entity_test_mulrevpub_property_data', + revision_table: 'entity_test_mulrevpub_revision', + revision_data_table: 'entity_test_mulrevpub_property_revision', + translatable: TRUE, + show_revision_ui: TRUE, +)] class EntityTestMulRevPub extends EntityTestMulRev implements EntityPublishedInterface { use EntityPublishedTrait; diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulWithBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulWithBundle.php index a9ee258b1141cf45b8240aa8041493011d65cce6..03d0a833fe9f3cb4a73e3e7986ca8a51d62ab6d4 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulWithBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulWithBundle.php @@ -4,48 +4,57 @@ namespace Drupal\entity_test\Entity; +use Drupal\content_translation\ContentTranslationHandler; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; + /** * Defines the multilingual test entity class with bundles. - * - * @ContentEntityType( - * id = "entity_test_mul_with_bundle", - * label = @Translation("Test entity multilingual with bundle - data table"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm" - * }, - * "translation" = "Drupal\content_translation\ContentTranslationHandler", - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_mul_with_bundle", - * data_table = "entity_test_mul_with_bundle_property_data", - * admin_permission = "administer entity_test content", - * translatable = TRUE, - * permission_granularity = "bundle", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * bundle_entity_type = "entity_test_mul_bundle", - * links = { - * "add-page" = "/entity_test_mul_with_bundle/add", - * "add-form" = "/entity_test_mul_with_bundle/add/{type}", - * "canonical" = "/entity_test_mul_with_bundle/manage/{entity_test_mul}", - * "edit-form" = "/entity_test_mul_with_bundle/manage/{entity_test_mul}/edit", - * "delete-form" = "/entity_test/delete/entity_test_mul_with_bundle/{entity_test_mul}", - * }, - * field_ui_base_route = "entity.entity_test_mul_with_bundle.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_with_bundle', + label: new TranslatableMarkup('Test entity multilingual with bundle - data table'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + ], + 'translation' => ContentTranslationHandler::class, + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'add-page' => '/entity_test_mul_with_bundle/add', + 'add-form' => '/entity_test_mul_with_bundle/add/{type}', + 'canonical' => '/entity_test_mul_with_bundle/manage/{entity_test_mul_with_bundle}', + 'edit-form' => '/entity_test_mul_with_bundle/manage/{entity_test_mul_with_bundle}/edit', + 'delete-form' => '/entity_test/delete/entity_test_mul_with_bundle/{entity_test_mul_with_bundle}', + ], + admin_permission: 'administer entity_test content', + permission_granularity: 'bundle', + bundle_entity_type: 'entity_test_mul_bundle', + base_table: 'entity_test_mul_with_bundle', + data_table: 'entity_test_mul_with_bundle_property_data', + translatable: TRUE, + field_ui_base_route: 'entity.entity_test_mul_with_bundle.admin_form' +)] class EntityTestMulWithBundle extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBaseField.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBaseField.php new file mode 100644 index 0000000000000000000000000000000000000000..ff69c8779353de96f2858cbfeb252b16655f8684 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBaseField.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test\Entity; + +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\views\EntityViewsData; + +// cspell:ignore basefield + +/** + * Defines an entity type with a multivalue base field. + */ +#[ContentEntityType( + id: 'entity_test_multivalue_basefield', + label: new TranslatableMarkup('Entity Test with a multivalue base field'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'views_data' => EntityViewsData::class, + ], + base_table: 'entity_test_multivalue_basefield', + data_table: 'entity_test_multivalue_basefield_field_data', +)] +class EntityTestMultiValueBaseField extends EntityTest { + + /** + * {@inheritdoc} + */ + public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { + $fields = parent::baseFieldDefinitions($entity_type); + $fields['name']->setCardinality(2); + + return $fields; + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBasefield.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBasefield.php deleted file mode 100644 index 466f45fc4c8da50db50474566c95d218bb464962..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBasefield.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Drupal\entity_test\Entity; - -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Defines an entity type with a multivalue base field. - * - * @ContentEntityType( - * id = "entity_test_multivalue_basefield", - * label = @Translation("Entity Test with a multivalue base field"), - * base_table = "entity_test_multivalue_basefield", - * data_table = "entity_test_multivalue_basefield_field_data", - * handlers = { - * "views_data" = "Drupal\views\EntityViewsData", - * }, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * } - * ) - */ -class EntityTestMultiValueBasefield extends EntityTest { - - /** - * {@inheritdoc} - */ - public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { - $fields = parent::baseFieldDefinitions($entity_type); - $fields['name']->setCardinality(2); - - return $fields; - } - -} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNew.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNew.php index 4b120fcf93937606b20e0cec63cd35c6875d13f5..eedcd79460ef86b78e65262128b0a247788357f6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNew.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNew.php @@ -4,24 +4,26 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; + /** * Defines the test entity class for testing definition addition. * * This entity type is initially not defined. It is enabled when needed to test * the related updates. - * - * @ContentEntityType( - * id = "entity_test_new", - * label = @Translation("New test entity"), - * base_table = "entity_test_new", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_new', + label: new TranslatableMarkup('New test entity'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + base_table: 'entity_test_new', +)] class EntityTestNew extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php index f2b1888fed5da4561cabbff469e3df2b759fe92d..c62d428830bbe61fc603e047272d1a7c7e834b7d 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php @@ -4,26 +4,29 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\views\EntityViewsData; + /** * Test entity class with no bundle. - * - * @ContentEntityType( - * id = "entity_test_no_bundle", - * label = @Translation("Entity Test without bundle"), - * base_table = "entity_test_no_bundle", - * handlers = { - * "views_data" = "Drupal\views\EntityViewsData" - * }, - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * }, - * admin_permission = "administer entity_test content", - * links = { - * "add-form" = "/entity_test_no_bundle/add", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_no_bundle', + label: new TranslatableMarkup('Entity Test without bundle'), + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + ], + handlers: [ + 'views_data' => EntityViewsData::class, + ], + links: [ + 'add-form' => '/entity_test_no_bundle/add', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_no_bundle', +)] class EntityTestNoBundle extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php index ef966a4532ac241f301c9ab2553b3d50d1c3c31c..3d1e9912e7e70dcf65f85f2968fdfde593314ea6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php @@ -4,27 +4,30 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\views\EntityViewsData; + /** * Test entity class with no bundle but with label. - * - * @ContentEntityType( - * id = "entity_test_no_bundle_with_label", - * label = @Translation("Entity Test without bundle but with label"), - * base_table = "entity_test_no_bundle_with_label", - * handlers = { - * "views_data" = "Drupal\views\EntityViewsData" - * }, - * entity_keys = { - * "id" = "id", - * "label" = "name", - * "revision" = "revision_id", - * }, - * admin_permission = "administer entity_test content", - * links = { - * "add-form" = "/entity_test_no_bundle_with_label/add", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_no_bundle_with_label', + label: new TranslatableMarkup('Entity Test without bundle but with label'), + entity_keys: [ + 'id' => 'id', + 'label' => 'name', + 'revision' => 'revision_id', + ], + handlers: [ + 'views_data' => EntityViewsData::class, + ], + links: [ + 'add-form' => '/entity_test_no_bundle_with_label/add', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_no_bundle_with_label', +)] class EntityTestNoBundleWithLabel extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoId.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoId.php index 23e3e2678c2931746ceecb94b39a36c2386345f0..7382b31a553522fbee41b4d51de4479dd2fe47f2 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoId.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoId.php @@ -4,25 +4,28 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\ContentEntityNullStorage; +use Drupal\Core\StringTranslation\TranslatableMarkup; + /** * Test entity class. - * - * @ContentEntityType( - * id = "entity_test_no_id", - * label = @Translation("Entity Test without id"), - * handlers = { - * "storage" = "Drupal\Core\Entity\ContentEntityNullStorage", - * }, - * entity_keys = { - * "bundle" = "type", - * }, - * admin_permission = "administer entity_test content", - * field_ui_base_route = "entity.entity_test_no_id.admin_form", - * links = { - * "add-form" = "/entity_test_no_id/add", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_no_id', + label: new TranslatableMarkup('Entity Test without id'), + entity_keys: [ + 'bundle' => 'type', + ], + handlers: [ + 'storage' => ContentEntityNullStorage::class, + ], + links: [ + 'add-form' => '/entity_test_no_id/add', + ], + admin_permission: 'administer entity_test content', + field_ui_base_route: 'entity.entity_test_no_id.admin_form', +)] class EntityTestNoId extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php index 6b947985a66c0ed112571c5efbe3d861bf181ba6..5c0c1ea16bb86919cba9e1bc70cf188f69a47ea6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php @@ -4,25 +4,28 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; + /** * Test entity class. - * - * @ContentEntityType( - * id = "entity_test_no_label", - * label = @Translation("Entity Test without label"), - * internal = TRUE, - * persistent_cache = FALSE, - * base_table = "entity_test_no_label", - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * }, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_no_label', + label: new TranslatableMarkup('Entity Test without label'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + ], + base_table: 'entity_test_no_label', + internal: TRUE, +)] class EntityTestNoLabel extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php index 802ff359f4d19928f47370ba7cf6456e5d115d78..3942b006de24c6f81d6f4e178cb69471dbd87da7 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php @@ -4,28 +4,31 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; + /** * Test entity class with revisions but without UUIDs. - * - * @ContentEntityType( - * id = "entity_test_no_uuid", - * label = @Translation("Test entity without UUID"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * }, - * base_table = "entity_test_no_uuid", - * revision_table = "entity_test_no_uuid_revision", - * admin_permission = "administer entity_test content", - * persistent_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "revision" = "vid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_no_uuid', + label: new TranslatableMarkup('Test entity without UUID'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'revision' => 'vid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_no_uuid', + revision_table: 'entity_test_no_uuid_revision', +)] class EntityTestNoUuid extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php index 1f81e0b7bbee5e5d92563c9ee5685322631b590b..1aa90d50d301fe8c1dd4261b18a40c455875955e 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php @@ -4,56 +4,66 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\Entity\Form\DeleteMultipleForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; +use Drupal\views\EntityViewsData; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_rev", - * label = @Translation("Test entity - revisions"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm", - * "delete-multiple-confirm" = \Drupal\Core\Entity\Form\DeleteMultipleForm::class, - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * }, - * base_table = "entity_test_rev", - * revision_table = "entity_test_rev_revision", - * admin_permission = "administer entity_test content", - * show_revision_ui = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * links = { - * "add-form" = "/entity_test_rev/add", - * "canonical" = "/entity_test_rev/manage/{entity_test_rev}", - * "delete-form" = "/entity_test/delete/entity_test_rev/{entity_test_rev}", - * "delete-multiple-form" = "/entity_test_rev/delete_multiple", - * "edit-form" = "/entity_test_rev/manage/{entity_test_rev}/edit", - * "revision" = "/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/view", - * "revision-delete-form" = "/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/delete", - * "revision-revert-form" = "/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/revert", - * "version-history" = "/entity_test_rev/{entity_test_rev}/revisions", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_rev', + label: new TranslatableMarkup('Test entity - revisions'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'view_builder' => TestViewBuilder::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + 'delete-multiple-confirm' => DeleteMultipleForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + 'revision' => RevisionHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_rev/add', + 'canonical' => '/entity_test_rev/manage/{entity_test_rev}', + 'delete-form' => '/entity_test/delete/entity_test_rev/{entity_test_rev}', + 'delete-multiple-form' => '/entity_test_rev/delete_multiple', + 'edit-form' => '/entity_test_rev/manage/{entity_test_rev}/edit', + 'revision' => '/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/view', + 'revision-delete-form' => '/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/delete', + 'revision-revert-form' => '/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/revert', + 'version-history' => '/entity_test_rev/{entity_test_rev}/revisions', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_rev', + revision_table: 'entity_test_rev_revision', show_revision_ui: TRUE, +)] class EntityTestRev extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRevPub.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRevPub.php index 0871fcfbad3ff82b5325e75e8b733a0103cc1688..877710005c05821e7f8fd9765484375a88eb8427 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRevPub.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRevPub.php @@ -4,57 +4,67 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\Entity\Form\DeleteMultipleForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityPublishedInterface; use Drupal\Core\Entity\EntityPublishedTrait; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestDeleteForm; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_revpub", - * label = @Translation("Test entity - revisions and publishing status"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", - * "delete" = "Drupal\entity_test\EntityTestDeleteForm", - * "delete-multiple-confirm" = \Drupal\Core\Entity\Form\DeleteMultipleForm::class, - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "route_provider" = { - * "html" = \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::class, - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * }, - * base_table = "entity_test_revpub", - * revision_table = "entity_test_revpub_revision", - * admin_permission = "administer entity_test content", - * show_revision_ui = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * "published" = "status", - * }, - * links = { - * "add-form" = "/entity_test_revpub/add", - * "canonical" = "/entity_test_revpub/manage/{entity_test_revpub}", - * "delete-form" = "/entity_test/delete/entity_test_revpub/{entity_test_revpub}", - * "delete-multiple-form" = "/entity_test_revpub/delete_multiple", - * "edit-form" = "/entity_test_revpub/manage/{entity_test_revpub}/edit", - * "revision" = "/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/view", - * "revision-delete-form" = "/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/delete", - * "revision-revert-form" = "/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/revert", - * "version-history" = "/entity_test_revpub/{entity_test_revpub}/revisions", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_revpub', + label: new TranslatableMarkup('Test entity - revisions and publishing status'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + 'published' => 'status', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'view_builder' => TestViewBuilder::class, + 'form' => [ + 'default' => EntityTestForm::class, + 'delete' => EntityTestDeleteForm::class, + 'delete-multiple-confirm' => DeleteMultipleForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + 'revision' => RevisionHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_revpub/add', + 'canonical' => '/entity_test_revpub/manage/{entity_test_revpub}', + 'delete-form' => '/entity_test/delete/entity_test_revpub/{entity_test_revpub}', + 'delete-multiple-form' => '/entity_test_revpub/delete_multiple', + 'edit-form' => '/entity_test_revpub/manage/{entity_test_revpub}/edit', + 'revision' => '/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/view', + 'revision-delete-form' => '/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/delete', + 'revision-revert-form' => '/entity_test_revpub/{entity_test_revpub}/revision/{entity_test_revpub_revision}/revert', + 'version-history' => '/entity_test_revpub/{entity_test_revpub}/revisions', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_revpub', + revision_table: 'entity_test_revpub_revision', + show_revision_ui: TRUE, +)] class EntityTestRevPub extends EntityTestRev implements EntityPublishedInterface { use EntityPublishedTrait; diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestStringId.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestStringId.php index c19ad18fd29f35f4e45830c48f7d0fad3a3d3d77..2db1fe8bc0197d4462f48bbd253e89ca330d2205 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestStringId.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestStringId.php @@ -4,40 +4,44 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestForm; /** * Defines a test entity class with a string ID. - * - * @ContentEntityType( - * id = "entity_test_string_id", - * label = @Translation("Test entity with string_id"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_string", - * admin_permission = "administer entity_test content", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * }, - * links = { - * "canonical" = "/entity_test_string_id/manage/{entity_test_string_id}", - * "add-form" = "/entity_test_string_id/add", - * "edit-form" = "/entity_test_string_id/manage/{entity_test_string_id}", - * }, - * field_ui_base_route = "entity.entity_test_string_id.admin_form", - * ) */ +#[ContentEntityType( + id: 'entity_test_string_id', + label: new TranslatableMarkup('Test entity with string_id'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'canonical' => '/entity_test_string_id/manage/{entity_test_string_id}', + 'add-form' => '/entity_test_string_id/add', + 'edit-form' => '/entity_test_string_id/manage/{entity_test_string_id}', + ], + admin_permission: 'administer entity_test content', + base_table: 'entity_test_string', + field_ui_base_route: 'entity.entity_test_string_id.admin_form', +)] class EntityTestStringId extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUniqueConstraint.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUniqueConstraint.php index 43ce759e6ab07febaf0aa7f61729ef423f9c0df1..0e23aa61688a1f1e96aa339b9a552cbf3c036bba 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUniqueConstraint.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUniqueConstraint.php @@ -4,31 +4,36 @@ namespace Drupal\entity_test\Entity; +use Drupal\content_translation\ContentTranslationHandler; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestForm; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; /** * Defines a test entity class for unique constraint. - * - * @ContentEntityType( - * id = "entity_test_unique_constraint", - * label = @Translation("unique field entity"), - * handlers = { - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm" - * }, - * "translation" = "Drupal\content_translation\ContentTranslationHandler", - * }, - * base_table = "entity_test_unique_constraint", - * data_table = "entity_test_unique_constraint_data", - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_unique_constraint', + label: new TranslatableMarkup('unique field entity'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + ], + handlers: [ + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => EntityTestForm::class, + ], + 'translation' => ContentTranslationHandler::class, + ], + base_table: 'entity_test_unique_constraint', + data_table: 'entity_test_unique_constraint_data', +)] class EntityTestUniqueConstraint extends EntityTest { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUuidId.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUuidId.php new file mode 100644 index 0000000000000000000000000000000000000000..5935fd857dedd4a919e5b4cbfeca31cbd134ab67 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUuidId.php @@ -0,0 +1,77 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test\Entity; + +use Drupal\Component\Uuid\UuidInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; + +/** + * Defines a test entity class with UUIDs as IDs. + * + * @ContentEntityType( + * id = "entity_test_uuid_id", + * label = @Translation("Test entity with UUIDs as IDs"), + * handlers = { + * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestForm" + * }, + * "route_provider" = { + * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", + * }, + * }, + * translatable = TRUE, + * base_table = "entity_test_uuid_id", + * data_table = "entity_test_uuid_id_data", + * admin_permission = "administer entity_test content", + * entity_keys = { + * "id" = "uuid", + * "uuid" = "uuid", + * "bundle" = "type", + * "langcode" = "langcode", + * "label" = "name", + * }, + * links = { + * "canonical" = "/entity_test_uuid_id/manage/{entity_test_uuid_id}", + * "add-form" = "/entity_test_uuid_id/add", + * "edit-form" = "/entity_test_uuid_id/manage/{entity_test_uuid_id}/edit", + * }, + * ) + */ +class EntityTestUuidId extends EntityTest { + + /** + * {@inheritdoc} + */ + public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { + $fields = parent::baseFieldDefinitions($entity_type); + // Configure a string field to match the UUID field configuration and use it + // for both the ID and the UUID key. The UUID field type cannot be used + // because it would add a unique key to the data table. + $fields[$entity_type->getKey('uuid')] = BaseFieldDefinition::create('string') + ->setLabel(new TranslatableMarkup('UUID')) + /* @see \Drupal\Core\Field\Plugin\Field\FieldType\UuidItem::defaultStorageSettings() */ + ->setSetting('max_length', 128) + ->setSetting('is_ascii', TRUE) + /* @see \Drupal\Core\Field\Plugin\Field\FieldType\UuidItem::applyDefaultValue() */ + ->setDefaultValueCallback(static::class . '::generateUuid'); + return $fields; + } + + /** + * Statically generates a UUID. + * + * @return string + * A newly generated UUID. + */ + public static function generateUuid(): string { + $uuid = \Drupal::service('uuid'); + assert($uuid instanceof UuidInterface); + return $uuid->generate(); + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestViewBuilder.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestViewBuilder.php index 4d22ff4e627ad2f8a6178698668170f7831a4891..a03358e617f99ccc97f927695b92b749f40aec3b 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestViewBuilder.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestViewBuilder.php @@ -4,27 +4,31 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestViewBuilderOverriddenView; + /** * Test entity class for testing a view builder. - * - * @ContentEntityType( - * id = "entity_test_view_builder", - * label = @Translation("Entity Test view builder"), - * handlers = { - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilderOverriddenView", - * }, - * base_table = "entity_test_view_builder", - * render_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "label" = "name", - * "bundle" = "type", - * "langcode" = "langcode", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_view_builder', + label: new TranslatableMarkup('Entity Test view builder'), + render_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'label' => 'name', + 'bundle' => 'type', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestAccessControlHandler::class, + 'view_builder' => EntityTestViewBuilderOverriddenView::class, + ], + base_table: 'entity_test_view_builder', +)] class EntityTestViewBuilder extends EntityTest { } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php index 9171ff7462aae839526033a3117503cd0d9cbfef..407ea3eb7718648abf64522861d01aae10db0ed9 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php @@ -4,51 +4,58 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\ContentEntityForm; +use Drupal\Core\Entity\EntityDeleteForm; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test\EntityTestAccessControlHandler; +use Drupal\entity_test\EntityTestListBuilder; +use Drupal\entity_test\EntityTestViewBuilder as TestViewBuilder; /** * Defines the Test entity with bundle entity class. - * - * @ContentEntityType( - * id = "entity_test_with_bundle", - * label = @Translation("Test entity with bundle"), - * handlers = { - * "list_builder" = "Drupal\entity_test\EntityTestListBuilder", - * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", - * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", - * "form" = { - * "default" = "\Drupal\Core\Entity\ContentEntityForm", - * "delete" = "\Drupal\Core\Entity\EntityDeleteForm" - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", - * }, - * }, - * base_table = "entity_test_with_bundle", - * data_table = "entity_test_with_bundle_field_data", - * admin_permission = "administer entity_test_with_bundle content", - * persistent_cache = FALSE, - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * bundle_entity_type = "entity_test_bundle", - * links = { - * "canonical" = "/entity_test_with_bundle/{entity_test_with_bundle}", - * "add-page" = "/entity_test_with_bundle/add", - * "add-form" = "/entity_test_with_bundle/add/{entity_test_bundle}", - * "edit-form" = "/entity_test_with_bundle/{entity_test_with_bundle}/edit", - * "delete-form" = "/entity_test_with_bundle/{entity_test_with_bundle}/delete", - * "create" = "/entity_test_with_bundle", - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_with_bundle', + label: new TranslatableMarkup('Test entity with bundle'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'list_builder' => EntityTestListBuilder::class, + 'view_builder' => TestViewBuilder::class, + 'access' => EntityTestAccessControlHandler::class, + 'form' => [ + 'default' => ContentEntityForm::class, + 'delete' => EntityDeleteForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + ], + ], + links: [ + 'canonical' => '/entity_test_with_bundle/{entity_test_with_bundle}', + 'add-page' => '/entity_test_with_bundle/add', + 'add-form' => '/entity_test_with_bundle/add/{entity_test_bundle}', + 'edit-form' => '/entity_test_with_bundle/{entity_test_with_bundle}/edit', + 'delete-form' => '/entity_test_with_bundle/{entity_test_with_bundle}/delete', + 'create' => '/entity_test_with_bundle', + ], + admin_permission: 'administer entity_test_with_bundle content', + bundle_entity_type: 'entity_test_bundle', + base_table: 'entity_test_with_bundle', + data_table: 'entity_test_with_bundle_field_data', + translatable: TRUE, +)] class EntityTestWithBundle extends ContentEntityBase { /** diff --git a/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..dea5aaf0a47aa8b9c1233da2ffabe5adad046516 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php @@ -0,0 +1,700 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Url; +use Drupal\Component\Render\FormattableMarkup; +use Drupal\Core\Entity\Entity\EntityFormDisplay; +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test. + */ +class EntityTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + $state = \Drupal::state(); + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + foreach (entity_test_entity_types() as $entity_type) { + // Optionally specify a translation handler for testing translations. + if ($state->get('entity_test.translation')) { + $translation = $entity_types[$entity_type]->get('translation'); + $translation[$entity_type] = TRUE; + $entity_types[$entity_type]->set('translation', $translation); + } + } + // Allow entity_test_rev tests to override the entity type definition. + $entity_types['entity_test_rev'] = $state->get('entity_test_rev.entity_type', $entity_types['entity_test_rev']); + $entity_types['entity_test_revpub'] = $state->get('entity_test_revpub.entity_type', $entity_types['entity_test_revpub']); + // Enable the entity_test_new only when needed. + if (!$state->get('entity_test_new')) { + unset($entity_types['entity_test_new']); + } + else { + // Allow tests to override the entity type definition. + $entity_types['entity_test_new'] = \Drupal::state()->get('entity_test_new.entity_type', $entity_types['entity_test_new']); + } + $entity_test_definition = $entity_types['entity_test']; + $entity_test_definition->set('entity_keys', $state->get('entity_test.entity_keys', []) + $entity_test_definition->getKeys()); + // Allow tests to alter the permission granularity of entity_test_mul. + $entity_types['entity_test_mul']->set('permission_granularity', \Drupal::state()->get('entity_test_mul.permission_granularity', 'entity_type')); + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + $fields = []; + if ($entity_type->id() === 'entity_test' && \Drupal::state()->get('entity_test.internal_field')) { + $fields['internal_string_field'] = BaseFieldDefinition::create('string')->setLabel('Internal field')->setInternal(TRUE); + } + if ($entity_type->id() === 'entity_test_mul' && \Drupal::state()->get('entity_test.required_default_field')) { + $fields['required_default_field'] = BaseFieldDefinition::create('string')->setLabel('Required field with default value')->setRequired(TRUE)->setDefaultValue('this is a default value'); + } + if ($entity_type->id() === 'entity_test_mul' && \Drupal::state()->get('entity_test.required_multi_default_field')) { + $fields['required_multi_default_field'] = BaseFieldDefinition::create('string')->setLabel('Required field with default value')->setRequired(TRUE)->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)->setDefaultValue([ + [ + 'value' => 'this is the first default field item', + ], + [ + 'value' => 'this is the second default value', + ], + [ + 'value' => 'you get the idea...', + ], + ]); + } + if ($entity_type->id() == 'entity_test_mulrev' && \Drupal::state()->get('entity_test.field_test_item')) { + $fields['field_test_item'] = BaseFieldDefinition::create('field_test')->setLabel(t('Field test'))->setDescription(t('A field test.'))->setRevisionable(TRUE)->setTranslatable(TRUE); + } + if ($entity_type->id() == 'entity_test_mulrev' && \Drupal::state()->get('entity_test.multi_column')) { + $fields['description'] = BaseFieldDefinition::create('shape')->setLabel(t('Some custom description'))->setTranslatable(TRUE); + } + return $fields; + } + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$fields, EntityTypeInterface $entity_type) { + $state = \Drupal::state(); + if ($entity_type->id() == 'entity_test_mulrev' && ($names = $state->get('entity_test.field_definitions.translatable'))) { + foreach ($names as $name => $value) { + $fields[$name]->setTranslatable($value); + } + } + if ($entity_type->id() == 'node' && $state->get('entity_test.node_remove_status_field')) { + unset($fields['status']); + } + if ($entity_type->id() == 'entity_test' && $state->get('entity_test.remove_name_field')) { + unset($fields['name']); + } + // In 8001 we are assuming that a new definition with multiple cardinality has + // been deployed. + // @todo Remove this if we end up using state definitions at runtime. See + // https://www.drupal.org/node/2554235. + if ($entity_type->id() == 'entity_test' && $state->get('entity_test.db_updates.entity_definition_updates') == 8001) { + $fields['user_id']->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); + } + } + + /** + * Implements hook_entity_bundle_info(). + */ + #[Hook('entity_bundle_info')] + public function entityBundleInfo() { + $bundles = []; + $entity_types = \Drupal::entityTypeManager()->getDefinitions(); + foreach ($entity_types as $entity_type_id => $entity_type) { + if ($entity_type->getProvider() == 'entity_test' && !in_array($entity_type_id, ['entity_test_with_bundle', 'entity_test_mul_with_bundle'], TRUE)) { + $bundles[$entity_type_id] = \Drupal::state()->get($entity_type_id . '.bundles', [$entity_type_id => ['label' => 'Entity Test Bundle']]); + } + } + return $bundles; + } + + /** + * Implements hook_entity_bundle_info_alter(). + */ + #[Hook('entity_bundle_info_alter')] + public function entityBundleInfoAlter(&$bundles) { + $entity_info = \Drupal::entityTypeManager()->getDefinitions(); + $state = \Drupal::state(); + foreach ($bundles as $entity_type_id => &$all_bundle_info) { + if ($entity_info[$entity_type_id]->getProvider() == 'entity_test') { + if ($state->get('entity_test.translation') && $entity_info[$entity_type_id]->isTranslatable()) { + foreach ($all_bundle_info as &$bundle_info) { + $bundle_info['translatable'] = TRUE; + if ($state->get('entity_test.untranslatable_fields.default_translation_affected')) { + $bundle_info['untranslatable_fields.default_translation_affected'] = TRUE; + } + } + } + } + } + } + + /** + * Implements hook_entity_view_mode_info_alter(). + */ + #[Hook('entity_view_mode_info_alter')] + public function entityViewModeInfoAlter(&$view_modes) { + $entity_info = \Drupal::entityTypeManager()->getDefinitions(); + foreach ($entity_info as $entity_type => $info) { + if ($entity_info[$entity_type]->getProvider() == 'entity_test' && !isset($view_modes[$entity_type])) { + $view_modes[$entity_type] = [ + 'full' => [ + 'label' => t('Full object'), + 'status' => TRUE, + 'cache' => TRUE, + ], + 'teaser' => [ + 'label' => t('Teaser'), + 'status' => TRUE, + 'cache' => TRUE, + ], + ]; + } + } + } + + /** + * Implements hook_entity_form_mode_info_alter(). + */ + #[Hook('entity_form_mode_info_alter')] + public function entityFormModeInfoAlter(&$form_modes) { + $entity_info = \Drupal::entityTypeManager()->getDefinitions(); + foreach ($entity_info as $entity_type => $info) { + if ($entity_info[$entity_type]->getProvider() == 'entity_test') { + $form_modes[$entity_type]['compact'] = ['label' => t('Compact version'), 'status' => TRUE]; + } + } + } + + /** + * Implements hook_ENTITY_TYPE_view_mode_alter(). + */ + #[Hook('entity_test_view_mode_alter')] + public function entityTestViewModeAlter(string &$view_mode, EntityInterface $entity) : void { + if ($view_mode == 'entity_test.vm_alter_test') { + $view_mode = 'entity_test.vm_alter_full'; + } + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $extra['entity_test']['bundle_with_extra_fields'] = [ + 'display' => [ + // Note: those extra fields do not currently display anything, they are + // just used in \Drupal\Tests\field_ui\Kernel\EntityDisplayTest to test + // the behavior of entity display objects. + 'display_extra_field' => [ + 'label' => t('Display extra field'), + 'description' => t('An extra field on the display side.'), + 'weight' => 5, + 'visible' => TRUE, + ], + 'display_extra_field_hidden' => [ + 'label' => t('Display extra field (hidden)'), + 'description' => t('An extra field on the display side, hidden by default.'), + 'visible' => FALSE, + ], + ], + ]; + return $extra; + } + + /** + * Implements hook_form_BASE_FORM_ID_alter(). + */ + #[Hook('form_entity_test_form_alter')] + public function formEntityTestFormAlter(&$form) : void { + switch (\Drupal::state()->get('entity_test.form.validate.test')) { + case 'form-level': + $form['#validate'][] = 'entity_test_form_entity_test_form_validate'; + $form['#validate'][] = 'entity_test_form_entity_test_form_validate_check'; + break; + + case 'button-level': + $form['actions']['submit']['#validate'][] = 'entity_test_form_entity_test_form_validate'; + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter(). + */ + #[Hook('form_node_form_alter')] + public function formNodeFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $langcode = $form_state->getFormObject()->getFormLangcode($form_state); + \Drupal::state()->set('entity_test.form_langcode', $langcode); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'entity_test'. + */ + #[Hook('entity_test_insert')] + public function entityTestInsert($entity) { + if ($entity->name->value == 'fail_insert') { + throw new \Exception("Test exception rollback."); + } + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + if ($entity->getEntityTypeId() == 'entity_test_mulrev' && $entity->label() == 'EntityLoadedRevisionTest') { + $entity->setNewRevision(FALSE); + $entity->save(); + } + } + + /** + * Implements hook_entity_update(). + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + if ($entity instanceof ContentEntityInterface) { + \Drupal::state()->set('entity_test.loadedRevisionId', $entity->getLoadedRevisionId()); + } + } + + /** + * Implements hook_entity_field_access(). + * + * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + if ($field_definition->getName() == 'field_test_text') { + if ($items) { + if ($items->value == 'no access value') { + return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); + } + elseif ($items->value == 'custom cache tag value') { + return AccessResult::allowed()->addCacheableDependency($items->getEntity())->addCacheTags(['entity_test_access:field_test_text']); + } + elseif ($operation == 'edit' && $items->value == 'no edit access value') { + return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); + } + } + } + if ($field = \Drupal::state()->get('views_field_access_test-field')) { + if ($field_definition->getName() === $field) { + $result = AccessResult::allowedIfHasPermission($account, 'view test entity field'); + // For test purposes we want to actively deny access. + if ($result->isNeutral()) { + $result = AccessResult::forbidden(); + } + return $result; + } + } + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_field_access_alter(). + * + * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() + */ + #[Hook('entity_field_access_alter')] + public function entityFieldAccessAlter(array &$grants, array $context) { + if ($context['field_definition']->getName() == 'field_test_text' && $context['items']->value == 'access alter value') { + $grants[':default'] = AccessResult::forbidden()->inheritCacheability($grants[':default'])->addCacheableDependency($context['items']->getEntity()); + } + } + + /** + * Implements hook_entity_form_mode_alter(). + */ + #[Hook('entity_form_mode_alter')] + public function entityFormModeAlter(&$form_mode, EntityInterface $entity) { + if ($entity->getEntityTypeId() === 'entity_test' && $entity->get('name')->value === 'compact_form_mode') { + $form_mode = 'compact'; + } + } + + /** + * Implements hook_entity_form_display_alter(). + */ + #[Hook('entity_form_display_alter')] + public function entityFormDisplayAlter(EntityFormDisplay $form_display, $context) { + // Make the field_test_text field 42 characters for entity_test_mul. + if ($context['entity_type'] == 'entity_test') { + if ($component_options = $form_display->getComponent('field_test_text')) { + $component_options['settings']['size'] = 42; + $form_display->setComponent('field_test_text', $component_options); + } + } + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + if (isset($GLOBALS['entity_test_throw_exception'])) { + throw new \Exception('Entity presave exception', 1); + } + if ($entity->getEntityType()->id() == 'entity_view_display') { + $entity->setThirdPartySetting('entity_test', 'foo', 'bar'); + } + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + if (isset($GLOBALS['entity_test_throw_exception'])) { + throw new \Exception('Entity predelete exception', 2); + } + } + + /** + * Implements hook_entity_operation_alter(). + */ + #[Hook('entity_operation_alter')] + public function entityOperationAlter(array &$operations, EntityInterface $entity) { + $valid_entity_type_ids = ['user_role', 'block']; + if (in_array($entity->getEntityTypeId(), $valid_entity_type_ids)) { + if (\Drupal::service('router.route_provider')->getRouteByName("entity.{$entity->getEntityTypeId()}.test_operation")) { + $operations['test_operation'] = [ + 'title' => new FormattableMarkup('Test Operation: @label', [ + '@label' => $entity->label(), + ]), + 'url' => Url::fromRoute("entity.{$entity->getEntityTypeId()}.test_operation", [ + $entity->getEntityTypeId() => $entity->id(), + ]), + 'weight' => 50, + ]; + } + } + } + + /** + * Implements hook_entity_translation_create(). + */ + #[Hook('entity_translation_create')] + public function entityTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_entity_translation_insert(). + */ + #[Hook('entity_translation_insert')] + public function entityTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_entity_translation_delete(). + */ + #[Hook('entity_translation_delete')] + public function entityTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul'. + */ + #[Hook('entity_test_mul_translation_create')] + public function entityTestMulTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul'. + */ + #[Hook('entity_test_mul_translation_insert')] + public function entityTestMulTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mul'. + */ + #[Hook('entity_test_mul_translation_delete')] + public function entityTestMulTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul_changed'. + */ + #[Hook('entity_test_mul_changed_translation_create')] + public function entityTestMulChangedTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_changed_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul_changed'. + */ + #[Hook('entity_test_mul_changed_translation_insert')] + public function entityTestMulChangedTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_changed_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_delete(). + */ + #[Hook('entity_test_mul_changed_translation_delete')] + public function entityTestMulChangedTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_changed_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_create(). + */ + #[Hook('entity_test_mulrev_translation_create')] + public function entityTestMulrevTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_insert(). + */ + #[Hook('entity_test_mulrev_translation_insert')] + public function entityTestMulrevTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mulrev'. + */ + #[Hook('entity_test_mulrev_translation_delete')] + public function entityTestMulrevTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mulrev_changed'. + */ + #[Hook('entity_test_mulrev_changed_translation_create')] + public function entityTestMulrevChangedTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_changed_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mulrev'. + */ + #[Hook('entity_test_mulrev_changed_translation_insert')] + public function entityTestMulrevChangedTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_changed_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_delete(). + */ + #[Hook('entity_test_mulrev_changed_translation_delete')] + public function entityTestMulrevChangedTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mulrev_changed_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_create() for 'entity_test_mul_langcode_key'. + */ + #[Hook('entity_test_mul_langcode_key_translation_create')] + public function entityTestMulLangcodeKeyTranslationCreate(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_langcode_key_translation_create', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mul_langcode_key'. + */ + #[Hook('entity_test_mul_langcode_key_translation_insert')] + public function entityTestMulLangcodeKeyTranslationInsert(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_langcode_key_translation_insert', $translation->language()->getId()); + } + + /** + * Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mul_langcode_key'. + */ + #[Hook('entity_test_mul_langcode_key_translation_delete')] + public function entityTestMulLangcodeKeyTranslationDelete(EntityInterface $translation) { + _entity_test_record_hooks('entity_test_mul_langcode_key_translation_delete', $translation->language()->getId()); + } + + /** + * Implements hook_entity_revision_create(). + */ + #[Hook('entity_revision_create')] + public function entityRevisionCreate(EntityInterface $new_revision, EntityInterface $entity, $keep_untranslatable_fields) { + _entity_test_record_hooks('entity_revision_create', [ + 'new_revision' => $new_revision, + 'entity' => $entity, + 'keep_untranslatable_fields' => $keep_untranslatable_fields, + ]); + } + + /** + * Implements hook_ENTITY_TYPE_revision_create() for 'entity_test_mulrev'. + */ + #[Hook('entity_test_mulrev_revision_create')] + public function entityTestMulrevRevisionCreate(EntityInterface $new_revision, EntityInterface $entity, $keep_untranslatable_fields) { + if ($new_revision->get('name')->value == 'revision_create_test_it') { + $new_revision->set('name', 'revision_create_test_it_altered'); + } + _entity_test_record_hooks('entity_test_mulrev_revision_create', [ + 'new_revision' => $new_revision, + 'entity' => $entity, + 'keep_untranslatable_fields' => $keep_untranslatable_fields, + ]); + } + + /** + * Implements hook_entity_prepare_view(). + */ + #[Hook('entity_prepare_view')] + public function entityPrepareView($entity_type, array $entities, array $displays) { + if ($entity_type == 'entity_test') { + foreach ($entities as $entity) { + /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ + // Add field item attributes on field_test_text if it exists. + // See \Drupal\Tests\system\Functional\Entity\EntityViewControllerTest::testFieldItemAttributes(). + if ($entity->hasField('field_test_text') && $displays[$entity->bundle()]->getComponent('field_test_text')) { + foreach ($entity->get('field_test_text') as $item) { + $item->_attributes += ['data-field-item-attr' => 'foobar', 'property' => 'schema:text']; + } + } + // Add an item attribute on daterange fields if they exist. + $fields = $entity->getFieldDefinitions(); + foreach ($fields as $field) { + if ($field->getType() === 'daterange') { + $item = $entity->get($field->getName()); + $item->_attributes += ['data-field-item-attr' => 'foobar']; + } + } + } + } + } + + /** + * Implements hook_entity_display_build_alter(). + */ + #[Hook('entity_display_build_alter')] + public function entityDisplayBuildAlter(&$build, $context) { + /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ + $entity = $context['entity']; + if ($entity->getEntityTypeId() == 'entity_test' && $entity->bundle() == 'display_build_alter_bundle') { + $build['entity_display_build_alter']['#markup'] = 'Content added in hook_entity_display_build_alter for entity id ' . $entity->id(); + } + } + + /** + * Implements hook_entity_access(). + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + // Only apply to the 'entity_test' entities. + if ($entity->getEntityType()->getProvider() != 'entity_test') { + return AccessResult::neutral(); + } + \Drupal::state()->set('entity_test_entity_access', TRUE); + // Attempt to allow access to entities with the title forbid_access, + // this will be overridden by + // \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess(). + if ($entity->label() == 'forbid_access') { + return AccessResult::allowed(); + } + // Create specific labels to allow or deny access based on certain test + // conditions. + // @see \Drupal\KernelTests\Core\Entity\EntityAccessControlHandlerTest + if ($entity->label() == 'Accessible') { + return AccessResult::allowed(); + } + if ($entity->label() == 'Inaccessible') { + return AccessResult::forbidden(); + } + // Uncacheable because the access result depends on a State key-value pair and + // might therefore change at any time. + $condition = \Drupal::state()->get("entity_test_entity_access.{$operation}." . $entity->id(), FALSE); + return AccessResult::allowedIf($condition)->setCacheMaxAge(0); + } + + /** + * Implements hook_ENTITY_TYPE_access() for 'entity_test'. + */ + #[Hook('entity_test_access')] + public function entityTestAccess(EntityInterface $entity, $operation, AccountInterface $account) { + \Drupal::state()->set('entity_test_entity_test_access', TRUE); + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_create_access(). + */ + #[Hook('entity_create_access')] + public function entityCreateAccess(AccountInterface $account, $context, $entity_bundle) { + \Drupal::state()->set('entity_test_entity_create_access', TRUE); + \Drupal::state()->set('entity_test_entity_create_access_context', $context); + if ($entity_bundle === 'forbidden_access_bundle') { + // We need to cover a case in which a bundle is specifically forbidden + // from creation (as opposed to neutral access). + return AccessResult::forbidden(); + } + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_ENTITY_TYPE_create_access() for 'entity_test'. + */ + #[Hook('entity_test_create_access')] + public function entityTestCreateAccess(AccountInterface $account, $context, $entity_bundle) { + \Drupal::state()->set('entity_test_entity_test_create_access', TRUE); + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_query_entity_test_access_alter(). + */ + #[Hook('query_entity_test_access_alter')] + public function queryEntityTestAccessAlter(AlterableInterface $query) { + if (!\Drupal::state()->get('entity_test_query_access')) { + return; + } + /** @var \Drupal\Core\Database\Query\Select|\Drupal\Core\Database\Query\AlterableInterface $query */ + if (!\Drupal::currentUser()->hasPermission('view all entity_test_query_access entities')) { + $query->condition('entity_test_query_access.name', 'published entity'); + } + } + + /** + * Implements hook_ENTITY_TYPE_form_mode_alter(). + */ + #[Hook('entity_test_form_mode_alter')] + public function entityTestFormModeAlter(&$form_mode, EntityInterface $entity) : void { + if ($entity->getEntityTypeId() === 'entity_test' && $entity->get('name')->value === 'test_entity_type_form_mode_alter') { + $form_mode = 'compact'; + } + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestViewsHooks.php b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..933840b71470fea5d01e06d484274649d3fa0e1c --- /dev/null +++ b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestViewsHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test. + */ +class EntityTestViewsHooks { + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $data['entity_test']['name_alias'] = $data['entity_test']['name']; + $data['entity_test']['name_alias']['field']['real field'] = 'name'; + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraintValidator.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraintValidator.php index 47e0bcd623a81df8079cd6bc38e0ba2809756743..456afeb8cb5182489fa3ee6312edf65112f36019 100644 --- a/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraintValidator.php +++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraintValidator.php @@ -21,7 +21,7 @@ public function validate($items, Constraint $constraint): void { } foreach ($items as $item) { $violations = $item->entity->validate(); - foreach ($violations as $violation) { + if ($violations->count()) { // Add the reason for the validation failure to the current context. $this->context->buildViolation($constraint->message)->addViolation(); } diff --git a/core/modules/system/tests/modules/entity_test_bundle_class/entity_test_bundle_class.module b/core/modules/system/tests/modules/entity_test_bundle_class/entity_test_bundle_class.module deleted file mode 100644 index a55ba80d6275e50da75423e250dc3b4421cc4555..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test_bundle_class/entity_test_bundle_class.module +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -/** - * @file - * Support module for testing entity bundle classes. - */ - -declare(strict_types=1); - -use Drupal\entity_test\Entity\EntityTest; -use Drupal\entity_test_bundle_class\Entity\EntityTestAmbiguousBundleClass; -use Drupal\entity_test_bundle_class\Entity\EntityTestBundleClass; -use Drupal\entity_test_bundle_class\Entity\EntityTestUserClass; -use Drupal\entity_test_bundle_class\Entity\EntityTestVariant; -use Drupal\entity_test_bundle_class\Entity\NonInheritingBundleClass; -use Drupal\entity_test_bundle_class\Entity\SharedEntityTestBundleClassA; -use Drupal\entity_test_bundle_class\Entity\SharedEntityTestBundleClassB; - -/** - * Implements hook_entity_bundle_info_alter(). - */ -function entity_test_bundle_class_entity_bundle_info_alter(&$bundles) { - if (!empty($bundles['entity_test']['bundle_class'])) { - $bundles['entity_test']['bundle_class']['class'] = EntityTestBundleClass::class; - } - - if (\Drupal::state()->get('entity_test_bundle_class_enable_ambiguous_entity_types', FALSE)) { - $bundles['entity_test']['bundle_class_2']['class'] = EntityTestBundleClass::class; - $bundles['entity_test']['entity_test_no_label']['class'] = EntityTestAmbiguousBundleClass::class; - $bundles['entity_test_no_label']['entity_test_no_label']['class'] = EntityTestAmbiguousBundleClass::class; - } - - if (\Drupal::state()->get('entity_test_bundle_class_non_inheriting', FALSE)) { - $bundles['entity_test']['bundle_class']['class'] = NonInheritingBundleClass::class; - } - - if (\Drupal::state()->get('entity_test_bundle_class_enable_user_class', FALSE)) { - $bundles['user']['user']['class'] = EntityTestUserClass::class; - } - - if (\Drupal::state()->get('entity_test_bundle_class_does_not_exist', FALSE)) { - $bundles['entity_test']['bundle_class']['class'] = '\Drupal\Core\NonExistentClass'; - } - - // Have two bundles share the same base entity class. - $bundles['shared_type']['bundle_a'] = [ - 'label' => 'Bundle A', - 'class' => SharedEntityTestBundleClassA::class, - ]; - $bundles['shared_type']['bundle_b'] = [ - 'label' => 'Bundle B', - 'class' => SharedEntityTestBundleClassB::class, - ]; -} - -/** - * Implements hook_entity_type_alter(). - */ -function entity_test_bundle_class_entity_type_alter(&$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - if (\Drupal::state()->get('entity_test_bundle_class_override_base_class', FALSE) && isset($entity_types['entity_test'])) { - $entity_types['entity_test']->setClass(EntityTestVariant::class); - } -} - -/** - * Implements hook_entity_type_build(). - */ -function entity_test_bundle_class_entity_type_build(array &$entity_types): void { - - // Have multiple entity types share the same class as Entity Test. - // This allows us to test that AmbiguousBundleClassException does not - // get thrown when sharing classes. - /** @var \Drupal\Core\Entity\ContentEntityType $original_type */ - $cloned_type = clone $entity_types['entity_test']; - $cloned_type->set('bundle_of', 'entity_test'); - $entity_types['shared_type'] = $cloned_type; - $entity_types['shared_type']->setClass(EntityTest::class); -} diff --git a/core/modules/system/tests/modules/entity_test_bundle_class/src/Hook/EntityTestBundleClassHooks.php b/core/modules/system/tests/modules/entity_test_bundle_class/src/Hook/EntityTestBundleClassHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b5ec82ddbccaa0af2e7ab4ef3f5478a7349615fd --- /dev/null +++ b/core/modules/system/tests/modules/entity_test_bundle_class/src/Hook/EntityTestBundleClassHooks.php @@ -0,0 +1,81 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test_bundle_class\Hook; + +use Drupal\entity_test\Entity\EntityTest; +use Drupal\entity_test_bundle_class\Entity\EntityTestVariant; +use Drupal\entity_test_bundle_class\Entity\SharedEntityTestBundleClassB; +use Drupal\entity_test_bundle_class\Entity\SharedEntityTestBundleClassA; +use Drupal\entity_test_bundle_class\Entity\EntityTestUserClass; +use Drupal\entity_test_bundle_class\Entity\NonInheritingBundleClass; +use Drupal\entity_test_bundle_class\Entity\EntityTestAmbiguousBundleClass; +use Drupal\entity_test_bundle_class\Entity\EntityTestBundleClass; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test_bundle_class. + */ +class EntityTestBundleClassHooks { + + /** + * Implements hook_entity_bundle_info_alter(). + */ + #[Hook('entity_bundle_info_alter')] + public function entityBundleInfoAlter(&$bundles) { + if (!empty($bundles['entity_test']['bundle_class'])) { + $bundles['entity_test']['bundle_class']['class'] = EntityTestBundleClass::class; + } + if (\Drupal::state()->get('entity_test_bundle_class_enable_ambiguous_entity_types', FALSE)) { + $bundles['entity_test']['bundle_class_2']['class'] = EntityTestBundleClass::class; + $bundles['entity_test']['entity_test_no_label']['class'] = EntityTestAmbiguousBundleClass::class; + $bundles['entity_test_no_label']['entity_test_no_label']['class'] = EntityTestAmbiguousBundleClass::class; + } + if (\Drupal::state()->get('entity_test_bundle_class_non_inheriting', FALSE)) { + $bundles['entity_test']['bundle_class']['class'] = NonInheritingBundleClass::class; + } + if (\Drupal::state()->get('entity_test_bundle_class_enable_user_class', FALSE)) { + $bundles['user']['user']['class'] = EntityTestUserClass::class; + } + if (\Drupal::state()->get('entity_test_bundle_class_does_not_exist', FALSE)) { + $bundles['entity_test']['bundle_class']['class'] = '\Drupal\Core\NonExistentClass'; + } + // Have two bundles share the same base entity class. + $bundles['shared_type']['bundle_a'] = [ + 'label' => 'Bundle A', + 'class' => SharedEntityTestBundleClassA::class, + ]; + $bundles['shared_type']['bundle_b'] = [ + 'label' => 'Bundle B', + 'class' => SharedEntityTestBundleClassB::class, + ]; + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(&$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + if (\Drupal::state()->get('entity_test_bundle_class_override_base_class', FALSE) && isset($entity_types['entity_test'])) { + $entity_types['entity_test']->setClass(EntityTestVariant::class); + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) : void { + // Have multiple entity types share the same class as Entity Test. + // This allows us to test that AmbiguousBundleClassException does not + // get thrown when sharing classes. + /** @var \Drupal\Core\Entity\ContentEntityType $original_type */ + $cloned_type = clone $entity_types['entity_test']; + $cloned_type->set('bundle_of', 'entity_test'); + $entity_types['shared_type'] = $cloned_type; + $entity_types['shared_type']->setClass(EntityTest::class); + } + +} diff --git a/core/modules/system/tests/modules/entity_test_constraints/entity_test_constraints.module b/core/modules/system/tests/modules/entity_test_constraints/entity_test_constraints.module deleted file mode 100644 index e401298a8cffd837b8387a5b692f829e16c1d715..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test_constraints/entity_test_constraints.module +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * @file - * Test module file. - */ - -declare(strict_types=1); - -/** - * Implements hook_entity_type_build(). - */ -function entity_test_constraints_entity_type_build(array &$entity_types) { - if ($extra = \Drupal::state()->get('entity_test_constraints.build')) { - foreach ($extra as $id => $option) { - $entity_types['entity_test_constraints']->addConstraint($id, $option); - } - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function entity_test_constraints_entity_type_alter(array &$entity_types) { - if ($alter = \Drupal::state()->get('entity_test_constraints.alter')) { - $entity_types['entity_test_constraints']->setConstraints($alter); - } -} diff --git a/core/modules/system/tests/modules/entity_test_constraints/src/Hook/EntityTestConstraintsHooks.php b/core/modules/system/tests/modules/entity_test_constraints/src/Hook/EntityTestConstraintsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..beaab922040e04b8f4011016f2c0d5a3fc60ea71 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test_constraints/src/Hook/EntityTestConstraintsHooks.php @@ -0,0 +1,36 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test_constraints\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test_constraints. + */ +class EntityTestConstraintsHooks { + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + if ($extra = \Drupal::state()->get('entity_test_constraints.build')) { + foreach ($extra as $id => $option) { + $entity_types['entity_test_constraints']->addConstraint($id, $option); + } + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + if ($alter = \Drupal::state()->get('entity_test_constraints.alter')) { + $entity_types['entity_test_constraints']->setConstraints($alter); + } + } + +} diff --git a/core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module b/core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module deleted file mode 100644 index 115ec0272c647aa8f412f3b308d453179228dac8..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @file - * Test module for the entity API providing several extra fields for testing. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Implements hook_entity_base_field_info(). - */ -function entity_test_extra_entity_base_field_info(EntityTypeInterface $entity_type) { - return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []); -} - -/** - * Implements hook_entity_field_storage_info(). - */ -function entity_test_extra_entity_field_storage_info(EntityTypeInterface $entity_type) { - return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []); -} - -/** - * Implements hook_entity_bundle_field_info(). - */ -function entity_test_extra_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { - return \Drupal::state()->get($entity_type->id() . '.' . $bundle . '.additional_bundle_field_definitions', []); -} diff --git a/core/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php b/core/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..595b21c7b167dabe3d3297f69e160a14520b44f5 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test_extra\Hook; + +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test_extra. + */ +class EntityTestExtraHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []); + } + + /** + * Implements hook_entity_field_storage_info(). + */ + #[Hook('entity_field_storage_info')] + public function entityFieldStorageInfo(EntityTypeInterface $entity_type) { + return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []); + } + + /** + * Implements hook_entity_bundle_field_info(). + */ + #[Hook('entity_bundle_field_info')] + public function entityBundleFieldInfo(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { + return \Drupal::state()->get($entity_type->id() . '.' . $bundle . '.additional_bundle_field_definitions', []); + } + +} diff --git a/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module b/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module deleted file mode 100644 index fd5dd45377c8d3668ec583a2f14089345afef6b8..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for Entity Operation Test Module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Url; - -/** - * Implements hook_entity_operation(). - */ -function entity_test_operation_entity_operation(EntityInterface $entity) { - return [ - 'test' => [ - 'title' => t('Front page'), - 'url' => Url::fromRoute('<front>'), - 'weight' => 0, - ], - ]; -} diff --git a/core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php b/core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c815d8aefa034982961b9f55eb044b911b9097f1 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test_operation\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test_operation. + */ +class EntityTestOperationHooks { + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + return [ + 'test' => [ + 'title' => t('Front page'), + 'url' => Url::fromRoute('<front>'), + 'weight' => 0, + ], + ]; + } + +} diff --git a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLog.php b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLog.php index 92b91c0027eca87391b1a5cfe9d8bc89edd02052..1bbcf5030d62dbe4b03e9ba79f36bd295e52a4e2 100644 --- a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLog.php +++ b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLog.php @@ -4,54 +4,62 @@ namespace Drupal\entity_test_revlog\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\Entity\ContentEntityForm; +use Drupal\entity_test_revlog\EntityTestRevlogAccessControlHandler; +use Drupal\Core\StringTranslation\TranslatableMarkup; + /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mul_revlog", - * label = @Translation("Test entity - data table, revisions log"), - * handlers = { - * "access" = \Drupal\entity_test_revlog\EntityTestRevlogAccessControlHandler::class, - * "form" = { - * "default" = \Drupal\Core\Entity\ContentEntityForm::class, - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "route_provider" = { - * "html" = \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::class, - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * }, - * base_table = "entity_test_mul_revlog", - * data_table = "entity_test_mul_revlog_field_data", - * revision_table = "entity_test_mul_revlog_revision", - * revision_data_table = "entity_test_mul_revlog_field_revision", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message" - * }, - * links = { - * "add-form" = "/entity_test_mul_revlog/add", - * "canonical" = "/entity_test_mul_revlog/manage/{entity_test_mul_revlog}", - * "delete-form" = "/entity_test/delete/entity_test_mul_revlog/{entity_test_mul_revlog}", - * "edit-form" = "/entity_test_mul_revlog/manage/{entity_test_mul_revlog}/edit", - * "revision" = "/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/view", - * "revision-delete-form" = "/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/delete", - * "revision-revert-form" = "/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/revert", - * "version-history" = "/entity_test_mul_revlog/{entity_test_mul_revlog}/revisions", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_revlog', + label: new TranslatableMarkup('Test entity - data table, revisions log'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'access' => EntityTestRevlogAccessControlHandler::class, + 'form' => [ + 'default' => ContentEntityForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + 'revision' => RevisionHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_mul_revlog/add', + 'canonical' => '/entity_test_mul_revlog/manage/{entity_test_mul_revlog}', + 'delete-form' => '/entity_test/delete/entity_test_mul_revlog/{entity_test_mul_revlog}', + 'edit-form' => '/entity_test_mul_revlog/manage/{entity_test_mul_revlog}/edit', + 'revision' => '/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/view', + 'revision-delete-form' => '/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/delete', + 'revision-revert-form' => '/entity_test_mul_revlog/{entity_test_mul_revlog}/revision/{entity_test_mul_revlog_revision}/revert', + 'version-history' => '/entity_test_mul_revlog/{entity_test_mul_revlog}/revisions', + ], + base_table: 'entity_test_mul_revlog', + data_table: 'entity_test_mul_revlog_field_data', + revision_table: 'entity_test_mul_revlog_revision', + revision_data_table: 'entity_test_mul_revlog_field_revision', + translatable: TRUE, + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ], +)] class EntityTestMulWithRevisionLog extends EntityTestWithRevisionLog { } diff --git a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLogPub.php b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLogPub.php index 557835e73c0ef4461f90ed7ce493587e5dc2a08d..6c1f7aaf082a9d716cd7671133773310c03fd22e 100644 --- a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLogPub.php +++ b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLogPub.php @@ -4,37 +4,38 @@ namespace Drupal\entity_test_revlog\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityPublishedInterface; use Drupal\Core\Entity\EntityPublishedTrait; use Drupal\Core\Entity\EntityTypeInterface; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_mul_revlog_pub", - * label = @Translation("Test entity - data table, revisions log, publishing status"), - * base_table = "entity_test_mul_revlog_pub", - * data_table = "entity_test_mul_revlog_pub_field_data", - * revision_table = "entity_test_mul_revlog_pub_revision", - * revision_data_table = "entity_test_mul_revlog_pub_field_revision", - * translatable = TRUE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * "published" = "status", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message" - * }, - * ) */ +#[ContentEntityType( + id: 'entity_test_mul_revlog_pub', + label: new TranslatableMarkup('Test entity - data table, revisions log, publishing status'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + 'published' => 'status', + ], + base_table: 'entity_test_mul_revlog_pub', + data_table: 'entity_test_mul_revlog_pub_field_data', + revision_table: 'entity_test_mul_revlog_pub_revision', + revision_data_table: 'entity_test_mul_revlog_pub_field_revision', + translatable: TRUE, + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ], +)] class EntityTestMulWithRevisionLogPub extends EntityTestWithRevisionLog implements EntityPublishedInterface { use EntityPublishedTrait; diff --git a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestWithRevisionLog.php b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestWithRevisionLog.php index c8319fd9e02f6707e04068978872ad9a56bf3f8e..8a4f7b9afee4a69f72156fee9de28263f19b8e0f 100644 --- a/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestWithRevisionLog.php +++ b/core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestWithRevisionLog.php @@ -4,56 +4,63 @@ namespace Drupal\entity_test_revlog\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\Entity\ContentEntityForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\RevisionableContentEntityBase; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\entity_test_revlog\EntityTestRevlogAccessControlHandler; /** * Defines the test entity class. - * - * @ContentEntityType( - * id = "entity_test_revlog", - * label = @Translation("Test entity - revisions log"), - * handlers = { - * "access" = "Drupal\entity_test_revlog\EntityTestRevlogAccessControlHandler", - * "form" = { - * "default" = \Drupal\Core\Entity\ContentEntityForm::class, - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "route_provider" = { - * "html" = \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::class, - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * }, - * base_table = "entity_test_revlog", - * revision_table = "entity_test_revlog_revision", - * translatable = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "revision" = "revision_id", - * "bundle" = "type", - * "label" = "name", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message" - * }, - * links = { - * "add-form" = "/entity_test_revlog/add", - * "canonical" = "/entity_test_revlog/manage/{entity_test_revlog}", - * "delete-form" = "/entity_test/delete/entity_test_revlog/{entity_test_revlog}", - * "delete-multiple-form" = "/entity_test_revlog/delete_multiple", - * "edit-form" = "/entity_test_revlog/manage/{entity_test_revlog}/edit", - * "revision" = "/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/view", - * "revision-delete-form" = "/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/delete", - * "revision-revert-form" = "/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/revert", - * "version-history" = "/entity_test_revlog/{entity_test_revlog}/revisions", - * } - * ) */ +#[ContentEntityType( + id: 'entity_test_revlog', + label: new TranslatableMarkup('Test entity - revisions log'), + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'revision' => 'revision_id', + 'bundle' => 'type', + 'label' => 'name', + ], + handlers: [ + 'access' => EntityTestRevlogAccessControlHandler::class, + 'form' => [ + 'default' => ContentEntityForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'route_provider' => [ + 'html' => DefaultHtmlRouteProvider::class, + 'revision' => RevisionHtmlRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/entity_test_revlog/add', + 'canonical' => '/entity_test_revlog/manage/{entity_test_revlog}', + 'delete-form' => '/entity_test/delete/entity_test_revlog/{entity_test_revlog}', + 'delete-multiple-form' => '/entity_test_revlog/delete_multiple', + 'edit-form' => '/entity_test_revlog/manage/{entity_test_revlog}/edit', + 'revision' => '/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/view', + 'revision-delete-form' => '/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/delete', + 'revision-revert-form' => '/entity_test_revlog/{entity_test_revlog}/revision/{entity_test_revlog_revision}/revert', + 'version-history' => '/entity_test_revlog/{entity_test_revlog}/revisions', + ], + base_table: 'entity_test_revlog', + revision_table: 'entity_test_revlog_revision', + translatable: FALSE, + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ], +)] class EntityTestWithRevisionLog extends RevisionableContentEntityBase { /** diff --git a/core/modules/system/tests/modules/entity_test_update/entity_test_update.module b/core/modules/system/tests/modules/entity_test_update/entity_test_update.module deleted file mode 100644 index 30f5806af69dee0a8e43f69e0cf5320b14b916cb..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/entity_test_update/entity_test_update.module +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @file - * Provides an entity type for testing definition and schema updates. - */ - -declare(strict_types=1); - -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\StringTranslation\TranslatableMarkup; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Implements hook_entity_base_field_info(). - */ -function entity_test_update_entity_base_field_info(EntityTypeInterface $entity_type) { - // Add a base field that will be used to test that fields added through - // hook_entity_base_field_info() are handled correctly during a schema - // conversion (e.g. from non-revisionable to revisionable). - if ($entity_type->id() == 'entity_test_update') { - $fields = []; - $fields['test_entity_base_field_info'] = BaseFieldDefinition::create('string') - ->setLabel(new TranslatableMarkup('Field added by hook_entity_base_field_info()')) - ->setTranslatable(TRUE) - ->setRevisionable(TRUE); - - return $fields; - } -} - -/** - * Implements hook_entity_field_storage_info(). - */ -function entity_test_update_entity_field_storage_info(EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'entity_test_update') { - return \Drupal::state()->get('entity_test_update.additional_field_storage_definitions', []); - } -} - -/** - * Implements hook_entity_type_alter(). - */ -function entity_test_update_entity_type_alter(array &$entity_types) { - // Allow entity_test_update tests to override the entity type definition. - $entity_type = \Drupal::state()->get('entity_test_update.entity_type', $entity_types['entity_test_update']); - if ($entity_type !== 'null') { - $entity_types['entity_test_update'] = $entity_type; - } - else { - unset($entity_types['entity_test_update']); - } -} - -/** - * Implements hook_ENTITY_TYPE_presave() for the 'view' entity type. - */ -function entity_test_update_view_presave(EntityInterface $entity) { - if (\Drupal::state()->get('entity_test_update.throw_view_exception') === $entity->id()) { - throw new \LogicException('The view could not be saved.'); - } -} diff --git a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php index f3eec50fd0405ffcde759d88cd7df6b67f66c67c..0b4c49504553867d3217fb622995f91436ca88e4 100644 --- a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php +++ b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php @@ -4,11 +4,14 @@ namespace Drupal\entity_test_update\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\entity_test_update\EntityTestUpdateStorage; +use Drupal\entity_test_update\EntityTestUpdateStorageSchema; /** * Defines the test entity class for testing definition and schema updates. @@ -17,26 +20,27 @@ * an update test it can be made revisionable and translatable using the helper * methods from * \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait. - * - * @ContentEntityType( - * id = "entity_test_update", - * label = @Translation("Test entity update"), - * handlers = { - * "storage_schema" = "Drupal\entity_test_update\EntityTestUpdateStorageSchema", - * "storage" = "Drupal\entity_test_update\EntityTestUpdateStorage", - * }, - * base_table = "entity_test_update", - * persistent_cache = FALSE, - * entity_keys = { - * "id" = "id", - * "uuid" = "uuid", - * "bundle" = "type", - * "label" = "name", - * "langcode" = "langcode", - * }, - * content_translation_ui_skip = TRUE, - * ) */ +#[ContentEntityType( + id: 'entity_test_update', + label: new TranslatableMarkup('Test entity update'), + persistent_cache: FALSE, + entity_keys: [ + 'id' => 'id', + 'uuid' => 'uuid', + 'bundle' => 'type', + 'label' => 'name', + 'langcode' => 'langcode', + ], + handlers: [ + 'storage_schema' => EntityTestUpdateStorageSchema::class, + 'storage' => EntityTestUpdateStorage::class, + ], + base_table: 'entity_test_update', + additional: [ + 'content_translation_ui_skip' => TRUE, + ], +)] class EntityTestUpdate extends ContentEntityBase { /** diff --git a/core/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php b/core/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..587a66021329759db4e6c425fde4038be258d082 --- /dev/null +++ b/core/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php @@ -0,0 +1,68 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\entity_test_update\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for entity_test_update. + */ +class EntityTestUpdateHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + // Add a base field that will be used to test that fields added through + // hook_entity_base_field_info() are handled correctly during a schema + // conversion (e.g. from non-revisionable to revisionable). + if ($entity_type->id() == 'entity_test_update') { + $fields = []; + $fields['test_entity_base_field_info'] = BaseFieldDefinition::create('string')->setLabel(new TranslatableMarkup('Field added by hook_entity_base_field_info()'))->setTranslatable(TRUE)->setRevisionable(TRUE); + return $fields; + } + } + + /** + * Implements hook_entity_field_storage_info(). + */ + #[Hook('entity_field_storage_info')] + public function entityFieldStorageInfo(EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'entity_test_update') { + return \Drupal::state()->get('entity_test_update.additional_field_storage_definitions', []); + } + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + // Allow entity_test_update tests to override the entity type definition. + $entity_type = \Drupal::state()->get('entity_test_update.entity_type', $entity_types['entity_test_update']); + if ($entity_type !== 'null') { + $entity_types['entity_test_update'] = $entity_type; + } + else { + unset($entity_types['entity_test_update']); + } + } + + /** + * Implements hook_ENTITY_TYPE_presave() for the 'view' entity type. + */ + #[Hook('view_presave')] + public function viewPresave(EntityInterface $entity) { + if (\Drupal::state()->get('entity_test_update.throw_view_exception') === $entity->id()) { + throw new \LogicException('The view could not be saved.'); + } + } + +} diff --git a/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install b/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install index 3a11103aa1f015946531aaa212a0d7fe144a4366..e264734728af87e22db05e2f4f97421ccf4fa606 100644 --- a/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install +++ b/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install @@ -14,7 +14,7 @@ /** * Implements hook_update_last_removed(). */ - function equivalent_update_test_update_last_removed() { + function equivalent_update_test_update_last_removed(): int { return \Drupal::state()->get('equivalent_update_test_update_last_removed', 100000); } diff --git a/core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.module b/core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.module deleted file mode 100644 index cd399da49574adfc41f5279cbb6e3d2d7b49e8f8..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Experimental Test Requirements module to test hook_requirements(). - */ - -declare(strict_types=1); - -/** - * Implements hook_help(). - */ -function experimental_module_requirements_test_help($route_name) { - switch ($route_name) { - case 'help.page.experimental_module_requirements_test': - // Make the help text conform to core standards. - return t('The Experimental Requirements Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Requirements Test module</a>.', [':url' => 'http://www.example.com']); - } -} diff --git a/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php b/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..cfd042c50e36ab98cbb2d75b57c6707aa8ef1bf8 --- /dev/null +++ b/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\experimental_module_requirements_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for experimental_module_requirements_test. + */ +class ExperimentalModuleRequirementsTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name) { + switch ($route_name) { + case 'help.page.experimental_module_requirements_test': + // Make the help text conform to core standards. + return t('The Experimental Requirements Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Requirements Test module</a>.', [':url' => 'http://www.example.com']); + } + } + +} diff --git a/core/modules/system/tests/modules/experimental_module_test/experimental_module_test.module b/core/modules/system/tests/modules/experimental_module_test/experimental_module_test.module deleted file mode 100644 index 981b4191999af1ecfc25ad1a524b8d6645d9da43..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/experimental_module_test/experimental_module_test.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Experimental Test module to test the Core (Experimental) package. - */ - -declare(strict_types=1); - -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function experimental_module_test_help($route_name, RouteMatchInterface $route_match) { - - switch ($route_name) { - case 'help.page.experimental_module_test': - // Make the help text conform to core standards. - return t('The Experimental Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Test module</a>.', [':url' => 'http://www.example.com']); - } - -} diff --git a/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php b/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6dbd3f5b1a6f8ce08a38f260e52493727e6e971b --- /dev/null +++ b/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\experimental_module_test\Hook; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for experimental_module_test. + */ +class ExperimentalModuleTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.experimental_module_test': + // Make the help text conform to core standards. + return t('The Experimental Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Test module</a>.', [':url' => 'http://www.example.com']); + } + } + +} diff --git a/core/modules/system/tests/modules/form_test/form_test.module b/core/modules/system/tests/modules/form_test/form_test.module index 834c0433e8784cdae6c709df759f5a6473d3be28..8ccfc8e48d93e57ab9702bd67c806dd1f1f9f918 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -9,36 +9,6 @@ use Drupal\Core\Form\FormStateInterface; -/** - * Implements hook_form_FORM_ID_alter(). - */ -function block_form_form_test_alter_form_alter(&$form, FormStateInterface $form_state) { - \Drupal::messenger()->addStatus('block_form_form_test_alter_form_alter() executed.'); -} - -/** - * Implements hook_form_alter(). - */ -function form_test_form_alter(&$form, FormStateInterface $form_state, $form_id) { - if ($form_id == 'form_test_alter_form') { - \Drupal::messenger()->addStatus('form_test_form_alter() executed.'); - } -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function form_test_form_form_test_alter_form_alter(&$form, FormStateInterface $form_state) { - \Drupal::messenger()->addStatus('form_test_form_form_test_alter_form_alter() executed.'); -} - -/** - * Implements hook_form_FORM_ID_alter(). - */ -function system_form_form_test_alter_form_alter(&$form, FormStateInterface $form_state) { - \Drupal::messenger()->addStatus('system_form_form_test_alter_form_alter() executed.'); -} - /** * Create a header and options array. Helper function for callbacks. */ @@ -77,17 +47,6 @@ function _form_test_tableselect_get_data() { return [$header, $options]; } -/** - * Implements hook_form_FORM_ID_alter() for the registration form. - */ -function form_test_form_user_register_form_alter(&$form, FormStateInterface $form_state) { - $form['test_rebuild'] = [ - '#type' => 'submit', - '#value' => t('Rebuild'), - '#submit' => ['form_test_user_register_form_rebuild'], - ]; -} - /** * Submit callback that just lets the form rebuild. */ @@ -96,17 +55,6 @@ function form_test_user_register_form_rebuild($form, FormStateInterface $form_st $form_state->setRebuild(); } -/** - * Implements hook_form_FORM_ID_alter() for form_test_vertical_tabs_access_form(). - */ -function form_test_form_form_test_vertical_tabs_access_form_alter(&$form, &$form_state, $form_id) { - $form['vertical_tabs1']['#access'] = FALSE; - $form['vertical_tabs2']['#access'] = FALSE; - $form['tabs3']['#access'] = TRUE; - $form['fieldset1']['#access'] = FALSE; - $form['container']['#access'] = FALSE; -} - /** * Ajax callback that returns the form element. */ diff --git a/core/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php b/core/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php index 7a93c1d32e157658316ef07965e6c4c39bbecc0e..6de8e4ad1855ab9029d6ceff183c78fea4264a69 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php @@ -732,6 +732,15 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => 'Enable textarea', ]; + $form['password_confirm'] = [ + '#title' => $this->t('Enter password'), + '#type' => 'password_confirm', + '#states' => [ + 'visible' => [ + ':input[name="checkbox_trigger"]' => ['checked' => FALSE], + ], + ], + ]; $form['test_select_visible_dependence']['select_visible_1'] = [ '#type' => 'select', '#title' => 'Select visible 1', diff --git a/core/modules/system/tests/modules/form_test/src/Hook/FormTestHooks.php b/core/modules/system/tests/modules/form_test/src/Hook/FormTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..140ddb02dcdb21e9d331f7d4b2a19c2d1cb64aa6 --- /dev/null +++ b/core/modules/system/tests/modules/form_test/src/Hook/FormTestHooks.php @@ -0,0 +1,75 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\form_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for form_test. + */ +class FormTestHooks { + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_form_test_alter_form_alter', module: 'block')] + public function blockFormFormTestAlterFormAlter(&$form, FormStateInterface $form_state) : void { + \Drupal::messenger()->addStatus('block_form_form_test_alter_form_alter() executed.'); + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + if ($form_id == 'form_test_alter_form') { + \Drupal::messenger()->addStatus('form_test_form_alter() executed.'); + } + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_form_test_alter_form_alter')] + public function formFormTestAlterFormAlter(&$form, FormStateInterface $form_state) : void { + \Drupal::messenger()->addStatus('form_test_form_form_test_alter_form_alter() executed.'); + } + + /** + * Implements hook_form_FORM_ID_alter(). + */ + #[Hook('form_form_test_alter_form_alter', module: 'system')] + public function systemFormFormTestAlterFormAlter(&$form, FormStateInterface $form_state) : void { + \Drupal::messenger()->addStatus('system_form_form_test_alter_form_alter() executed.'); + } + + /** + * Implements hook_form_FORM_ID_alter() for the registration form. + */ + #[Hook('form_user_register_form_alter')] + public function formUserRegisterFormAlter(&$form, FormStateInterface $form_state) : void { + $form['test_rebuild'] = [ + '#type' => 'submit', + '#value' => t('Rebuild'), + '#submit' => [ + 'form_test_user_register_form_rebuild', + ], + ]; + } + + /** + * Implements hook_form_FORM_ID_alter() for form_test_vertical_tabs_access_form(). + */ + #[Hook('form_form_test_vertical_tabs_access_form_alter')] + public function formFormTestVerticalTabsAccessFormAlter(&$form, &$form_state, $form_id) : void { + $form['vertical_tabs1']['#access'] = FALSE; + $form['vertical_tabs2']['#access'] = FALSE; + $form['tabs3']['#access'] = TRUE; + $form['fieldset1']['#access'] = FALSE; + $form['container']['#access'] = FALSE; + } + +} diff --git a/core/modules/system/tests/modules/form_test/src/Plugin/Block/RedirectFormBlock.php b/core/modules/system/tests/modules/form_test/src/Plugin/Block/RedirectFormBlock.php index 5c0d84f3054984e1b744e1ec1f84847665628ddc..6aacf7edd9ae9967ef6ac0e6dbec8abadb20d4b3 100644 --- a/core/modules/system/tests/modules/form_test/src/Plugin/Block/RedirectFormBlock.php +++ b/core/modules/system/tests/modules/form_test/src/Plugin/Block/RedirectFormBlock.php @@ -36,7 +36,7 @@ class RedirectFormBlock extends BlockBase implements ContainerFactoryPluginInter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Form\FormBuilderInterface $form_builder diff --git a/core/modules/system/tests/modules/hold_test/hold_test.install b/core/modules/system/tests/modules/hold_test/hold_test.install index cc7d9045e7539a39144918d1539de662ff67eec7..64ef37da27047bcaa3f1d49c72dd7c5d9f6e6ff1 100644 --- a/core/modules/system/tests/modules/hold_test/hold_test.install +++ b/core/modules/system/tests/modules/hold_test/hold_test.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function hold_test_install() { +function hold_test_install(): void { hold_test_request(FALSE); hold_test_response(FALSE); } diff --git a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php index c8c6bd32302193ebfd59099403078f3ca505fc04..908d0d8d45451d352ae0e836a18c254dedf845ec 100644 --- a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php +++ b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php @@ -57,7 +57,7 @@ class TestToolkit extends ImageToolkitBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface $operation_manager diff --git a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.module b/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.module deleted file mode 100644 index 7c643f423fea575ee877041454ac1ad809233e3a..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.module +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @file - * Helper module for jQuery 3.6 FunctionalJavascript test compatibility. - */ - -declare(strict_types=1); - -/** - * Implements hook_library_info_alter(). - */ -function jquery_keyevent_polyfill_test_library_info_alter(&$libraries, $module) { - if ($module == 'core' && isset($libraries['jquery'])) { - $libraries['jquery']['dependencies'][] = 'jquery_keyevent_polyfill_test/jquery.keyevent.polyfill'; - } -} diff --git a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/src/Hook/JqueryKeyeventPolyfillTestHooks.php b/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/src/Hook/JqueryKeyeventPolyfillTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..64d23aef929920c40f34329401d9816abe35bc52 --- /dev/null +++ b/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/src/Hook/JqueryKeyeventPolyfillTestHooks.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\jquery_keyevent_polyfill_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for jquery_keyevent_polyfill_test. + */ +class JqueryKeyeventPolyfillTestHooks { + + /** + * Implements hook_library_info_alter(). + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(&$libraries, $module) { + if ($module == 'core' && isset($libraries['jquery'])) { + $libraries['jquery']['dependencies'][] = 'jquery_keyevent_polyfill_test/jquery.keyevent.polyfill'; + } + } + +} diff --git a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module deleted file mode 100644 index be3ef20c301c6cac0f7365c6848d6bcc36e5931c..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * @file - * Helper module for the JavaScript deprecation tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_js_settings_alter(). - */ -function js_deprecation_test_js_settings_alter(&$settings) { - $settings['suppressDeprecationErrors'] = FALSE; -} diff --git a/core/modules/system/tests/modules/js_deprecation_test/src/Hook/JsDeprecationTestHooks.php b/core/modules/system/tests/modules/js_deprecation_test/src/Hook/JsDeprecationTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..191382e24bfea74118dc27646771bcd12f68b09a --- /dev/null +++ b/core/modules/system/tests/modules/js_deprecation_test/src/Hook/JsDeprecationTestHooks.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\js_deprecation_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for js_deprecation_test. + */ +class JsDeprecationTestHooks { + + /** + * Implements hook_js_settings_alter(). + */ + #[Hook('js_settings_alter')] + public function jsSettingsAlter(&$settings) { + $settings['suppressDeprecationErrors'] = FALSE; + } + +} diff --git a/core/modules/system/tests/modules/js_testing_ajax_request_test/js_testing_ajax_request_test.module b/core/modules/system/tests/modules/js_testing_ajax_request_test/js_testing_ajax_request_test.module deleted file mode 100644 index 56e443667aab969378db048f392de1e8cdc1b908..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/js_testing_ajax_request_test/js_testing_ajax_request_test.module +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * @file - * Helper module for the JavaScript AJAX request tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments(). - */ -function js_testing_ajax_request_test_page_attachments(array &$attachments) { - // Unconditionally attach an asset to the page. - $attachments['#attached']['library'][] = 'js_testing_ajax_request_test/track_ajax_requests'; -} diff --git a/core/modules/system/tests/modules/js_testing_ajax_request_test/src/Hook/JsTestingAjaxRequestTestHooks.php b/core/modules/system/tests/modules/js_testing_ajax_request_test/src/Hook/JsTestingAjaxRequestTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f7bf260b478368aec7c21c26fb5b6026eeb16cab --- /dev/null +++ b/core/modules/system/tests/modules/js_testing_ajax_request_test/src/Hook/JsTestingAjaxRequestTestHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\js_testing_ajax_request_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for js_testing_ajax_request_test. + */ +class JsTestingAjaxRequestTestHooks { + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$attachments) { + // Unconditionally attach an asset to the page. + $attachments['#attached']['library'][] = 'js_testing_ajax_request_test/track_ajax_requests'; + } + +} diff --git a/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module deleted file mode 100644 index 92f683a3c99219a5df7169211420ca742f35fc05..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Helper module for the JavaScript deprecation tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments(). - */ -function js_testing_log_test_page_attachments(array &$attachments) { - // Unconditionally attach an asset to the page. - $attachments['#attached']['library'][] = 'js_testing_log_test/deprecation_log'; -} - -/** - * Implements hook_js_settings_alter(). - */ -function js_testing_log_test_js_settings_alter(&$settings) { - $settings['suppressDeprecationErrors'] = FALSE; -} diff --git a/core/modules/system/tests/modules/js_testing_log_test/src/Hook/JsTestingLogTestHooks.php b/core/modules/system/tests/modules/js_testing_log_test/src/Hook/JsTestingLogTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..278651fa889ce4e49d0e60748ffd074b357f7ca9 --- /dev/null +++ b/core/modules/system/tests/modules/js_testing_log_test/src/Hook/JsTestingLogTestHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\js_testing_log_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for js_testing_log_test. + */ +class JsTestingLogTestHooks { + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$attachments) { + // Unconditionally attach an asset to the page. + $attachments['#attached']['library'][] = 'js_testing_log_test/deprecation_log'; + } + + /** + * Implements hook_js_settings_alter(). + */ + #[Hook('js_settings_alter')] + public function jsSettingsAlter(&$settings) { + $settings['suppressDeprecationErrors'] = FALSE; + } + +} diff --git a/core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module b/core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module deleted file mode 100644 index 44ebff26546f5e0e472c18fa0654c6ba16bfdfb7..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Sets up the key value entity storage. - */ - -declare(strict_types=1); - -/** - * Implements hook_entity_type_alter(). - */ -function keyvalue_test_entity_type_alter(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - if (isset($entity_types['entity_test_label'])) { - $entity_types['entity_test_label']->setStorageClass('Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage'); - $entity_keys = $entity_types['entity_test_label']->getKeys(); - $entity_types['entity_test_label']->set('entity_keys', $entity_keys + ['uuid' => 'uuid']); - $entity_types['entity_test_label']->set('provider', 'keyvalue_test'); - } -} diff --git a/core/modules/system/tests/modules/keyvalue_test/src/Hook/KeyvalueTestHooks.php b/core/modules/system/tests/modules/keyvalue_test/src/Hook/KeyvalueTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c8c919165ed93af635de46f893660351604b0119 --- /dev/null +++ b/core/modules/system/tests/modules/keyvalue_test/src/Hook/KeyvalueTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\keyvalue_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for keyvalue_test. + */ +class KeyvalueTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + if (isset($entity_types['entity_test_label'])) { + $entity_types['entity_test_label']->setStorageClass('Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage'); + $entity_keys = $entity_types['entity_test_label']->getKeys(); + $entity_types['entity_test_label']->set('entity_keys', $entity_keys + ['uuid' => 'uuid']); + $entity_types['entity_test_label']->set('provider', 'keyvalue_test'); + } + } + +} diff --git a/core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module b/core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module deleted file mode 100644 index b611fe08e376bc13c0e55e0865e1a763609af8fd..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Helper module for the lazy route provider tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function lazy_route_provider_install_test_menu_links_discovered_alter(&$links) { - $message = \Drupal::state()->get(__FUNCTION__, 'success'); - try { - // Ensure that calling this does not cause a recursive rebuild. - \Drupal::service('router.route_provider')->getAllRoutes(); - } - catch (\RuntimeException) { - $message = 'failed'; - } - \Drupal::state()->set(__FUNCTION__, $message); -} diff --git a/core/modules/system/tests/modules/lazy_route_provider_install_test/src/Hook/LazyRouteProviderInstallTestHooks.php b/core/modules/system/tests/modules/lazy_route_provider_install_test/src/Hook/LazyRouteProviderInstallTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..bae8f9a8fc2cb98b66271e0168790ba77ecd1cc2 --- /dev/null +++ b/core/modules/system/tests/modules/lazy_route_provider_install_test/src/Hook/LazyRouteProviderInstallTestHooks.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\lazy_route_provider_install_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for lazy_route_provider_install_test. + */ +class LazyRouteProviderInstallTestHooks { + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(&$links) { + $message = \Drupal::state()->get('lazy_route_provider_install_test_menu_links_discovered_alter', 'success'); + try { + // Ensure that calling this does not cause a recursive rebuild. + \Drupal::service('router.route_provider')->getAllRoutes(); + } + catch (\RuntimeException) { + $message = 'failed'; + } + \Drupal::state()->set('lazy_route_provider_install_test_menu_links_discovered_alter', $message); + } + +} diff --git a/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.info.yml b/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..e022f145644a0db5035c20afc5e2bae7de163f70 --- /dev/null +++ b/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.info.yml @@ -0,0 +1,5 @@ +name: 'LegacyHook attribute test' +type: module +description: 'LegacyHook attribute test module' +package: test +core_version_requirement: ^10 || ^11 diff --git a/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.module b/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.module new file mode 100644 index 0000000000000000000000000000000000000000..1f91db50ca913b1faeae1cd7fd742fa42c0c2e66 --- /dev/null +++ b/core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.module @@ -0,0 +1,18 @@ +<?php + +/** + * @file + */ + +declare(strict_types=1); + +use Drupal\Core\Hook\Attribute\LegacyHook; + +#[LegacyHook] +function legacy_hook_test_test1(): void { + 1 / 0; +} + +function legacy_hook_test_test2(): string { + return 'ok'; +} diff --git a/core/modules/system/tests/modules/link_generation_test/link_generation_test.module b/core/modules/system/tests/modules/link_generation_test/link_generation_test.module deleted file mode 100644 index 3fb66e1ab0634836837ba21313babcff7fff8691..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/link_generation_test/link_generation_test.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Helper module for the link generation tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_link_alter(). - */ -function link_generation_test_link_alter(&$variables) { - if (\Drupal::state()->get('link_generation_test_link_alter', FALSE)) { - // Add a text to the end of links. - if (\Drupal::state()->get('link_generation_test_link_alter_safe', FALSE)) { - $variables['text'] = t('@text <strong>Test!</strong>', ['@text' => $variables['text']]); - } - else { - $variables['text'] .= ' <strong>Test!</strong>'; - } - } -} diff --git a/core/modules/system/tests/modules/link_generation_test/src/Hook/LinkGenerationTestHooks.php b/core/modules/system/tests/modules/link_generation_test/src/Hook/LinkGenerationTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..c402e6a21287b32b1096309474e803692712b1f6 --- /dev/null +++ b/core/modules/system/tests/modules/link_generation_test/src/Hook/LinkGenerationTestHooks.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\link_generation_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for link_generation_test. + */ +class LinkGenerationTestHooks { + + /** + * Implements hook_link_alter(). + */ + #[Hook('link_alter')] + public function linkAlter(&$variables) { + if (\Drupal::state()->get('link_generation_test_link_alter', FALSE)) { + // Add a text to the end of links. + if (\Drupal::state()->get('link_generation_test_link_alter_safe', FALSE)) { + $variables['text'] = t('@text <strong>Test!</strong>', ['@text' => $variables['text']]); + } + else { + $variables['text'] .= ' <strong>Test!</strong>'; + } + } + } + +} diff --git a/core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module b/core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module deleted file mode 100644 index 4e289a842b07e42d9b47860771c5eab87bd4e394..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Helper module for the catching mail that needs to be cancelled. - */ - -declare(strict_types=1); - -/** - * Implements hook_mail_alter(). - * - * Aborts sending of messages with ID 'mail_cancel_test_cancel_test'. - * - * @see MailTestCase::testCancelMessage() - */ -function mail_cancel_test_mail_alter(&$message) { - if ($message['id'] == 'mail_cancel_test_cancel_test') { - $message['send'] = FALSE; - } -} diff --git a/core/modules/system/tests/modules/mail_cancel_test/src/Hook/MailCancelTestHooks.php b/core/modules/system/tests/modules/mail_cancel_test/src/Hook/MailCancelTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a95f2763fda8195ffa7efd33705d24e8586799e1 --- /dev/null +++ b/core/modules/system/tests/modules/mail_cancel_test/src/Hook/MailCancelTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\mail_cancel_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for mail_cancel_test. + */ +class MailCancelTestHooks { + + /** + * Implements hook_mail_alter(). + * + * Aborts sending of messages with ID 'mail_cancel_test_cancel_test'. + * + * @see MailTestCase::testCancelMessage() + */ + #[Hook('mail_alter')] + public function mailAlter(&$message) { + if ($message['id'] == 'mail_cancel_test_cancel_test') { + $message['send'] = FALSE; + } + } + +} diff --git a/core/modules/system/tests/modules/mail_html_test/mail_html_test.module b/core/modules/system/tests/modules/mail_html_test/mail_html_test.module deleted file mode 100644 index b6802095172bf1732b5fdeb5a7e70d409efdf4ba..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/mail_html_test/mail_html_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Helper module for the html mail and URL conversion tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_mail(). - */ -function mail_html_test_mail($key, &$message, $params) { - switch ($key) { - case 'render_from_message_param': - $message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']); - break; - } -} diff --git a/core/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php b/core/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ad762ccfe617bdaf668a112a2b13f53a65ff2559 --- /dev/null +++ b/core/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\mail_html_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for mail_html_test. + */ +class MailHtmlTestHooks { + + /** + * Implements hook_mail(). + */ + #[Hook('mail')] + public function mail($key, &$message, $params) { + switch ($key) { + case 'render_from_message_param': + $message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']); + break; + } + } + +} diff --git a/core/modules/system/tests/modules/many_assets_test/many_assets_test.module b/core/modules/system/tests/modules/many_assets_test/many_assets_test.module deleted file mode 100644 index 1621b095619b380b80fb94e4b076ea42d800bc5c..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/many_assets_test/many_assets_test.module +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * Helper module for asset load order test. - */ - -declare(strict_types=1); - -/** - * Implements hook_library_info_build(). - */ -function many_assets_test_library_info_build() { - $libraries = []; - // Load the local javascript as an "external" asset varied by query string. - $base_javascript = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.module')->getPath('many_assets_test') . '/js/noop.js'; - $base_css = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.module')->getPath('many_assets_test') . '/css/noop.css'; - - // Build a library dependency containing 100 javascript assets. - for ($i = 1; $i <= 150; $i++) { - $libraries['many-dependencies']['js'][$base_javascript . '?dep' . $i] = [ - 'type' => 'external', - ]; - $libraries['many-dependencies']['css']['component'][$base_css . '?dep' . $i] = [ - 'type' => 'external', - ]; - } - - return $libraries; -} diff --git a/core/modules/system/tests/modules/many_assets_test/src/Hook/ManyAssetsTestHooks.php b/core/modules/system/tests/modules/many_assets_test/src/Hook/ManyAssetsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..4582934a2ecf1bf37d5c0652be083208b4f9d8ea --- /dev/null +++ b/core/modules/system/tests/modules/many_assets_test/src/Hook/ManyAssetsTestHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\many_assets_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for many_assets_test. + */ +class ManyAssetsTestHooks { + + /** + * Implements hook_library_info_build(). + */ + #[Hook('library_info_build')] + public function libraryInfoBuild() { + $libraries = []; + // Load the local javascript as an "external" asset varied by query string. + $base_javascript = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.module')->getPath('many_assets_test') . '/js/noop.js'; + $base_css = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.module')->getPath('many_assets_test') . '/css/noop.css'; + // Build a library dependency containing 100 javascript assets. + for ($i = 1; $i <= 150; $i++) { + $libraries['many-dependencies']['js'][$base_javascript . '?dep' . $i] = ['type' => 'external']; + $libraries['many-dependencies']['css']['component'][$base_css . '?dep' . $i] = ['type' => 'external']; + } + return $libraries; + } + +} diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index d188250500ae300dbf0d15a1ddd852781dd3fcbd..1707582d7fa283cc5587d40dc846298a6de22bdf 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -7,53 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Cache\RefinableCacheableDependencyInterface; -use Drupal\Core\Url; - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function menu_test_menu_links_discovered_alter(&$links) { - // Many of the machine names here are slightly different from the route name. - // Since the machine name is arbitrary, this helps ensure that core does not - // add mistaken assumptions about the correlation. - $links['menu_test.menu_name_test']['menu_name'] = menu_test_menu_name(); - $links['menu_test.context']['title'] = \Drupal::config('menu_test.menu_item')->get('title'); - - // Adds a custom menu link. - $links['menu_test.custom'] = [ - 'title' => 'Custom link', - 'route_name' => 'menu_test.custom', - 'description' => 'Custom link used to check the integrity of manually added menu links.', - 'parent' => 'menu_test', - ]; -} - -/** - * Implements hook_menu_local_tasks_alter(). - */ -function menu_test_menu_local_tasks_alter(&$data, $route_name, RefinableCacheableDependencyInterface &$cacheability) { - if (in_array($route_name, ['menu_test.tasks_default'])) { - $data['tabs'][0]['foo'] = [ - '#theme' => 'menu_local_task', - '#link' => [ - 'title' => "Task 1 <script>alert('Welcome to the jungle!')</script>", - 'url' => Url::fromRoute('menu_test.router_test1', ['bar' => '1']), - ], - '#weight' => 10, - ]; - $data['tabs'][0]['bar'] = [ - '#theme' => 'menu_local_task', - '#link' => [ - 'title' => 'Task 2', - 'url' => Url::fromRoute('menu_test.router_test2', ['bar' => '2']), - ], - '#weight' => 20, - ]; - } - $cacheability->addCacheTags(['kittens:dwarf-cat']); -} - /** * Sets a static variable for the testMenuName() test. * diff --git a/core/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php b/core/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..654c42218de9922168d4f0d486f3037ed7b33931 --- /dev/null +++ b/core/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php @@ -0,0 +1,65 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\menu_test\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Cache\RefinableCacheableDependencyInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for menu_test. + */ +class MenuTestHooks { + + /** + * Implements hook_menu_links_discovered_alter(). + */ + #[Hook('menu_links_discovered_alter')] + public function menuLinksDiscoveredAlter(&$links) { + // Many of the machine names here are slightly different from the route name. + // Since the machine name is arbitrary, this helps ensure that core does not + // add mistaken assumptions about the correlation. + $links['menu_test.menu_name_test']['menu_name'] = menu_test_menu_name(); + $links['menu_test.context']['title'] = \Drupal::config('menu_test.menu_item')->get('title'); + // Adds a custom menu link. + $links['menu_test.custom'] = [ + 'title' => 'Custom link', + 'route_name' => 'menu_test.custom', + 'description' => 'Custom link used to check the integrity of manually added menu links.', + 'parent' => 'menu_test', + ]; + } + + /** + * Implements hook_menu_local_tasks_alter(). + */ + #[Hook('menu_local_tasks_alter')] + public function menuLocalTasksAlter(&$data, $route_name, RefinableCacheableDependencyInterface &$cacheability) { + if (in_array($route_name, ['menu_test.tasks_default'])) { + $data['tabs'][0]['foo'] = [ + '#theme' => 'menu_local_task', + '#link' => [ + 'title' => "Task 1 <script>alert('Welcome to the jungle!')</script>", + 'url' => Url::fromRoute('menu_test.router_test1', [ + 'bar' => '1', + ]), + ], + '#weight' => 10, + ]; + $data['tabs'][0]['bar'] = [ + '#theme' => 'menu_local_task', + '#link' => [ + 'title' => 'Task 2', + 'url' => Url::fromRoute('menu_test.router_test2', [ + 'bar' => '2', + ]), + ], + '#weight' => 20, + ]; + } + $cacheability->addCacheTags(['kittens:dwarf-cat']); + } + +} diff --git a/core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalActionWithConfig.php b/core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalActionWithConfig.php index e1d9077b2c2809dea5b68ab4b381b5e0be3ab097..35e7c1c38a77b1ed64449e35ce6ecbc17fc8927b 100644 --- a/core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalActionWithConfig.php +++ b/core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalActionWithConfig.php @@ -33,7 +33,7 @@ public function getTitle(?Request $request = NULL) { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install index f188d06985954ace8012442451643f1b2be88966..c78001b255a389a0954d95a58afea3d4d994a654 100644 --- a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install +++ b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install @@ -10,7 +10,7 @@ /** * Implements hook_install(). */ -function module_handler_test_multiple_install() { +function module_handler_test_multiple_install(): void { // Set weight of module. module_set_weight('module_handler_test_multiple', 1); } diff --git a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install index 01e22777100565ef76cae54cee9893224a674d08..a264dba00ef68382bc85f32f7ddee8ac15335edc 100644 --- a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install +++ b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install @@ -13,7 +13,7 @@ /** * Implements hook_install(). */ -function module_handler_test_multiple_child_install() { +function module_handler_test_multiple_child_install(): void { // Set weight of module. module_set_weight('module_handler_test_multiple_child', 1); } diff --git a/core/modules/system/tests/modules/module_installer_config_test/src/Entity/TestConfigType.php b/core/modules/system/tests/modules/module_installer_config_test/src/Entity/TestConfigType.php index b43f102e3915bec7d613927a8050fb2b1343efd2..c842f64c5c783450a1c8cf3a0db91c3d85090cb0 100644 --- a/core/modules/system/tests/modules/module_installer_config_test/src/Entity/TestConfigType.php +++ b/core/modules/system/tests/modules/module_installer_config_test/src/Entity/TestConfigType.php @@ -4,28 +4,30 @@ namespace Drupal\module_installer_config_test\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityListBuilder; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; /** * Defines a configuration-based entity type used for testing. - * - * @ConfigEntityType( - * id = "test_config_type", - * label = @Translation("Test entity type"), - * handlers = { - * "list_builder" = "Drupal\Core\Entity\EntityListBuilder" - * }, - * admin_permission = "administer modules", - * config_prefix = "type", - * entity_keys = { - * "id" = "id", - * "label" = "name" - * }, - * config_export = { - * "id", - * "label", - * } - * ) */ +#[ConfigEntityType( + id: 'test_config_type', + label: new TranslatableMarkup('Test entity type'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'id', + 'label' => 'name', + ], + handlers: [ + 'list_builder' => EntityListBuilder::class, + ], + admin_permission: 'administer modules', + config_export: [ + 'id', + 'label', + ], +)] class TestConfigType extends ConfigEntityBase { } diff --git a/core/modules/system/tests/modules/module_required_test/module_required_test.module b/core/modules/system/tests/modules/module_required_test/module_required_test.module deleted file mode 100644 index 3bbf43b4eae3854666c25ff8aa716f2581f5d4fd..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/module_required_test/module_required_test.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - * - * Manipulate module dependencies to test dependency chains. - */ -function module_required_test_system_info_alter(&$info, Extension $file, $type) { - if ($file->getName() == 'module_required_test' && \Drupal::state()->get('module_required_test.hook_system_info_alter')) { - $info['required'] = TRUE; - $info['explanation'] = 'Testing hook_system_info_alter()'; - } -} diff --git a/core/modules/system/tests/modules/module_required_test/src/Hook/ModuleRequiredTestHooks.php b/core/modules/system/tests/modules/module_required_test/src/Hook/ModuleRequiredTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..29c30b4936085474035cacc95caaf04cf1fd89d2 --- /dev/null +++ b/core/modules/system/tests/modules/module_required_test/src/Hook/ModuleRequiredTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\module_required_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for module_required_test. + */ +class ModuleRequiredTestHooks { + + /** + * Implements hook_system_info_alter(). + * + * Manipulate module dependencies to test dependency chains. + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + if ($file->getName() == 'module_required_test' && \Drupal::state()->get('module_required_test.hook_system_info_alter')) { + $info['required'] = TRUE; + $info['explanation'] = 'Testing hook_system_info_alter()'; + } + } + +} diff --git a/core/modules/system/tests/modules/module_test/module_test.install b/core/modules/system/tests/modules/module_test/module_test.install index 42ea0c451058e5019500d6a1c46898cee696b383..7c3638e88d9b3743fed66e8f3b53eaf3dc362ae5 100644 --- a/core/modules/system/tests/modules/module_test/module_test.install +++ b/core/modules/system/tests/modules/module_test/module_test.install @@ -31,7 +31,7 @@ function module_test_schema() { /** * Implements hook_install(). */ -function module_test_install() { +function module_test_install(): void { $schema = module_test_schema()['module_test']; Database::getConnection()->insert('module_test') ->fields([ diff --git a/core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module b/core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module deleted file mode 100644 index d1ad0923ccd7999aeb89167fcbaa82e8d80ed1c7..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for testing the off-canvas area. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments(). - */ -function off_canvas_test_page_attachments(array &$attachments) { - // This library wraps around the Drupal.offCanvas.resetSize() method and adds - // a special data-resize-done attribute to help functional JavaScript tests - // use the off-canvas area when it is fully loaded and ready to be interacted - // with. - // @see \Drupal\Tests\system\Traits\OffCanvasTestTrait::waitForOffCanvasArea() - $attachments['#attached']['library'][] = 'off_canvas_test/resize_helper'; -} diff --git a/core/modules/system/tests/modules/off_canvas_test/src/Hook/OffCanvasTestHooks.php b/core/modules/system/tests/modules/off_canvas_test/src/Hook/OffCanvasTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..56de094eb9e8c059586e9d4b936274a4757053a4 --- /dev/null +++ b/core/modules/system/tests/modules/off_canvas_test/src/Hook/OffCanvasTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\off_canvas_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for off_canvas_test. + */ +class OffCanvasTestHooks { + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$attachments) { + // This library wraps around the Drupal.offCanvas.resetSize() method and adds + // a special data-resize-done attribute to help functional JavaScript tests + // use the off-canvas area when it is fully loaded and ready to be interacted + // with. + // @see \Drupal\Tests\system\Traits\OffCanvasTestTrait::waitForOffCanvasArea() + $attachments['#attached']['library'][] = 'off_canvas_test/resize_helper'; + } + +} diff --git a/core/modules/system/tests/modules/pager_test/pager_test.module b/core/modules/system/tests/modules/pager_test/pager_test.module index f8871e0e1e046e42d1719ca6e76ea32a1d6e27d9..583d40645f8cecf520b6054b6f839165a9cab98e 100644 --- a/core/modules/system/tests/modules/pager_test/pager_test.module +++ b/core/modules/system/tests/modules/pager_test/pager_test.module @@ -27,7 +27,7 @@ function pager_test_preprocess_pager(&$variables) { return; } - foreach ($variables['items']['pages'] as $index => &$pager_item) { + foreach ($variables['items']['pages'] as &$pager_item) { $pager_item['attributes']['pager-test'] = 'yes'; $pager_item['attributes']->addClass('lizards'); } diff --git a/core/modules/system/tests/modules/plugin_test/plugin_test.module b/core/modules/system/tests/modules/plugin_test/plugin_test.module deleted file mode 100644 index 992720ea888acca09805e8d3bc9ef548d4a83166..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/plugin_test/plugin_test.module +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/** - * @file - * Helper module for the plugin tests. - */ - -declare(strict_types=1); - -use Drupal\plugin_test\Plugin\plugin_test\fruit\Apple; - -/** - * Implements hook_test_plugin_info(). - */ -function plugin_test_test_plugin_info() { - return [ - 'apple' => [ - 'id' => 'apple', - 'class' => Apple::class, - ], - ]; -} - -/** - * Implements hook_plugin_test_alter(). - */ -function plugin_test_plugin_test_alter(&$definitions) { - foreach ($definitions as &$definition) { - $definition['altered'] = TRUE; - } - $definitions['user_login']['altered_single'] = TRUE; -} diff --git a/core/modules/system/tests/modules/plugin_test/src/Hook/PluginTestHooks.php b/core/modules/system/tests/modules/plugin_test/src/Hook/PluginTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5f9096b7243f1a7ab750be9a497280dd62a1026d --- /dev/null +++ b/core/modules/system/tests/modules/plugin_test/src/Hook/PluginTestHooks.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\plugin_test\Hook; + +use Drupal\plugin_test\Plugin\plugin_test\fruit\Apple; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for plugin_test. + */ +class PluginTestHooks { + + /** + * Implements hook_test_plugin_info(). + */ + #[Hook('test_plugin_info')] + public function testPluginInfo() { + return [ + 'apple' => [ + 'id' => 'apple', + 'class' => Apple::class, + ], + ]; + } + + /** + * Implements hook_plugin_test_alter(). + */ + #[Hook('plugin_test_alter')] + public function pluginTestAlter(&$definitions) { + foreach ($definitions as &$definition) { + $definition['altered'] = TRUE; + } + $definitions['user_login']['altered_single'] = TRUE; + } + +} diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example4.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example4.php index 0849a53de8187da531c22f5c3233afdbb485495c..d4be1e9adc6bde4f7e07124de5b1050c963352b0 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example4.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example4.php @@ -4,7 +4,7 @@ namespace Drupal\plugin_test\Plugin\plugin_test\custom_annotation; -use Drupal\plugin_test\Plugin; +use Drupal\plugin_test\Plugin\Attribute\PluginExample; /** * Provides a test plugin with a custom attribute. @@ -14,7 +14,7 @@ * * @see \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::parse() */ -#[Plugin\Attribute\PluginExample( +#[PluginExample( id: "example_4", custom: "Example 4" )] diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example5.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example5.php index 08eb4acc42108f60b84c20fceac8bb0da1dbf568..d62fcf484b02d22f5548d85efd96535520350d80 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example5.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example5.php @@ -4,6 +4,8 @@ namespace Drupal\plugin_test\Plugin\plugin_test\custom_annotation; +use Drupal\plugin_test\Plugin\Attribute\PluginExample; + /** * Provides a test plugin with a custom attribute. * @@ -13,7 +15,7 @@ * @see \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::parse() */ #[\Attribute] -#[\Drupal\plugin_test\Plugin\Attribute\PluginExample( +#[PluginExample( id: "example_5", custom: "Example 5" )] diff --git a/core/modules/system/tests/modules/requirements1_test/requirements1_test.module b/core/modules/system/tests/modules/requirements1_test/requirements1_test.module deleted file mode 100644 index 9e89c58144c18d41f81acb1f3b0cfb052049c02d..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/requirements1_test/requirements1_test.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Hook implementations for requirements1_test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_requirements_alter(). - */ -function requirements1_test_requirements_alter(array &$requirements): void { - // Change the title. - $requirements['requirements1_test_alterable']['title'] = t('Requirements 1 Test - Changed'); - // Decrease the severity. - $requirements['requirements1_test_alterable']['severity'] = REQUIREMENT_WARNING; - // Delete 'requirements1_test_deletable', - unset($requirements['requirements1_test_deletable']); -} diff --git a/core/modules/system/tests/modules/requirements1_test/src/Hook/Requirements1TestHooks.php b/core/modules/system/tests/modules/requirements1_test/src/Hook/Requirements1TestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f122ea913fbdba5782a12ff110c82c1ef28fbb7f --- /dev/null +++ b/core/modules/system/tests/modules/requirements1_test/src/Hook/Requirements1TestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\requirements1_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for requirements1_test. + */ +class Requirements1TestHooks { + + /** + * Implements hook_requirements_alter(). + */ + #[Hook('requirements_alter')] + public function requirementsAlter(array &$requirements) : void { + // Change the title. + $requirements['requirements1_test_alterable']['title'] = t('Requirements 1 Test - Changed'); + // Decrease the severity. + $requirements['requirements1_test_alterable']['severity'] = REQUIREMENT_WARNING; + // Delete 'requirements1_test_deletable', + unset($requirements['requirements1_test_deletable']); + } + +} diff --git a/core/modules/system/tests/modules/respond_install_uninstall_hook_test/respond_install_uninstall_hook_test.info.yml b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/respond_install_uninstall_hook_test.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..db65510cc4d3382406fb2926a4b69a3aef9175eb --- /dev/null +++ b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/respond_install_uninstall_hook_test.info.yml @@ -0,0 +1,5 @@ +name: 'Hooks in ModuleInstaller' +type: module +description: 'Test hooks invoked when modules are installed or uninstalled.' +package: Testing +version: VERSION diff --git a/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleInstalledHooks.php b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleInstalledHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..37023dc995f1e906f1e1b50dc21e3f24196a725b --- /dev/null +++ b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleInstalledHooks.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\respond_install_uninstall_hook_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for respond_install_uninstall_hook_test. + */ +class OtherModuleInstalledHooks { + + /** + * Implements hook_module_preinstall(). + */ + #[Hook('module_preinstall')] + public function modulePreinstall(): void { + // Set a global value we can check in test code. + $GLOBALS['hook_module_preinstall'] = 'hook_module_preinstall'; + } + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled(): void { + // Set a global value we can check in test code. + $GLOBALS['hook_modules_installed'] = 'hook_modules_installed'; + } + +} diff --git a/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleUninstalledHooks.php b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleUninstalledHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f68fe97468fc282083bfd50dbe0130af517ff2fa --- /dev/null +++ b/core/modules/system/tests/modules/respond_install_uninstall_hook_test/src/Hook/OtherModuleUninstalledHooks.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\respond_install_uninstall_hook_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for respond_install_uninstall_hook_test. + */ +class OtherModuleUninstalledHooks { + + /** + * Implements hook_module_preuninstall(). + */ + #[Hook('module_preuninstall')] + public function modulePreuninstall(): void { + // Set a global value we can check in test code. + $GLOBALS['hook_module_preuninstall'] = 'hook_module_preuninstall'; + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstall(): void { + // Set a global value we can check in test code. + $GLOBALS['hook_modules_uninstalled'] = 'hook_modules_uninstalled'; + } + + /** + * Implements hook_cache_flush(). + */ + #[Hook('cache_flush')] + public function cacheFlush(): void { + // Set a global value we can check in test code. + $GLOBALS['hook_cache_flush'] = 'hook_cache_flush'; + } + +} diff --git a/core/modules/system/tests/modules/router_installer_test/router_installer_test.module b/core/modules/system/tests/modules/router_installer_test/router_installer_test.module deleted file mode 100644 index c75f307a28422b8155d8e2b7541139885d03af6d..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/router_installer_test/router_installer_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Install, update and uninstall functions for the router_installer_test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Url; - -/** - * Implements hook_modules_installed(). - */ -function router_installer_test_modules_installed($modules) { - if (in_array('router_installer_test', $modules, TRUE)) { - // Ensure a URL can be generated for routes provided by the module during - // installation. - \Drupal::state()->set(__FUNCTION__, Url::fromRoute('router_installer_test.1')->toString()); - } -} diff --git a/core/modules/system/tests/modules/router_installer_test/src/Hook/RouterInstallerTestHooks.php b/core/modules/system/tests/modules/router_installer_test/src/Hook/RouterInstallerTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..644f1ada58a85a3d484f74b6ad53b0183a263dda --- /dev/null +++ b/core/modules/system/tests/modules/router_installer_test/src/Hook/RouterInstallerTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\router_installer_test\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for router_installer_test. + */ +class RouterInstallerTestHooks { + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + if (in_array('router_installer_test', $modules, TRUE)) { + // Ensure a URL can be generated for routes provided by the module during + // installation. + \Drupal::state()->set('router_installer_test_modules_installed', Url::fromRoute('router_installer_test.1')->toString()); + } + } + +} diff --git a/core/modules/system/tests/modules/router_test_directory/router_test.install b/core/modules/system/tests/modules/router_test_directory/router_test.install index 92fb50df8c3639dc4a5132967e4373dfd6afb45b..c87947bea13f674a364155aee154571b7260bdb9 100644 --- a/core/modules/system/tests/modules/router_test_directory/router_test.install +++ b/core/modules/system/tests/modules/router_test_directory/router_test.install @@ -12,7 +12,7 @@ /** * Implements hook_install(). */ -function router_test_install() { +function router_test_install(): void { // Ensure a URL can be generated for routes provided by the module during // installation. \Drupal::state()->set(__FUNCTION__, Url::fromRoute('router_test.1')->toString()); diff --git a/core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml b/core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml index 614e90029aceebf7ef482b216b7c7177ab99eed5..6cefdedb3b53d52128f45bf065d0f9fb12520b76 100644 --- a/core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml +++ b/core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml @@ -6,3 +6,28 @@ services: tags: - { name: needs_destruction } arguments: ['@state'] + # Used to test destructable service order. + service_provider_test_class_1: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: 50 } + service_provider_test_class_2: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: -10 } + service_provider_test_class_3: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: 0 } + service_provider_test_class_4: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: -100 } + service_provider_test_class_5: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: 100 } + service_provider_test_class_6: + parent: service_provider_test_class + tags: + - { name: needs_destruction, priority: -50 } diff --git a/core/modules/system/tests/modules/session_exists_cache_context_test/session_exists_cache_context_test.module b/core/modules/system/tests/modules/session_exists_cache_context_test/session_exists_cache_context_test.module deleted file mode 100644 index 047264ec71addd8b7d0cdb592b67ca838eebe140..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/session_exists_cache_context_test/session_exists_cache_context_test.module +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_top(). - */ -function session_exists_cache_context_test_page_top(array &$page_top) { - // Ensure this hook is invoked on every page load. - $page_top['#cache']['max-age'] = 0; - - $request = \Drupal::request(); - $session_exists = \Drupal::service('session_configuration')->hasSession($request); - $page_top['session_exists_cache_context_test'] = [ - 'label' => [ - '#markup' => '<p>' . ($session_exists ? 'Session exists!' : 'Session does not exist!') . '</p>', - ], - 'cache_context_value' => [ - '#markup' => '<code>[session.exists]=' . \Drupal::service('cache_context.session.exists')->getContext() . '</code>', - ], - ]; - - $request = \Drupal::request(); - if ($request->query->get('trigger_session')) { - $request->getSession()->set('session_exists_cache_context_test', TRUE); - } -} diff --git a/core/modules/system/tests/modules/session_exists_cache_context_test/src/Hook/SessionExistsCacheContextTestHooks.php b/core/modules/system/tests/modules/session_exists_cache_context_test/src/Hook/SessionExistsCacheContextTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..efd440564ae46bfa308025195de694e627c33ae4 --- /dev/null +++ b/core/modules/system/tests/modules/session_exists_cache_context_test/src/Hook/SessionExistsCacheContextTestHooks.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\session_exists_cache_context_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for session_exists_cache_context_test. + */ +class SessionExistsCacheContextTestHooks { + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + // Ensure this hook is invoked on every page load. + $page_top['#cache']['max-age'] = 0; + $request = \Drupal::request(); + $session_exists = \Drupal::service('session_configuration')->hasSession($request); + $page_top['session_exists_cache_context_test'] = [ + 'label' => [ + '#markup' => '<p>' . ($session_exists ? 'Session exists!' : 'Session does not exist!') . '</p>', + ], + 'cache_context_value' => [ + '#markup' => '<code>[session.exists]=' . \Drupal::service('cache_context.session.exists')->getContext() . '</code>', + ], + ]; + $request = \Drupal::request(); + if ($request->query->get('trigger_session')) { + $request->getSession()->set('session_exists_cache_context_test', TRUE); + } + } + +} diff --git a/core/modules/system/tests/modules/session_test/session_test.module b/core/modules/system/tests/modules/session_test/session_test.module deleted file mode 100644 index 5944510b4e0849cf51e2882c8a51be95f2b2db08..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/session_test/session_test.module +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -use Drupal\user\UserInterface; - -/** - * Implements hook_user_login(). - */ -function session_test_user_login(UserInterface $account) { - if ($account->getAccountName() == 'session_test_user') { - // Exit so we can verify that the session was regenerated - // before hook_user_login() was called. - exit; - } - // Add some data in the session for retrieval testing purpose. - \Drupal::request()->getSession()->set("session_test_key", "foobar"); -} diff --git a/core/modules/system/tests/modules/session_test/src/Hook/SessionTestHooks.php b/core/modules/system/tests/modules/session_test/src/Hook/SessionTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ab0cd6c59e1f3dec3b6210fa95ef48e74649b43d --- /dev/null +++ b/core/modules/system/tests/modules/session_test/src/Hook/SessionTestHooks.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\session_test\Hook; + +use Drupal\user\UserInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for session_test. + */ +class SessionTestHooks { + + /** + * Implements hook_user_login(). + */ + #[Hook('user_login')] + public function userLogin(UserInterface $account) { + if ($account->getAccountName() == 'session_test_user') { + // Exit so we can verify that the session was regenerated + // before hook_user_login() was called. + exit; + } + // Add some data in the session for retrieval testing purpose. + \Drupal::request()->getSession()->set("session_test_key", "foobar"); + } + +} diff --git a/core/modules/system/tests/modules/system_module_test/src/Hook/SystemModuleTestHooks.php b/core/modules/system/tests/modules/system_module_test/src/Hook/SystemModuleTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ac5ec35d60857240fa7f245a9797e9f55a264690 --- /dev/null +++ b/core/modules/system/tests/modules/system_module_test/src/Hook/SystemModuleTestHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\system_module_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for system_module_test. + */ +class SystemModuleTestHooks { + + /** + * Implements hook_page_attachments_alter(). + */ + #[Hook('page_attachments_alter')] + public function pageAttachmentsAlter(&$page) { + // Remove the HTML5 mobile meta-tags. + $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'ClearType']; + foreach ($page['#attached']['html_head'] as $index => $parts) { + if (in_array($parts[1], $meta_tags_to_remove)) { + unset($page['#attached']['html_head'][$index]); + } + } + } + +} diff --git a/core/modules/system/tests/modules/system_module_test/system_module_test.install b/core/modules/system/tests/modules/system_module_test/system_module_test.install index 931488918a53b2414e22e37fe898e89b2737be4a..63aafddae4f341987d80e9989c558b5d25683dac 100644 --- a/core/modules/system/tests/modules/system_module_test/system_module_test.install +++ b/core/modules/system/tests/modules/system_module_test/system_module_test.install @@ -12,6 +12,6 @@ /** * Implements hook_install(). */ -function system_module_test_install() { +function system_module_test_install(): void { Cache::invalidateTags(['rendered']); } diff --git a/core/modules/system/tests/modules/system_module_test/system_module_test.module b/core/modules/system/tests/modules/system_module_test/system_module_test.module deleted file mode 100644 index c2661cea233b1c789089d53b0cb475a6db4c6cd0..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/system_module_test/system_module_test.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * Provides System module hook implementations for testing purposes. - */ - -declare(strict_types=1); - -/** - * Implements hook_page_attachments_alter(). - */ -function system_module_test_page_attachments_alter(&$page) { - // Remove the HTML5 mobile meta-tags. - $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'ClearType']; - foreach ($page['#attached']['html_head'] as $index => $parts) { - if (in_array($parts[1], $meta_tags_to_remove)) { - unset($page['#attached']['html_head'][$index]); - } - } - -} diff --git a/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php b/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..31d7da782bf7a3623a33d164017dd319fcc0ac4b --- /dev/null +++ b/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php @@ -0,0 +1,154 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\system_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for system_test. + */ +class SystemTestHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.system_test': + $output = ''; + $output .= '<h2>' . t('Test Help Page') . '</h2>'; + $output .= '<p>' . t('This is a test help page for the system_test module for the purpose of testing if the "Help" link displays properly.') . '</p>'; + return $output; + } + } + + /** + * Implements hook_modules_installed(). + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + if (\Drupal::state()->get('system_test.verbose_module_hooks')) { + foreach ($modules as $module) { + \Drupal::messenger()->addStatus(t('hook_modules_installed fired for @module', ['@module' => $module])); + } + } + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled($modules, $is_syncing) { + if (\Drupal::state()->get('system_test.verbose_module_hooks')) { + foreach ($modules as $module) { + \Drupal::messenger()->addStatus(t('hook_modules_uninstalled fired for @module', ['@module' => $module])); + } + } + // Save the config.installer isSyncing() value to state to check that it is + // correctly set when installing module during config import. + \Drupal::state()->set('system_test_modules_uninstalled_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); + // Save the $is_syncing parameter value to state to check that it is correctly + // set when installing module during config import. + \Drupal::state()->set('system_test_modules_uninstalled_syncing_param', $is_syncing); + } + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + // We need a static otherwise the last test will fail to alter common_test. + static $test; + if (($dependencies = \Drupal::state()->get('system_test.dependencies')) || $test) { + if ($file->getName() == 'module_test') { + $info['hidden'] = FALSE; + $info['dependencies'][] = array_shift($dependencies); + \Drupal::state()->set('system_test.dependencies', $dependencies); + $test = TRUE; + } + if ($file->getName() == 'common_test') { + $info['hidden'] = FALSE; + $info['version'] = '8.x-2.4-beta3'; + } + } + // Make the system_dependencies_test visible by default. + if ($file->getName() == 'system_dependencies_test') { + $info['hidden'] = FALSE; + } + if (in_array($file->getName(), [ + 'system_incompatible_module_version_dependencies_test', + 'system_incompatible_core_version_dependencies_test', + 'system_incompatible_module_version_test', + ])) { + $info['hidden'] = FALSE; + } + if ($file->getName() == 'requirements1_test' || $file->getName() == 'requirements2_test') { + $info['hidden'] = FALSE; + } + if ($file->getName() == 'system_test') { + $info['hidden'] = \Drupal::state()->get('system_test.module_hidden', TRUE); + } + } + + /** + * Implements hook_page_attachments(). + */ + #[Hook('page_attachments')] + public function pageAttachments(array &$page) { + // Used by FrontPageTestCase to get the results of + // \Drupal::service('path.matcher')->isFrontPage(). + $frontpage = \Drupal::state()->get('system_test.front_page_output', 0); + if ($frontpage && \Drupal::service('path.matcher')->isFrontPage()) { + \Drupal::messenger()->addStatus(t('On front page.')); + } + } + + /** + * Implements hook_filetransfer_info(). + */ + #[Hook('filetransfer_info')] + public function filetransferInfo() { + return [ + 'system_test' => [ + 'title' => t('System Test FileTransfer'), + 'class' => 'Drupal\system_test\MockFileTransfer', + 'weight' => -10, + ], + ]; + } + + /** + * Implements hook_module_preinstall(). + */ + #[Hook('module_preinstall')] + public function modulePreinstall($module, bool $is_syncing) { + \Drupal::messenger()->addStatus('system_test_preinstall_module called'); + \Drupal::state()->set('system_test_preinstall_module', $module); + // Save the config.installer isSyncing() value to state to check that it is + // correctly set when installing module during config import. + \Drupal::state()->set('system_test_preinstall_module_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); + // Save the $is_syncing parameter value to state to check that it is correctly + // set when installing module during config import. + \Drupal::state()->set('system_test_preinstall_module_syncing_param', $is_syncing); + } + + /** + * Implements hook_module_preuninstall(). + */ + #[Hook('module_preuninstall')] + public function modulePreuninstall($module, bool $is_syncing) { + \Drupal::state()->set('system_test_preuninstall_module', $module); + // Save the config.installer isSyncing() value to state to check that it is + // correctly set when uninstalling module during config import. + \Drupal::state()->set('system_test_preuninstall_module_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); + // Save the $is_syncing parameter value to state to check that it is correctly + // set when installing module during config import. + \Drupal::state()->set('system_test_preuninstall_module_syncing_param', $is_syncing); + } + +} diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module index 6ba1e0c5e26407a06eaca39c85b9520cffb9a7ad..bf00733722ec5e9d5862457d15b63243172267d1 100644 --- a/core/modules/system/tests/modules/system_test/system_test.module +++ b/core/modules/system/tests/modules/system_test/system_test.module @@ -7,102 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Extension\Extension; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function system_test_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.system_test': - $output = ''; - $output .= '<h2>' . t('Test Help Page') . '</h2>'; - $output .= '<p>' . t('This is a test help page for the system_test module for the purpose of testing if the "Help" link displays properly.') . '</p>'; - return $output; - } -} - -/** - * Implements hook_modules_installed(). - */ -function system_test_modules_installed($modules) { - if (\Drupal::state()->get('system_test.verbose_module_hooks')) { - foreach ($modules as $module) { - \Drupal::messenger()->addStatus(t('hook_modules_installed fired for @module', ['@module' => $module])); - } - } -} - -/** - * Implements hook_modules_uninstalled(). - */ -function system_test_modules_uninstalled($modules, $is_syncing) { - if (\Drupal::state()->get('system_test.verbose_module_hooks')) { - foreach ($modules as $module) { - \Drupal::messenger()->addStatus(t('hook_modules_uninstalled fired for @module', ['@module' => $module])); - } - } - - // Save the config.installer isSyncing() value to state to check that it is - // correctly set when installing module during config import. - \Drupal::state()->set('system_test_modules_uninstalled_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); - - // Save the $is_syncing parameter value to state to check that it is correctly - // set when installing module during config import. - \Drupal::state()->set('system_test_modules_uninstalled_syncing_param', $is_syncing); -} - -/** - * Implements hook_system_info_alter(). - */ -function system_test_system_info_alter(&$info, Extension $file, $type) { - // We need a static otherwise the last test will fail to alter common_test. - static $test; - if (($dependencies = \Drupal::state()->get('system_test.dependencies')) || $test) { - if ($file->getName() == 'module_test') { - $info['hidden'] = FALSE; - $info['dependencies'][] = array_shift($dependencies); - \Drupal::state()->set('system_test.dependencies', $dependencies); - $test = TRUE; - } - if ($file->getName() == 'common_test') { - $info['hidden'] = FALSE; - $info['version'] = '8.x-2.4-beta3'; - } - } - - // Make the system_dependencies_test visible by default. - if ($file->getName() == 'system_dependencies_test') { - $info['hidden'] = FALSE; - } - if (in_array($file->getName(), [ - 'system_incompatible_module_version_dependencies_test', - 'system_incompatible_core_version_dependencies_test', - 'system_incompatible_module_version_test', - ])) { - $info['hidden'] = FALSE; - } - if ($file->getName() == 'requirements1_test' || $file->getName() == 'requirements2_test') { - $info['hidden'] = FALSE; - } - if ($file->getName() == 'system_test') { - $info['hidden'] = \Drupal::state()->get('system_test.module_hidden', TRUE); - } -} - -/** - * Implements hook_page_attachments(). - */ -function system_test_page_attachments(array &$page) { - // Used by FrontPageTestCase to get the results of - // \Drupal::service('path.matcher')->isFrontPage(). - $frontpage = \Drupal::state()->get('system_test.front_page_output', 0); - if ($frontpage && \Drupal::service('path.matcher')->isFrontPage()) { - \Drupal::messenger()->addStatus(t('On front page.')); - } -} - /** * Dummy shutdown function which registers another shutdown function. */ @@ -125,47 +29,3 @@ function _system_test_second_shutdown_function($arg1, $arg2) { // \Drupal\Core\Utility\Error::renderExceptionSafe() if possible. throw new Exception('Drupal is <blink>awesome</blink>.'); } - -/** - * Implements hook_filetransfer_info(). - */ -function system_test_filetransfer_info() { - return [ - 'system_test' => [ - 'title' => t('System Test FileTransfer'), - 'class' => 'Drupal\system_test\MockFileTransfer', - 'weight' => -10, - ], - ]; -} - -/** - * Implements hook_module_preinstall(). - */ -function system_test_module_preinstall($module, bool $is_syncing) { - \Drupal::messenger()->addStatus('system_test_preinstall_module called'); - \Drupal::state()->set('system_test_preinstall_module', $module); - - // Save the config.installer isSyncing() value to state to check that it is - // correctly set when installing module during config import. - \Drupal::state()->set('system_test_preinstall_module_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); - - // Save the $is_syncing parameter value to state to check that it is correctly - // set when installing module during config import. - \Drupal::state()->set('system_test_preinstall_module_syncing_param', $is_syncing); -} - -/** - * Implements hook_module_preuninstall(). - */ -function system_test_module_preuninstall($module, bool $is_syncing) { - \Drupal::state()->set('system_test_preuninstall_module', $module); - - // Save the config.installer isSyncing() value to state to check that it is - // correctly set when uninstalling module during config import. - \Drupal::state()->set('system_test_preuninstall_module_config_installer_syncing', \Drupal::service('config.installer')->isSyncing()); - - // Save the $is_syncing parameter value to state to check that it is correctly - // set when installing module during config import. - \Drupal::state()->set('system_test_preuninstall_module_syncing_param', $is_syncing); -} diff --git a/core/modules/system/tests/modules/test_batch_test/test_batch_test.install b/core/modules/system/tests/modules/test_batch_test/test_batch_test.install index ccd805c1aaedb4475c5038c3a1ff884775c95d6d..4ddd787d15c31ea581ef5ee98c24bf06a8d0156f 100644 --- a/core/modules/system/tests/modules/test_batch_test/test_batch_test.install +++ b/core/modules/system/tests/modules/test_batch_test/test_batch_test.install @@ -12,7 +12,7 @@ /** * Implements hook_install(). */ -function test_batch_test_install() { +function test_batch_test_install(): void { $total = 2; $operations = []; for ($i = 1; $i <= $total; $i++) { diff --git a/core/modules/system/tests/modules/theme_page_test/src/Hook/ThemePageTestHooks.php b/core/modules/system/tests/modules/theme_page_test/src/Hook/ThemePageTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..247e958a3a338f5139f5fc43672cea751ffb0e2f --- /dev/null +++ b/core/modules/system/tests/modules/theme_page_test/src/Hook/ThemePageTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\theme_page_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for theme_page_test. + */ +class ThemePageTestHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file, $type) { + // Make sure that all themes are visible on the Appearance form. + if ($type === 'theme') { + unset($info['hidden']); + } + } + +} diff --git a/core/modules/system/tests/modules/theme_page_test/theme_page_test.module b/core/modules/system/tests/modules/theme_page_test/theme_page_test.module deleted file mode 100644 index 7a658902a5838525fbefb4cf9830050371b3e6f1..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/theme_page_test/theme_page_test.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - */ -function theme_page_test_system_info_alter(&$info, Extension $file, $type) { - // Make sure that all themes are visible on the Appearance form. - if ($type === 'theme') { - unset($info['hidden']); - } -} diff --git a/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php b/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..19895acb91955c644a17d4c55d023ac65974cfff --- /dev/null +++ b/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\theme_suggestions_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for theme_suggestions_test. + */ +class ThemeSuggestionsTestHooks { + + /** + * Implements hook_theme_suggestions_alter(). + */ + #[Hook('theme_suggestions_alter')] + public function themeSuggestionsAlter(array &$suggestions, array &$variables, $hook) { + \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_alter' . '() executed.'); + if ($hook == 'theme_test_general_suggestions') { + $suggestions[] = $hook . '__module_override'; + $variables['module_hook'] = 'theme_suggestions_test_theme_suggestions_alter'; + } + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_theme_test_suggestions_alter')] + public function themeSuggestionsThemeTestSuggestionsAlter(array &$suggestions, array $variables) { + \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_theme_test_suggestions_alter' . '() executed.'); + $suggestions[] = 'theme_test_suggestions__module_override'; + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_theme_test_specific_suggestions_alter')] + public function themeSuggestionsThemeTestSpecificSuggestionsAlter(array &$suggestions, array $variables) { + $suggestions[] = 'theme_test_specific_suggestions__variant__foo'; + } + +} diff --git a/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module b/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module deleted file mode 100644 index 3c7a55ce426960fcec3ad76faf6f4c4ae520f09b..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/** - * @file - * Support module for testing theme suggestions. - */ - -declare(strict_types=1); - -/** - * Implements hook_theme_suggestions_alter(). - */ -function theme_suggestions_test_theme_suggestions_alter(array &$suggestions, array &$variables, $hook) { - \Drupal::messenger()->addStatus(__FUNCTION__ . '() executed.'); - if ($hook == 'theme_test_general_suggestions') { - $suggestions[] = $hook . '__module_override'; - $variables['module_hook'] = 'theme_suggestions_test_theme_suggestions_alter'; - } -} - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function theme_suggestions_test_theme_suggestions_theme_test_suggestions_alter(array &$suggestions, array $variables) { - \Drupal::messenger()->addStatus(__FUNCTION__ . '() executed.'); - $suggestions[] = 'theme_test_suggestions__module_override'; -} - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function theme_suggestions_test_theme_suggestions_theme_test_specific_suggestions_alter(array &$suggestions, array $variables) { - $suggestions[] = 'theme_test_specific_suggestions__variant__foo'; -} diff --git a/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php b/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..3e93c19c2f92e9f7028893341c1b96c2c4ef3eac --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php @@ -0,0 +1,120 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\theme_test\Hook; + +use Drupal\Component\Utility\NestedArray; +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for theme_test. + */ +class ThemeTestHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + $items['theme_test'] = ['file' => 'theme_test.inc', 'variables' => ['foo' => '']]; + $items['theme_test_template_test'] = ['template' => 'theme_test.template_test']; + $items['theme_test_template_test_2'] = ['template' => 'theme_test.template_test']; + $items['theme_test_suggestion_provided'] = ['variables' => []]; + $items['theme_test_specific_suggestions'] = ['variables' => []]; + $items['theme_test_suggestions'] = ['variables' => []]; + $items['theme_test_general_suggestions'] = ['variables' => ['module_hook' => 'theme_test_theme', 'theme_hook' => 'none']]; + $items['theme_test_foo'] = ['variables' => ['foo' => NULL]]; + $items['theme_test_render_element'] = ['render element' => 'elements']; + $items['theme_test_render_element_children'] = ['render element' => 'element']; + $items['theme_test_preprocess_suggestions'] = ['variables' => ['foo' => '', 'bar' => '']]; + $items['theme_test_preprocess_callback'] = ['variables' => ['foo' => '']]; + $items['theme_test_registered_by_module'] = ['render element' => 'content', 'base hook' => 'container']; + $items['theme_test_theme_class'] = ['variables' => ['message' => '']]; + $items['theme_test_deprecations_preprocess'] = [ + 'variables' => [ + 'foo' => '', + 'bar' => '', + 'gaz' => '', + 'set_var' => '', + 'for_var' => '', + 'contents' => [], + ], + ]; + $items['theme_test_deprecations_child'] = ['variables' => ['foo' => '', 'bar' => '', 'gaz' => '']]; + $items['theme_test_deprecations_hook_theme'] = [ + 'variables' => [ + 'foo' => '', + 'bar' => '', + 'deprecations' => [ + 'foo' => "'foo' is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use 'new_foo' instead. See https://www.example.com.", + 'bar' => "'bar' is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use 'new_bar' instead. See https://www.example.com.", + ], + ], + ]; + return $items; + } + + /** + * Implements hook_theme_registry_alter(). + */ + #[Hook('theme_registry_alter')] + public function themeRegistryAlter(&$registry) { + $registry['theme_test_preprocess_callback']['preprocess functions'][] = ['\Drupal\theme_test\ThemeTestPreprocess', 'preprocess']; + } + + /** + * Implements hook_page_bottom(). + */ + #[Hook('page_bottom')] + public function pageBottom(array &$page_bottom) { + $page_bottom['theme_test_page_bottom'] = ['#markup' => 'theme test page bottom markup']; + } + + /** + * Implements hook_theme_suggestions_alter(). + */ + #[Hook('theme_suggestions_alter')] + public function themeSuggestionsAlter(array &$suggestions, array $variables, $hook) { + \Drupal::messenger()->addStatus('theme_test_theme_suggestions_alter' . '() executed for ' . $hook . '.'); + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_theme_test_suggestions_alter')] + public function themeSuggestionsThemeTestSuggestionsAlter(array &$suggestions, array $variables) { + \Drupal::messenger()->addStatus('theme_test_theme_suggestions_theme_test_suggestions_alter' . '() executed.'); + } + + /** + * Implements hook_system_info_alter(). + * + * @see \Drupal\system\Tests\Theme\ThemeInfoTest::testChanges() + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(array &$info, Extension $file, $type) { + if ($type == 'theme' && $file->getName() == 'test_theme' && \Drupal::state()->get('theme_test.modify_info_files')) { + // Add a library to see if the system picks it up. + $info += ['libraries' => []]; + $info['libraries'][] = 'core/once'; + } + } + + /** + * Implements hook_library_info_alter(). + */ + #[Hook('library_info_alter')] + public function libraryInfoAlter(array &$libraries, string $extension) : void { + // Allow test code to simulate library changes in a particular extension by + // setting a state key in the form `theme_test_library_info_alter $extension`, + // whose values is an array containing everything that should be recursively + // merged into the given extension's library definitions. + $info = \Drupal::state()->get('theme_test_library_info_alter' . " {$extension}"); + if (is_array($info)) { + $libraries = NestedArray::mergeDeep($libraries, $info); + } + } + +} diff --git a/core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php b/core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php index 211af09edd5418c86a9bece574723d8f91b2dc4e..5749af5778276f7f42a4354828ad134e8875bc42 100644 --- a/core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php +++ b/core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php @@ -12,7 +12,7 @@ class ThemeTestPreprocess { /** * Preprocess callback for testing preprocess callbacks. * - * @param $variables + * @param array $variables * An associative array containing: * - foo: Text for testing preprocess callback. */ diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index 545c0141e1e454a2d13e9c7e8e6ae7e6aa32f9d3..dd430ba201d60b19591ea44093af4fc491a026cb 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -7,101 +7,6 @@ declare(strict_types=1); -use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_theme(). - */ -function theme_test_theme($existing, $type, $theme, $path) { - $items['theme_test'] = [ - 'file' => 'theme_test.inc', - 'variables' => ['foo' => ''], - ]; - $items['theme_test_template_test'] = [ - 'template' => 'theme_test.template_test', - ]; - $items['theme_test_template_test_2'] = [ - 'template' => 'theme_test.template_test', - ]; - $items['theme_test_suggestion_provided'] = [ - 'variables' => [], - ]; - $items['theme_test_specific_suggestions'] = [ - 'variables' => [], - ]; - $items['theme_test_suggestions'] = [ - 'variables' => [], - ]; - $items['theme_test_general_suggestions'] = [ - 'variables' => ['module_hook' => 'theme_test_theme', 'theme_hook' => 'none'], - ]; - $items['theme_test_foo'] = [ - 'variables' => ['foo' => NULL], - ]; - $items['theme_test_render_element'] = [ - 'render element' => 'elements', - ]; - $items['theme_test_render_element_children'] = [ - 'render element' => 'element', - ]; - $items['theme_test_preprocess_suggestions'] = [ - 'variables' => [ - 'foo' => '', - 'bar' => '', - ], - ]; - $items['theme_test_preprocess_callback'] = [ - 'variables' => [ - 'foo' => '', - ], - ]; - $items['theme_test_registered_by_module'] = [ - 'render element' => 'content', - 'base hook' => 'container', - ]; - $items['theme_test_theme_class'] = [ - 'variables' => [ - 'message' => '', - ], - ]; - $items['theme_test_deprecations_preprocess'] = [ - 'variables' => [ - 'foo' => '', - 'bar' => '', - 'gaz' => '', - 'set_var' => '', - 'for_var' => '', - 'contents' => [], - ], - ]; - $items['theme_test_deprecations_child'] = [ - 'variables' => [ - 'foo' => '', - 'bar' => '', - 'gaz' => '', - ], - ]; - $items['theme_test_deprecations_hook_theme'] = [ - 'variables' => [ - 'foo' => '', - 'bar' => '', - 'deprecations' => [ - 'foo' => "'foo' is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use 'new_foo' instead. See https://www.example.com.", - 'bar' => "'bar' is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use 'new_bar' instead. See https://www.example.com.", - ], - ], - ]; - return $items; -} - -/** - * Implements hook_theme_registry_alter(). - */ -function theme_test_theme_registry_alter(&$registry) { - $registry['theme_test_preprocess_callback']['preprocess functions'][] = ['\Drupal\theme_test\ThemeTestPreprocess', 'preprocess']; -} - /** * Implements hook_preprocess_HOOK() for HTML document templates. */ @@ -112,13 +17,6 @@ function theme_test_preprocess_html(&$variables) { $variables['attributes']['theme_test_page_variable'] = 'Page variable is an array.'; } -/** - * Implements hook_page_bottom(). - */ -function theme_test_page_bottom(array &$page_bottom) { - $page_bottom['theme_test_page_bottom'] = ['#markup' => 'theme test page bottom markup']; -} - /** * Implements hook_theme_suggestions_HOOK(). */ @@ -160,33 +58,6 @@ function theme_test_theme_suggestions_theme_test_suggestion_provided(array $vari return ['theme_test_suggestion_provided__foo']; } -/** - * Implements hook_theme_suggestions_alter(). - */ -function theme_test_theme_suggestions_alter(array &$suggestions, array $variables, $hook) { - \Drupal::messenger()->addStatus(__FUNCTION__ . '() executed for ' . $hook . '.'); -} - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function theme_test_theme_suggestions_theme_test_suggestions_alter(array &$suggestions, array $variables) { - \Drupal::messenger()->addStatus(__FUNCTION__ . '() executed.'); -} - -/** - * Implements hook_system_info_alter(). - * - * @see \Drupal\system\Tests\Theme\ThemeInfoTest::testChanges() - */ -function theme_test_system_info_alter(array &$info, Extension $file, $type) { - if ($type == 'theme' && $file->getName() == 'test_theme' && \Drupal::state()->get('theme_test.modify_info_files')) { - // Add a library to see if the system picks it up. - $info += ['libraries' => []]; - $info['libraries'][] = 'core/once'; - } -} - /** * Implements hook_theme_suggestions_HOOK(). */ @@ -214,18 +85,3 @@ function template_preprocess_theme_test_registered_by_module() { function template_preprocess_theme_test_deprecations_preprocess(array &$variables) { $variables = array_merge($variables, \Drupal::state()->get('theme_test.theme_test_deprecations_preprocess')); } - -/** - * Implements hook_library_info_alter(). - */ -function theme_test_library_info_alter(array &$libraries, string $extension): void { - // Allow test code to simulate library changes in a particular extension by - // setting a state key in the form `theme_test_library_info_alter $extension`, - // whose values is an array containing everything that should be recursively - // merged into the given extension's library definitions. - $info = \Drupal::state()->get(__FUNCTION__ . " $extension"); - - if (is_array($info)) { - $libraries = NestedArray::mergeDeep($libraries, $info); - } -} diff --git a/core/modules/system/tests/modules/twig_extension_test/src/Hook/TwigExtensionTestHooks.php b/core/modules/system/tests/modules/twig_extension_test/src/Hook/TwigExtensionTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..3c255419d187de10663739d79ef353da54dba09f --- /dev/null +++ b/core/modules/system/tests/modules/twig_extension_test/src/Hook/TwigExtensionTestHooks.php @@ -0,0 +1,34 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\twig_extension_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for twig_extension_test. + */ +class TwigExtensionTestHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + return [ + 'twig_extension_test_filter' => [ + 'variables' => [ + 'message' => NULL, + 'safe_join_items' => NULL, + ], + 'template' => 'twig_extension_test.filter', + ], + 'twig_extension_test_function' => [ + 'render element' => 'element', + 'template' => 'twig_extension_test.function', + ], + ]; + } + +} diff --git a/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module b/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module deleted file mode 100644 index 149cb41354e9980c0e7a589c6f792e60da33c2f6..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Helper module for Twig extension tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_theme(). - */ -function twig_extension_test_theme($existing, $type, $theme, $path) { - return [ - 'twig_extension_test_filter' => [ - 'variables' => ['message' => NULL, 'safe_join_items' => NULL], - 'template' => 'twig_extension_test.filter', - ], - 'twig_extension_test_function' => [ - 'render element' => 'element', - 'template' => 'twig_extension_test.function', - ], - ]; -} diff --git a/core/modules/system/tests/modules/twig_theme_test/src/Hook/TwigThemeTestHooks.php b/core/modules/system/tests/modules/twig_theme_test/src/Hook/TwigThemeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b71dc37e35cdc864b825295441a9a7d5e64f2e49 --- /dev/null +++ b/core/modules/system/tests/modules/twig_theme_test/src/Hook/TwigThemeTestHooks.php @@ -0,0 +1,68 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\twig_theme_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for twig_theme_test. + */ +class TwigThemeTestHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + $items['twig_theme_test_filter'] = [ + 'variables' => [ + 'quote' => [], + 'attributes' => [], + ], + 'template' => 'twig_theme_test.filter', + ]; + $items['twig_theme_test_php_variables'] = ['template' => 'twig_theme_test.php_variables']; + $items['twig_theme_test_trans'] = ['variables' => [], 'template' => 'twig_theme_test.trans']; + $items['twig_theme_test_placeholder_outside_trans'] = [ + 'variables' => [ + 'var' => '', + ], + 'template' => 'twig_theme_test.placeholder_outside_trans', + ]; + $items['twig_namespace_test'] = ['variables' => [], 'template' => 'twig_namespace_test']; + $items['twig_registry_loader_test'] = ['variables' => []]; + $items['twig_registry_loader_test_include'] = ['variables' => []]; + $items['twig_registry_loader_test_extend'] = ['variables' => []]; + $items['twig_raw_test'] = ['variables' => ['script' => '']]; + $items['twig_autoescape_test'] = ['variables' => ['script' => '']]; + $items['twig_theme_test_url_generator'] = ['variables' => [], 'template' => 'twig_theme_test.url_generator']; + $items['twig_theme_test_link_generator'] = [ + 'variables' => [ + 'test_url' => NULL, + 'test_url_attribute' => NULL, + 'attributes' => [], + ], + 'template' => 'twig_theme_test.link_generator', + ]; + $items['twig_theme_test_url_to_string'] = [ + 'variables' => [ + 'test_url' => NULL, + ], + 'template' => 'twig_theme_test.url_to_string', + ]; + $items['twig_theme_test_file_url'] = ['variables' => [], 'template' => 'twig_theme_test.file_url']; + $items['twig_theme_test_attach_library'] = ['variables' => [], 'template' => 'twig_theme_test.attach_library']; + $items['twig_theme_test_renderable'] = [ + 'variables' => [ + 'renderable' => NULL, + ], + 'template' => 'twig_theme_test.renderable', + ]; + $items['twig_theme_test_embed_tag'] = ['variables' => [], 'template' => 'twig_theme_test.embed_tag']; + $items['twig_theme_test_dump'] = ['variables' => [], 'template' => 'twig_theme_test.dump']; + return $items; + } + +} diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module index 4e2fc05a3029b6f267de7a1178364a8618a46b7f..e74aa96183784ef20b40b3dd39f5d381d69380d7 100644 --- a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module +++ b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module @@ -7,85 +7,6 @@ declare(strict_types=1); -/** - * Implements hook_theme(). - */ -function twig_theme_test_theme($existing, $type, $theme, $path) { - $items['twig_theme_test_filter'] = [ - 'variables' => ['quote' => [], 'attributes' => []], - 'template' => 'twig_theme_test.filter', - ]; - $items['twig_theme_test_php_variables'] = [ - 'template' => 'twig_theme_test.php_variables', - ]; - $items['twig_theme_test_trans'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.trans', - ]; - $items['twig_theme_test_placeholder_outside_trans'] = [ - 'variables' => ['var' => ''], - 'template' => 'twig_theme_test.placeholder_outside_trans', - ]; - $items['twig_namespace_test'] = [ - 'variables' => [], - 'template' => 'twig_namespace_test', - ]; - $items['twig_registry_loader_test'] = [ - 'variables' => [], - ]; - $items['twig_registry_loader_test_include'] = [ - 'variables' => [], - ]; - $items['twig_registry_loader_test_extend'] = [ - 'variables' => [], - ]; - $items['twig_raw_test'] = [ - 'variables' => ['script' => ''], - ]; - $items['twig_autoescape_test'] = [ - 'variables' => ['script' => ''], - ]; - $items['twig_theme_test_url_generator'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.url_generator', - ]; - $items['twig_theme_test_link_generator'] = [ - 'variables' => [ - 'test_url' => NULL, - 'test_url_attribute' => NULL, - 'attributes' => [], - ], - 'template' => 'twig_theme_test.link_generator', - ]; - $items['twig_theme_test_url_to_string'] = [ - 'variables' => ['test_url' => NULL], - 'template' => 'twig_theme_test.url_to_string', - ]; - $items['twig_theme_test_file_url'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.file_url', - ]; - $items['twig_theme_test_attach_library'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.attach_library', - ]; - $items['twig_theme_test_renderable'] = [ - 'variables' => [ - 'renderable' => NULL, - ], - 'template' => 'twig_theme_test.renderable', - ]; - $items['twig_theme_test_embed_tag'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.embed_tag', - ]; - $items['twig_theme_test_dump'] = [ - 'variables' => [], - 'template' => 'twig_theme_test.dump', - ]; - return $items; -} - /** * Helper function to test PHP variables in the Twig engine. */ diff --git a/core/modules/system/tests/modules/unique_field_constraint_test/src/Hook/UniqueFieldConstraintTestHooks.php b/core/modules/system/tests/modules/unique_field_constraint_test/src/Hook/UniqueFieldConstraintTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5f3921e183d6c9ddd2c7ffacc09ebc68596a8d55 --- /dev/null +++ b/core/modules/system/tests/modules/unique_field_constraint_test/src/Hook/UniqueFieldConstraintTestHooks.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\unique_field_constraint_test\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for unique_field_constraint_test. + */ +class UniqueFieldConstraintTestHooks { + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$fields, EntityTypeInterface $entity_type) { + if ($entity_type->id() === 'entity_test_string_id') { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ + $fields['name']->addConstraint('UniqueField'); + } + if ($entity_type->id() === 'entity_test') { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ + $fields['name']->addConstraint('UniqueField'); + } + } + + /** + * Implements hook_query_entity_test_access_alter(). + */ + #[Hook('query_entity_test_access_alter')] + public function queryEntityTestAccessAlter(AlterableInterface $query) { + // Set an impossible condition to filter out all entities. + /** @var \Drupal\Core\Database\Query\Select|\Drupal\Core\Database\Query\AlterableInterface $query */ + $query->condition('entity_test.id', 0); + } + +} diff --git a/core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module b/core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module deleted file mode 100644 index 0f47b136d320697dfd77c666fba1a8086cc36e82..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/** - * @file - * Contains unique_field_constraint_test.module. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Database\Query\AlterableInterface; - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function unique_field_constraint_test_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) { - if ($entity_type->id() === 'entity_test_string_id') { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ - $fields['name']->addConstraint('UniqueField'); - } - if ($entity_type->id() === 'entity_test') { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */ - $fields['name']->addConstraint('UniqueField'); - } -} - -/** - * Implements hook_query_entity_test_access_alter(). - */ -function unique_field_constraint_test_query_entity_test_access_alter(AlterableInterface $query) { - // Set an impossible condition to filter out all entities. - /** @var \Drupal\Core\Database\Query\Select|\Drupal\Core\Database\Query\AlterableInterface $query */ - $query->condition('entity_test.id', 0); -} diff --git a/core/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestHooks.php b/core/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b88d617fca0249e883fc37ef59b004fd4fab25aa --- /dev/null +++ b/core/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestHooks.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\update_script_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for update_script_test. + */ +class UpdateScriptTestHooks { + + /** + * Implements hook_cache_flush(). + * + * This sets a message to confirm that all caches are cleared whenever + * update.php completes. + * + * @see UpdateScriptFunctionalTest::testRequirements() + */ + #[Hook('cache_flush')] + public function cacheFlush() { + \Drupal::messenger()->addStatus(t('hook_cache_flush() invoked for update_script_test.module.')); + } + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(array &$info, Extension $file, $type) { + $new_info = \Drupal::state()->get('update_script_test.system_info_alter'); + if ($new_info) { + if ($file->getName() == 'update_script_test') { + $info = $new_info + $info; + } + } + } + +} diff --git a/core/modules/system/tests/modules/update_script_test/update_script_test.install b/core/modules/system/tests/modules/update_script_test/update_script_test.install index 6780fecd99f35a98ac63a7444808c54a2bb1bc9d..617444b82dd58ad2d269d53c934cd6262a538613 100644 --- a/core/modules/system/tests/modules/update_script_test/update_script_test.install +++ b/core/modules/system/tests/modules/update_script_test/update_script_test.install @@ -52,7 +52,7 @@ function update_script_test_requirements_alter(array &$requirements): void { /** * Implements hook_update_last_removed(). */ -function update_script_test_update_last_removed() { +function update_script_test_update_last_removed(): int { return 7110; } diff --git a/core/modules/system/tests/modules/update_script_test/update_script_test.module b/core/modules/system/tests/modules/update_script_test/update_script_test.module deleted file mode 100644 index 0a8ea41d867bcaffbc6ae2d4c4818411c2d28f8f..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/update_script_test/update_script_test.module +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/** - * @file - * This file provides testing functionality for update.php. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_cache_flush(). - * - * This sets a message to confirm that all caches are cleared whenever - * update.php completes. - * - * @see UpdateScriptFunctionalTest::testRequirements() - */ -function update_script_test_cache_flush() { - \Drupal::messenger()->addStatus(t('hook_cache_flush() invoked for update_script_test.module.')); -} - -/** - * Implements hook_system_info_alter(). - */ -function update_script_test_system_info_alter(array &$info, Extension $file, $type) { - $new_info = \Drupal::state()->get('update_script_test.system_info_alter'); - if ($new_info) { - if ($file->getName() == 'update_script_test') { - $info = $new_info + $info; - } - } -} diff --git a/core/modules/system/tests/modules/update_test_broken_theme_hook/src/Hook/UpdateTestBrokenThemeHookHooks.php b/core/modules/system/tests/modules/update_test_broken_theme_hook/src/Hook/UpdateTestBrokenThemeHookHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fb77696942e056852a19d8d4e90f47359bff40a2 --- /dev/null +++ b/core/modules/system/tests/modules/update_test_broken_theme_hook/src/Hook/UpdateTestBrokenThemeHookHooks.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\update_test_broken_theme_hook\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for update_test_broken_theme_hook. + */ +class UpdateTestBrokenThemeHookHooks { + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + throw new \Exception('This mimics an exception caused by unstable dependencies.'); + } + +} diff --git a/core/modules/system/tests/modules/update_test_broken_theme_hook/update_test_broken_theme_hook.module b/core/modules/system/tests/modules/update_test_broken_theme_hook/update_test_broken_theme_hook.module deleted file mode 100644 index 76bcd999b70c8ce5fabdcd7b5a7a5bfd05650993..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/update_test_broken_theme_hook/update_test_broken_theme_hook.module +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * @file - * Hook implementations for the update_test_broken_theme_hook module. - */ - -declare(strict_types=1); - -/** - * Implements hook_theme(). - */ -function update_test_broken_theme_hook_theme($existing, $type, $theme, $path) { - throw new \Exception('This mimics an exception caused by unstable dependencies.'); -} diff --git a/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install b/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install index 9fc56d1be8cb5eb5974ff4272eb449541b19996f..e97f0d0e86131bd1e4c35d995a294515c8340a52 100644 --- a/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install +++ b/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install @@ -10,7 +10,7 @@ /** * Implements hook_update_last_removed(). */ -function update_test_last_removed_update_last_removed() { +function update_test_last_removed_update_last_removed(): int { return 8002; } diff --git a/core/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php b/core/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php index 371f96fe5d99585ea7a8f908e2295ab2713dee17..0c9d136a14d381a061feaa470b7fdbaf49cb9612 100644 --- a/core/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php +++ b/core/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php @@ -75,7 +75,7 @@ function update_test_postupdate_post_update_test_batch(&$sandbox = NULL) { /** * Implements hook_removed_post_updates(). */ -function update_test_postupdate_removed_post_updates() { +function update_test_postupdate_removed_post_updates(): array { return [ 'update_test_postupdate_post_update_foo' => '8.x-1.0', 'update_test_postupdate_post_update_bar' => '8.x-2.0', diff --git a/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install b/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install index 74f4f9c6c034f381ed2a1597338f2a4db040d147..6a53f0febae0a613c191614c18703af8896a7968 100644 --- a/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install +++ b/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install @@ -22,6 +22,6 @@ function update_test_with_7x_update_7201() { /** * Implements hook_update_last_removed(). */ -function update_test_with_7x_update_last_removed() { +function update_test_with_7x_update_last_removed(): int { return 7110; } diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php index 405dada8ff0e46051ec2728861b9b4a92a832374..2c09e1ef0a40523b2b81d87878f63f7a8714eb05 100644 --- a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php +++ b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php @@ -220,7 +220,7 @@ public function testBatchLargePercentage(): void { /** * Triggers a pass if the texts were found in order in the raw content. * - * @param $texts + * @param array $texts * Array of raw strings to look for. * * @internal diff --git a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php index e09f46771968282d4d2bf70a57bc8d0f9b0a3643..56ceaae71afd29f1133ce0322dea33fe2fdac44f 100644 --- a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php +++ b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php @@ -18,11 +18,11 @@ abstract class CacheTestBase extends BrowserTestBase { /** * Checks whether or not a cache entry exists. * - * @param $cid + * @param string $cid * The cache id. - * @param $var + * @param mixed $var * The variable the cache should contain. - * @param $bin + * @param string|null $bin * The bin the cache item was stored in. * * @return bool @@ -41,13 +41,13 @@ protected function checkCacheExists($cid, $var, $bin = NULL): bool { /** * Asserts that a cache entry exists. * - * @param $message + * @param string $message * Message to display. - * @param $var + * @param string|null $var * The variable the cache should contain. - * @param $cid + * @param string|null $cid * The cache id. - * @param $bin + * @param string|null $bin * The bin the cache item was stored in. */ protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin = NULL) { @@ -67,11 +67,11 @@ protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin = /** * Asserts that a cache entry has been removed. * - * @param $message + * @param string $message * Message to display. - * @param $cid + * @param string|null $cid * The cache id. - * @param $bin + * @param string|null $bin * The bin the cache item was stored in. */ public function assertCacheRemoved($message, $cid = NULL, $bin = NULL) { diff --git a/core/modules/system/tests/src/Functional/Common/UrlTest.php b/core/modules/system/tests/src/Functional/Common/UrlTest.php index 8e22d2a03bd8f885fccb63f2062310f52992b317..f8602d5b057df9da8f74ba2968fe4e98a908781d 100644 --- a/core/modules/system/tests/src/Functional/Common/UrlTest.php +++ b/core/modules/system/tests/src/Functional/Common/UrlTest.php @@ -14,6 +14,9 @@ */ class UrlTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['common_test']; /** diff --git a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php index 932f4d5fd7cf9e457c9dc12a54ead7fdc657c4ce..c762a5dc5b78add038af6e5134ab045a09529b2d 100644 --- a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php +++ b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php @@ -18,6 +18,9 @@ */ class ConditionFormTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'condition_test']; /** diff --git a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php index 9c725570d7daf1e5b5d3cb3e82fcf5061fe45497..ae6f7243ecff09dca7dee2f168511f979318915a 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php @@ -133,7 +133,7 @@ public function testEntityFormDisplayAlter(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestFormCRUD($entity_type) { + protected function doTestFormCRUD($entity_type): void { $name1 = $this->randomMachineName(8); $name2 = $this->randomMachineName(10); @@ -169,7 +169,7 @@ protected function doTestFormCRUD($entity_type) { * @param string $entity_type_id * The ID of entity type to run the tests with. */ - protected function doTestMultilingualFormCRUD($entity_type_id) { + protected function doTestMultilingualFormCRUD($entity_type_id): void { $name1 = $this->randomMachineName(8); $name1_ro = $this->randomMachineName(9); $name2_ro = $this->randomMachineName(11); diff --git a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php index 6321dc583bca0b626632dfa7a8a774934cf61df7..7101989b65ef33067db0efbfbf6db17a93669eec 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php @@ -68,7 +68,7 @@ public function testRevisions(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function runRevisionsTests($entity_type) { + protected function runRevisionsTests($entity_type): void { // Create a translatable test field. $field_storage = FieldStorageConfig::create([ 'entity_type' => $entity_type, diff --git a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php index 3aa2e65fb7c6130d0ba987b280ec14ca54ae4212..6a0cfb88a47e3929d8fb707cb7baf5c6d562ca8c 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php @@ -27,6 +27,9 @@ class EntityTranslationFormTest extends BrowserTestBase { */ protected $defaultTheme = 'stark'; + /** + * The test language codes. + */ protected $langcodes; /** diff --git a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php index af1dd96386bc1e02fea453f4fea49580c216c2f3..be898a640cad82efa3b56b2e73bb3456b9ab660c 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\system\Functional\Entity; +use Drupal\Core\Entity\EntityInterface; use Drupal\entity_test\Entity\EntityTest; use Drupal\Tests\BrowserTestBase; @@ -131,7 +132,7 @@ public function testEntityViewControllerViewBuilder(): void { * @return \Drupal\Core\Entity\EntityInterface * The created entity. */ - protected function createTestEntity($entity_type, $name = NULL) { + protected function createTestEntity($entity_type, $name = NULL): EntityInterface { $data = [ 'bundle' => $entity_type, 'name' => $name ?? $this->randomMachineName(), diff --git a/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php b/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6d76153501ae7e942a87c7c18b2194e97d901624 --- /dev/null +++ b/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\system\Functional\Extension; + +use Drupal\Tests\BrowserTestBase; + +/** + * Tests the LegacyHook attribute. + * + * @group Hook + */ +class LegacyHookTest extends BrowserTestBase { + + protected static $modules = ['legacy_hook_test']; + + protected $defaultTheme = 'stark'; + + public function testLegacyHook(): void { + // Calling legacy_hook_test1 leads to a fatal error so there's no need + // for asserts to show it does not get called. + \Drupal::moduleHandler()->invokeAll('test1'); + // Verify the module actually exists and works even with one LegacyHook. + $result = \Drupal::moduleHandler()->invokeAll('test2'); + $this->assertSame(['ok'], $result); + \Drupal::moduleHandler()->invoke('legacy_hook_test', 'test1'); + $result = \Drupal::moduleHandler()->invoke('legacy_hook_test', 'test2'); + $this->assertSame('ok', $result); + } + +} diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php index 21212a9371d565c50c613c63c702faacee4b5090..a20a387155efa8d57a5a324d1efffb96c68f5de7 100644 --- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php +++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php @@ -63,7 +63,7 @@ public function _buildFakeModule() { return $location; } - public function _writeDirectory($base, $files = []) { + public function _writeDirectory($base, $files = []): void { mkdir($base); foreach ($files as $key => $file) { if (is_array($file)) { diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php index d8cc66acf7d37b5ffebe1ec6aad1bf2323fc229f..9675dbfa3fba077e0d748a07382ef8215a6d6eb9 100644 --- a/core/modules/system/tests/src/Functional/Form/FormTest.php +++ b/core/modules/system/tests/src/Functional/Form/FormTest.php @@ -589,7 +589,7 @@ public function testSelectSorting(): void { * @param string[] $order * Expected order of its options. */ - protected function validateSelectSorting($select, array $order) { + protected function validateSelectSorting($select, array $order): void { $option_map_function = function (NodeElement $node) { return ($node->getTagName() === 'optgroup') ? $node->getAttribute('label') : $node->getValue(); diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php index ff72c6841a7364a9ac3cc0ab923d8dc8bed5f2d4..ab3b89e62d3c318332e064e0c8406598fc7d0367 100644 --- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php +++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php @@ -103,7 +103,7 @@ public function testHiddenLanguageSelectElement(): void { * @param array $options * An array with options to compare with. */ - protected function _testLanguageSelectElementOptions($id, $options) { + protected function _testLanguageSelectElementOptions($id, $options): void { // Check that the options in the language field are exactly the same, // including the order, as the languages sent as a parameter. $found_options = $this->assertSession()->selectExists($id)->findAll('css', 'option'); diff --git a/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php index 1039c86f46dd069e33fd412540290c51d25c9924..553292a8d31d1c3f35158d1f2561b258866c59ec 100644 --- a/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php +++ b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php @@ -31,7 +31,7 @@ trait AssertBreadcrumbTrait { * (optional) An associative array whose keys are link paths and whose * values are link titles (not sanitized) of an expected active trail in a * menu tree output on the page. - * @param $last_active + * @param bool $last_active * (optional) Whether the last link in $tree is expected to be active (TRUE) * or just to be in the active trail (FALSE). * @param string $active_trail_class diff --git a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php index 19be61d99f1cf3cf4bc9445b4778bb70c2ddad81..a450538ddf218d1c60923b9c408664c27b8d23f9 100644 --- a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php +++ b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php @@ -60,7 +60,7 @@ public function testMenuIntegration(): void { /** * Tests local tasks with route placeholders. */ - protected function doTestHookMenuIntegration() { + protected function doTestHookMenuIntegration(): void { // Generate base path with random argument. $machine_name = $this->randomMachineName(8); $base_path = 'foo/' . $machine_name; @@ -80,7 +80,7 @@ protected function doTestHookMenuIntegration() { /** * Tests title callback set to FALSE. */ - protected function doTestTitleCallbackFalse() { + protected function doTestTitleCallbackFalse(): void { $this->drupalGet('test-page'); $this->assertSession()->pageTextContains('A title with @placeholder'); $this->assertSession()->pageTextNotContains('A title with some other text'); @@ -89,7 +89,7 @@ protected function doTestTitleCallbackFalse() { /** * Tests page title of MENU_CALLBACKs. */ - protected function doTestTitleMenuCallback() { + protected function doTestTitleMenuCallback(): void { // Verify that the menu router item title is not visible. $this->drupalGet(''); $this->assertSession()->pageTextNotContains('Menu Callback Title'); @@ -101,7 +101,7 @@ protected function doTestTitleMenuCallback() { /** * Tests menu item descriptions. */ - protected function doTestDescriptionMenuItems() { + protected function doTestDescriptionMenuItems(): void { // Verify that the menu router item title is output as page title. $this->drupalGet('menu_callback_description'); $this->assertSession()->pageTextContains('Menu item description text'); @@ -110,7 +110,7 @@ protected function doTestDescriptionMenuItems() { /** * Tests for menu_name parameter for default menu links. */ - protected function doTestMenuName() { + protected function doTestMenuName(): void { $admin_user = $this->drupalCreateUser(['administer site configuration']); $this->drupalLogin($admin_user); /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ @@ -132,7 +132,7 @@ protected function doTestMenuName() { /** * Tests menu links added in hook_menu_links_discovered_alter(). */ - protected function doTestMenuLinksDiscoveredAlter() { + protected function doTestMenuLinksDiscoveredAlter(): void { // Check that machine name does not need to be defined since it is already // set as the key of each menu link. /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ @@ -149,7 +149,7 @@ protected function doTestMenuLinksDiscoveredAlter() { /** * Tests for menu hierarchy. */ - protected function doTestMenuHierarchy() { + protected function doTestMenuHierarchy(): void { /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ $menu_link_manager = \Drupal::service('plugin.manager.menu.link'); $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.hierarchy_parent'); @@ -165,7 +165,7 @@ protected function doTestMenuHierarchy() { /** * Tests menu links that have optional placeholders. */ - protected function doTestMenuOptionalPlaceholders() { + protected function doTestMenuOptionalPlaceholders(): void { $this->drupalGet('menu-test/optional'); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->pageTextContains('Sometimes there is no placeholder.'); @@ -178,7 +178,7 @@ protected function doTestMenuOptionalPlaceholders() { /** * Tests a menu on a router page. */ - protected function doTestMenuOnRoute() { + protected function doTestMenuOnRoute(): void { \Drupal::service('module_installer')->install(['router_test']); $this->resetAll(); @@ -192,7 +192,7 @@ protected function doTestMenuOnRoute() { /** * Tests path containing "exotic" characters. */ - protected function doTestExoticPath() { + protected function doTestExoticPath(): void { // "Special" ASCII characters. $path = "menu-test/ -._~!$'\"()*@[]?&+%#,;=:" . @@ -271,7 +271,7 @@ public function testThemeIntegration(): void { /** * Tests theme negotiation for an administrative theme. */ - protected function doTestThemeCallbackAdministrative() { + protected function doTestThemeCallbackAdministrative(): void { $this->drupalGet('menu-test/theme-callback/use-admin-theme'); $this->assertSession()->pageTextContains('Active theme: claro. Actual theme: claro.'); $this->assertSession()->responseContains('claro/css/base/elements.css'); @@ -280,7 +280,7 @@ protected function doTestThemeCallbackAdministrative() { /** * Tests the theme negotiation when the site is in maintenance mode. */ - protected function doTestThemeCallbackMaintenanceMode() { + protected function doTestThemeCallbackMaintenanceMode(): void { $this->container->get('state')->set('system.maintenance_mode', TRUE); // For a regular user, the fact that the site is in maintenance mode means @@ -303,7 +303,7 @@ protected function doTestThemeCallbackMaintenanceMode() { /** * Tests the theme negotiation when it is set to use an optional theme. */ - protected function doTestThemeCallbackOptionalTheme() { + protected function doTestThemeCallbackOptionalTheme(): void { // Request a theme that is not installed. $this->drupalGet('menu-test/theme-callback/use-test-theme'); $this->assertSession()->pageTextContains('Active theme: olivero. Actual theme: olivero.'); @@ -326,7 +326,7 @@ protected function doTestThemeCallbackOptionalTheme() { /** * Tests the theme negotiation when it is set to use a theme that does not exist. */ - protected function doTestThemeCallbackFakeTheme() { + protected function doTestThemeCallbackFakeTheme(): void { $this->drupalGet('menu-test/theme-callback/use-fake-theme'); $this->assertSession()->pageTextContains('Active theme: olivero. Actual theme: olivero.'); // Check that the default theme's CSS appears on the page. @@ -336,7 +336,7 @@ protected function doTestThemeCallbackFakeTheme() { /** * Tests the theme negotiation when no theme is requested. */ - protected function doTestThemeCallbackNoThemeRequested() { + protected function doTestThemeCallbackNoThemeRequested(): void { $this->drupalGet('menu-test/theme-callback/no-theme-requested'); $this->assertSession()->pageTextContains('Active theme: olivero. Actual theme: olivero.'); // Check that the default theme's CSS appears on the page. diff --git a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php index d73c75f7e8da1dbc5a55e1ce23fc404b5b60c15b..a5a34cc2630ef3a190fdf22c51bca836f8c3478b 100644 --- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php +++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php @@ -39,7 +39,7 @@ protected function setUp(): void { /** * Assert that all tables defined in a module's hook_schema() exist. * - * @param $module + * @param string $module * The name of the module. */ public function assertModuleTablesExist($module) { @@ -57,7 +57,7 @@ public function assertModuleTablesExist($module) { /** * Assert that none of the tables defined in a module's hook_schema() exist. * - * @param $module + * @param string $module * The name of the module. */ public function assertModuleTablesDoNotExist($module) { @@ -127,9 +127,9 @@ public function assertNoModuleConfig($module) { /** * Assert the list of modules are enabled or disabled. * - * @param $modules + * @param array $modules * Module list to check. - * @param $enabled + * @param bool $enabled * Expected module state. */ public function assertModules(array $modules, $enabled) { @@ -148,21 +148,21 @@ public function assertModules(array $modules, $enabled) { /** * Verify a log entry was entered for a module's status change. * - * @param $type + * @param string $type * The category to which this message belongs. - * @param $message + * @param string $message * The message to store in the log. Keep $message translatable * by not concatenating dynamic values into it! Variables in the * message should be added by using placeholder strings alongside * the variables argument to declare the value of the placeholders. * See t() for documentation on how $message and $variables interact. - * @param $variables + * @param array $variables * Array of variables to replace in the message on display or * NULL if message is already translated or not possible to * translate. - * @param $severity + * @param int $severity * The severity of the message, as per RFC 3164. - * @param $link + * @param string $link * A link to associate with the message. */ public function assertLogMessage($type, $message, $variables = [], $severity = RfcLogLevel::NOTICE, $link = '') { diff --git a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php index be1587153d167bd587bdf7d1551b62c1186e8e90..a3a89112afe399868084168191ef5a0d86dc242f 100644 --- a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php +++ b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php @@ -16,6 +16,9 @@ */ class UpcastingTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['paramconverter_test', 'node', 'language']; /** diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php index 02bdcf763c87b4818bc7b7d70c64247ad0532c1a..f3fe2c10cdd66f3b46124f89bc85bb0931ac86f5 100644 --- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php +++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php @@ -122,7 +122,7 @@ public function testHttpsSession(): void { * * Note that the parents $session_id and $loggedInUser is not updated. */ - protected function loginHttp(AccountInterface $account) { + protected function loginHttp(AccountInterface $account): void { $guzzle_cookie_jar = $this->getGuzzleCookieJar(); $post = [ 'form_id' => 'user_login_form', @@ -173,7 +173,7 @@ protected function loginHttp(AccountInterface $account) { * * Note that the parents $session_id and $loggedInUser is not updated. */ - protected function loginHttps(AccountInterface $account) { + protected function loginHttps(AccountInterface $account): void { $guzzle_cookie_jar = $this->getGuzzleCookieJar(); $post = [ 'form_id' => 'user_login_form', @@ -268,7 +268,7 @@ protected function assertSessionIds(string $sid, string $assertion_text): void { /** * Builds a URL for submitting a mock HTTPS request to HTTP test environments. * - * @param $url + * @param string $url * A Drupal path such as 'user/login'. * * @return string @@ -281,7 +281,7 @@ protected function httpsUrl($url): string { /** * Builds a URL for submitting a mock HTTP request to HTTPS test environments. * - * @param $url + * @param string $url * A Drupal path such as 'user/login'. * * @return string diff --git a/core/modules/system/tests/src/Functional/Session/SessionTest.php b/core/modules/system/tests/src/Functional/Session/SessionTest.php index 0ae64de4e1bfbe16f95eb1c43f882d1522e6040f..7512d30c51c253df24abbbbf7b01a957d89ce8f6 100644 --- a/core/modules/system/tests/src/Functional/Session/SessionTest.php +++ b/core/modules/system/tests/src/Functional/Session/SessionTest.php @@ -375,7 +375,7 @@ public function testSessionWriteError(): void { /** * Reset the cookie file so that it refers to the specified user. */ - public function sessionReset() { + public function sessionReset(): void { // Close the internal browser. $this->mink->resetSessions(); $this->loggedInUser = FALSE; diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php index 7f8357242c998ae4d7bc3e3d698ab2138e52b2d9..a51362999ca3a523c38c11c8c48006225432a6ae 100644 --- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php +++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php @@ -27,7 +27,6 @@ class PageTitleTest extends BrowserTestBase { protected $defaultTheme = 'starterkit_theme'; protected $contentUser; - protected $savedTitle; /** * Implement setUp(). diff --git a/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php b/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php index df7fd6d5c7be07a0e9e57f12dbf54bc10ce90cc0..41d60b8a42a0d491f81b8fe4493690484a5f1d5e 100644 --- a/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php +++ b/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php @@ -101,7 +101,7 @@ protected function checkSystemRequirements() { * @param string $site_path * The sites directory path, such as 'sites/default'. */ - protected function makeWritable($site_path) { + protected function makeWritable($site_path): void { chmod($site_path, 0755); chmod($this->settingsFile($site_path), 0644); } diff --git a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php index d0d040cf054b5c47556bc9dd2264a31e9e6dda96..2708034a1e869ccd2e2ff6857cd0379be12119a5 100644 --- a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php +++ b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { * * @see system_authorized_init() */ - public function drupalGetAuthorizePHP($page_title = 'system-test-auth') { + public function drupalGetAuthorizePHP($page_title = 'system-test-auth'): void { $this->drupalGet('system-test/authorize-init/' . $page_title); } diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php index 4c5d5aad343060f303eb783298942594a2889a2d..0d6d4aff5e692d348220a62396aeed7914f7cc30 100644 --- a/core/modules/system/tests/src/Functional/System/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php @@ -463,8 +463,8 @@ public function testInvalidTheme(): void { // Clear the system_list() and theme listing cache to pick up the change. $this->container->get('theme_handler')->reset(); $this->drupalGet('admin/appearance'); - $this->assertSession()->pageTextContains('This theme requires the base theme not_real_test_basetheme to operate correctly.'); - $this->assertSession()->pageTextContains('This theme requires the base theme test_invalid_basetheme to operate correctly.'); + $this->assertSession()->pageTextContains('This theme requires the base theme not_real_test_base_theme to operate correctly.'); + $this->assertSession()->pageTextContains('This theme requires the base theme test_invalid_base_theme to operate correctly.'); $this->assertSession()->pageTextContains('This theme requires the theme engine not_real_engine to operate correctly.'); // Check for the error text of a theme with the wrong core version // using 7.x and ^7. diff --git a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php index e3aeb3cb81ab7de0a9d30a68c4d1f06f956dc669..d2b9e2e00cda9fdc79c6e825b64ef9b67945b999 100644 --- a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php +++ b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php @@ -24,7 +24,7 @@ class MaintenanceThemeUpdateRegistryTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function prepareSettings() { + protected function prepareSettings(): void { parent::prepareSettings(); $this->writeSettings([ 'settings' => [ @@ -39,7 +39,7 @@ protected function prepareSettings() { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $info = [ 'type' => 'profile', diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php index b92e189948e3521d99c0f18c26d1fff1abccb332..736fb6975b9df44b8d9bbb86e84cee4ce5a995f6 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php @@ -59,12 +59,12 @@ protected function setUp(): void { * Tests libraries-override. */ public function testStylesheets(): void { - $this->themeInstaller->install(['test_basetheme', 'test_subtheme']); + $this->themeInstaller->install(['test_base_theme', 'test_subtheme']); $this->config('system.theme') ->set('default', 'test_subtheme') ->save(); - $base = $this->getThemePath('test_basetheme'); + $base = $this->getThemePath('test_base_theme'); $sub = $this->getThemePath('test_subtheme') . '/css'; // All removals are expected to be based on a file's path and name and diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php index 56fe747d0a30ed1cc62e5a5d98b77f86165e2b48..010f1ccb5210188e45d238ff2eb8cacead2a9160 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php @@ -171,7 +171,7 @@ public function testThemeInstallWithModuleDependencies($theme_name, array $first * @param string[] $module_names * An array of module machine names. */ - protected function uninstallModules(array $module_names) { + protected function uninstallModules(array $module_names): void { $assert_session = $this->assertSession(); $this->drupalGet('admin/modules/uninstall'); foreach ($module_names as $attribute) { @@ -200,7 +200,7 @@ protected function uninstallModules(array $module_names) { * @param string $theme_name * The theme name. */ - protected function uninstallTheme($theme_name) { + protected function uninstallTheme($theme_name): void { $this->drupalGet('admin/appearance'); $this->clickLink("Uninstall $theme_name theme"); $this->assertSession()->pageTextContains("The $theme_name theme has been uninstalled."); diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php index d847abb559e3b141bedc52edede0fd8546caacab..b523c2bd50f745304711cec41021f4e220d1eab8 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php @@ -47,7 +47,7 @@ public function testThemeUpdates(): void { /** * {@inheritdoc} */ - protected function doSelectionTest() { + protected function doSelectionTest(): void { // Ensure that the theme's post update appears as expected. $this->assertSession()->responseContains('test_theme_depending_on_modules theme'); $this->assertSession()->responseContains('Install a dependent module.'); diff --git a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php index 45605375978194d22b5f542e773250a34e84e47c..838a5cf2a54e5cdf1273aa8ddfaa3da1780ceca9 100644 --- a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php +++ b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php @@ -188,7 +188,7 @@ protected function assertTwigTransTags(): void { /** * Helper function: install languages. */ - protected function installLanguages() { + protected function installLanguages(): void { $file_system = \Drupal::service('file_system'); foreach ($this->languages as $langcode => $name) { // Generate custom .po contents for the language. diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php index 371b939cc8b6a31b42c815a638c694c8844dd2c6..0990ccde80755e4ca5be61f5158757b7dd6be243 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/EquivalentUpdateTest.php @@ -56,7 +56,7 @@ protected function setUp(): void { /** * Tests that update hooks are properly run. */ - public function testUpdateHooks() { + public function testUpdateHooks(): void { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); $this->drupalLogin($this->user); @@ -202,7 +202,7 @@ public function testUpdateHooks() { /** * Tests that module uninstall removes skipped update information. */ - public function testModuleUninstall() { + public function testModuleUninstall(): void { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php index 77d15a813e5bf60b2b11785ee9f20139c831b941..484f520da0b5f68baef2e704f84273259815a236 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php @@ -51,9 +51,9 @@ public function testRebuild(): void { $this->assertFalse($cache->get('rebuild_test')); $this->refreshVariables(); $this->assertSame(1, \Drupal::state()->get('container_rebuild_test.count', 0)); - $this->drupalGet('/container_rebuild_test/module_test/module_test_system_info_alter'); + $this->drupalGet('/container_rebuild_test/module_test/system_info_alter'); $this->assertSession()->pageTextContains('module_test: core/modules/system/tests/modules/module_test'); - $this->assertSession()->pageTextContains('module_test_system_info_alter: true'); + $this->assertSession()->pageTextContains('system_info_alter: true'); // Move a module to ensure it does not break the rebuild. $file_system = new Filesystem(); @@ -63,9 +63,9 @@ public function testRebuild(): void { $this->assertSession()->addressEquals(new Url('<front>')); $this->refreshVariables(); $this->assertSame(1, \Drupal::state()->get('container_rebuild_test.count', 0)); - $this->drupalGet('/container_rebuild_test/module_test/module_test_system_info_alter'); + $this->drupalGet('/container_rebuild_test/module_test/system_info_alter'); $this->assertSession()->pageTextContains('module_test: ' . $this->siteDirectory . '/modules/module_test'); - $this->assertSession()->pageTextContains('module_test_system_info_alter: true'); + $this->assertSession()->pageTextContains('system_info_alter: true'); // Disable a module by writing to the core.extension list. $this->config('core.extension')->clear('module.module_test')->save(); @@ -74,9 +74,9 @@ public function testRebuild(): void { $this->assertSession()->addressEquals(new Url('<front>')); $this->refreshVariables(); $this->assertSame(1, \Drupal::state()->get('container_rebuild_test.count', 0)); - $this->drupalGet('/container_rebuild_test/module_test/module_test_system_info_alter'); + $this->drupalGet('/container_rebuild_test/module_test/system_info_alter'); $this->assertSession()->pageTextContains('module_test: not installed'); - $this->assertSession()->pageTextContains('module_test_system_info_alter: false'); + $this->assertSession()->pageTextContains('system_info_alter: false'); // Enable a module by writing to the core.extension list. $modules = $this->config('core.extension')->get('module'); @@ -87,9 +87,9 @@ public function testRebuild(): void { $this->assertSession()->addressEquals(new Url('<front>')); $this->refreshVariables(); $this->assertSame(1, \Drupal::state()->get('container_rebuild_test.count', 0)); - $this->drupalGet('/container_rebuild_test/module_test/module_test_system_info_alter'); + $this->drupalGet('/container_rebuild_test/module_test/system_info_alter'); $this->assertSession()->pageTextContains('module_test: ' . $this->siteDirectory . '/modules/module_test'); - $this->assertSession()->pageTextContains('module_test_system_info_alter: true'); + $this->assertSession()->pageTextContains('system_info_alter: true'); // Test how many container rebuild occur when there is no cached container. \Drupal::state()->set('container_rebuild_test.count', 0); diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php index 4f97e46ffe4724f386b242d42c531787889f01a7..b6ae484f42e401da79ad75f55608ecbd8e47ebf6 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php @@ -26,7 +26,7 @@ class UpdatePathTestBaseFilledTest extends UpdatePathTestBase { /** * {@inheritdoc} */ - protected function setDatabaseDumpFiles() { + protected function setDatabaseDumpFiles(): void { $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; @@ -400,7 +400,7 @@ public function testUpdatedSite(): void { /** * {@inheritdoc} */ - protected function replaceUser1() { + protected function replaceUser1(): void { // Do not replace the user from our dump. } diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php index 18e9adbefad8531158e9332eaa8aa0ec8a8c4c90..ffaaba1119aa800cf98011a196052dceaf1790f2 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php @@ -40,7 +40,7 @@ public function testJavaScriptLoading(): void { /** * {@inheritdoc} */ - protected function doSelectionTest() { + protected function doSelectionTest(): void { // Ensure that at least one JS script has drupalSettings in there. $scripts = $this->xpath('//script'); $found = FALSE; diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php index 814c02b9920ca7481ab6d2f3221a112f3743532a..fdcd9491812692cb26caba2556bbb220a0cfe733 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php @@ -63,7 +63,7 @@ public function testPostUpdate(): void { /** * {@inheritdoc} */ - protected function doSelectionTest() { + protected function doSelectionTest(): void { $this->assertSession()->assertEscaped("Post update that throws an exception."); } diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php index 7eca9da31fd369c7f1b67b0f802f28ba0b92ed80..11084dcbf0aeb35b44653d9732e7450eb3748fb8 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php @@ -68,7 +68,7 @@ public function testPostUpdate(): void { /** * {@inheritdoc} */ - protected function doSelectionTest() { + protected function doSelectionTest(): void { // First update, should not be run since this module's update hooks fail. $this->assertSession()->responseContains('8001 - This update will fail.'); $this->assertSession()->responseContains('8002 - A further update'); diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php index 3cd3416a268fb051d993e277dd6a900ce7749127..1a4ad97af1a49eb5a7928692c2f5de899ba4d138 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php @@ -67,7 +67,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function doSelectionTest() { + protected function doSelectionTest(): void { // Ensure that normal and post_update updates are merged together on the // selection page. $this->assertSession()->responseContains('<ul><li>8001 - Normal update_N() function.</li><li>First update.</li><li>Second update.</li><li>Test0 update.</li><li>Test1 update.</li><li>Testing batch processing in post updates update.</li></ul>'); diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php index ed305861a62925720b6939d34317f9e26827dcd9..52524acf9fd26bac3f3dca97b106b5cad8960c30 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php @@ -845,7 +845,7 @@ public function testMaintenanceModeLink(): void { /** * Helper function to run updates via the browser. */ - protected function runUpdates($maintenance_mode) { + protected function runUpdates($maintenance_mode): void { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); $schema_version = $update_registry->getInstalledVersion('update_script_test'); diff --git a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php index 98bd03714d50ce0fff073e0a18aa8679bc106e13..2f8b14a32e2e558459ed7f456a5026333b33aa57 100644 --- a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php +++ b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php @@ -69,7 +69,7 @@ public function testBasicFeedAddNoTitle(): void { // Glean the content from the response object. $this->setRawContent($response->getContent()); // Assert that the content contains the RSS links we specified. - foreach ($urls as $description => $feed_info) { + foreach ($urls as $feed_info) { $this->assertPattern($this->urlToRSSLinkPattern($feed_info['url'], $feed_info['title'])); } } diff --git a/core/modules/system/tests/src/Kernel/Common/UrlTest.php b/core/modules/system/tests/src/Kernel/Common/UrlTest.php index d087d73c51e2aaaff427eb3aa9caff7c5c4a3197..3d7dacc402700f00c71133966fe5e50dfecdb9cd 100644 --- a/core/modules/system/tests/src/Kernel/Common/UrlTest.php +++ b/core/modules/system/tests/src/Kernel/Common/UrlTest.php @@ -22,6 +22,9 @@ */ class UrlTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['common_test', 'url_alter_test']; /** @@ -165,11 +168,11 @@ public function testLinkRenderArrayText(): void { /** * Checks for class existence in link. * - * @param $attribute + * @param string $attribute * Attribute to be checked. - * @param $link + * @param string $link * URL to search. - * @param $class + * @param string $class * Element class to search for. * * @return bool diff --git a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php index 6df2d23e5223b8bf73865412742f005f1e41abcd..b9b4f96cec0976e40969cf8089d6aedfe712b1a8 100644 --- a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php +++ b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php @@ -15,6 +15,9 @@ */ class DecoratedServiceTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'decorated_service_test', ]; diff --git a/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php b/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php index c6ae196ccb7d1d2c6eef1583f55f8b0d547e023c..4d8784c4064ae2b5c267fd2c73343109119694e2 100644 --- a/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php +++ b/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php @@ -57,7 +57,7 @@ public function testConfigUpdateImport(): void { /** * Tests updating an action during import. */ - protected function doActionUpdate() { + protected function doActionUpdate(): void { // Create a test action with a known label. $name = 'system.action.apple'; $entity = Action::create([ @@ -78,7 +78,7 @@ protected function doActionUpdate() { /** * Tests updating a block during import. */ - protected function doBlockUpdate() { + protected function doBlockUpdate(): void { // Create a test block with a known label. $name = 'block.block.apple'; $block = $this->placeBlock('system_powered_by_block', [ @@ -98,7 +98,7 @@ protected function doBlockUpdate() { /** * Tests updating a filter format during import. */ - protected function doFilterFormatUpdate() { + protected function doFilterFormatUpdate(): void { // Create a test filter format with a known label. $name = 'filter.format.plain_text'; @@ -130,7 +130,7 @@ protected function doFilterFormatUpdate() { /** * Tests updating an image style during import. */ - protected function doImageStyleUpdate() { + protected function doImageStyleUpdate(): void { // Create a test image style with a known label. $name = 'image.style.thumbnail'; @@ -167,7 +167,7 @@ protected function doImageStyleUpdate() { /** * Tests updating a search page during import. */ - protected function doSearchPageUpdate() { + protected function doSearchPageUpdate(): void { // Create a test search page with a known label. $name = 'search.page.apple'; $entity = SearchPage::create([ @@ -189,7 +189,7 @@ protected function doSearchPageUpdate() { /** * Tests updating of third party settings. */ - protected function doThirdPartySettingsUpdate() { + protected function doThirdPartySettingsUpdate(): void { // Create a test action with a known label. $name = 'system.action.third_party_settings_test'; @@ -226,7 +226,7 @@ protected function doThirdPartySettingsUpdate() { * @param mixed $expected * The expected default value of the plugin config setting. */ - protected function checkSinglePluginConfigSync(EntityWithPluginCollectionInterface $entity, $config_key, $setting_key, $expected) { + protected function checkSinglePluginConfigSync(EntityWithPluginCollectionInterface $entity, $config_key, $setting_key, $expected): void { $plugin_collection = $entity->getPluginCollections()[$config_key]; $settings = $entity->get($config_key); diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php index 3f29865ac954e25fe99619921387c9ee7c0a4f47..84add63741e00f2d2e9a4334986e62b2e04a9d37 100644 --- a/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php +++ b/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php @@ -4,7 +4,8 @@ namespace Drupal\Tests\system\Kernel\Entity; -use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; +use Drupal\Core\Entity\Attribute\EntityType; +use Drupal\Core\Plugin\Discovery\AttributeClassDiscovery; use Drupal\KernelTests\KernelTestBase; /** @@ -22,10 +23,10 @@ public function testEntityLabelCasing(): void { $modules = scandir($base_directory); $paths = []; foreach ($modules as $module) { - $paths["\Drupal\\{$module}\Entity"] = $base_directory . $module . '/src/'; + $paths["Drupal\\{$module}"] = $base_directory . $module . '/src/'; } $namespaces = new \ArrayObject($paths); - $discovery = new AnnotatedClassDiscovery('Entity', $namespaces, 'Drupal\Core\Entity\Annotation\EntityType'); + $discovery = new AttributeClassDiscovery('Entity', $namespaces, EntityType::class); $definitions = $discovery->getDefinitions(); foreach ($definitions as $definition) { diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php index f291fa7aeb1f91b8e2be4cd97e7c7ebd542bbd89..a300066cc48c86db22ad8e08732707f588a71cee 100644 --- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php +++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php @@ -58,13 +58,13 @@ public function testSubmissionWorkflow(): void { /** * Programmatically submits the form_test.module form with the given values. * - * @param $values + * @param array $values * An array of field values to be submitted. - * @param $valid_input + * @param bool $valid_input * A boolean indicating whether or not the form submission is expected to * be valid. */ - protected function doSubmitForm($values, $valid_input) { + protected function doSubmitForm($values, $valid_input): void { // Programmatically submit the given values. $form_state = (new FormState())->setValues($values); \Drupal::formBuilder()->submitForm('\Drupal\form_test\Form\FormTestProgrammaticForm', $form_state); diff --git a/core/modules/system/tests/src/Kernel/Mail/MailTest.php b/core/modules/system/tests/src/Kernel/Mail/MailTest.php index 444075a265516de471c198201be7b5cc52116935..73c9974c30455fa0eee855d20f7909794d97810a 100644 --- a/core/modules/system/tests/src/Kernel/Mail/MailTest.php +++ b/core/modules/system/tests/src/Kernel/Mail/MailTest.php @@ -387,7 +387,7 @@ public function testRenderedElementsUseAbsolutePaths(): void { * @param string $mail_interface * The mail interface to configure. */ - protected function configureDefaultMailInterface($mail_interface) { + protected function configureDefaultMailInterface($mail_interface): void { $GLOBALS['config']['system.mail']['interface']['default'] = $mail_interface; } diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php index 262d3589a4141627e65e3e9c6c87ef88796ceb83..92326b60eb92bc2fee9682f1c3c50b25c077730b 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php @@ -14,6 +14,9 @@ */ class MigrateActionsTest extends MigrateDrupal6TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['comment', 'node']; /** diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php index 60dda796a078d19b3ea3e33b916532c5cfbb28f4..147fa619336983f088d647d1148231a50a0e7e1a 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php @@ -14,6 +14,9 @@ */ class MigrateActionsTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['comment', 'node']; /** diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php index 2fa4229480a771861e1e95f5fc38d0329fc1ca0c..a60cff4d797ff937aa73dcb143b304c727c12ab3 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php @@ -30,9 +30,9 @@ protected function setUp(): void { * The menu ID. * @param string $language * The menu language. - * @param $label + * @param string $label * The menu label. - * @param $description + * @param string $description * The menu description. * * @internal diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php index eadbc007bcb297f699e69e38051768aa9d59cda8..60a0f2c4af6f7db9c79ec3f59cfe1fd1c3f191c4 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php @@ -13,6 +13,9 @@ */ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['file', 'system']; protected $expectedConfig = [ diff --git a/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php b/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php index 219ded03f3007bf53b465579ee5d15a29121adee..13c8521de737ceaf29366413999e46e2c346a2ea 100644 --- a/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php +++ b/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php @@ -94,7 +94,7 @@ public function testGetOverride(): void { * @param array $configuration * An array of configuration to set. Will be merged with default values. */ - protected function setSettings($name = 'default', array $configuration = []) { + protected function setSettings($name = 'default', array $configuration = []): void { $settings['php_storage'][$name] = $configuration + [ 'class' => 'Drupal\system\PhpStorage\MockPhpStorage', 'directory' => 'tmp://', diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php index 42ff6c944e7fa492570af51c15a17d277e11aa95..7ca305c65aafe74f6d4afdff4758963ca25a351f 100644 --- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php +++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php @@ -341,7 +341,7 @@ public function testQueueWorkerDeriver(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('test_logger', get_class($this->logger->reveal())) ->addTag('logger'); diff --git a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php index 545d15074ab73438dd81a9a0d15ecb5c47d49a5c..dbdbccc74397c620f4b0f83c9e265d341deb3020 100644 --- a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php +++ b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php @@ -13,6 +13,9 @@ */ class InfoAlterTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php index 21bfbe5d43e029300d5d4f0df02e15e74cbbd492..0e98f2bfdf4df63c849655b40b0967f80160cb23 100644 --- a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php +++ b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php @@ -114,15 +114,15 @@ public function testListThemes(): void { // Check if ThemeHandlerInterface::listInfo() returns disabled themes. // Check for base theme and subtheme lists. - $base_theme_list = ['test_basetheme' => 'Theme test base theme']; + $base_theme_list = ['test_base_theme' => 'Theme test base theme']; $sub_theme_list = ['test_subsubtheme' => 'Theme test subsubtheme', 'test_subtheme' => 'Theme test subtheme']; - $this->assertSame($sub_theme_list, $themes['test_basetheme']->sub_themes, 'Base theme\'s object includes list of subthemes.'); + $this->assertSame($sub_theme_list, $themes['test_base_theme']->sub_themes, 'Base theme\'s object includes list of subthemes.'); $this->assertSame($base_theme_list, $themes['test_subtheme']->base_themes, 'Subtheme\'s object includes list of base themes.'); // Check for theme engine in subtheme. $this->assertSame('twig', $themes['test_subtheme']->engine, 'Subtheme\'s object includes the theme engine.'); // Check for theme engine prefix. - $this->assertSame('twig', $themes['test_basetheme']->prefix, 'Base theme\'s object includes the theme engine prefix.'); + $this->assertSame('twig', $themes['test_base_theme']->prefix, 'Base theme\'s object includes the theme engine prefix.'); $this->assertSame('twig', $themes['test_subtheme']->prefix, 'Subtheme\'s object includes the theme engine prefix.'); } diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigIncludeTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigIncludeTest.php index 711a008eafa3082ccb3c1178dd53dbfc6d87cfea..c1bac735e804d5479fd4881d3be8baed3aa73d5f 100644 --- a/core/modules/system/tests/src/Kernel/Theme/TwigIncludeTest.php +++ b/core/modules/system/tests/src/Kernel/Theme/TwigIncludeTest.php @@ -136,7 +136,7 @@ public function testTemplateInclusion(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); if (!empty($this->twigConfig)) { $container->setParameter('twig.config', $this->twigConfig); diff --git a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php index fed64ed349d1c3f6cfc30bb29b156bdf276ae8c8..35d1615ced9b5eae5d3b158292fb7703c87435a2 100644 --- a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php +++ b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php @@ -391,13 +391,13 @@ public function testBuildWithUserPath(): void { /** * Setup the access manager to always allow access to routes. */ - public function setupAccessManagerToAllow() { + public function setupAccessManagerToAllow(): void { $this->accessManager->expects($this->any()) ->method('check') ->willReturn((new AccessResultAllowed())->cachePerPermissions()); } - protected function setupStubPathProcessor() { + protected function setupStubPathProcessor(): void { $this->pathProcessor->expects($this->any()) ->method('processInbound') ->willReturnArgument(0); @@ -417,7 +417,7 @@ public function setStringTranslation(TranslationInterface $string_translation) { return $this; } - public function setLinkGenerator(LinkGeneratorInterface $link_generator) { + public function setLinkGenerator(LinkGeneratorInterface $link_generator): void { $this->linkGenerator = $link_generator; } diff --git a/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php b/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php index ed3dce647b3eb85755ab16c7bf3d1739f4c92bf5..02c6e11d08783179f420235f19446382d73a371d 100644 --- a/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php +++ b/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php @@ -28,7 +28,7 @@ public function setUp(): void { /** * Converts a string to its PHP source equivalent for display in test messages. * - * @param $text + * @param string $text * The text string to convert. * * @return string diff --git a/core/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine b/core/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine index 423dcae8115b0e1467dd5258106a117c53cb824f..ec74b2aa1636800d07f70cc98712a752337fc2c5 100644 --- a/core/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine +++ b/core/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine @@ -14,7 +14,7 @@ /** * Implements hook_theme(). */ -function nyan_cat_theme($existing, $type, $theme, $path) { +function nyan_cat_theme($existing, $type, $theme, $path): array { return drupal_find_theme_templates($existing, '.nyan-cat.html', $path); } diff --git a/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml b/core/modules/system/tests/themes/test_base_theme/config/install/core.date_format.fancy.yml similarity index 92% rename from core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml rename to core/modules/system/tests/themes/test_base_theme/config/install/core.date_format.fancy.yml index ca93fc041024bf11d6d22b474e8a3b41e53d1ae1..a482a382d3d5b606d355e58f488a7ba431a1d752 100644 --- a/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml +++ b/core/modules/system/tests/themes/test_base_theme/config/install/core.date_format.fancy.yml @@ -6,7 +6,7 @@ status: true dependencies: enforced: theme: - - test_basetheme + - test_base_theme id: fancy label: 'Fancy date' locked: false diff --git a/core/modules/system/tests/themes/test_basetheme/config/install/test_basetheme.settings.yml b/core/modules/system/tests/themes/test_base_theme/config/install/test_base_theme.settings.yml similarity index 100% rename from core/modules/system/tests/themes/test_basetheme/config/install/test_basetheme.settings.yml rename to core/modules/system/tests/themes/test_base_theme/config/install/test_base_theme.settings.yml diff --git a/core/modules/system/tests/themes/test_basetheme/config/schema/test_basetheme.schema.yml b/core/modules/system/tests/themes/test_base_theme/config/schema/test_base_theme.schema.yml similarity index 89% rename from core/modules/system/tests/themes/test_basetheme/config/schema/test_basetheme.schema.yml rename to core/modules/system/tests/themes/test_base_theme/config/schema/test_base_theme.schema.yml index e22c3c5be75348b5b270ffbdad0d1b8628d2e517..7bef087bb58b1cf0c649919e3fe1c5f6ffb45127 100644 --- a/core/modules/system/tests/themes/test_basetheme/config/schema/test_basetheme.schema.yml +++ b/core/modules/system/tests/themes/test_base_theme/config/schema/test_base_theme.schema.yml @@ -1,4 +1,4 @@ -test_basetheme.settings: +test_base_theme.settings: type: theme_settings label: 'Test base theme settings' mapping: diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml b/core/modules/system/tests/themes/test_base_theme/test_base_theme.info.yml similarity index 87% rename from core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml rename to core/modules/system/tests/themes/test_base_theme/test_base_theme.info.yml index ad03c934e9f683579f0b547e6f0e538312dea199..8c6468a79493f1167eb711fc0c10d31eb943bc0f 100644 --- a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml +++ b/core/modules/system/tests/themes/test_base_theme/test_base_theme.info.yml @@ -6,7 +6,7 @@ base theme: false hidden: true libraries: - - test_basetheme/global-styling + - test_base_theme/global-styling libraries-override: core/drupal.dialog: js: @@ -21,4 +21,4 @@ libraries-override: libraries-extend: starterkit_theme/base: - - test_basetheme/global-styling + - test_base_theme/global-styling diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml b/core/modules/system/tests/themes/test_base_theme/test_base_theme.libraries.yml similarity index 100% rename from core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml rename to core/modules/system/tests/themes/test_base_theme/test_base_theme.libraries.yml diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.theme b/core/modules/system/tests/themes/test_base_theme/test_base_theme.theme similarity index 67% rename from core/modules/system/tests/themes/test_basetheme/test_basetheme.theme rename to core/modules/system/tests/themes/test_base_theme/test_base_theme.theme index 1276117096f8bf7b89f25bd18c151620abc78138..c6eab50d0ebfc0bb185a54bbe11bacb4b51ef016 100644 --- a/core/modules/system/tests/themes/test_basetheme/test_basetheme.theme +++ b/core/modules/system/tests/themes/test_base_theme/test_base_theme.theme @@ -13,7 +13,7 @@ /** * Implements hook_views_pre_render(). */ -function test_basetheme_views_pre_render(ViewExecutable $view) { +function test_base_theme_views_pre_render(ViewExecutable $view): void { // We append the function name to the title for test to check for. $view->setTitle($view->getTitle() . ":" . __FUNCTION__); } @@ -21,7 +21,7 @@ function test_basetheme_views_pre_render(ViewExecutable $view) { /** * Implements hook_views_post_render(). */ -function test_basetheme_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) { +function test_base_theme_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache): void { // We append the function name to the title for test to check for. $view->setTitle($view->getTitle() . ":" . __FUNCTION__); } @@ -29,11 +29,11 @@ function test_basetheme_views_post_render(ViewExecutable $view, &$output, CacheP /** * Implements hook_preprocess_HOOK() for theme_test_template_test templates. */ -function test_basetheme_preprocess_theme_test_template_test(&$variables) { +function test_base_theme_preprocess_theme_test_template_test(&$variables): void { } /** * Implements hook_preprocess_HOOK() for theme_test_function_suggestions theme functions. */ -function test_basetheme_preprocess_theme_test_function_suggestions(&$variables) { +function test_base_theme_preprocess_theme_test_function_suggestions(&$variables): void { } diff --git a/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml b/core/modules/system/tests/themes/test_invalid_base_theme/test_invalid_base_theme.info.yml similarity index 78% rename from core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml rename to core/modules/system/tests/themes/test_invalid_base_theme/test_invalid_base_theme.info.yml index 7d7d22960a62d95e81a27f8a3af5edd057bea590..ae8ca8b93f537e05548079e3116c7b99d0e721f3 100644 --- a/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml +++ b/core/modules/system/tests/themes/test_invalid_base_theme/test_invalid_base_theme.info.yml @@ -2,4 +2,4 @@ name: 'Theme test with invalid base theme' type: theme description: 'Test theme which has a non-existent base theme.' version: VERSION -base theme: not_real_test_basetheme +base theme: not_real_test_base_theme diff --git a/core/modules/system/tests/themes/test_invalid_basetheme_sub/test_invalid_basetheme_sub.info.yml b/core/modules/system/tests/themes/test_invalid_base_theme_sub/test_invalid_base_theme_sub.info.yml similarity index 83% rename from core/modules/system/tests/themes/test_invalid_basetheme_sub/test_invalid_basetheme_sub.info.yml rename to core/modules/system/tests/themes/test_invalid_base_theme_sub/test_invalid_base_theme_sub.info.yml index 3df3931014f03e74816e6aa7842a5b3477a2b601..92bade24b41f0ae9019b9f58e261d8beda19855b 100644 --- a/core/modules/system/tests/themes/test_invalid_basetheme_sub/test_invalid_basetheme_sub.info.yml +++ b/core/modules/system/tests/themes/test_invalid_base_theme_sub/test_invalid_base_theme_sub.info.yml @@ -2,4 +2,4 @@ name: 'Theme test with valid base theme but no grandparent base theme' type: theme description: 'Test theme which has a non-existent base theme in the base chain.' version: VERSION -base theme: test_invalid_basetheme +base theme: test_invalid_base_theme diff --git a/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml b/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml index c512f2319d42549466a1ab99cde980192a8100b1..9435165b682ab515f964c918f0897c4888ff79d1 100644 --- a/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml +++ b/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml @@ -4,7 +4,7 @@ description: 'Test theme which uses test_subtheme as the base theme.' version: VERSION base theme: test_subtheme libraries-override: - test_basetheme/global-styling: + test_base_theme/global-styling: css: base: css/sub-sub-last-override.css: false diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml index 919436f472c639bef7b43ac198adbd9c1624d32b..12de766ba9cd67aeddae634f18b7cf5e179f38cf 100644 --- a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml +++ b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml @@ -1,8 +1,8 @@ name: 'Theme test subtheme' type: theme -description: 'Test theme which uses test_basetheme as the base theme.' +description: 'Test theme which uses test_base_theme as the base theme.' version: VERSION -base theme: test_basetheme +base theme: test_base_theme libraries: - test_subtheme/global-styling libraries-override: @@ -10,7 +10,7 @@ libraries-override: css: base: css/sub-remove.css: false - test_basetheme/global-styling: + test_base_theme/global-styling: css: base: base-add.sub-remove.css: false diff --git a/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/src/Hook/TestModuleRequiredByThemeHooks.php b/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/src/Hook/TestModuleRequiredByThemeHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..b9eca990f184e9b1828ae9ed60b5e852e500c080 --- /dev/null +++ b/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/src/Hook/TestModuleRequiredByThemeHooks.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\test_module_required_by_theme\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for test_module_required_by_theme. + */ +class TestModuleRequiredByThemeHooks { + + /** + * Implements hook_system_info_alter(). + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(array &$info, Extension $file, $type) { + if ($file->getName() == 'test_theme_depending_on_modules') { + $new_info = \Drupal::state()->get('test_theme_depending_on_modules.system_info_alter'); + if ($new_info) { + $info = $new_info + $info; + } + } + } + +} diff --git a/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/test_module_required_by_theme.module b/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/test_module_required_by_theme.module deleted file mode 100644 index ef2f6c7988e6dac467d4a7e9a98d6ae3d9234165..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/test_module_required_by_theme.module +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @file - * This file provides testing functionality for update.php. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - */ -function test_module_required_by_theme_system_info_alter(array &$info, Extension $file, $type) { - if ($file->getName() == 'test_theme_depending_on_modules') { - $new_info = \Drupal::state()->get('test_theme_depending_on_modules.system_info_alter'); - if ($new_info) { - $info = $new_info + $info; - } - } -} diff --git a/core/modules/system/tests/themes/test_theme_depending_on_modules/test_theme_depending_on_modules.post_update.php b/core/modules/system/tests/themes/test_theme_depending_on_modules/test_theme_depending_on_modules.post_update.php index 41d6d28351e9af0f6cf58d129cf1f4aedc980e21..7b197fce68f9e62eb336bd81b13a9ba2b8de182b 100644 --- a/core/modules/system/tests/themes/test_theme_depending_on_modules/test_theme_depending_on_modules.post_update.php +++ b/core/modules/system/tests/themes/test_theme_depending_on_modules/test_theme_depending_on_modules.post_update.php @@ -22,9 +22,9 @@ function test_theme_depending_on_modules_post_update_module_install(&$sandbox = if (\Drupal::state()->get('test_theme_depending_on_modules.removed_post_updates')) { /** - * Implements HOOK_removed_post_updates(). + * Implements hook_removed_post_updates(). */ - function test_theme_depending_on_modules_removed_post_updates() { + function test_theme_depending_on_modules_removed_post_updates(): array { return [ 'test_theme_depending_on_modules_post_update_foo' => '3.1', ]; diff --git a/core/modules/system/tests/themes/test_theme_settings/theme-settings.php b/core/modules/system/tests/themes/test_theme_settings/theme-settings.php index e849de145758fcd958bf14a0ccbab9513485719e..22f17c2285dadc08dd01e7776ed63a1fdb055cdd 100644 --- a/core/modules/system/tests/themes/test_theme_settings/theme-settings.php +++ b/core/modules/system/tests/themes/test_theme_settings/theme-settings.php @@ -13,7 +13,7 @@ /** * Implements hook_form_system_theme_settings_alter(). */ -function test_theme_settings_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) { +function test_theme_settings_form_system_theme_settings_alter(&$form, FormStateInterface $form_state): void { $form['custom_logo'] = [ '#type' => 'managed_file', '#title' => t('Secondary logo.'), diff --git a/core/modules/system/tests/themes/test_theme_theme/test_theme_theme.theme b/core/modules/system/tests/themes/test_theme_theme/test_theme_theme.theme index 0e7bc88f255ff762824c7ff61302996767f50609..6046d47a08c93719a5d94c257ad467ca03fe81cb 100644 --- a/core/modules/system/tests/themes/test_theme_theme/test_theme_theme.theme +++ b/core/modules/system/tests/themes/test_theme_theme/test_theme_theme.theme @@ -13,7 +13,7 @@ /** * Implements hook_form_system_theme_settings_alter(). */ -function test_theme_theme_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) { +function test_theme_theme_form_system_theme_settings_alter(&$form, FormStateInterface $form_state): void { $form['custom_logo'] = [ '#type' => 'managed_file', diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php index a0824d755be6de7bf2a3a5be3f76574e8e20a59f..d96aaa83a7ae1a1636fe54cadcab8ddcaca2c080 100644 --- a/core/modules/taxonomy/src/Entity/Term.php +++ b/core/modules/taxonomy/src/Entity/Term.php @@ -2,85 +2,98 @@ namespace Drupal\taxonomy\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\Entity\EntityListBuilder; +use Drupal\Core\Entity\EntityViewBuilder; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; +use Drupal\Core\Entity\Form\RevisionRevertForm; +use Drupal\Core\Entity\Form\RevisionDeleteForm; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\taxonomy\Form\TermDeleteForm; +use Drupal\taxonomy\TermAccessControlHandler; +use Drupal\taxonomy\TermForm; use Drupal\taxonomy\TermInterface; +use Drupal\taxonomy\TermStorage; +use Drupal\taxonomy\TermStorageSchema; +use Drupal\taxonomy\TermTranslationHandler; +use Drupal\taxonomy\TermViewsData; use Drupal\user\StatusItem; /** * Defines the taxonomy term entity. - * - * @ContentEntityType( - * id = "taxonomy_term", - * label = @Translation("Taxonomy term"), - * label_collection = @Translation("Taxonomy terms"), - * label_singular = @Translation("taxonomy term"), - * label_plural = @Translation("taxonomy terms"), - * label_count = @PluralTranslation( - * singular = "@count taxonomy term", - * plural = "@count taxonomy terms", - * ), - * bundle_label = @Translation("Vocabulary"), - * handlers = { - * "storage" = "Drupal\taxonomy\TermStorage", - * "storage_schema" = "Drupal\taxonomy\TermStorageSchema", - * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", - * "list_builder" = "Drupal\Core\Entity\EntityListBuilder", - * "access" = "Drupal\taxonomy\TermAccessControlHandler", - * "views_data" = "Drupal\taxonomy\TermViewsData", - * "form" = { - * "default" = "Drupal\taxonomy\TermForm", - * "delete" = "Drupal\taxonomy\Form\TermDeleteForm", - * "revision-delete" = \Drupal\Core\Entity\Form\RevisionDeleteForm::class, - * "revision-revert" = \Drupal\Core\Entity\Form\RevisionRevertForm::class, - * }, - * "route_provider" = { - * "revision" = \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider::class, - * }, - * "translation" = "Drupal\taxonomy\TermTranslationHandler" - * }, - * base_table = "taxonomy_term_data", - * data_table = "taxonomy_term_field_data", - * revision_table = "taxonomy_term_revision", - * revision_data_table = "taxonomy_term_field_revision", - * show_revision_ui = TRUE, - * translatable = TRUE, - * entity_keys = { - * "id" = "tid", - * "revision" = "revision_id", - * "bundle" = "vid", - * "label" = "name", - * "langcode" = "langcode", - * "uuid" = "uuid", - * "published" = "status", - * }, - * revision_metadata_keys = { - * "revision_user" = "revision_user", - * "revision_created" = "revision_created", - * "revision_log_message" = "revision_log_message", - * }, - * bundle_entity_type = "taxonomy_vocabulary", - * field_ui_base_route = "entity.taxonomy_vocabulary.overview_form", - * common_reference_target = TRUE, - * links = { - * "canonical" = "/taxonomy/term/{taxonomy_term}", - * "delete-form" = "/taxonomy/term/{taxonomy_term}/delete", - * "edit-form" = "/taxonomy/term/{taxonomy_term}/edit", - * "create" = "/taxonomy/term", - * "revision" = "/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/view", - * "revision-delete-form" = "/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/delete", - * "revision-revert-form" = "/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/revert", - * "version-history" = "/taxonomy/term/{taxonomy_term}/revisions", - * }, - * permission_granularity = "bundle", - * collection_permission = "access taxonomy overview", - * constraints = { - * "TaxonomyHierarchy" = {} - * } - * ) */ +#[ContentEntityType( + id: 'taxonomy_term', + label: new TranslatableMarkup('Taxonomy term'), + label_collection: new TranslatableMarkup('Taxonomy terms'), + label_singular: new TranslatableMarkup('taxonomy term'), + label_plural: new TranslatableMarkup('taxonomy terms'), + entity_keys: [ + 'id' => 'tid', + 'revision' => 'revision_id', + 'bundle' => 'vid', + 'label' => 'name', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + 'published' => 'status', + ], + handlers: [ + 'storage' => TermStorage::class, + 'storage_schema' => TermStorageSchema::class, + 'view_builder' => EntityViewBuilder::class, + 'list_builder' => EntityListBuilder::class, + 'access' => TermAccessControlHandler::class, + 'views_data' => TermViewsData::class, + 'form' => [ + 'default' => TermForm::class, + 'delete' => TermDeleteForm::class, + 'revision-delete' => RevisionDeleteForm::class, + 'revision-revert' => RevisionRevertForm::class, + ], + 'route_provider' => [ + 'revision' => RevisionHtmlRouteProvider::class, + ], + 'translation' => TermTranslationHandler::class, + ], + links: [ + 'canonical' => '/taxonomy/term/{taxonomy_term}', + 'delete-form' => '/taxonomy/term/{taxonomy_term}/delete', + 'edit-form' => '/taxonomy/term/{taxonomy_term}/edit', + 'create' => '/taxonomy/term', + 'revision' => '/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/view', + 'revision-delete-form' => '/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/delete', + 'revision-revert-form' => '/taxonomy/term/{taxonomy_term}/revision/{taxonomy_term_revision}/revert', + 'version-history' => '/taxonomy/term/{taxonomy_term}/revisions', + ], + collection_permission: 'access taxonomy overview', + permission_granularity: 'bundle', + bundle_entity_type: 'taxonomy_vocabulary', + bundle_label: new TranslatableMarkup('Vocabulary'), + base_table: 'taxonomy_term_data', + data_table: 'taxonomy_term_field_data', + revision_table: 'taxonomy_term_revision', + revision_data_table: 'taxonomy_term_field_revision', + translatable: TRUE, + show_revision_ui: TRUE, + label_count: [ + 'singular' => '@count taxonomy term', + 'plural' => '@count taxonomy terms', + ], + field_ui_base_route: 'entity.taxonomy_vocabulary.overview_form', + common_reference_target: TRUE, + constraints: [ + 'TaxonomyHierarchy' => [], + ], + revision_metadata_keys: [ + 'revision_user' => 'revision_user', + 'revision_created' => 'revision_created', + 'revision_log_message' => 'revision_log_message', + ], +)] class Term extends EditorialContentEntityBase implements TermInterface { /** diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index 790a3744c8e1ac7e8d526f3f01e7ecafe789ebb1..e254e8ad0b45ea7899f2114d0dfc4ba107cdbf1e 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -2,65 +2,75 @@ namespace Drupal\taxonomy\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\taxonomy\Entity\Routing\VocabularyRouteProvider; +use Drupal\taxonomy\Form\OverviewTerms; +use Drupal\taxonomy\Form\VocabularyDeleteForm; +use Drupal\taxonomy\Form\VocabularyResetForm; +use Drupal\taxonomy\VocabularyAccessControlHandler; +use Drupal\taxonomy\VocabularyForm; use Drupal\taxonomy\VocabularyInterface; +use Drupal\taxonomy\VocabularyListBuilder; +use Drupal\taxonomy\VocabularyStorage; +use Drupal\user\Entity\EntityPermissionsRouteProvider; /** * Defines the taxonomy vocabulary entity. - * - * @ConfigEntityType( - * id = "taxonomy_vocabulary", - * label = @Translation("Taxonomy vocabulary"), - * label_singular = @Translation("vocabulary"), - * label_plural = @Translation("vocabularies"), - * label_collection = @Translation("Taxonomy"), - * label_count = @PluralTranslation( - * singular = "@count vocabulary", - * plural = "@count vocabularies" - * ), - * handlers = { - * "storage" = "Drupal\taxonomy\VocabularyStorage", - * "list_builder" = "Drupal\taxonomy\VocabularyListBuilder", - * "access" = "Drupal\taxonomy\VocabularyAccessControlHandler", - * "form" = { - * "default" = "Drupal\taxonomy\VocabularyForm", - * "reset" = "Drupal\taxonomy\Form\VocabularyResetForm", - * "delete" = "Drupal\taxonomy\Form\VocabularyDeleteForm", - * "overview" = "Drupal\taxonomy\Form\OverviewTerms" - * }, - * "route_provider" = { - * "html" = "Drupal\taxonomy\Entity\Routing\VocabularyRouteProvider", - * "permissions" = "Drupal\user\Entity\EntityPermissionsRouteProvider", - * } - * }, - * admin_permission = "administer taxonomy", - * collection_permission = "access taxonomy overview", - * config_prefix = "vocabulary", - * bundle_of = "taxonomy_term", - * entity_keys = { - * "id" = "vid", - * "label" = "name", - * "weight" = "weight" - * }, - * links = { - * "add-form" = "/admin/structure/taxonomy/add", - * "delete-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/delete", - * "reset-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/reset", - * "overview-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview", - * "edit-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}", - * "entity-permissions-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview/permissions", - * "collection" = "/admin/structure/taxonomy", - * }, - * config_export = { - * "name", - * "vid", - * "description", - * "weight", - * "new_revision", - * } - * ) */ +#[ConfigEntityType( + id: 'taxonomy_vocabulary', + label: new TranslatableMarkup('Taxonomy vocabulary'), + label_collection: new TranslatableMarkup('Taxonomy'), + label_singular: new TranslatableMarkup('vocabulary'), + label_plural: new TranslatableMarkup('vocabularies'), + config_prefix: 'vocabulary', + entity_keys: [ + 'id' => 'vid', + 'label' => 'name', + 'weight' => 'weight', + ], + handlers: [ + 'storage' => VocabularyStorage::class, + 'list_builder' => VocabularyListBuilder::class, + 'access' => VocabularyAccessControlHandler::class, + 'form' => [ + 'default' => VocabularyForm::class, + 'reset' => VocabularyResetForm::class, + 'delete' => VocabularyDeleteForm::class, + 'overview' => OverviewTerms::class, + ], + 'route_provider' => [ + 'html' => VocabularyRouteProvider::class, + 'permissions' => EntityPermissionsRouteProvider::class, + ], + ], + links: [ + 'add-form' => '/admin/structure/taxonomy/add', + 'delete-form' => '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/delete', + 'reset-form' => '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/reset', + 'overview-form' => '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview', + 'edit-form' => '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}', + 'entity-permissions-form' => '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview/permissions', + 'collection' => '/admin/structure/taxonomy', + ], + admin_permission: 'administer taxonomy', + collection_permission: 'access taxonomy overview', + bundle_of: 'taxonomy_term', + label_count: [ + 'singular' => '@count vocabulary', + 'plural' => '@count vocabularies', + ], + config_export: [ + 'name', + 'vid', + 'description', + 'weight', + 'new_revision', + ], +)] class Vocabulary extends ConfigEntityBundleBase implements VocabularyInterface { /** diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..9447038c3141a487edd5629b48f45ca5ed6f3467 --- /dev/null +++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php @@ -0,0 +1,179 @@ +<?php + +namespace Drupal\taxonomy\Hook; + +use Drupal\taxonomy\Entity\Term; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy. + */ +class TaxonomyHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.taxonomy': + $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Taxonomy module allows users who have permission to create and edit content to categorize (tag) content of that type. Users who have the <em>Administer vocabularies and terms</em> <a href=":permissions" title="Taxonomy module permissions">permission</a> can add <em>vocabularies</em> that contain a set of related <em>terms</em>. The terms in a vocabulary can either be pre-set by an administrator or built gradually as content is added and edited. Terms may be organized hierarchically if desired.', [ + ':permissions' => Url::fromRoute('user.admin_permissions.module', [ + 'modules' => 'taxonomy', + ])->toString(), + ]) . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":taxonomy">online documentation for the Taxonomy module</a>.', [':taxonomy' => 'https://www.drupal.org/docs/8/core/modules/taxonomy']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing vocabularies') . '</dt>'; + $output .= '<dd>' . t('Users who have the <em>Administer vocabularies and terms</em> permission can add and edit vocabularies from the <a href=":taxonomy_admin">Taxonomy administration page</a>. Vocabularies can be deleted from their <em>Edit vocabulary</em> page. Users with the <em>Taxonomy term: Administer fields</em> permission may add additional fields for terms in that vocabulary using the <a href=":field_ui">Field UI module</a>.', [ + ':taxonomy_admin' => Url::fromRoute('entity.taxonomy_vocabulary.collection')->toString(), + ':field_ui' => $field_ui_url, + ]) . '</dd>'; + $output .= '<dt>' . t('Managing terms') . '</dt>'; + $output .= '<dd>' . t('Users who have the <em>Administer vocabularies and terms</em> permission or the <em>Edit terms</em> permission for a particular vocabulary can add, edit, and organize the terms in a vocabulary from a vocabulary\'s term listing page, which can be accessed by going to the <a href=":taxonomy_admin">Taxonomy administration page</a> and clicking <em>List terms</em> in the <em>Operations</em> column. Users must have the <em>Administer vocabularies and terms</em> permission or the <em>Delete terms</em> permission for a particular vocabulary to delete terms.', [ + ':taxonomy_admin' => Url::fromRoute('entity.taxonomy_vocabulary.collection')->toString(), + ]) . ' </dd>'; + $output .= '<dt>' . t('Classifying entity content') . '</dt>'; + $output .= '<dd>' . t('A user with the <em>Administer fields</em> permission for a certain entity type may add <em>Taxonomy term</em> reference fields to the entity type, which will allow entities to be classified using taxonomy terms. See the <a href=":entity_reference">Entity Reference help</a> for more information about reference fields. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them.', [ + ':field_ui' => $field_ui_url, + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':entity_reference' => Url::fromRoute('help.page', [ + 'name' => 'entity_reference', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Adding new terms during content creation') . '</dt>'; + $output .= '<dd>' . t("Allowing users to add new terms gradually builds a vocabulary as content is added and edited. Users can add new terms if either of the two <em>Autocomplete</em> widgets is chosen for the Taxonomy term reference field in the <em>Manage form display</em> page for the field. You will also need to enable the <em>Create referenced entities if they don't already exist</em> option, and restrict the field to one vocabulary.") . '</dd>'; + $output .= '<dt>' . t('Configuring displays and form displays') . '</dt>'; + $output .= '<dd>' . t('See the <a href=":entity_reference">Entity Reference help</a> page for the field widgets and formatters that can be configured for any reference field on the <em>Manage display</em> and <em>Manage form display</em> pages. Taxonomy additionally provides an <em>RSS category</em> formatter that displays nothing when the entity item is displayed as HTML, but displays an RSS category instead of a list when the entity item is displayed in an RSS feed.', [ + ':entity_reference' => Url::fromRoute('help.page', [ + 'name' => 'entity_reference', + ])->toString(), + ]) . '</li>'; + $output .= '</ul>'; + $output .= '</dd>'; + $output .= '</dl>'; + return $output; + + case 'entity.taxonomy_vocabulary.collection': + $output = '<p>' . t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".') . '</p>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return ['taxonomy_term' => ['render element' => 'elements']]; + } + + /** + * Implements hook_local_tasks_alter(). + * + * @todo Evaluate removing as part of https://www.drupal.org/node/2358923. + */ + #[Hook('local_tasks_alter')] + public function localTasksAlter(&$local_tasks) { + $local_task_key = 'config_translation.local_tasks:entity.taxonomy_vocabulary.config_translation_overview'; + if (isset($local_tasks[$local_task_key])) { + // The config_translation module expects the base route to be + // entity.taxonomy_vocabulary.edit_form like it is for other configuration + // entities. Taxonomy uses the overview_form as the base route. + $local_tasks[$local_task_key]['base_route'] = 'entity.taxonomy_vocabulary.overview_form'; + } + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $term) { + $operations = []; + if ($term instanceof Term && $term->access('create')) { + $operations['add-child'] = [ + 'title' => t('Add child'), + 'weight' => 10, + 'url' => Url::fromRoute('entity.taxonomy_term.add_form', [ + 'taxonomy_vocabulary' => $term->bundle(), + ], [ + 'query' => [ + 'parent' => $term->id(), + ], + ]), + ]; + } + return $operations; + } + + /** + * @defgroup taxonomy_index Taxonomy indexing + * @{ + * Functions to maintain taxonomy indexing. + * + * Taxonomy uses default field storage to store canonical relationships + * between terms and fieldable entities. However its most common use case + * requires listing all content associated with a term or group of terms + * sorted by creation date. To avoid slow queries due to joining across + * multiple node and field tables with various conditions and order by criteria, + * we maintain a denormalized table with all relationships between terms, + * published nodes and common sort criteria such as status, sticky and created. + * When using other field storage engines or alternative methods of + * denormalizing this data you should set the + * taxonomy.settings:maintain_index_table to '0' to avoid unnecessary writes in + * SQL. + */ + + /** + * Implements hook_ENTITY_TYPE_insert() for node entities. + */ + #[Hook('node_insert')] + public function nodeInsert(EntityInterface $node) { + // Add taxonomy index entries for the node. + taxonomy_build_node_index($node); + } + + /** + * Implements hook_ENTITY_TYPE_update() for node entities. + */ + #[Hook('node_update')] + public function nodeUpdate(EntityInterface $node) { + // If we're not dealing with the default revision of the node, do not make any + // change to the taxonomy index. + if (!$node->isDefaultRevision()) { + return; + } + taxonomy_delete_node_index($node); + taxonomy_build_node_index($node); + } + + /** + * Implements hook_ENTITY_TYPE_predelete() for node entities. + */ + #[Hook('node_predelete')] + public function nodePredelete(EntityInterface $node) { + // Clean up the {taxonomy_index} table when nodes are deleted. + taxonomy_delete_node_index($node); + } + + /** + * Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities. + */ + #[Hook('taxonomy_term_delete')] + public function taxonomyTermDelete(Term $term) { + if (\Drupal::config('taxonomy.settings')->get('maintain_index_table')) { + // Clean up the {taxonomy_index} table when terms are deleted. + \Drupal::database()->delete('taxonomy_index')->condition('tid', $term->id())->execute(); + } + } + +} diff --git a/core/modules/taxonomy/src/Hook/TaxonomyTokensHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..07f5e6b9f9c6349b632a50e74e26da8afb95c41b --- /dev/null +++ b/core/modules/taxonomy/src/Hook/TaxonomyTokensHooks.php @@ -0,0 +1,202 @@ +<?php + +namespace Drupal\taxonomy\Hook; + +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\taxonomy\Entity\Vocabulary; +use Drupal\Core\Language\LanguageInterface; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy. + */ +class TaxonomyTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $types['term'] = [ + 'name' => t("Taxonomy terms"), + 'description' => t("Tokens related to taxonomy terms."), + 'needs-data' => 'term', + ]; + $types['vocabulary'] = [ + 'name' => t("Vocabularies"), + 'description' => t("Tokens related to taxonomy vocabularies."), + 'needs-data' => 'vocabulary', + ]; + // Taxonomy term related variables. + $term['tid'] = [ + 'name' => t("Term ID"), + 'description' => t("The unique ID of the taxonomy term."), + ]; + $term['uuid'] = ['name' => t('UUID'), 'description' => t("The UUID of the taxonomy term.")]; + $term['name'] = ['name' => t("Name"), 'description' => t("The name of the taxonomy term.")]; + $term['description'] = [ + 'name' => t("Description"), + 'description' => t("The optional description of the taxonomy term."), + ]; + $term['node-count'] = [ + 'name' => t("Node count"), + 'description' => t("The number of nodes tagged with the taxonomy term."), + ]; + $term['url'] = ['name' => t("URL"), 'description' => t("The URL of the taxonomy term.")]; + // Taxonomy vocabulary related variables. + $vocabulary['vid'] = [ + 'name' => t("Vocabulary ID"), + 'description' => t("The unique ID of the taxonomy vocabulary."), + ]; + $vocabulary['name'] = ['name' => t("Name"), 'description' => t("The name of the taxonomy vocabulary.")]; + $vocabulary['description'] = [ + 'name' => t("Description"), + 'description' => t("The optional description of the taxonomy vocabulary."), + ]; + $vocabulary['node-count'] = [ + 'name' => t("Node count"), + 'description' => t("The number of nodes tagged with terms belonging to the taxonomy vocabulary."), + ]; + $vocabulary['term-count'] = [ + 'name' => t("Term count"), + 'description' => t("The number of terms belonging to the taxonomy vocabulary."), + ]; + // Chained tokens for taxonomies + $term['vocabulary'] = [ + 'name' => t("Vocabulary"), + 'description' => t("The vocabulary the taxonomy term belongs to."), + 'type' => 'vocabulary', + ]; + $term['parent'] = [ + 'name' => t("Parent term"), + 'description' => t("The parent term of the taxonomy term, if one exists."), + 'type' => 'term', + ]; + $term['changed'] = [ + 'name' => t("Date changed"), + 'description' => t("The date the taxonomy was most recently updated."), + 'type' => 'date', + ]; + return ['types' => $types, 'tokens' => ['term' => $term, 'vocabulary' => $vocabulary]]; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = LanguageInterface::LANGCODE_DEFAULT; + } + $replacements = []; + if ($type == 'term' && !empty($data['term'])) { + $term = $data['term']; + $term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $options['langcode'] ?? NULL); + foreach ($tokens as $name => $original) { + switch ($name) { + case 'tid': + $replacements[$original] = $term->id(); + break; + + case 'uuid': + $replacements[$original] = $term->uuid(); + break; + + case 'name': + $replacements[$original] = $term->label(); + break; + + case 'description': + // "processed" returns a \Drupal\Component\Render\MarkupInterface via + // check_markup(). + $replacements[$original] = $term->description->processed; + break; + + case 'url': + $replacements[$original] = $term->toUrl('canonical', ['absolute' => TRUE])->toString(); + break; + + case 'node-count': + $query = \Drupal::database()->select('taxonomy_index'); + $query->condition('tid', $term->id()); + $query->addTag('term_node_count'); + $count = $query->countQuery()->execute()->fetchField(); + $replacements[$original] = $count; + break; + + case 'vocabulary': + $vocabulary = Vocabulary::load($term->bundle()); + $bubbleable_metadata->addCacheableDependency($vocabulary); + $replacements[$original] = $vocabulary->label(); + break; + + case 'parent': + $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); + if ($parents = $taxonomy_storage->loadParents($term->id())) { + $parent = array_pop($parents); + $bubbleable_metadata->addCacheableDependency($parent); + $replacements[$original] = $parent->getName(); + } + break; + + case 'changed': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = \Drupal::service('date.formatter')->format($term->getChangedTime(), 'medium', '', NULL, $langcode); + break; + } + } + if ($vocabulary_tokens = $token_service->findWithPrefix($tokens, 'vocabulary')) { + $vocabulary = Vocabulary::load($term->bundle()); + $replacements += $token_service->generate('vocabulary', $vocabulary_tokens, ['vocabulary' => $vocabulary], $options, $bubbleable_metadata); + } + if ($vocabulary_tokens = $token_service->findWithPrefix($tokens, 'parent')) { + $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); + if ($parents = $taxonomy_storage->loadParents($term->id())) { + $parent = array_pop($parents); + $replacements += $token_service->generate('term', $vocabulary_tokens, ['term' => $parent], $options, $bubbleable_metadata); + } + } + if ($changed_tokens = $token_service->findWithPrefix($tokens, 'changed')) { + $replacements += $token_service->generate('date', $changed_tokens, ['date' => $term->getChangedTime()], $options, $bubbleable_metadata); + } + } + elseif ($type == 'vocabulary' && !empty($data['vocabulary'])) { + $vocabulary = $data['vocabulary']; + foreach ($tokens as $name => $original) { + switch ($name) { + case 'vid': + $replacements[$original] = $vocabulary->id(); + break; + + case 'name': + $replacements[$original] = $vocabulary->label(); + break; + + case 'description': + $build = ['#markup' => $vocabulary->getDescription()]; + // @todo Fix in https://www.drupal.org/node/2577827 + $replacements[$original] = \Drupal::service('renderer')->renderInIsolation($build); + break; + + case 'term-count': + $replacements[$original] = \Drupal::entityQuery('taxonomy_term')->accessCheck(TRUE)->condition('vid', $vocabulary->id())->addTag('vocabulary_term_count')->count()->execute(); + break; + + case 'node-count': + $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); + $replacements[$original] = $taxonomy_storage->nodeCount($vocabulary->id()); + break; + } + } + } + return $replacements; + } + +} diff --git a/core/modules/taxonomy/src/Hook/TaxonomyViewsHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a446864caf9c50575a990b1abc4cec25f4cb81f0 --- /dev/null +++ b/core/modules/taxonomy/src/Hook/TaxonomyViewsHooks.php @@ -0,0 +1,77 @@ +<?php + +namespace Drupal\taxonomy\Hook; + +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy. + */ +class TaxonomyViewsHooks { + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $data['node_field_data']['term_node_tid'] = [ + 'title' => t('Taxonomy terms on node'), + 'help' => t('Relate nodes to taxonomy terms, specifying which vocabulary or vocabularies to use. This relationship will cause duplicated records if there are multiple terms.'), + 'relationship' => [ + 'id' => 'node_term_data', + 'label' => t('term'), + 'base' => 'taxonomy_term_field_data', + ], + 'field' => [ + 'title' => t('All taxonomy terms'), + 'help' => t('Display all taxonomy terms associated with a node from specified vocabularies.'), + 'id' => 'taxonomy_index_tid', + 'no group by' => TRUE, + 'click sortable' => FALSE, + ], + ]; + $data['node_field_data']['term_node_tid_depth'] = [ + 'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'), + 'real field' => 'nid', + 'argument' => [ + 'title' => t('Has taxonomy term ID (with depth)'), + 'id' => 'taxonomy_index_tid_depth', + 'accept depth modifier' => TRUE, + ], + 'filter' => [ + 'title' => t('Has taxonomy terms (with depth)'), + 'id' => 'taxonomy_index_tid_depth', + ], + ]; + $data['node_field_data']['term_node_tid_depth_modifier'] = [ + 'title' => t('Has taxonomy term ID depth modifier'), + 'help' => t('Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional contextual filter value.'), + 'argument' => [ + 'id' => 'taxonomy_index_tid_depth_modifier', + ], + ]; + } + + /** + * Implements hook_field_views_data_alter(). + * + * Views integration for entity reference fields which reference taxonomy terms. + * Adds a term relationship to the default field data. + * + * @see views_field_default_views_data() + */ + #[Hook('field_views_data_alter')] + public function fieldViewsDataAlter(array &$data, FieldStorageConfigInterface $field_storage) { + if ($field_storage->getType() == 'entity_reference' && $field_storage->getSetting('target_type') == 'taxonomy_term') { + foreach ($data as $table_name => $table_data) { + foreach ($table_data as $field_name => $field_data) { + if (isset($field_data['filter']) && $field_name != 'delta') { + $data[$table_name][$field_name]['filter']['id'] = 'taxonomy_index_tid'; + } + } + } + } + } + +} diff --git a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php index 6b6188a5efffad95d4f014b4a634382c9c9f2263..716c937f8f44744d113a40d65c23513e8355596a 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php +++ b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php @@ -43,7 +43,7 @@ class Tid extends ArgumentDefaultPluginBase implements CacheableDependencyInterf * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * * @param \Drupal\Core\Routing\RouteMatchInterface $route_match diff --git a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php index 353e913e043c89e922909233041c93e41c7eb05e..5dd75072810cfec1aaa4af0dfb32c4240239a5ff 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php @@ -31,7 +31,7 @@ class TaxonomyIndexTid extends PrerenderList { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index efb12a94f4f8a7760da692bf1b32c9457d519153..4cad71a81d16460675e3516009d168b4378c7fb5 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -27,7 +27,7 @@ class TaxonomyIndexTid extends ManyToOne { * * @var array|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $validated_exposed_input = NULL; /** @@ -57,7 +57,7 @@ class TaxonomyIndexTid extends ManyToOne { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index fb697827742b12bcc8696622e3dbe6ae6cd9a23c..edb8619e4ee8a2c197498cb27b67f592263de082 100644 --- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -30,7 +30,7 @@ class NodeTermData extends RelationshipPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php index 3bf3f204130b470b8512a09bbe06ff2a8009aaf8..75efbaceb5dbeaf07a66be4f8c1ece1db170b8af 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -207,7 +207,13 @@ public function save(array $form, FormStateInterface $form_state) { case SAVED_UPDATED: $this->messenger()->addStatus($this->t('Updated term %term.', ['%term' => $view_link])); $this->logger('taxonomy')->info('Updated term %term.', ['%term' => $term->getName(), 'link' => $edit_link]); - $form_state->setRedirect('entity.taxonomy_term.canonical', ['taxonomy_term' => $term->id()]); + + // Redirect to term view page if user has access, otherwise the form + // will be displayed again. + $canonicalUrl = $term->toUrl(); + if ($canonicalUrl->access()) { + $form_state->setRedirectUrl($canonicalUrl); + } break; } diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index 867097b962fe100290624ab006bff386c287aacb..5248840121c4ae80e50b36592d31c190d82b7a42 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -92,7 +92,6 @@ public function resetCache(?array $ids = NULL) { */ public function loadParents($tid) { $terms = []; - /** @var \Drupal\taxonomy\TermInterface $term */ if ($tid && $term = $this->load($tid)) { foreach ($this->getParents($term) as $id => $parent) { // This method currently doesn't return the <root> parent. diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install index 04fa3fe2be5c3581620e2bad5f876cdeca7963b8..0df8b4dc68ecb3f79b20178d0645bc1f81d880d7 100644 --- a/core/modules/taxonomy/taxonomy.install +++ b/core/modules/taxonomy/taxonomy.install @@ -8,6 +8,6 @@ /** * Implements hook_update_last_removed(). */ -function taxonomy_update_last_removed() { +function taxonomy_update_last_removed(): int { return 10100; } diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index e98b465cc3eaf732054e6a302ef765e1cda01097..6ba925c9f498671e836e4b003ba0ba2f8c21d4ee 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -2,61 +2,13 @@ /** * @file - * Enables the organization of content into categories. */ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Sql\SqlContentEntityStorage; use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; use Drupal\taxonomy\Entity\Term; -/** - * Implements hook_help(). - */ -function taxonomy_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.taxonomy': - $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Taxonomy module allows users who have permission to create and edit content to categorize (tag) content of that type. Users who have the <em>Administer vocabularies and terms</em> <a href=":permissions" title="Taxonomy module permissions">permission</a> can add <em>vocabularies</em> that contain a set of related <em>terms</em>. The terms in a vocabulary can either be pre-set by an administrator or built gradually as content is added and edited. Terms may be organized hierarchically if desired.', [':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'taxonomy'])->toString()]) . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":taxonomy">online documentation for the Taxonomy module</a>.', [':taxonomy' => 'https://www.drupal.org/docs/8/core/modules/taxonomy']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing vocabularies') . '</dt>'; - $output .= '<dd>' . t('Users who have the <em>Administer vocabularies and terms</em> permission can add and edit vocabularies from the <a href=":taxonomy_admin">Taxonomy administration page</a>. Vocabularies can be deleted from their <em>Edit vocabulary</em> page. Users with the <em>Taxonomy term: Administer fields</em> permission may add additional fields for terms in that vocabulary using the <a href=":field_ui">Field UI module</a>.', [':taxonomy_admin' => Url::fromRoute('entity.taxonomy_vocabulary.collection')->toString(), ':field_ui' => $field_ui_url]) . '</dd>'; - $output .= '<dt>' . t('Managing terms') . '</dt>'; - $output .= '<dd>' . t('Users who have the <em>Administer vocabularies and terms</em> permission or the <em>Edit terms</em> permission for a particular vocabulary can add, edit, and organize the terms in a vocabulary from a vocabulary\'s term listing page, which can be accessed by going to the <a href=":taxonomy_admin">Taxonomy administration page</a> and clicking <em>List terms</em> in the <em>Operations</em> column. Users must have the <em>Administer vocabularies and terms</em> permission or the <em>Delete terms</em> permission for a particular vocabulary to delete terms.', [':taxonomy_admin' => Url::fromRoute('entity.taxonomy_vocabulary.collection')->toString()]) . ' </dd>'; - $output .= '<dt>' . t('Classifying entity content') . '</dt>'; - $output .= '<dd>' . t('A user with the <em>Administer fields</em> permission for a certain entity type may add <em>Taxonomy term</em> reference fields to the entity type, which will allow entities to be classified using taxonomy terms. See the <a href=":entity_reference">Entity Reference help</a> for more information about reference fields. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them.', [':field_ui' => $field_ui_url, ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':entity_reference' => Url::fromRoute('help.page', ['name' => 'entity_reference'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Adding new terms during content creation') . '</dt>'; - $output .= '<dd>' . t("Allowing users to add new terms gradually builds a vocabulary as content is added and edited. Users can add new terms if either of the two <em>Autocomplete</em> widgets is chosen for the Taxonomy term reference field in the <em>Manage form display</em> page for the field. You will also need to enable the <em>Create referenced entities if they don't already exist</em> option, and restrict the field to one vocabulary.") . '</dd>'; - $output .= '<dt>' . t('Configuring displays and form displays') . '</dt>'; - $output .= '<dd>' . t('See the <a href=":entity_reference">Entity Reference help</a> page for the field widgets and formatters that can be configured for any reference field on the <em>Manage display</em> and <em>Manage form display</em> pages. Taxonomy additionally provides an <em>RSS category</em> formatter that displays nothing when the entity item is displayed as HTML, but displays an RSS category instead of a list when the entity item is displayed in an RSS feed.', [':entity_reference' => Url::fromRoute('help.page', ['name' => 'entity_reference'])->toString()]) . '</li>'; - $output .= '</ul>'; - $output .= '</dd>'; - $output .= '</dl>'; - return $output; - - case 'entity.taxonomy_vocabulary.collection': - $output = '<p>' . t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".') . '</p>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function taxonomy_theme() { - return [ - 'taxonomy_term' => [ - 'render element' => 'elements', - ], - ]; -} - /** * Implements hook_theme_suggestions_HOOK(). */ @@ -72,21 +24,6 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) { return $suggestions; } -/** - * Implements hook_local_tasks_alter(). - * - * @todo Evaluate removing as part of https://www.drupal.org/node/2358923. - */ -function taxonomy_local_tasks_alter(&$local_tasks) { - $local_task_key = 'config_translation.local_tasks:entity.taxonomy_vocabulary.config_translation_overview'; - if (isset($local_tasks[$local_task_key])) { - // The config_translation module expects the base route to be - // entity.taxonomy_vocabulary.edit_form like it is for other configuration - // entities. Taxonomy uses the overview_form as the base route. - $local_tasks[$local_task_key]['base_route'] = 'entity.taxonomy_vocabulary.overview_form'; - } -} - /** * Prepares variables for taxonomy term templates. * @@ -139,26 +76,6 @@ function template_preprocess_taxonomy_term(&$variables) { } } -/** - * Implements hook_entity_operation(). - */ -function taxonomy_entity_operation(EntityInterface $term) { - $operations = []; - if ($term instanceof Term && $term->access('create')) { - $operations['add-child'] = [ - 'title' => t('Add child'), - 'weight' => 10, - 'url' => Url::fromRoute( - 'entity.taxonomy_term.add_form', - ['taxonomy_vocabulary' => $term->bundle()], - ['query' => ['parent' => $term->id()]], - ), - ]; - } - - return $operations; -} - /** * Returns whether the current page is the page of the passed-in term. * @@ -172,32 +89,6 @@ function taxonomy_term_is_page(Term $term) { return FALSE; } -/** - * @defgroup taxonomy_index Taxonomy indexing - * @{ - * Functions to maintain taxonomy indexing. - * - * Taxonomy uses default field storage to store canonical relationships - * between terms and fieldable entities. However its most common use case - * requires listing all content associated with a term or group of terms - * sorted by creation date. To avoid slow queries due to joining across - * multiple node and field tables with various conditions and order by criteria, - * we maintain a denormalized table with all relationships between terms, - * published nodes and common sort criteria such as status, sticky and created. - * When using other field storage engines or alternative methods of - * denormalizing this data you should set the - * taxonomy.settings:maintain_index_table to '0' to avoid unnecessary writes in - * SQL. - */ - -/** - * Implements hook_ENTITY_TYPE_insert() for node entities. - */ -function taxonomy_node_insert(EntityInterface $node) { - // Add taxonomy index entries for the node. - taxonomy_build_node_index($node); -} - /** * Builds and inserts taxonomy index entries for a given node. * @@ -248,27 +139,6 @@ function taxonomy_build_node_index($node) { } } -/** - * Implements hook_ENTITY_TYPE_update() for node entities. - */ -function taxonomy_node_update(EntityInterface $node) { - // If we're not dealing with the default revision of the node, do not make any - // change to the taxonomy index. - if (!$node->isDefaultRevision()) { - return; - } - taxonomy_delete_node_index($node); - taxonomy_build_node_index($node); -} - -/** - * Implements hook_ENTITY_TYPE_predelete() for node entities. - */ -function taxonomy_node_predelete(EntityInterface $node) { - // Clean up the {taxonomy_index} table when nodes are deleted. - taxonomy_delete_node_index($node); -} - /** * Deletes taxonomy index entries for a given node. * @@ -281,16 +151,6 @@ function taxonomy_delete_node_index(EntityInterface $node) { } } -/** - * Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities. - */ -function taxonomy_taxonomy_term_delete(Term $term) { - if (\Drupal::config('taxonomy.settings')->get('maintain_index_table')) { - // Clean up the {taxonomy_index} table when terms are deleted. - \Drupal::database()->delete('taxonomy_index')->condition('tid', $term->id())->execute(); - } -} - /** * @} End of "defgroup taxonomy_index". */ diff --git a/core/modules/taxonomy/taxonomy.post_update.php b/core/modules/taxonomy/taxonomy.post_update.php index fba5de925e1f0bb83ab749fe2f5a27b10d1b32b9..01afe432bb46c13914d82bf6096082006f9fc7a2 100644 --- a/core/modules/taxonomy/taxonomy.post_update.php +++ b/core/modules/taxonomy/taxonomy.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function taxonomy_removed_post_updates() { +function taxonomy_removed_post_updates(): array { return [ 'taxonomy_post_update_clear_views_data_cache' => '9.0.0', 'taxonomy_post_update_clear_entity_bundle_field_definitions_cache' => '9.0.0', diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc deleted file mode 100644 index 3235803988b772bfe3d403a956c3b12d9b149dc3..0000000000000000000000000000000000000000 --- a/core/modules/taxonomy/taxonomy.tokens.inc +++ /dev/null @@ -1,223 +0,0 @@ -<?php - -/** - * @file - * Builds placeholder replacement tokens for taxonomy terms and vocabularies. - */ - -use Drupal\Core\Datetime\Entity\DateFormat; -use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Render\BubbleableMetadata; -use Drupal\taxonomy\Entity\Vocabulary; - -/** - * Implements hook_token_info(). - */ -function taxonomy_token_info() { - $types['term'] = [ - 'name' => t("Taxonomy terms"), - 'description' => t("Tokens related to taxonomy terms."), - 'needs-data' => 'term', - ]; - $types['vocabulary'] = [ - 'name' => t("Vocabularies"), - 'description' => t("Tokens related to taxonomy vocabularies."), - 'needs-data' => 'vocabulary', - ]; - - // Taxonomy term related variables. - $term['tid'] = [ - 'name' => t("Term ID"), - 'description' => t("The unique ID of the taxonomy term."), - ]; - $term['name'] = [ - 'name' => t("Name"), - 'description' => t("The name of the taxonomy term."), - ]; - $term['description'] = [ - 'name' => t("Description"), - 'description' => t("The optional description of the taxonomy term."), - ]; - $term['node-count'] = [ - 'name' => t("Node count"), - 'description' => t("The number of nodes tagged with the taxonomy term."), - ]; - $term['url'] = [ - 'name' => t("URL"), - 'description' => t("The URL of the taxonomy term."), - ]; - - // Taxonomy vocabulary related variables. - $vocabulary['vid'] = [ - 'name' => t("Vocabulary ID"), - 'description' => t("The unique ID of the taxonomy vocabulary."), - ]; - $vocabulary['name'] = [ - 'name' => t("Name"), - 'description' => t("The name of the taxonomy vocabulary."), - ]; - $vocabulary['description'] = [ - 'name' => t("Description"), - 'description' => t("The optional description of the taxonomy vocabulary."), - ]; - $vocabulary['node-count'] = [ - 'name' => t("Node count"), - 'description' => t("The number of nodes tagged with terms belonging to the taxonomy vocabulary."), - ]; - $vocabulary['term-count'] = [ - 'name' => t("Term count"), - 'description' => t("The number of terms belonging to the taxonomy vocabulary."), - ]; - - // Chained tokens for taxonomies - $term['vocabulary'] = [ - 'name' => t("Vocabulary"), - 'description' => t("The vocabulary the taxonomy term belongs to."), - 'type' => 'vocabulary', - ]; - $term['parent'] = [ - 'name' => t("Parent term"), - 'description' => t("The parent term of the taxonomy term, if one exists."), - 'type' => 'term', - ]; - $term['changed'] = [ - 'name' => t("Date changed"), - 'description' => t("The date the taxonomy was most recently updated."), - 'type' => 'date', - ]; - - return [ - 'types' => $types, - 'tokens' => [ - 'term' => $term, - 'vocabulary' => $vocabulary, - ], - ]; -} - -/** - * Implements hook_tokens(). - */ -function taxonomy_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $token_service = \Drupal::token(); - - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = LanguageInterface::LANGCODE_DEFAULT; - } - - $replacements = []; - if ($type == 'term' && !empty($data['term'])) { - $term = $data['term']; - $term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $options['langcode'] ?? NULL); - - foreach ($tokens as $name => $original) { - switch ($name) { - case 'tid': - $replacements[$original] = $term->id(); - break; - - case 'name': - $replacements[$original] = $term->label(); - break; - - case 'description': - // "processed" returns a \Drupal\Component\Render\MarkupInterface via - // check_markup(). - $replacements[$original] = $term->description->processed; - break; - - case 'url': - $replacements[$original] = $term->toUrl('canonical', ['absolute' => TRUE])->toString(); - break; - - case 'node-count': - $query = \Drupal::database()->select('taxonomy_index'); - $query->condition('tid', $term->id()); - $query->addTag('term_node_count'); - $count = $query->countQuery()->execute()->fetchField(); - $replacements[$original] = $count; - break; - - case 'vocabulary': - $vocabulary = Vocabulary::load($term->bundle()); - $bubbleable_metadata->addCacheableDependency($vocabulary); - $replacements[$original] = $vocabulary->label(); - break; - - case 'parent': - $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); - if ($parents = $taxonomy_storage->loadParents($term->id())) { - $parent = array_pop($parents); - $bubbleable_metadata->addCacheableDependency($parent); - $replacements[$original] = $parent->getName(); - } - break; - - case 'changed': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = \Drupal::service('date.formatter')->format($term->getChangedTime(), 'medium', '', NULL, $langcode); - break; - } - } - - if ($vocabulary_tokens = $token_service->findWithPrefix($tokens, 'vocabulary')) { - $vocabulary = Vocabulary::load($term->bundle()); - $replacements += $token_service->generate('vocabulary', $vocabulary_tokens, ['vocabulary' => $vocabulary], $options, $bubbleable_metadata); - } - - if (($vocabulary_tokens = $token_service->findWithPrefix($tokens, 'parent'))) { - $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); - if ($parents = $taxonomy_storage->loadParents($term->id())) { - $parent = array_pop($parents); - $replacements += $token_service->generate('term', $vocabulary_tokens, ['term' => $parent], $options, $bubbleable_metadata); - } - } - - if ($changed_tokens = $token_service->findWithPrefix($tokens, 'changed')) { - $replacements += $token_service->generate('date', $changed_tokens, ['date' => $term->getChangedTime()], $options, $bubbleable_metadata); - } - } - - elseif ($type == 'vocabulary' && !empty($data['vocabulary'])) { - $vocabulary = $data['vocabulary']; - - foreach ($tokens as $name => $original) { - switch ($name) { - case 'vid': - $replacements[$original] = $vocabulary->id(); - break; - - case 'name': - $replacements[$original] = $vocabulary->label(); - break; - - case 'description': - $build = ['#markup' => $vocabulary->getDescription()]; - // @todo Fix in https://www.drupal.org/node/2577827 - $replacements[$original] = \Drupal::service('renderer')->renderInIsolation($build); - break; - - case 'term-count': - $replacements[$original] = \Drupal::entityQuery('taxonomy_term') - ->accessCheck(TRUE) - ->condition('vid', $vocabulary->id()) - ->addTag('vocabulary_term_count') - ->count() - ->execute(); - break; - - case 'node-count': - $taxonomy_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); - $replacements[$original] = $taxonomy_storage->nodeCount($vocabulary->id()); - break; - } - } - } - - return $replacements; -} diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc deleted file mode 100644 index 2f5718d12e4bc3d9e6652a575675b56014433855..0000000000000000000000000000000000000000 --- a/core/modules/taxonomy/taxonomy.views.inc +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -/** - * @file - * Provides views data for taxonomy.module. - */ - -use Drupal\field\FieldStorageConfigInterface; - -/** - * Implements hook_views_data_alter(). - */ -function taxonomy_views_data_alter(&$data) { - $data['node_field_data']['term_node_tid'] = [ - 'title' => t('Taxonomy terms on node'), - 'help' => t('Relate nodes to taxonomy terms, specifying which vocabulary or vocabularies to use. This relationship will cause duplicated records if there are multiple terms.'), - 'relationship' => [ - 'id' => 'node_term_data', - 'label' => t('term'), - 'base' => 'taxonomy_term_field_data', - ], - 'field' => [ - 'title' => t('All taxonomy terms'), - 'help' => t('Display all taxonomy terms associated with a node from specified vocabularies.'), - 'id' => 'taxonomy_index_tid', - 'no group by' => TRUE, - 'click sortable' => FALSE, - ], - ]; - - $data['node_field_data']['term_node_tid_depth'] = [ - 'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'), - 'real field' => 'nid', - 'argument' => [ - 'title' => t('Has taxonomy term ID (with depth)'), - 'id' => 'taxonomy_index_tid_depth', - 'accept depth modifier' => TRUE, - ], - 'filter' => [ - 'title' => t('Has taxonomy terms (with depth)'), - 'id' => 'taxonomy_index_tid_depth', - ], - ]; - - $data['node_field_data']['term_node_tid_depth_modifier'] = [ - 'title' => t('Has taxonomy term ID depth modifier'), - 'help' => t('Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional contextual filter value.'), - 'argument' => [ - 'id' => 'taxonomy_index_tid_depth_modifier', - ], - ]; -} - -/** - * Implements hook_field_views_data_alter(). - * - * Views integration for entity reference fields which reference taxonomy terms. - * Adds a term relationship to the default field data. - * - * @see views_field_default_views_data() - */ -function taxonomy_field_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) { - if ($field_storage->getType() == 'entity_reference' && $field_storage->getSetting('target_type') == 'taxonomy_term') { - foreach ($data as $table_name => $table_data) { - foreach ($table_data as $field_name => $field_data) { - if (isset($field_data['filter']) && $field_name != 'delta') { - $data[$table_name][$field_name]['filter']['id'] = 'taxonomy_index_tid'; - } - } - } - } -} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_crud/src/Hook/TaxonomyCrudHooks.php b/core/modules/taxonomy/tests/modules/taxonomy_crud/src/Hook/TaxonomyCrudHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..80848fd77687cff20670cbf9faaa0db1008e1b25 --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_crud/src/Hook/TaxonomyCrudHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\taxonomy_crud\Hook; + +use Drupal\taxonomy\VocabularyInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy_crud. + */ +class TaxonomyCrudHooks { + + /** + * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities. + */ + #[Hook('taxonomy_vocabulary_presave')] + public function taxonomyVocabularyPresave(VocabularyInterface $vocabulary) { + $vocabulary->setThirdPartySetting('taxonomy_crud', 'foo', 'bar'); + } + +} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module b/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module deleted file mode 100644 index 5af9fc1603b51315f1d955408cde726df70731b3..0000000000000000000000000000000000000000 --- a/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @file - * Provides hook implementations for testing purposes. - */ - -declare(strict_types=1); - -use Drupal\taxonomy\VocabularyInterface; - -/** - * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities. - */ -function taxonomy_crud_taxonomy_vocabulary_presave(VocabularyInterface $vocabulary) { - $vocabulary->setThirdPartySetting('taxonomy_crud', 'foo', 'bar'); -} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..444677420dfef1ff85996dff57cc563498d75c91 --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\taxonomy_term_display_configurable_test\Hook; + +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy_term_display_configurable_test. + */ +class TaxonomyTermDisplayConfigurableTestHooks { + + /** + * Implements hook_entity_base_field_info_alter(). + */ + #[Hook('entity_base_field_info_alter')] + public function entityBaseFieldInfoAlter(&$base_field_definitions, EntityTypeInterface $entity_type) { + if ($entity_type->id() === 'taxonomy_term') { + /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ + $base_field_definitions['name']->setDisplayConfigurable('view', TRUE); + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + // Allow skipping of extra preprocessing for configurable display. + $entity_types['taxonomy_term']->set('enable_base_field_custom_preprocess_skipping', TRUE); + } + +} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module deleted file mode 100644 index c4247f13ce92d4898ddd816f5655f74bbe0ffb93..0000000000000000000000000000000000000000 --- a/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * @file - * Tests configurable displays for taxonomy_term base fields. - */ - -declare(strict_types=1); - -use Drupal\Core\Entity\EntityTypeInterface; - -/** - * Implements hook_entity_base_field_info_alter(). - */ -function taxonomy_term_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) { - if ($entity_type->id() === 'taxonomy_term') { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */ - $base_field_definitions['name']->setDisplayConfigurable('view', TRUE); - } -} - -/** - * Implements hook_entity_type_build(). - */ -function taxonomy_term_display_configurable_test_entity_type_build(array &$entity_types) { - // Allow skipping of extra preprocessing for configurable display. - $entity_types['taxonomy_term']->set('enable_base_field_custom_preprocess_skipping', TRUE); -} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php b/core/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..8f467f849e261940ffd133f97c1d76247e80bcac --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php @@ -0,0 +1,91 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\taxonomy_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\taxonomy\TermInterface; +use Drupal\Core\Access\AccessResultInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for taxonomy_test. + */ +class TaxonomyTestHooks { + + /** + * Implements hook_entity_access(). + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, string $operation, AccountInterface $account) : AccessResultInterface { + if ($entity instanceof TermInterface) { + $parts = explode(' ', (string) $entity->label()); + if (in_array('Inaccessible', $parts, TRUE) && in_array($operation, $parts, TRUE)) { + return AccessResult::forbidden(); + } + } + return AccessResult::neutral(); + } + + /** + * Implements hook_query_alter(). + */ + #[Hook('query_alter')] + public function queryAlter(AlterableInterface $query) { + $value = \Drupal::state()->get('taxonomy_test_query_alter'); + if (isset($value)) { + \Drupal::state()->set('taxonomy_test_query_alter', ++$value); + } + } + + /** + * Implements hook_query_TAG_alter(). + */ + #[Hook('query_term_access_alter')] + public function queryTermAccessAlter(AlterableInterface $query) { + $value = \Drupal::state()->get('taxonomy_test_query_term_access_alter'); + if (isset($value)) { + \Drupal::state()->set('taxonomy_test_query_term_access_alter', ++$value); + } + } + + /** + * Implements hook_query_TAG_alter(). + */ + #[Hook('query_taxonomy_term_access_alter')] + public function queryTaxonomyTermAccessAlter(AlterableInterface $query) { + $value = \Drupal::state()->get('taxonomy_test_query_taxonomy_term_access_alter'); + if (isset($value)) { + \Drupal::state()->set('taxonomy_test_query_taxonomy_term_access_alter', ++$value); + } + } + + /** + * Implements hook_form_BASE_FORM_ID_alter() for the taxonomy term form. + */ + #[Hook('form_taxonomy_term_form_alter')] + public function formTaxonomyTermFormAlter(&$form, FormStateInterface $form_state, $form_id) : void { + if (\Drupal::state()->get('taxonomy_test.disable_parent_form_element', FALSE)) { + $form['relations']['parent']['#disabled'] = TRUE; + } + } + + /** + * Implements hook_ENTITY_TYPE_load() for the taxonomy term. + */ + #[Hook('taxonomy_term_load')] + public function taxonomyTermLoad($entities) { + $value = \Drupal::state()->get('taxonomy_test_taxonomy_term_load'); + // Only record loaded terms is the test has set this to an empty array. + if (is_array($value)) { + $value = array_merge($value, array_keys($entities)); + \Drupal::state()->set('taxonomy_test_taxonomy_term_load', array_unique($value)); + } + } + +} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module b/core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module deleted file mode 100644 index 822d1cb6ab111759f05d7ee004e538e0b1341df3..0000000000000000000000000000000000000000 --- a/core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/** - * @file - * Provides test hook implementations for taxonomy tests. - */ - -declare(strict_types=1); - -use Drupal\Core\Database\Query\AlterableInterface; -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_query_alter(). - */ -function taxonomy_test_query_alter(AlterableInterface $query) { - $value = \Drupal::state()->get(__FUNCTION__); - if (isset($value)) { - \Drupal::state()->set(__FUNCTION__, ++$value); - } -} - -/** - * Implements hook_query_TAG_alter(). - */ -function taxonomy_test_query_term_access_alter(AlterableInterface $query) { - $value = \Drupal::state()->get(__FUNCTION__); - if (isset($value)) { - \Drupal::state()->set(__FUNCTION__, ++$value); - } -} - -/** - * Implements hook_query_TAG_alter(). - */ -function taxonomy_test_query_taxonomy_term_access_alter(AlterableInterface $query) { - $value = \Drupal::state()->get(__FUNCTION__); - if (isset($value)) { - \Drupal::state()->set(__FUNCTION__, ++$value); - } -} - -/** - * Implements hook_form_BASE_FORM_ID_alter() for the taxonomy term form. - */ -function taxonomy_test_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id) { - if (\Drupal::state()->get('taxonomy_test.disable_parent_form_element', FALSE)) { - $form['relations']['parent']['#disabled'] = TRUE; - } -} - -/** - * Implements hook_ENTITY_TYPE_load() for the taxonomy term. - */ -function taxonomy_test_taxonomy_term_load($entities) { - $value = \Drupal::state()->get(__FUNCTION__); - // Only record loaded terms is the test has set this to an empty array. - if (is_array($value)) { - $value = array_merge($value, array_keys($entities)); - \Drupal::state()->set(__FUNCTION__, array_unique($value)); - } -} diff --git a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php index e33f700c3d02713f7069f1ea85a6499d9f94c20a..bceadd594b121994f170519332824dcc398ec92f 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php @@ -14,6 +14,9 @@ */ class TermLanguageTest extends TaxonomyTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['language']; /** diff --git a/core/modules/taxonomy/tests/src/Functional/TermTest.php b/core/modules/taxonomy/tests/src/Functional/TermTest.php index c4c40a46492912e4cd5ee14d665f285a2700d3a3..2078d9e2d99ed8e4dcaa3ce0bb13bd78ea0d863b 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTest.php @@ -6,6 +6,7 @@ use Drupal\Component\Utility\Tags; use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\Core\Url; use Drupal\field\Entity\FieldConfig; use Drupal\taxonomy\Entity\Term; use Drupal\taxonomy\TermInterface; @@ -37,7 +38,7 @@ class TermTest extends TaxonomyTestBase { /** * {@inheritdoc} */ - protected static $modules = ['block']; + protected static $modules = ['block', 'taxonomy_test']; /** * {@inheritdoc} @@ -568,6 +569,43 @@ public function testTermMultipleParentsInterface(): void { $this->assertEquals([1, 2], $this->getParentTids($term), 'Term parents (two real) were successfully saved.'); } + /** + * Tests destination after saving terms. + */ + public function testRedirects(): void { + // Save a new term. + $addUrl = Url::fromRoute('entity.taxonomy_term.add_form', ['taxonomy_vocabulary' => $this->vocabulary->id()]); + $this->drupalGet($addUrl); + $this->submitForm([ + 'name[0][value]' => $this->randomMachineName(), + ], 'Save'); + + // Adding a term reloads the form. + $this->assertSession()->addressEquals($addUrl->toString()); + $this->assertSession()->pageTextContains('Created new term'); + + // Update a term. + $term = Term::create(['vid' => $this->vocabulary->id(), 'name' => $this->randomMachineName()]); + $term->save(); + $this->drupalGet($term->toUrl('edit-form')); + $this->submitForm(edit: [], submit: 'Save'); + + // Updating a term sends user to view the term. + $this->assertSession()->addressEquals($term->toUrl()->setAbsolute()); + $this->assertSession()->pageTextContains('Updated term'); + + // Unless the term is not accessible to the user. + // Label triggers forbidden in taxonomy_test_entity_access(). + $term = Term::create(['vid' => $this->vocabulary->id(), 'name' => 'Inaccessible view']); + $term->save(); + $this->drupalGet($term->toUrl('edit-form')); + $this->submitForm(edit: [], submit: 'Save'); + + // In which case, the edit form is reloaded. + $this->assertSession()->addressEquals($term->toUrl('edit-form')->setAbsolute()); + $this->assertSession()->pageTextContains('Updated term'); + } + /** * Reloads a term by name. * diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php index 7a5944a513ddde8334184ce3125c958de09fad54..4e17c672cc4c513c164be1c23fb78d40269bc2d8 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php @@ -77,7 +77,7 @@ public function testTranslatedTaxonomyTermReferenceDisplay(): void { /** * Creates a test subject node, with translation. */ - protected function setUpNode() { + protected function setUpNode(): void { /** @var \Drupal\node\Entity\Node $node */ $node = Node::create([ 'title' => $this->randomMachineName(), @@ -100,7 +100,7 @@ protected function setUpNode() { /** * Creates a test subject term, with translation. */ - protected function setUpTerm() { + protected function setUpTerm(): void { $this->term = $this->createTerm($this->vocabulary, [ 'name' => $this->baseTagName, 'langcode' => $this->baseLangcode, diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php index 37ffbe522f1ee4f9fcbdfc15e31172ace1e74218..7fe2efe6f525de76d761df31d832ff54aaaf5f31 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php @@ -122,7 +122,7 @@ public function testTermsTranslation(): void { /** * Setup translated terms in a hierarchy. */ - protected function setUpTerms() { + protected function setUpTerms(): void { $parent_vid = 0; foreach ($this->termTranslationMap as $name => $translation) { diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php index 27b7c06dfea26f8ab442e2b53381c6749babe482..cd715c7e6df40407b1ab3fccdd6ee92cab3c86ab 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php @@ -56,7 +56,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - protected function setupBundle() { + protected function setupBundle(): void { parent::setupBundle(); // Create a vocabulary. @@ -164,7 +164,7 @@ public function testTranslateLinkVocabularyAdminPage(): void { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); @@ -185,7 +185,7 @@ protected function doTestTranslationEdit() { /** * {@inheritdoc} */ - protected function doTestPublishedStatus() { + protected function doTestPublishedStatus(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php index 6453205b4b528592edca97820af5bb7def69217f..e4d1a71de0a1f867c93425b76dff2f5a8fea3202 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php @@ -106,7 +106,7 @@ public function testTermsTranslationWithContextualFilter(): void { /** * Setup translated terms in a hierarchy. */ - protected function setUpTerms() { + protected function setUpTerms(): void { $parent_vid = 0; foreach ($this->termTranslationMap as $name => $translation) { diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php index b2b64d6a6ee6344bd4f8a6290cbab4eb9fe0f356..0307dd31d8d7e6133844b238567d8480de36b1b5 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php @@ -14,6 +14,9 @@ */ class VocabularyLanguageTest extends TaxonomyTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['language']; /** diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php index 0615b19afba43dd92bbe2a16f0147ef059f2962d..f2acd9385230e859c0744508ff9c65cf13aaec1d 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php @@ -15,6 +15,9 @@ */ class TaxonomyTermDeriverTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['taxonomy', 'text']; /** diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php index 187c357b5662c8ef582e8185fd4381f6188efabd..ff5e7136611e5f8bcce436c2f52ca0c1da3e039f 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php @@ -108,7 +108,7 @@ public function testVocabularyFieldInstance(): void { * @param string[] $target_bundles * An array of expected target bundles. */ - protected function assertTargetBundles($id, array $target_bundles) { + protected function assertTargetBundles($id, array $target_bundles): void { $field = FieldConfig::load($id); $handler_settings = $field->getSetting('handler_settings'); $this->assertArrayHasKey('target_bundles', $handler_settings); diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php index 791052402c377f85bc3ec7a0772e000e7b911d02..458496f2f05ecaa74ba33455556c64289c23228b 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php @@ -13,6 +13,9 @@ */ class MigrateNodeTaxonomyTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'comment', 'datetime', diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php index 30f7521aa66790b678604c82272b54b7b1420b05..f4c4d0b1d5e81868bcbb959d95b5e53c31ce4c69 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php @@ -15,6 +15,9 @@ */ class MigrateTaxonomyTermTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'comment', 'content_translation', @@ -62,9 +65,9 @@ protected function setUp(): void { * Entity ID to load and check. * @param string $expected_language * The language code for this term. - * @param $expected_label + * @param string $expected_label * The label the migrated entity should have. - * @param $expected_vid + * @param string $expected_vid * The parent vocabulary the migrated entity should have. * @param string|null $expected_description * The description the migrated entity should have. @@ -201,7 +204,7 @@ public function testTaxonomyTerms(): void { /** * Retrieves the parent term IDs for a given term. * - * @param $tid + * @param int $tid * ID of the term to check. * * @return array diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php index 3cde0fb5485ab57d27b514693351bdec319ca8da..e56fe67c481643957ed8cdf9137e270743d1a3d2 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php @@ -33,11 +33,11 @@ protected function setUp(): void { * * @param string $id * Entity ID to load and check. - * @param $expected_label + * @param string $expected_label * The label the migrated entity should have. - * @param $expected_description + * @param string $expected_description * The description the migrated entity should have. - * @param $expected_weight + * @param string $expected_weight * The weight the migrated entity should have. * * @internal diff --git a/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php b/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php index 785a060eb105a965707fcd6ac3223580ab137e14..08a326fe3754c0340116fe19c1e86ceb6f88fd39 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php @@ -119,7 +119,7 @@ public function testTaxonomyQueryAlter(): void { /** * Sets up the hooks in the test module. */ - protected function setupQueryTagTestHooks() { + protected function setupQueryTagTestHooks(): void { $this->container->get('entity_type.manager')->getStorage('taxonomy_term')->resetCache(); $state = $this->container->get('state'); $state->set('taxonomy_test_query_alter', 0); diff --git a/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php b/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php index a0253d1aab99332c274bdb4f319bc3579904f972..bd98cc2a44b2e3fce568d515a4697a1fbffa4b96 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php @@ -109,7 +109,7 @@ public function testTaxonomyTokenReplacement(): void { ]); // Create node with term2. - $node = $this->createNode([ + $this->createNode([ 'type' => 'article', $this->fieldName => $term2->id(), ]); @@ -117,6 +117,7 @@ public function testTaxonomyTokenReplacement(): void { // Generate and test sanitized tokens for term1. $tests = []; $tests['[term:tid]'] = $term1->id(); + $tests['[term:uuid]'] = $term1->uuid(); $tests['[term:name]'] = $term1->getName(); $tests['[term:description]'] = $term1->description->processed; $tests['[term:url]'] = $term1->toUrl('canonical', ['absolute' => TRUE])->toString(); @@ -132,6 +133,7 @@ public function testTaxonomyTokenReplacement(): void { $metadata_tests = []; $metadata_tests['[term:tid]'] = $base_bubbleable_metadata; + $metadata_tests['[term:uuid]'] = $base_bubbleable_metadata; $metadata_tests['[term:name]'] = $base_bubbleable_metadata; $metadata_tests['[term:description]'] = $base_bubbleable_metadata; $metadata_tests['[term:url]'] = $base_bubbleable_metadata; @@ -153,6 +155,7 @@ public function testTaxonomyTokenReplacement(): void { // Generate and test sanitized tokens for term2. $tests = []; $tests['[term:tid]'] = $term2->id(); + $tests['[term:uuid]'] = $term2->uuid(); $tests['[term:name]'] = $term2->getName(); $tests['[term:description]'] = $term2->description->processed; $tests['[term:url]'] = $term2->toUrl('canonical', ['absolute' => TRUE])->toString(); diff --git a/core/modules/telephone/src/Hook/TelephoneHooks.php b/core/modules/telephone/src/Hook/TelephoneHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..fafd3f1c07c710e13ed517886aa365e03f5985ec --- /dev/null +++ b/core/modules/telephone/src/Hook/TelephoneHooks.php @@ -0,0 +1,66 @@ +<?php + +namespace Drupal\telephone\Hook; + +use Drupal\Core\Field\FieldTypeCategoryManagerInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for telephone. + */ +class TelephoneHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.telephone': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Telephone module allows you to create fields that contain telephone numbers. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":telephone_documentation">online documentation for the Telephone module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':telephone_documentation' => 'https://www.drupal.org/documentation/modules/telephone', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying telephone fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the telephone field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Displaying telephone numbers as links') . '</dt>'; + $output .= '<dd>' . t('Telephone numbers can be displayed as links with the scheme name <em>tel:</em> by choosing the <em>Telephone</em> display format on the <em>Manage display</em> page. Any spaces will be stripped out of the link text. This semantic markup improves the user experience on mobile and assistive technology devices.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_field_formatter_info_alter(). + */ + #[Hook('field_formatter_info_alter')] + public function fieldFormatterInfoAlter(&$info) { + $info['string']['field_types'][] = 'telephone'; + } + + /** + * Implements hook_field_type_category_info_alter(). + */ + #[Hook('field_type_category_info_alter')] + public function fieldTypeCategoryInfoAlter(&$definitions) { + // The `telephone` field type belongs in the `general` category, so the + // libraries need to be attached using an alter hook. + $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'telephone/drupal.telephone-icon'; + } + +} diff --git a/core/modules/telephone/telephone.module b/core/modules/telephone/telephone.module deleted file mode 100644 index 3c65366168f0dda87fdc9a00179b8cfb077a28f8..0000000000000000000000000000000000000000 --- a/core/modules/telephone/telephone.module +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @file - * Defines a simple telephone number field type. - */ - -use Drupal\Core\Field\FieldTypeCategoryManagerInterface; -use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; - -/** - * Implements hook_help(). - */ -function telephone_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.telephone': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Telephone module allows you to create fields that contain telephone numbers. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":telephone_documentation">online documentation for the Telephone module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':telephone_documentation' => 'https://www.drupal.org/documentation/modules/telephone']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying telephone fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the telephone field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Displaying telephone numbers as links') . '</dt>'; - $output .= '<dd>' . t('Telephone numbers can be displayed as links with the scheme name <em>tel:</em> by choosing the <em>Telephone</em> display format on the <em>Manage display</em> page. Any spaces will be stripped out of the link text. This semantic markup improves the user experience on mobile and assistive technology devices.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_field_formatter_info_alter(). - */ -function telephone_field_formatter_info_alter(&$info) { - $info['string']['field_types'][] = 'telephone'; -} - -/** - * Implements hook_field_type_category_info_alter(). - */ -function telephone_field_type_category_info_alter(&$definitions) { - // The `telephone` field type belongs in the `general` category, so the - // libraries need to be attached using an alter hook. - $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'telephone/drupal.telephone-icon'; -} diff --git a/core/modules/text/src/Hook/TextHooks.php b/core/modules/text/src/Hook/TextHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..356052ad658d8eefc11ed9bd84513f2f8771a946 --- /dev/null +++ b/core/modules/text/src/Hook/TextHooks.php @@ -0,0 +1,55 @@ +<?php + +namespace Drupal\text\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for text. + */ +class TextHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.text': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Text module allows you to create short and long text fields with optional summaries. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":text_documentation">online documentation for the Text module</a>.', [ + ':field' => Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString(), + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ':text_documentation' => 'https://www.drupal.org/documentation/modules/text', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Managing and displaying text fields') . '</dt>'; + $output .= '<dd>' . t('The <em>settings</em> and <em>display</em> of the text field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [ + ':field_ui' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', [ + 'name' => 'field_ui', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '<dt>' . t('Creating short text fields') . '</dt>'; + $output .= '<dd>' . t('If you choose <em>Text (plain)</em> or <em>Text (formatted)</em> as the field type on the <em>Manage fields</em> page, then a field with a single row is displayed. You can change the maximum text length in the <em>Field settings</em> when you set up the field.') . '</dd>'; + $output .= '<dt>' . t('Creating long text fields') . '</dt>'; + $output .= '<dd>' . t('If you choose <em>Text (plain, long)</em>, <em>Text (formatted, long)</em>, or <em>Text (formatted, long, with summary)</em> on the <em>Manage fields</em> page, then users can insert text of unlimited length. On the <em>Manage form display</em> page, you can set the number of rows that are displayed to users.') . '</dd>'; + $output .= '<dt>' . t('Trimming the text length') . '</dt>'; + $output .= '<dd>' . t('On the <em>Manage display</em> page you can choose to display a trimmed version of the text, and if so, where to cut off the text.') . '</dd>'; + $output .= '<dt>' . t('Displaying summaries instead of trimmed text') . '</dt>'; + $output .= '<dd>' . t('As an alternative to using a trimmed version of the text, you can enter a separate summary by choosing the <em>Text (formatted, long, with summary)</em> field type on the <em>Manage fields</em> page. Even when <em>Summary input</em> is enabled, and summaries are provided, you can display <em>trimmed</em> text nonetheless by choosing the appropriate format on the <em>Manage display</em> page.') . '</dd>'; + $output .= '<dt>' . t('Using text formats and editors') . '</dt>'; + $output .= '<dd>' . t('If you choose <em>Text (plain)</em> or <em>Text (plain, long)</em> you restrict the input to <em>Plain text</em> only. If you choose <em>Text (formatted)</em>, <em>Text (formatted, long)</em>, or <em>Text (formatted, long with summary)</em> you allow users to write formatted text. Which options are available to individual users depends on the settings on the <a href=":formats">Text formats and editors page</a>.', [':formats' => Url::fromRoute('filter.admin_overview')->toString()]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + +} diff --git a/core/modules/text/tests/src/Functional/TextFieldTest.php b/core/modules/text/tests/src/Functional/TextFieldTest.php index 35cf3da0dd879671ad7d77f913e0568acef6e5c9..e2102f9cc3ac688299d9688282f11511056d5bd9 100644 --- a/core/modules/text/tests/src/Functional/TextFieldTest.php +++ b/core/modules/text/tests/src/Functional/TextFieldTest.php @@ -307,7 +307,7 @@ public function testTextfieldWidgetsAllowedFormats(): void { /** * Helper function for testTextfieldWidgetsFormatted(). */ - public function _testTextfieldWidgetsFormatted($field_type, $widget_type) { + public function _testTextfieldWidgetsFormatted($field_type, $widget_type): void { // Create a field. $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ diff --git a/core/modules/text/tests/src/Kernel/TextSummaryTest.php b/core/modules/text/tests/src/Kernel/TextSummaryTest.php index 2a77312d18d3fb57f13c4795dc4c8bc833aefb79..f8eecabee7ad34079b8a0bd2b8e9b55be1b45b4c 100644 --- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php +++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php @@ -22,6 +22,9 @@ class TextSummaryTest extends KernelTestBase { use UserCreationTrait; + /** + * {@inheritdoc} + */ protected static $modules = [ 'system', 'user', diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php index e386c918a9bb6c42dfca7c836b12ae7470635ee3..b2f7586d442803500f78624f5795bf72db98bbce 100644 --- a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php +++ b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php @@ -101,7 +101,7 @@ public function testCrudAndUpdate(): void { * @param string $entity_type * Entity type for which the field should be created. */ - protected function createField($entity_type) { + protected function createField($entity_type): void { // Create a field . $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => 'summary_field', diff --git a/core/modules/text/text.module b/core/modules/text/text.module index 5a6b85235d54d6ec025481f3fa4ae8a83171a35f..b7bc4208561ce49d320c1a5607ef82e599b8976a 100644 --- a/core/modules/text/text.module +++ b/core/modules/text/text.module @@ -2,43 +2,12 @@ /** * @file - * Defines simple text field types. */ -use Drupal\Core\Url; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Unicode; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\filter\Entity\FilterFormat; -/** - * Implements hook_help(). - */ -function text_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.text': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Text module allows you to create short and long text fields with optional summaries. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":text_documentation">online documentation for the Text module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#', ':text_documentation' => 'https://www.drupal.org/documentation/modules/text']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Managing and displaying text fields') . '</dt>'; - $output .= '<dd>' . t('The <em>settings</em> and <em>display</em> of the text field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [':field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#']) . '</dd>'; - $output .= '<dt>' . t('Creating short text fields') . '</dt>'; - $output .= '<dd>' . t('If you choose <em>Text (plain)</em> or <em>Text (formatted)</em> as the field type on the <em>Manage fields</em> page, then a field with a single row is displayed. You can change the maximum text length in the <em>Field settings</em> when you set up the field.') . '</dd>'; - $output .= '<dt>' . t('Creating long text fields') . '</dt>'; - $output .= '<dd>' . t('If you choose <em>Text (plain, long)</em>, <em>Text (formatted, long)</em>, or <em>Text (formatted, long, with summary)</em> on the <em>Manage fields</em> page, then users can insert text of unlimited length. On the <em>Manage form display</em> page, you can set the number of rows that are displayed to users.') . '</dd>'; - $output .= '<dt>' . t('Trimming the text length') . '</dt>'; - $output .= '<dd>' . t('On the <em>Manage display</em> page you can choose to display a trimmed version of the text, and if so, where to cut off the text.') . '</dd>'; - $output .= '<dt>' . t('Displaying summaries instead of trimmed text') . '</dt>'; - $output .= '<dd>' . t('As an alternative to using a trimmed version of the text, you can enter a separate summary by choosing the <em>Text (formatted, long, with summary)</em> field type on the <em>Manage fields</em> page. Even when <em>Summary input</em> is enabled, and summaries are provided, you can display <em>trimmed</em> text nonetheless by choosing the appropriate format on the <em>Manage display</em> page.') . '</dd>'; - $output .= '<dt>' . t('Using text formats and editors') . '</dt>'; - $output .= '<dd>' . t('If you choose <em>Text (plain)</em> or <em>Text (plain, long)</em> you restrict the input to <em>Plain text</em> only. If you choose <em>Text (formatted)</em>, <em>Text (formatted, long)</em>, or <em>Text (formatted, long with summary)</em> you allow users to write formatted text. Which options are available to individual users depends on the settings on the <a href=":formats">Text formats and editors page</a>.', [':formats' => Url::fromRoute('filter.admin_overview')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - /** * Generates a trimmed, formatted version of a text field value. * diff --git a/core/modules/text/text.post_update.php b/core/modules/text/text.post_update.php index a3cfbd5f2f088626502671bcb8fff45812fe6db8..730bda0b97f41d9a455bab723efd1a17a1862e67 100644 --- a/core/modules/text/text.post_update.php +++ b/core/modules/text/text.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function text_removed_post_updates() { +function text_removed_post_updates(): array { return [ 'text_post_update_add_required_summary_flag' => '9.0.0', 'text_post_update_add_required_summary_flag_form_display' => '10.0.0', diff --git a/core/modules/toolbar/src/Hook/ToolbarHooks.php b/core/modules/toolbar/src/Hook/ToolbarHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..883b733cd334dc48c41df34cddad9e2b1c90153f --- /dev/null +++ b/core/modules/toolbar/src/Hook/ToolbarHooks.php @@ -0,0 +1,159 @@ +<?php + +namespace Drupal\toolbar\Hook; + +use Drupal\toolbar\Controller\ToolbarController; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for toolbar. + */ +class ToolbarHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.toolbar': + $output = '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the <a href=":toolbar_docs">online documentation for the Toolbar module</a>.', [':toolbar_docs' => 'https://www.drupal.org/docs/8/core/modules/toolbar']) . '</p>'; + $output .= '<h4>' . t('Terminology') . '</h4>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Tabs') . '</dt>'; + $output .= '<dd>' . t('Tabs are buttons, displayed in a bar across the top of the screen. Some tabs execute an action (such as starting Edit mode), while other tabs toggle which tray is open.') . '</dd>'; + $output .= '<dt>' . t('Trays') . '</dt>'; + $output .= '<dd>' . t('Trays are usually lists of links, which can be hierarchical like a menu. If a tray has been toggled open, it is displayed either vertically or horizontally below the tab bar, depending on the browser width. Only one tray may be open at a time. If you click another tab, that tray will replace the tray being displayed. In wide browser widths, the user has the ability to toggle from vertical to horizontal, using a link at the bottom or right of the tray. Hierarchical menus only have open/close behavior in vertical mode; if you display a tray containing a hierarchical menu horizontally, only the top-level links will be available.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + $items['toolbar'] = ['render element' => 'element']; + $items['menu__toolbar'] = [ + 'base hook' => 'menu', + 'variables' => [ + 'menu_name' => NULL, + 'items' => [], + 'attributes' => [], + ], + ]; + return $items; + } + + /** + * Implements hook_page_top(). + * + * Add admin toolbar to the top of the page automatically. + */ + #[Hook('page_top')] + public function pageTop(array &$page_top) { + $page_top['toolbar'] = [ + '#type' => 'toolbar', + '#access' => \Drupal::currentUser()->hasPermission('access toolbar'), + '#cache' => [ + 'keys' => [ + 'toolbar', + ], + 'contexts' => [ + 'user.permissions', + ], + ], + ]; + } + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + // The 'Home' tab is a simple link, with no corresponding tray. + $items['home'] = [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'link', + '#title' => t('Back to site'), + '#url' => Url::fromRoute('<front>'), + '#attributes' => [ + 'title' => t('Return to site content'), + 'class' => [ + 'toolbar-icon', + 'toolbar-icon-escape-admin', + ], + 'data-toolbar-escape-admin' => TRUE, + ], + ], + '#wrapper_attributes' => [ + 'class' => [ + 'home-toolbar-tab', + ], + ], + '#attached' => [ + 'library' => [ + 'toolbar/toolbar.escapeAdmin', + ], + ], + '#weight' => -20, + ]; + // To conserve bandwidth, we only include the top-level links in the HTML. + // The subtrees are fetched through a JSONP script that is generated at the + // toolbar_subtrees route. We provide the JavaScript requesting that JSONP + // script here with the hash parameter that is needed for that route. + // @see toolbar_subtrees_jsonp() + [$hash, $hash_cacheability] = _toolbar_get_subtrees_hash(); + $subtrees_attached['drupalSettings']['toolbar'] = ['subtreesHash' => $hash]; + // The administration element has a link that is themed to correspond to + // a toolbar tray. The tray contains the full administrative menu of the site. + $items['administration'] = [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'link', + '#title' => t('Manage'), + '#url' => Url::fromRoute('system.admin'), + '#attributes' => [ + 'title' => t('Admin menu'), + 'class' => [ + 'toolbar-icon', + 'toolbar-icon-menu', + ], + // A data attribute that indicates to the client to defer loading of + // the admin menu subtrees until this tab is activated. Admin menu + // subtrees will not render to the DOM if this attribute is removed. + // The value of the attribute is intentionally left blank. Only the + // presence of the attribute is necessary. + 'data-drupal-subtrees' => '', + ], + ], + 'tray' => [ + '#heading' => t('Administration menu'), + '#attached' => $subtrees_attached, + 'toolbar_administration' => [ + '#pre_render' => [ + [ + ToolbarController::class, + 'preRenderAdministrationTray', + ], + ], + '#type' => 'container', + '#attributes' => [ + 'class' => [ + 'toolbar-menu-administration', + ], + ], + ], + ], + '#weight' => -15, + ]; + $hash_cacheability->applyTo($items['administration']); + return $items; + } + +} diff --git a/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php b/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f2be064f9de5effbb5d1302dbb82cf78e23715cd --- /dev/null +++ b/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php @@ -0,0 +1,22 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\toolbar_disable_user_toolbar\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for toolbar_disable_user_toolbar. + */ +class ToolbarDisableUserToolbarHooks { + + /** + * Implements hook_toolbar_alter(). + */ + #[Hook('toolbar_alter')] + public function toolbarAlter(&$items) { + unset($items['user']); + } + +} diff --git a/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/toolbar_disable_user_toolbar.module b/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/toolbar_disable_user_toolbar.module deleted file mode 100644 index 27a86623e301b525bcd7510e8768d5a531a3e344..0000000000000000000000000000000000000000 --- a/core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/toolbar_disable_user_toolbar.module +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * @file - * Test module. - */ - -declare(strict_types=1); - -/** - * Implements hook_toolbar_alter(). - */ -function toolbar_disable_user_toolbar_toolbar_alter(&$items) { - unset($items['user']); -} diff --git a/core/modules/toolbar/tests/modules/toolbar_test/src/Hook/ToolbarTestHooks.php b/core/modules/toolbar/tests/modules/toolbar_test/src/Hook/ToolbarTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a6d2b69bcd6ce5c9e5ff90bfef6582b55d389ce0 --- /dev/null +++ b/core/modules/toolbar/tests/modules/toolbar_test/src/Hook/ToolbarTestHooks.php @@ -0,0 +1,71 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\toolbar_test\Hook; + +use Drupal\Core\Link; +use Drupal\Core\Url; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for toolbar_test. + */ +class ToolbarTestHooks { + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + $items['testing'] = [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'link', + '#title' => t('Test tab'), + '#url' => Url::fromRoute('<front>'), + '#options' => [ + 'attributes' => [ + 'id' => 'toolbar-tab-testing', + 'title' => t('Test tab'), + ], + ], + ], + 'tray' => [ + '#heading' => t('Test tray'), + '#wrapper_attributes' => [ + 'id' => 'toolbar-tray-testing', + ], + 'content' => [ + '#theme' => 'item_list', + '#items' => [ + Link::fromTextAndUrl(t('link 1'), Url::fromRoute('<front>', [], [ + 'attributes' => [ + 'title' => 'Test link 1 title', + ], + ]))->toRenderable(), + Link::fromTextAndUrl(t('link 2'), Url::fromRoute('<front>', [], [ + 'attributes' => [ + 'title' => 'Test link 2 title', + ], + ]))->toRenderable(), + Link::fromTextAndUrl(t('link 3'), Url::fromRoute('<front>', [], [ + 'attributes' => [ + 'title' => 'Test link 3 title', + ], + ]))->toRenderable(), + ], + '#attributes' => [ + 'class' => [ + 'toolbar-menu', + ], + ], + ], + ], + '#weight' => 50, + ]; + $items['empty'] = ['#type' => 'toolbar_item']; + return $items; + } + +} diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module index bea8d993054f69ad68273c8df8769a37c0b76f05..9085a1b6f60e817cd2f9a48d888af862d662f53f 100644 --- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module +++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module @@ -7,53 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Link; -use Drupal\Core\Url; - -/** - * Implements hook_toolbar(). - */ -function toolbar_test_toolbar() { - - $items['testing'] = [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'link', - '#title' => t('Test tab'), - '#url' => Url::fromRoute('<front>'), - '#options' => [ - 'attributes' => [ - 'id' => 'toolbar-tab-testing', - 'title' => t('Test tab'), - ], - ], - ], - 'tray' => [ - '#heading' => t('Test tray'), - '#wrapper_attributes' => [ - 'id' => 'toolbar-tray-testing', - ], - 'content' => [ - '#theme' => 'item_list', - '#items' => [ - Link::fromTextAndUrl(t('link 1'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 1 title']]))->toRenderable(), - Link::fromTextAndUrl(t('link 2'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 2 title']]))->toRenderable(), - Link::fromTextAndUrl(t('link 3'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 3 title']]))->toRenderable(), - ], - '#attributes' => [ - 'class' => ['toolbar-menu'], - ], - ], - ], - '#weight' => 50, - ]; - $items['empty'] = [ - '#type' => 'toolbar_item', - ]; - - return $items; -} - /** * Implements hook_preprocess_HOOK(). */ diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php index 20e27ab4bb84771d2216c28ba0a15715ee1594f1..993c5d91d46d8e219bbadfac767b683616fa88b2 100644 --- a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php +++ b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php @@ -139,7 +139,7 @@ protected function assertToolbarCacheContexts(array $cache_contexts, ?string $me * @param string[] $module_list * An array of module names. */ - protected function installExtraModules(array $module_list) { + protected function installExtraModules(array $module_list): void { \Drupal::service('module_installer')->install($module_list); // Installing modules updates the container and needs a router rebuild. diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index ff395da0fcfc8c3e1c6e589bad9f7f3aee489c62..285c1bc28e659f73abe73380176ae17eadb37e09 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -2,68 +2,15 @@ /** * @file - * Administration toolbar for quick access to top level administration items. */ use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Render\Element; use Drupal\Core\Render\RenderContext; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Template\Attribute; use Drupal\Component\Utility\Crypt; -use Drupal\Core\Url; use Drupal\toolbar\Controller\ToolbarController; -/** - * Implements hook_help(). - */ -function toolbar_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.toolbar': - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the <a href=":toolbar_docs">online documentation for the Toolbar module</a>.', [':toolbar_docs' => 'https://www.drupal.org/docs/8/core/modules/toolbar']) . '</p>'; - $output .= '<h4>' . t('Terminology') . '</h4>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Tabs') . '</dt>'; - $output .= '<dd>' . t('Tabs are buttons, displayed in a bar across the top of the screen. Some tabs execute an action (such as starting Edit mode), while other tabs toggle which tray is open.') . '</dd>'; - $output .= '<dt>' . t('Trays') . '</dt>'; - $output .= '<dd>' . t('Trays are usually lists of links, which can be hierarchical like a menu. If a tray has been toggled open, it is displayed either vertically or horizontally below the tab bar, depending on the browser width. Only one tray may be open at a time. If you click another tab, that tray will replace the tray being displayed. In wide browser widths, the user has the ability to toggle from vertical to horizontal, using a link at the bottom or right of the tray. Hierarchical menus only have open/close behavior in vertical mode; if you display a tray containing a hierarchical menu horizontally, only the top-level links will be available.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_theme(). - */ -function toolbar_theme($existing, $type, $theme, $path) { - $items['toolbar'] = [ - 'render element' => 'element', - ]; - $items['menu__toolbar'] = [ - 'base hook' => 'menu', - 'variables' => ['menu_name' => NULL, 'items' => [], 'attributes' => []], - ]; - - return $items; -} - -/** - * Implements hook_page_top(). - * - * Add admin toolbar to the top of the page automatically. - */ -function toolbar_page_top(array &$page_top) { - $page_top['toolbar'] = [ - '#type' => 'toolbar', - '#access' => \Drupal::currentUser()->hasPermission('access toolbar'), - '#cache' => [ - 'keys' => ['toolbar'], - 'contexts' => ['user.permissions'], - ], - ]; -} - /** * Prepares variables for administration toolbar templates. * @@ -132,81 +79,6 @@ function template_preprocess_toolbar(&$variables) { } } -/** - * Implements hook_toolbar(). - */ -function toolbar_toolbar() { - // The 'Home' tab is a simple link, with no corresponding tray. - $items['home'] = [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'link', - '#title' => t('Back to site'), - '#url' => Url::fromRoute('<front>'), - '#attributes' => [ - 'title' => t('Return to site content'), - 'class' => ['toolbar-icon', 'toolbar-icon-escape-admin'], - 'data-toolbar-escape-admin' => TRUE, - ], - ], - '#wrapper_attributes' => [ - 'class' => ['home-toolbar-tab'], - ], - '#attached' => [ - 'library' => [ - 'toolbar/toolbar.escapeAdmin', - ], - ], - '#weight' => -20, - ]; - - // To conserve bandwidth, we only include the top-level links in the HTML. - // The subtrees are fetched through a JSONP script that is generated at the - // toolbar_subtrees route. We provide the JavaScript requesting that JSONP - // script here with the hash parameter that is needed for that route. - // @see toolbar_subtrees_jsonp() - [$hash, $hash_cacheability] = _toolbar_get_subtrees_hash(); - $subtrees_attached['drupalSettings']['toolbar'] = [ - 'subtreesHash' => $hash, - ]; - - // The administration element has a link that is themed to correspond to - // a toolbar tray. The tray contains the full administrative menu of the site. - $items['administration'] = [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'link', - '#title' => t('Manage'), - '#url' => Url::fromRoute('system.admin'), - '#attributes' => [ - 'title' => t('Admin menu'), - 'class' => ['toolbar-icon', 'toolbar-icon-menu'], - // A data attribute that indicates to the client to defer loading of - // the admin menu subtrees until this tab is activated. Admin menu - // subtrees will not render to the DOM if this attribute is removed. - // The value of the attribute is intentionally left blank. Only the - // presence of the attribute is necessary. - 'data-drupal-subtrees' => '', - ], - ], - 'tray' => [ - '#heading' => t('Administration menu'), - '#attached' => $subtrees_attached, - 'toolbar_administration' => [ - '#pre_render' => [[ToolbarController::class, 'preRenderAdministrationTray']], - '#type' => 'container', - '#attributes' => [ - 'class' => ['toolbar-menu-administration'], - ], - ], - ], - '#weight' => -15, - ]; - $hash_cacheability->applyTo($items['administration']); - - return $items; -} - /** * Adds toolbar-specific attributes to the menu link tree. * diff --git a/core/modules/update/src/Hook/UpdateHooks.php b/core/modules/update/src/Hook/UpdateHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..999a4e4d630e2c29eb9165e7786b662ea3ace874 --- /dev/null +++ b/core/modules/update/src/Hook/UpdateHooks.php @@ -0,0 +1,330 @@ +<?php + +namespace Drupal\update\Hook; + +use Drupal\update\UpdateManagerInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for update. + */ +class UpdateHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.update': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Update Manager module periodically checks for new versions of your site\'s software (including contributed modules and themes), and alerts administrators to available updates. The Update Manager system is also used by some other modules to manage updates and downloads; for example, the Interface Translation module uses the Update Manager to download translations from the localization server. Note that whenever the Update Manager system is used, anonymous usage statistics are sent to Drupal.org. If desired, you may uninstall the Update Manager module from the <a href=":modules">Extend page</a>; if you do so, functionality that depends on the Update Manager system will not work. For more information, see the <a href=":update">online documentation for the Update Manager module</a>.', [ + ':update' => 'https://www.drupal.org/documentation/modules/update', + ':modules' => Url::fromRoute('system.modules_list')->toString(), + ]) . '</p>'; + // Only explain the Update manager if it has not been uninstalled. + if (_update_manager_access()) { + $output .= '<p>' . t('The Update Manager also allows administrators to add and update modules and themes through the administration interface.') . '</p>'; + } + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Checking for available updates') . '</dt>'; + $output .= '<dd>' . t('The <a href=":update-report">Available updates report</a> displays core, contributed modules, and themes for which there are new releases available for download. On the report page, you can also check manually for updates. You can configure the frequency of update checks, which are performed during cron runs, and whether notifications are sent on the <a href=":update-settings">Update Manager settings page</a>.', [ + ':update-report' => Url::fromRoute('update.status')->toString(), + ':update-settings' => Url::fromRoute('update.settings')->toString(), + ]) . '</dd>'; + // Only explain the Update manager if it has not been uninstalled. + if (_update_manager_access()) { + $output .= '<dt>' . t('Performing updates through the Update page') . '</dt>'; + $output .= '<dd>' . t('The Update Manager module allows administrators to perform updates directly from the <a href=":update-page">Update page</a>. It lists all available updates, and you can confirm whether you want to download them. If you don\'t have sufficient access rights to your web server, you could be prompted for your FTP/SSH password. Afterwards the files are transferred into your site installation, overwriting your old files. Direct links to the Update page are also displayed on the <a href=":modules_page">Extend page</a> and the <a href=":themes_page">Appearance page</a>.', [ + ':modules_page' => Url::fromRoute('system.modules_list')->toString(), + ':themes_page' => Url::fromRoute('system.themes_page')->toString(), + ':update-page' => Url::fromRoute('update.report_update')->toString(), + ]) . '</dd>'; + } + $output .= '</dl>'; + return $output; + + case 'update.status': + return '<p>' . t('Here you can find information about available updates for your installed modules and themes. Note that each module or theme is part of a "project", which may or may not have the same name, and might include multiple modules or themes within it.') . '</p>'; + + case 'system.modules_list': + return '<p>' . t('Regularly review <a href=":updates">available updates</a> and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time you update software.', [ + ':update-php' => Url::fromRoute('system.db_update')->toString(), + ':updates' => Url::fromRoute('update.status')->toString(), + ]) . '</p>'; + } + } + + /** + * Implements hook_page_top(). + */ + #[Hook('page_top')] + public function pageTop() { + /** @var \Drupal\Core\Routing\AdminContext $admin_context */ + $admin_context = \Drupal::service('router.admin_context'); + $route_match = \Drupal::routeMatch(); + if ($admin_context->isAdminRoute($route_match->getRouteObject()) && \Drupal::currentUser()->hasPermission('view update notifications')) { + $route_name = \Drupal::routeMatch()->getRouteName(); + switch ($route_name) { + // These pages don't need additional nagging. + case 'update.theme_update': + case 'update.module_update': + case 'update.status': + case 'update.report_update': + case 'update.settings': + case 'system.status': + case 'system.theme_install': + case 'update.confirmation_page': + case 'system.batch_page.html': + return; + + // If we are on the appearance or modules list, display a detailed report + // of the update status. + case 'system.themes_page': + case 'system.modules_list': + $verbose = TRUE; + break; + } + \Drupal::moduleHandler()->loadInclude('update', 'install'); + $status = update_requirements('runtime'); + foreach (['core', 'contrib'] as $report_type) { + $type = 'update_' . $report_type; + // hook_requirements() supports render arrays therefore we need to render + // them before using + // \Drupal\Core\Messenger\MessengerInterface::addStatus(). + if (isset($status[$type]['description']) && is_array($status[$type]['description'])) { + $status[$type]['description'] = \Drupal::service('renderer')->renderInIsolation($status[$type]['description']); + } + if (!empty($verbose)) { + if (isset($status[$type]['severity'])) { + if ($status[$type]['severity'] == REQUIREMENT_ERROR) { + \Drupal::messenger()->addError($status[$type]['description']); + } + elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) { + \Drupal::messenger()->addWarning($status[$type]['description']); + } + } + } + else { + if (isset($status[$type]) && isset($status[$type]['reason']) && $status[$type]['reason'] === UpdateManagerInterface::NOT_SECURE) { + \Drupal::messenger()->addError($status[$type]['description']); + } + } + } + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'update_last_check' => [ + 'variables' => [ + 'last' => 0, + ], + ], + 'update_report' => [ + 'variables' => [ + 'data' => NULL, + ], + 'file' => 'update.report.inc', + ], + 'update_project_status' => [ + 'variables' => [ + 'project' => [], + ], + 'file' => 'update.report.inc', + ], + // We are using template instead of '#type' => 'table' here to keep markup + // out of preprocess and allow for easier changes to markup. + 'update_version' => [ + 'variables' => [ + 'version' => NULL, + 'title' => NULL, + 'attributes' => [], + ], + 'file' => 'update.report.inc', + ], + 'update_fetch_error_message' => [ + 'file' => 'update.report.inc', + 'render element' => 'element', + 'variables' => [ + 'error_message' => [], + ], + ], + ]; + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + $update_config = \Drupal::config('update.settings'); + $frequency = $update_config->get('check.interval_days'); + $interval = 60 * 60 * 24 * $frequency; + $last_check = \Drupal::state()->get('update.last_check', 0); + $request_time = \Drupal::time()->getRequestTime(); + if ($request_time - $last_check > $interval) { + // If the configured update interval has elapsed, we want to invalidate + // the data for all projects, attempt to re-fetch, and trigger any + // configured notifications about the new status. + update_refresh(); + update_fetch_data(); + } + else { + // Otherwise, see if any individual projects are now stale or still + // missing data, and if so, try to fetch the data. + update_get_available(TRUE); + } + $last_email_notice = \Drupal::state()->get('update.last_email_notification', 0); + if ($request_time - $last_email_notice > $interval) { + // If configured time between notifications elapsed, send email about + // updates possibly available. + \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.fetch'); + _update_cron_notify(); + } + // Clear garbage from disk. + update_clear_update_disk_cache(); + } + + /** + * Implements hook_themes_installed(). + * + * If themes are installed, we invalidate the information of available updates. + */ + #[Hook('themes_installed')] + public function themesInstalled($themes) { + // Clear all update module data. + update_storage_clear(); + } + + /** + * Implements hook_themes_uninstalled(). + * + * If themes are uninstalled, we invalidate the information of available updates. + */ + #[Hook('themes_uninstalled')] + public function themesUninstalled($themes) { + // Clear all update module data. + update_storage_clear(); + } + + /** + * Implements hook_modules_installed(). + * + * If modules are installed, we invalidate the information of available updates. + */ + #[Hook('modules_installed')] + public function modulesInstalled($modules) { + // Clear all update module data. + update_storage_clear(); + } + + /** + * Implements hook_modules_uninstalled(). + * + * If modules are uninstalled, we invalidate the information of available updates. + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled($modules) { + // Clear all update module data. + update_storage_clear(); + } + + /** + * Implements hook_mail(). + * + * Constructs the email notification message when the site is out of date. + * + * @see \Drupal\Core\Mail\MailManagerInterface::mail() + * @see _update_cron_notify() + * @see _update_message_text() + * @see \Drupal\update\UpdateManagerInterface + */ + #[Hook('mail')] + public function mail($key, &$message, $params) { + $langcode = $message['langcode']; + $language = \Drupal::languageManager()->getLanguage($langcode); + $message['subject'] .= t('New release(s) available for @site_name', ['@site_name' => \Drupal::config('system.site')->get('name')], ['langcode' => $langcode]); + foreach ($params as $msg_type => $msg_reason) { + $message['body'][] = _update_message_text($msg_type, $msg_reason, $langcode); + } + $message['body'][] = t('See the available updates page for more information:', [], ['langcode' => $langcode]) . "\n" . Url::fromRoute('update.status', [], ['absolute' => TRUE, 'language' => $language])->toString(); + if (_update_manager_access()) { + $message['body'][] = t('You can automatically download your missing updates using the Update manager:', [], ['langcode' => $langcode]) . "\n" . Url::fromRoute('update.report_update', [], ['absolute' => TRUE, 'language' => $language])->toString(); + } + $settings_url = Url::fromRoute('update.settings', [], ['absolute' => TRUE])->toString(); + if (\Drupal::config('update.settings')->get('notification.threshold') == 'all') { + $message['body'][] = t('Your site is currently configured to send these emails when any updates are available. To get notified only for security updates, @url.', ['@url' => $settings_url]); + } + else { + $message['body'][] = t('Your site is currently configured to send these emails only when security updates are available. To get notified for any available updates, @url.', ['@url' => $settings_url]); + } + } + + /** + * Implements hook_verify_update_archive(). + * + * First, we ensure that the archive isn't a copy of Drupal core, which the + * update manager does not yet support. See https://www.drupal.org/node/606592. + * + * Then, we make sure that at least one module included in the archive file has + * an .info.yml file which claims that the code is compatible with the current + * version of Drupal core. + * + * @see \Drupal\Core\Extension\ExtensionDiscovery + */ + #[Hook('verify_update_archive')] + public function verifyUpdateArchive($project, $archive_file, $directory) { + $errors = []; + // Make sure this isn't a tarball of Drupal core. + if (file_exists("{$directory}/{$project}/index.php") && file_exists("{$directory}/{$project}/core/install.php") && file_exists("{$directory}/{$project}/core/includes/bootstrap.inc") && file_exists("{$directory}/{$project}/core/modules/node/node.module") && file_exists("{$directory}/{$project}/core/modules/system/system.module")) { + return [ + 'no-core' => t('Automatic updating of Drupal core is not supported. See the <a href=":update-guide">Updating Drupal guide</a> for information on how to update Drupal core manually.', [ + ':update-guide' => 'https://www.drupal.org/docs/updating-drupal', + ]), + ]; + } + // Parse all the .info.yml files and make sure at least one is compatible with + // this version of Drupal core. If one is compatible, then the project as a + // whole is considered compatible (since, for example, the project may ship + // with some out-of-date modules that are not necessary for its overall + // functionality). + $compatible_project = FALSE; + $incompatible = []; + /** @var \Drupal\Core\File\FileSystemInterface $file_system */ + $file_system = \Drupal::service('file_system'); + $files = $file_system->scanDirectory("{$directory}/{$project}", '/.*\.info.yml$/', ['key' => 'name', 'min_depth' => 0]); + foreach ($files as $file) { + // Get the .info.yml file for the module or theme this file belongs to. + $info = \Drupal::service('info_parser')->parse($file->uri); + // If the module or theme is incompatible with Drupal core, set an error. + if ($info['core_incompatible']) { + $incompatible[] = !empty($info['name']) ? $info['name'] : t('Unknown'); + } + else { + $compatible_project = TRUE; + break; + } + } + if (empty($files)) { + $errors[] = t('%archive_file does not contain any .info.yml files.', ['%archive_file' => $file_system->basename($archive_file)]); + } + elseif (!$compatible_project) { + $errors[] = \Drupal::translation()->formatPlural(count($incompatible), '%archive_file contains a version of %names that is not compatible with Drupal @version.', '%archive_file contains versions of modules or themes that are not compatible with Drupal @version: %names', [ + '@version' => \Drupal::VERSION, + '%archive_file' => $file_system->basename($archive_file), + '%names' => implode(', ', $incompatible), + ]); + } + return $errors; + } + +} diff --git a/core/modules/update/tests/fixtures/release-history/update_test_basetheme.1_1-sec.xml b/core/modules/update/tests/fixtures/release-history/update_test_base_theme.1_1-sec.xml similarity index 64% rename from core/modules/update/tests/fixtures/release-history/update_test_basetheme.1_1-sec.xml rename to core/modules/update/tests/fixtures/release-history/update_test_base_theme.1_1-sec.xml index 96fc287fccc9ce3f19c7c113255c30400121be31..efa4f940ea25ec7a396438901a0882c0b0f4e88b 100644 --- a/core/modules/update/tests/fixtures/release-history/update_test_basetheme.1_1-sec.xml +++ b/core/modules/update/tests/fixtures/release-history/update_test_base_theme.1_1-sec.xml @@ -1,21 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <project xmlns:dc="http://purl.org/dc/elements/1.1/"> <title>Update test base theme</title> -<short_name>update_test_basetheme</short_name> +<short_name>update_test_base_theme</short_name> <dc:creator>Drupal</dc:creator> <supported_branches>8.x-1.</supported_branches> <project_status>published</project_status> -<link>http://example.com/project/update_test_basetheme</link> +<link>http://example.com/project/update_test_base_theme</link> <terms> <term><name>Projects</name><value>Themes</value></term> </terms> <releases> <release> - <name>update_test_basetheme 8.x-1.1</name> + <name>update_test_base_theme 8.x-1.1</name> <version>8.x-1.1</version> <status>published</status> - <release_link>http://example.com/update_test_basetheme-8-x-1-1-release</release_link> - <download_link>http://example.com/update_test_basetheme-8.x-1.1.tar.gz</download_link> + <release_link>http://example.com/update_test_base_theme-8-x-1-1-release</release_link> + <download_link>http://example.com/update_test_base_theme-8.x-1.1.tar.gz</download_link> <date>1250624521</date> <terms> <term><name>Release type</name><value>Security update</value></term> @@ -24,11 +24,11 @@ </terms> </release> <release> - <name>update_test_basetheme 8.x-1.0</name> + <name>update_test_base_theme 8.x-1.0</name> <version>8.x-1.0</version> <status>published</status> - <release_link>http://example.com/update_test_basetheme-8-x-1-0-release</release_link> - <download_link>http://example.com/update_test_basetheme-8.x-1.0.tar.gz</download_link> + <release_link>http://example.com/update_test_base_theme-8-x-1-0-release</release_link> + <download_link>http://example.com/update_test_base_theme-8.x-1.0.tar.gz</download_link> <date>1250524521</date> <terms> <term><name>Release type</name><value>New features</value></term> diff --git a/core/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php b/core/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..32100571a7b742e3ce604168407d4f6059a1809b --- /dev/null +++ b/core/modules/update/tests/modules/update_test/src/Hook/UpdateTestHooks.php @@ -0,0 +1,82 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\update_test\Hook; + +use Drupal\Core\Extension\Extension; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for update_test. + */ +class UpdateTestHooks { + + /** + * Implements hook_system_info_alter(). + * + * Checks the 'update_test.settings:system_info' configuration and sees if we + * need to alter the system info for the given $file based on the setting. The + * setting is expected to be a nested associative array. If the key '#all' is + * defined, its subarray will include .info.yml keys and values for all modules + * and themes on the system. Otherwise, the settings array is keyed by the + * module or theme short name ($file->name) and the subarrays contain settings + * just for that module or theme. + */ + #[Hook('system_info_alter')] + public function systemInfoAlter(&$info, Extension $file) { + $setting = \Drupal::config('update_test.settings')->get('system_info'); + foreach (['#all', $file->getName()] as $id) { + if (!empty($setting[$id])) { + foreach ($setting[$id] as $key => $value) { + $info[$key] = $value; + } + } + } + } + + /** + * Implements hook_update_status_alter(). + * + * Checks the 'update_test.settings:update_status' configuration and sees if we + * need to alter the update status for the given project based on the setting. + * The setting is expected to be a nested associative array. If the key '#all' + * is defined, its subarray will include .info.yml keys and values for all modules + * and themes on the system. Otherwise, the settings array is keyed by the + * module or theme short name and the subarrays contain settings just for that + * module or theme. + */ + #[Hook('update_status_alter')] + public function updateStatusAlter(&$projects) { + $setting = \Drupal::config('update_test.settings')->get('update_status'); + if (!empty($setting)) { + foreach ($projects as $project_name => &$project) { + foreach (['#all', $project_name] as $id) { + if (!empty($setting[$id])) { + foreach ($setting[$id] as $key => $value) { + $project[$key] = $value; + } + } + } + } + } + } + + /** + * Implements hook_filetransfer_info(). + */ + #[Hook('filetransfer_info')] + public function filetransferInfo() { + // Define a test file transfer method, to ensure that there will always be at + // least one method available in the user interface (regardless of the + // environment in which the update manager tests are run). + return [ + 'system_test' => [ + 'title' => t('Update Test FileTransfer'), + 'class' => 'Drupal\update_test\TestFileTransferWithSettingsForm', + 'weight' => -20, + ], + ]; + } + +} diff --git a/core/modules/update/tests/modules/update_test/update_test.module b/core/modules/update/tests/modules/update_test/update_test.module deleted file mode 100644 index be38cd832b00c1fff3684603b9b6204e92a69698..0000000000000000000000000000000000000000 --- a/core/modules/update/tests/modules/update_test/update_test.module +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -/** - * @file - * Module for testing Update Manager functionality. - */ - -declare(strict_types=1); - -use Drupal\Core\Extension\Extension; - -/** - * Implements hook_system_info_alter(). - * - * Checks the 'update_test.settings:system_info' configuration and sees if we - * need to alter the system info for the given $file based on the setting. The - * setting is expected to be a nested associative array. If the key '#all' is - * defined, its subarray will include .info.yml keys and values for all modules - * and themes on the system. Otherwise, the settings array is keyed by the - * module or theme short name ($file->name) and the subarrays contain settings - * just for that module or theme. - */ -function update_test_system_info_alter(&$info, Extension $file) { - $setting = \Drupal::config('update_test.settings')->get('system_info'); - foreach (['#all', $file->getName()] as $id) { - if (!empty($setting[$id])) { - foreach ($setting[$id] as $key => $value) { - $info[$key] = $value; - } - } - } -} - -/** - * Implements hook_update_status_alter(). - * - * Checks the 'update_test.settings:update_status' configuration and sees if we - * need to alter the update status for the given project based on the setting. - * The setting is expected to be a nested associative array. If the key '#all' - * is defined, its subarray will include .info.yml keys and values for all modules - * and themes on the system. Otherwise, the settings array is keyed by the - * module or theme short name and the subarrays contain settings just for that - * module or theme. - */ -function update_test_update_status_alter(&$projects) { - $setting = \Drupal::config('update_test.settings')->get('update_status'); - if (!empty($setting)) { - foreach ($projects as $project_name => &$project) { - foreach (['#all', $project_name] as $id) { - if (!empty($setting[$id])) { - foreach ($setting[$id] as $key => $value) { - $project[$key] = $value; - } - } - } - } - } -} - -/** - * Implements hook_filetransfer_info(). - */ -function update_test_filetransfer_info() { - // Define a test file transfer method, to ensure that there will always be at - // least one method available in the user interface (regardless of the - // environment in which the update manager tests are run). - return [ - 'system_test' => [ - 'title' => t('Update Test FileTransfer'), - 'class' => 'Drupal\update_test\TestFileTransferWithSettingsForm', - 'weight' => -20, - ], - ]; -} diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php index a6b7415aa8bc47709c5fe35ece36c2ddd269b748..dd64cda629231e69c3184bd9088db3fef1290dc7 100644 --- a/core/modules/update/tests/src/Functional/UpdateContribTest.php +++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php @@ -216,9 +216,9 @@ public function testUpdateBaseThemeSecurityUpdate(): void { // Define the initial state for core and the subtheme. $this->mockInstalledExtensionsInfo([ - // Show the update_test_basetheme. - 'update_test_basetheme' => [ - 'project' => 'update_test_basetheme', + // Show the update_test_base_theme. + 'update_test_base_theme' => [ + 'project' => 'update_test_base_theme', 'version' => '8.x-1.0', 'hidden' => FALSE, ], @@ -232,11 +232,11 @@ public function testUpdateBaseThemeSecurityUpdate(): void { $xml_mapping = [ 'drupal' => '8.0.0', 'update_test_subtheme' => '1_0', - 'update_test_basetheme' => '1_1-sec', + 'update_test_base_theme' => '1_1-sec', ]; $this->refreshUpdateStatus($xml_mapping); $this->assertSession()->pageTextContains('Security update required!'); - $this->updateProject = 'update_test_basetheme'; + $this->updateProject = 'update_test_base_theme'; $this->assertVersionUpdateLinks('Security update', '8.x-1.1'); } @@ -351,9 +351,9 @@ public function testUpdateShowDisabledThemes(): void { // Define the initial state for core and the test contrib themes. $this->mockInstalledExtensionsInfo([ - // The update_test_basetheme should be visible and up to date. - 'update_test_basetheme' => [ - 'project' => 'update_test_basetheme', + // The update_test_base_theme should be visible and up to date. + 'update_test_base_theme' => [ + 'project' => 'update_test_base_theme', 'version' => '8.x-1.1', 'hidden' => FALSE, ], @@ -372,7 +372,7 @@ public function testUpdateShowDisabledThemes(): void { $xml_mapping = [ 'drupal' => '8.0.0', 'update_test_subtheme' => '1_0', - 'update_test_basetheme' => '1_1-sec', + 'update_test_base_theme' => '1_1-sec', ]; foreach ([TRUE, FALSE] as $check_disabled) { $update_settings->set('check.disabled_extensions', $check_disabled)->save(); @@ -384,14 +384,14 @@ public function testUpdateShowDisabledThemes(): void { if ($check_disabled) { $this->assertSession()->pageTextContains('Uninstalled themes'); $this->assertSession()->linkExists('Update test base theme'); - $this->assertSession()->linkByHrefExists('http://example.com/project/update_test_basetheme'); + $this->assertSession()->linkByHrefExists('http://example.com/project/update_test_base_theme'); $this->assertSession()->linkExists('Update test subtheme'); $this->assertSession()->linkByHrefExists('http://example.com/project/update_test_subtheme'); } else { $this->assertSession()->pageTextNotContains('Uninstalled themes'); $this->assertSession()->linkNotExists('Update test base theme'); - $this->assertSession()->linkByHrefNotExists('http://example.com/project/update_test_basetheme'); + $this->assertSession()->linkByHrefNotExists('http://example.com/project/update_test_base_theme'); $this->assertSession()->linkNotExists('Update test subtheme'); $this->assertSession()->linkByHrefNotExists('http://example.com/project/update_test_subtheme'); } @@ -409,9 +409,9 @@ public function testUpdateHiddenBaseTheme(): void { // Add a project and initial state for base theme and subtheme. $this->mockInstalledExtensionsInfo([ - // Hide the update_test_basetheme. - 'update_test_basetheme' => [ - 'project' => 'update_test_basetheme', + // Hide the update_test_base_theme. + 'update_test_base_theme' => [ + 'project' => 'update_test_base_theme', 'hidden' => TRUE, ], // Show the update_test_subtheme. @@ -425,7 +425,7 @@ public function testUpdateHiddenBaseTheme(): void { $project_info = new ProjectInfo(); $project_info->processInfoList($projects, $theme_data, 'theme', TRUE); - $this->assertNotEmpty($projects['update_test_basetheme'], 'Valid base theme (update_test_basetheme) was found.'); + $this->assertNotEmpty($projects['update_test_base_theme'], 'Valid base theme (update_test_base_theme) was found.'); } /** diff --git a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php index 1e1cb15e00f2306a3289dd11e41f86ec465b4537..96aa846e2e6dd9fda8fb035fce80d93af71631ec 100644 --- a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php +++ b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php @@ -306,7 +306,7 @@ public function testUninstalledUpdatesTable(): void { * Array of expected header texts, keyed by CSS selectors relative to the * thead tr (for example, "th:nth-of-type(3)"). */ - private function checkTableHeaders($table_locator, array $expected_headers) { + private function checkTableHeaders($table_locator, array $expected_headers): void { $assert_session = $this->assertSession(); $assert_session->elementExists('css', $table_locator); foreach ($expected_headers as $locator => $header) { diff --git a/core/modules/update/tests/src/Functional/UpdateTestBase.php b/core/modules/update/tests/src/Functional/UpdateTestBase.php index f9afb144f00fb125c5ca468ba8d01a90ac961275..67848f65001f42476548499242d8784ea222c016 100644 --- a/core/modules/update/tests/src/Functional/UpdateTestBase.php +++ b/core/modules/update/tests/src/Functional/UpdateTestBase.php @@ -64,10 +64,10 @@ abstract class UpdateTestBase extends BrowserTestBase { /** * Refreshes the update status based on the desired available update scenario. * - * @param $xml_map + * @param array $xml_map * Array that maps project names to availability scenarios to fetch. The key * '#all' is used if a project-specific mapping is not defined. - * @param $url + * @param string $url * (optional) A string containing the URL to fetch update data from. * Defaults to 'update-test'. * diff --git a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php index 4d9b47053a2e53f167fcba8a21e183b07287b17a..2345a65fe9239e3708bc9932ff7ea9ea1557bb93 100644 --- a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php +++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php @@ -160,10 +160,10 @@ public static function providerTestUpdateBuildFetchUrl() { /** * Mocks the HTTP client. * - * @param \GuzzleHttp\Psr7\Response ... + * @param \GuzzleHttp\Psr7\Response ...$responses * Variable number of Response objects that the mocked client should return. */ - protected function mockClient(Response ...$responses) { + protected function mockClient(Response ...$responses): void { // Create a mock and queue responses. $mock_handler = new MockHandler($responses); $handler_stack = HandlerStack::create($mock_handler); diff --git a/core/modules/update/tests/src/Unit/UpdateMailTest.php b/core/modules/update/tests/src/Unit/UpdateMailTest.php index ca3f73891d265fcf00b91a11e609080f3b83eca4..b8caa9e5f675c3fc65e063518695a5d8f4a63150 100644 --- a/core/modules/update/tests/src/Unit/UpdateMailTest.php +++ b/core/modules/update/tests/src/Unit/UpdateMailTest.php @@ -7,6 +7,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Tests\UnitTestCase; use Drupal\update\UpdateManagerInterface; +use Drupal\update\Hook\UpdateHooks; /** * Tests text of update email. @@ -147,7 +148,8 @@ public function testUpdateEmail($notification_threshold, $params, $authorized, a \Drupal::setContainer($this->container); // Generate the email message. - update_mail($key, $message, $params); + $updateMail = new UpdateHooks(); + $updateMail->mail($key, $message, $params); // Confirm the subject. $this->assertSame("New release(s) available for $site_name", $message['subject']); diff --git a/core/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info.yml b/core/modules/update/tests/themes/update_test_base_theme/update_test_base_theme.info.yml similarity index 100% rename from core/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info.yml rename to core/modules/update/tests/themes/update_test_base_theme/update_test_base_theme.info.yml diff --git a/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml b/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml index 28a6540866a8f7423fd5b678b916e6328d10828c..c169260f2daa83b7d1f6d4b4783a67a17c726aef 100644 --- a/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml +++ b/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml @@ -1,5 +1,5 @@ name: 'Update test subtheme' type: theme -description: 'Test theme which uses update_test_basetheme as the base theme.' +description: 'Test theme which uses update_test_base_theme as the base theme.' version: VERSION -base theme: update_test_basetheme +base theme: update_test_base_theme diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index 9be6690af407121d1d50d3a5d791c29c61a4ac7e..15f09badfcf0e98c84d61c8bc076799798f46494 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -2,12 +2,6 @@ /** * @file - * Callbacks and related functions invoked by authorize.php to update projects. - * - * We use the Batch API to actually update each individual project on the site. - * All of the code in this file is run at a low bootstrap level (modules are not - * loaded), so these functions cannot assume access to the rest of the code of - * the Update Manager module. */ use Drupal\Core\Batch\BatchBuilder; diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc index ed909ea7b3e08eac4d87e5dc81bbd3d066794fc2..4cca7e4000f8f27742ac9eb8422b405da30cdf72 100644 --- a/core/modules/update/update.compare.inc +++ b/core/modules/update/update.compare.inc @@ -2,7 +2,6 @@ /** * @file - * Code required only when comparing available updates to existing data. */ use Drupal\Core\Extension\ExtensionVersion; diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc index 4ae279da24194a6e1ba0aa9f18d596249bd27210..0056bb8ea3e4ffb8244b929567454c1b582beb9a 100644 --- a/core/modules/update/update.fetch.inc +++ b/core/modules/update/update.fetch.inc @@ -2,7 +2,6 @@ /** * @file - * Code required only when fetching information about available updates. */ use Drupal\update\UpdateManagerInterface; diff --git a/core/modules/update/update.install b/core/modules/update/update.install index d7a95d60013c3343481dc3d9d0cf43420cc9c2ae..ad1f9bc20ee04d593345ed9a5eb9dcf5db7966ee 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -73,7 +73,7 @@ function update_requirements($phase) { /** * Implements hook_install(). */ -function update_install() { +function update_install(): void { $queue = \Drupal::queue('update_fetch_tasks', TRUE); $queue->createQueue(); } @@ -81,7 +81,7 @@ function update_install() { /** * Implements hook_uninstall(). */ -function update_uninstall() { +function update_uninstall(): void { \Drupal::state()->delete('update.last_check'); \Drupal::state()->delete('update.last_email_notification'); @@ -172,6 +172,6 @@ function _update_requirement_check($project, $type) { /** * Implements hook_update_last_removed(). */ -function update_update_last_removed() { +function update_update_last_removed(): int { return 8001; } diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index 87330e337c3e3af315f03035230093cf716d9c63..02554db90acb8053172399dd0cb15acae0909d37 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -2,38 +2,6 @@ /** * @file - * Administrative screens and processing functions of the Update Manager module. - * - * This allows site administrators with the 'administer software updates' - * permission to either upgrade existing projects, or download and install new - * ones, so long as the kill switch setting ('allow_authorize_operations') is - * not FALSE. - * - * To install new code, the administrator is prompted for either the URL of an - * archive file, or to directly upload the archive file. The archive is loaded - * into a temporary location, extracted, and verified. If everything is - * successful, the user is redirected to authorize.php to type in file transfer - * credentials and authorize the installation to proceed with elevated - * privileges, such that the extracted files can be copied out of the temporary - * location and into the live web root. - * - * Updating existing code is a more elaborate process. The first step is a - * selection form where the user is presented with a table of installed projects - * that are missing newer releases. The user selects which projects they wish to - * update, and presses the "Download updates" button to continue. This sets up a - * batch to fetch all the selected releases, and redirects to - * admin/update/download to display the batch progress bar as it runs. Each - * batch operation is responsible for downloading a single file, extracting the - * archive, and verifying the contents. If there are any errors, the user is - * redirected back to the first page with the error messages. If all downloads - * were extracted and verified, the user is instead redirected to - * admin/update/ready, a landing page which reminds them to backup their - * database and asks if they want to put the site offline during the update. - * Once the user presses the "Install updates" button, they are redirected to - * authorize.php to supply their web root file access credentials. The - * authorized operation (which lives in update.authorize.inc) sets up a batch to - * copy each extracted update from the temporary location into the live web - * root. */ use Drupal\Core\File\Exception\FileException; diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 11c8fcb61357809e2697ec17bd85f57bfb30d8b4..f12aecaa74eb33b6bede31f2d4e5c59eacf59ae2 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -2,119 +2,15 @@ /** * @file - * Handles updates of Drupal core and contributed projects. - * - * The module checks for available updates of Drupal core and any installed - * contributed modules and themes. It warns site administrators if newer - * releases are available via the system status report (admin/reports/status), - * the module and theme pages, and optionally via email. */ use Drupal\Core\File\Exception\FileException; use Drupal\Core\Link; use Drupal\Core\Url; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Site\Settings; use Drupal\update\UpdateFetcherInterface; use Drupal\update\UpdateManagerInterface; -/** - * Implements hook_help(). - */ -function update_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.update': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Update Manager module periodically checks for new versions of your site\'s software (including contributed modules and themes), and alerts administrators to available updates. The Update Manager system is also used by some other modules to manage updates and downloads; for example, the Interface Translation module uses the Update Manager to download translations from the localization server. Note that whenever the Update Manager system is used, anonymous usage statistics are sent to Drupal.org. If desired, you may uninstall the Update Manager module from the <a href=":modules">Extend page</a>; if you do so, functionality that depends on the Update Manager system will not work. For more information, see the <a href=":update">online documentation for the Update Manager module</a>.', [':update' => 'https://www.drupal.org/documentation/modules/update', ':modules' => Url::fromRoute('system.modules_list')->toString()]) . '</p>'; - // Only explain the Update manager if it has not been uninstalled. - if (_update_manager_access()) { - $output .= '<p>' . t('The Update Manager also allows administrators to add and update modules and themes through the administration interface.') . '</p>'; - } - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Checking for available updates') . '</dt>'; - $output .= '<dd>' . t('The <a href=":update-report">Available updates report</a> displays core, contributed modules, and themes for which there are new releases available for download. On the report page, you can also check manually for updates. You can configure the frequency of update checks, which are performed during cron runs, and whether notifications are sent on the <a href=":update-settings">Update Manager settings page</a>.', [':update-report' => Url::fromRoute('update.status')->toString(), ':update-settings' => Url::fromRoute('update.settings')->toString()]) . '</dd>'; - // Only explain the Update manager if it has not been uninstalled. - if (_update_manager_access()) { - $output .= '<dt>' . t('Performing updates through the Update page') . '</dt>'; - $output .= '<dd>' . t('The Update Manager module allows administrators to perform updates directly from the <a href=":update-page">Update page</a>. It lists all available updates, and you can confirm whether you want to download them. If you don\'t have sufficient access rights to your web server, you could be prompted for your FTP/SSH password. Afterwards the files are transferred into your site installation, overwriting your old files. Direct links to the Update page are also displayed on the <a href=":modules_page">Extend page</a> and the <a href=":themes_page">Appearance page</a>.', [':modules_page' => Url::fromRoute('system.modules_list')->toString(), ':themes_page' => Url::fromRoute('system.themes_page')->toString(), ':update-page' => Url::fromRoute('update.report_update')->toString()]) . '</dd>'; - } - $output .= '</dl>'; - return $output; - - case 'update.status': - return '<p>' . t('Here you can find information about available updates for your installed modules and themes. Note that each module or theme is part of a "project", which may or may not have the same name, and might include multiple modules or themes within it.') . '</p>'; - - case 'system.modules_list': - return '<p>' . t('Regularly review <a href=":updates">available updates</a> and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time you update software.', [':update-php' => Url::fromRoute('system.db_update')->toString(), ':updates' => Url::fromRoute('update.status')->toString()]) . '</p>'; - - } -} - -/** - * Implements hook_page_top(). - */ -function update_page_top() { - /** @var \Drupal\Core\Routing\AdminContext $admin_context */ - $admin_context = \Drupal::service('router.admin_context'); - $route_match = \Drupal::routeMatch(); - if ($admin_context->isAdminRoute($route_match->getRouteObject()) && \Drupal::currentUser()->hasPermission('view update notifications')) { - $route_name = \Drupal::routeMatch()->getRouteName(); - switch ($route_name) { - // These pages don't need additional nagging. - case 'update.theme_update': - case 'update.module_update': - case 'update.status': - case 'update.report_update': - case 'update.settings': - case 'system.status': - case 'system.theme_install': - case 'update.confirmation_page': - case 'system.batch_page.html': - return; - - // If we are on the appearance or modules list, display a detailed report - // of the update status. - case 'system.themes_page': - case 'system.modules_list': - $verbose = TRUE; - break; - - } - \Drupal::moduleHandler()->loadInclude('update', 'install'); - $status = update_requirements('runtime'); - foreach (['core', 'contrib'] as $report_type) { - $type = 'update_' . $report_type; - // hook_requirements() supports render arrays therefore we need to render - // them before using - // \Drupal\Core\Messenger\MessengerInterface::addStatus(). - if (isset($status[$type]['description']) && is_array($status[$type]['description'])) { - $status[$type]['description'] = \Drupal::service('renderer')->renderInIsolation($status[$type]['description']); - } - if (!empty($verbose)) { - if (isset($status[$type]['severity'])) { - if ($status[$type]['severity'] == REQUIREMENT_ERROR) { - \Drupal::messenger()->addError($status[$type]['description']); - } - elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) { - \Drupal::messenger()->addWarning($status[$type]['description']); - } - } - } - // Otherwise, if we're on *any* admin page and there's a security - // update missing, print an error message about it. - else { - if (isset($status[$type]) - && isset($status[$type]['reason']) - && $status[$type]['reason'] === UpdateManagerInterface::NOT_SECURE) { - \Drupal::messenger()->addError($status[$type]['description']); - } - } - } - } -} - /** * Resolves if the current user can access updater menu items. * @@ -129,109 +25,6 @@ function _update_manager_access() { return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates'); } -/** - * Implements hook_theme(). - */ -function update_theme() { - return [ - 'update_last_check' => [ - 'variables' => ['last' => 0], - ], - 'update_report' => [ - 'variables' => ['data' => NULL], - 'file' => 'update.report.inc', - ], - 'update_project_status' => [ - 'variables' => ['project' => []], - 'file' => 'update.report.inc', - ], - // We are using template instead of '#type' => 'table' here to keep markup - // out of preprocess and allow for easier changes to markup. - 'update_version' => [ - 'variables' => ['version' => NULL, 'title' => NULL, 'attributes' => []], - 'file' => 'update.report.inc', - ], - 'update_fetch_error_message' => [ - 'file' => 'update.report.inc', - 'render element' => 'element', - 'variables' => ['error_message' => []], - ], - ]; -} - -/** - * Implements hook_cron(). - */ -function update_cron() { - $update_config = \Drupal::config('update.settings'); - $frequency = $update_config->get('check.interval_days'); - $interval = 60 * 60 * 24 * $frequency; - $last_check = \Drupal::state()->get('update.last_check', 0); - $request_time = \Drupal::time()->getRequestTime(); - if (($request_time - $last_check) > $interval) { - // If the configured update interval has elapsed, we want to invalidate - // the data for all projects, attempt to re-fetch, and trigger any - // configured notifications about the new status. - update_refresh(); - update_fetch_data(); - } - else { - // Otherwise, see if any individual projects are now stale or still - // missing data, and if so, try to fetch the data. - update_get_available(TRUE); - } - $last_email_notice = \Drupal::state()->get('update.last_email_notification', 0); - if (($request_time - $last_email_notice) > $interval) { - // If configured time between notifications elapsed, send email about - // updates possibly available. - \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.fetch'); - _update_cron_notify(); - } - - // Clear garbage from disk. - update_clear_update_disk_cache(); -} - -/** - * Implements hook_themes_installed(). - * - * If themes are installed, we invalidate the information of available updates. - */ -function update_themes_installed($themes) { - // Clear all update module data. - update_storage_clear(); -} - -/** - * Implements hook_themes_uninstalled(). - * - * If themes are uninstalled, we invalidate the information of available updates. - */ -function update_themes_uninstalled($themes) { - // Clear all update module data. - update_storage_clear(); -} - -/** - * Implements hook_modules_installed(). - * - * If modules are installed, we invalidate the information of available updates. - */ -function update_modules_installed($modules) { - // Clear all update module data. - update_storage_clear(); -} - -/** - * Implements hook_modules_uninstalled(). - * - * If modules are uninstalled, we invalidate the information of available updates. - */ -function update_modules_uninstalled($modules) { - // Clear all update module data. - update_storage_clear(); -} - /** * Returns a warning message when there is no data about available updates. */ @@ -374,36 +167,6 @@ function update_fetch_data_finished($success, $results) { } } -/** - * Implements hook_mail(). - * - * Constructs the email notification message when the site is out of date. - * - * @see \Drupal\Core\Mail\MailManagerInterface::mail() - * @see _update_cron_notify() - * @see _update_message_text() - * @see \Drupal\update\UpdateManagerInterface - */ -function update_mail($key, &$message, $params) { - $langcode = $message['langcode']; - $language = \Drupal::languageManager()->getLanguage($langcode); - $message['subject'] .= t('New release(s) available for @site_name', ['@site_name' => \Drupal::config('system.site')->get('name')], ['langcode' => $langcode]); - foreach ($params as $msg_type => $msg_reason) { - $message['body'][] = _update_message_text($msg_type, $msg_reason, $langcode); - } - $message['body'][] = t('See the available updates page for more information:', [], ['langcode' => $langcode]) . "\n" . Url::fromRoute('update.status', [], ['absolute' => TRUE, 'language' => $language])->toString(); - if (_update_manager_access()) { - $message['body'][] = t('You can automatically download your missing updates using the Update manager:', [], ['langcode' => $langcode]) . "\n" . Url::fromRoute('update.report_update', [], ['absolute' => TRUE, 'language' => $language])->toString(); - } - $settings_url = Url::fromRoute('update.settings', [], ['absolute' => TRUE])->toString(); - if (\Drupal::config('update.settings')->get('notification.threshold') == 'all') { - $message['body'][] = t('Your site is currently configured to send these emails when any updates are available. To get notified only for security updates, @url.', ['@url' => $settings_url]); - } - else { - $message['body'][] = t('Your site is currently configured to send these emails only when security updates are available. To get notified for any available updates, @url.', ['@url' => $settings_url]); - } -} - /** * Returns the appropriate message text when site is out of date or not secure. * @@ -512,77 +275,6 @@ function template_preprocess_update_last_check(&$variables) { $variables['link'] = Link::fromTextAndUrl(t('Check manually'), Url::fromRoute('update.manual_status', [], ['query' => \Drupal::destination()->getAsArray()]))->toString(); } -/** - * Implements hook_verify_update_archive(). - * - * First, we ensure that the archive isn't a copy of Drupal core, which the - * update manager does not yet support. See https://www.drupal.org/node/606592. - * - * Then, we make sure that at least one module included in the archive file has - * an .info.yml file which claims that the code is compatible with the current - * version of Drupal core. - * - * @see \Drupal\Core\Extension\ExtensionDiscovery - */ -function update_verify_update_archive($project, $archive_file, $directory) { - $errors = []; - - // Make sure this isn't a tarball of Drupal core. - if ( - file_exists("$directory/$project/index.php") - && file_exists("$directory/$project/core/install.php") - && file_exists("$directory/$project/core/includes/bootstrap.inc") - && file_exists("$directory/$project/core/modules/node/node.module") - && file_exists("$directory/$project/core/modules/system/system.module") - ) { - return [ - 'no-core' => t('Automatic updating of Drupal core is not supported. See the <a href=":update-guide">Updating Drupal guide</a> for information on how to update Drupal core manually.', [':update-guide' => 'https://www.drupal.org/docs/updating-drupal']), - ]; - } - - // Parse all the .info.yml files and make sure at least one is compatible with - // this version of Drupal core. If one is compatible, then the project as a - // whole is considered compatible (since, for example, the project may ship - // with some out-of-date modules that are not necessary for its overall - // functionality). - $compatible_project = FALSE; - $incompatible = []; - /** @var \Drupal\Core\File\FileSystemInterface $file_system */ - $file_system = \Drupal::service('file_system'); - $files = $file_system->scanDirectory("$directory/$project", '/.*\.info.yml$/', ['key' => 'name', 'min_depth' => 0]); - foreach ($files as $file) { - // Get the .info.yml file for the module or theme this file belongs to. - $info = \Drupal::service('info_parser')->parse($file->uri); - - // If the module or theme is incompatible with Drupal core, set an error. - if ($info['core_incompatible']) { - $incompatible[] = !empty($info['name']) ? $info['name'] : t('Unknown'); - } - else { - $compatible_project = TRUE; - break; - } - } - - if (empty($files)) { - $errors[] = t('%archive_file does not contain any .info.yml files.', ['%archive_file' => $file_system->basename($archive_file)]); - } - elseif (!$compatible_project) { - $errors[] = \Drupal::translation()->formatPlural( - count($incompatible), - '%archive_file contains a version of %names that is not compatible with Drupal @version.', - '%archive_file contains versions of modules or themes that are not compatible with Drupal @version: %names', - [ - '@version' => \Drupal::VERSION, - '%archive_file' => $file_system->basename($archive_file), - '%names' => implode(', ', $incompatible), - ] - ); - } - - return $errors; -} - /** * Invalidates stored data relating to update status. */ diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 8dbb17e094fff69a9a421a0d2baa63bdec4392c5..ec8bc36115e7b79e8e09bf0c0b001c20f824c179 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -2,7 +2,6 @@ /** * @file - * Code required only when rendering the available updates report. */ use Drupal\Core\Template\Attribute; diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php index 62890447801d6260e7d8e80e4206b0c5cd4f38ca..267a75d5408cd3bfc7ed88cfdacd05381a9d21ef 100644 --- a/core/modules/user/src/Entity/Role.php +++ b/core/modules/user/src/Entity/Role.php @@ -4,55 +4,60 @@ use Drupal\Core\Config\Action\Attribute\ActionMethod; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityDeleteForm; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\user\RoleAccessControlHandler; +use Drupal\user\RoleForm; use Drupal\user\RoleInterface; +use Drupal\user\RoleListBuilder; +use Drupal\user\RoleStorage; /** * Defines the user role entity class. - * - * @ConfigEntityType( - * id = "user_role", - * label = @Translation("Role"), - * label_collection = @Translation("Roles"), - * label_singular = @Translation("role"), - * label_plural = @Translation("roles"), - * label_count = @PluralTranslation( - * singular = "@count role", - * plural = "@count roles", - * ), - * handlers = { - * "storage" = "Drupal\user\RoleStorage", - * "access" = "Drupal\user\RoleAccessControlHandler", - * "list_builder" = "Drupal\user\RoleListBuilder", - * "form" = { - * "default" = "Drupal\user\RoleForm", - * "delete" = "Drupal\Core\Entity\EntityDeleteForm" - * } - * }, - * admin_permission = "administer permissions", - * config_prefix = "role", - * static_cache = TRUE, - * entity_keys = { - * "id" = "id", - * "weight" = "weight", - * "label" = "label" - * }, - * links = { - * "delete-form" = "/admin/people/roles/manage/{user_role}/delete", - * "edit-form" = "/admin/people/roles/manage/{user_role}", - * "edit-permissions-form" = "/admin/people/permissions/{user_role}", - * "collection" = "/admin/people/roles", - * }, - * config_export = { - * "id", - * "label", - * "weight", - * "is_admin", - * "permissions", - * } - * ) */ +#[ConfigEntityType( + id: 'user_role', + label: new TranslatableMarkup('Role'), + label_collection: new TranslatableMarkup('Roles'), + label_singular: new TranslatableMarkup('role'), + label_plural: new TranslatableMarkup('roles'), + config_prefix: 'role', + static_cache: TRUE, + entity_keys: [ + 'id' => 'id', + 'weight' => 'weight', + 'label' => 'label', + ], + handlers: [ + 'storage' => RoleStorage::class, + 'access' => RoleAccessControlHandler::class, + 'list_builder' => RoleListBuilder::class, + 'form' => [ + 'default' => RoleForm::class, + 'delete' => EntityDeleteForm::class, + ], + ], + links: [ + 'delete-form' => '/admin/people/roles/manage/{user_role}/delete', + 'edit-form' => '/admin/people/roles/manage/{user_role}', + 'edit-permissions-form' => '/admin/people/permissions/{user_role}', + 'collection' => '/admin/people/roles', + ], + admin_permission: 'administer permissions', + label_count: [ + 'singular' => '@count role', + 'plural' => '@count roles', + ], + config_export: [ + 'id', + 'label', + 'weight', + 'is_admin', + 'permissions', + ], +)] class Role extends ConfigEntityBase implements RoleInterface { /** diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 84d384b0060f8250abab579b3ab6c0f779db935e..a487c4cc9332b6cd7518fd9ccb036c39479d342a 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -2,6 +2,8 @@ namespace Drupal\user\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityStorageInterface; @@ -9,62 +11,70 @@ use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Flood\PrefixFloodInterface; use Drupal\Core\Language\LanguageInterface; +use Drupal\user\Form\UserCancelForm; +use Drupal\user\ProfileForm; +use Drupal\user\ProfileTranslationHandler; +use Drupal\user\RegisterForm; use Drupal\user\RoleInterface; use Drupal\user\StatusItem; use Drupal\user\TimeZoneItem; +use Drupal\user\UserAccessControlHandler; use Drupal\user\UserInterface; +use Drupal\user\UserListBuilder; +use Drupal\user\UserStorage; +use Drupal\user\UserStorageSchema; +use Drupal\user\UserViewsData; /** * Defines the user entity class. * * The base table name here is plural, despite Drupal table naming standards, * because "user" is a reserved word in many databases. - * - * @ContentEntityType( - * id = "user", - * label = @Translation("User"), - * label_collection = @Translation("Users"), - * label_singular = @Translation("user"), - * label_plural = @Translation("users"), - * label_count = @PluralTranslation( - * singular = "@count user", - * plural = "@count users", - * ), - * handlers = { - * "storage" = "Drupal\user\UserStorage", - * "storage_schema" = "Drupal\user\UserStorageSchema", - * "access" = "Drupal\user\UserAccessControlHandler", - * "list_builder" = "Drupal\user\UserListBuilder", - * "views_data" = "Drupal\user\UserViewsData", - * "route_provider" = { - * "html" = "Drupal\user\Entity\UserRouteProvider", - * }, - * "form" = { - * "default" = "Drupal\user\ProfileForm", - * "cancel" = "Drupal\user\Form\UserCancelForm", - * "register" = "Drupal\user\RegisterForm" - * }, - * "translation" = "Drupal\user\ProfileTranslationHandler" - * }, - * admin_permission = "administer users", - * base_table = "users", - * data_table = "users_field_data", - * translatable = TRUE, - * entity_keys = { - * "id" = "uid", - * "langcode" = "langcode", - * "uuid" = "uuid" - * }, - * links = { - * "canonical" = "/user/{user}", - * "edit-form" = "/user/{user}/edit", - * "cancel-form" = "/user/{user}/cancel", - * "collection" = "/admin/people", - * }, - * field_ui_base_route = "entity.user.admin_form", - * common_reference_target = TRUE - * ) */ +#[ContentEntityType( + id: 'user', + label: new TranslatableMarkup('User'), + label_collection: new TranslatableMarkup('Users'), + label_singular: new TranslatableMarkup('user'), + label_plural: new TranslatableMarkup('users'), + entity_keys: [ + 'id' => 'uid', + 'langcode' => 'langcode', + 'uuid' => 'uuid', + ], + handlers: [ + 'storage' => UserStorage::class, + 'storage_schema' => UserStorageSchema::class, + 'access' => UserAccessControlHandler::class, + 'list_builder' => UserListBuilder::class, + 'views_data' => UserViewsData::class, + 'route_provider' => [ + 'html' => UserRouteProvider::class, + ], + 'form' => [ + 'default' => ProfileForm::class, + 'cancel' => UserCancelForm::class, + 'register' => RegisterForm::class, + ], + 'translation' => ProfileTranslationHandler::class, + ], + links: [ + 'canonical' => '/user/{user}', + 'edit-form' => '/user/{user}/edit', + 'cancel-form' => '/user/{user}/cancel', + 'collection' => '/admin/people', + ], + admin_permission: 'administer users', + base_table: 'users', + data_table: 'users_field_data', + translatable: TRUE, + label_count: [ + 'singular' => '@count user', + 'plural' => '@count users', + ], + field_ui_base_route: 'entity.user.admin_form', + common_reference_target: TRUE, +)] class User extends ContentEntityBase implements UserInterface { use EntityChangedTrait; diff --git a/core/modules/user/src/Form/UserLoginForm.php b/core/modules/user/src/Form/UserLoginForm.php index 5fe351ede6bbb38efe71b941eee1336a72229f78..b8cbaed6090f425f0b77d1920ebaf7798605aeb8 100644 --- a/core/modules/user/src/Form/UserLoginForm.php +++ b/core/modules/user/src/Form/UserLoginForm.php @@ -4,6 +4,7 @@ use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Form\WorkspaceSafeFormInterface; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Render\BareHtmlPageRendererInterface; use Drupal\Core\Url; @@ -19,7 +20,7 @@ * * @internal */ -class UserLoginForm extends FormBase { +class UserLoginForm extends FormBase implements WorkspaceSafeFormInterface { /** * The user flood control service. diff --git a/core/modules/user/src/Form/UserPasswordForm.php b/core/modules/user/src/Form/UserPasswordForm.php index 01cf30144ff5b4f25c2b1bb445bbc4f7a7533c2b..613ca886f2fb8e9220b265f6feb04577f82fbc34 100644 --- a/core/modules/user/src/Form/UserPasswordForm.php +++ b/core/modules/user/src/Form/UserPasswordForm.php @@ -7,6 +7,7 @@ use Drupal\Core\Flood\FloodInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Form\WorkspaceSafeFormInterface; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Render\Element\Email; use Drupal\user\UserInterface; @@ -21,7 +22,7 @@ * * @internal */ -class UserPasswordForm extends FormBase { +class UserPasswordForm extends FormBase implements WorkspaceSafeFormInterface { /** * The user storage. diff --git a/core/modules/user/src/Form/UserPasswordResetForm.php b/core/modules/user/src/Form/UserPasswordResetForm.php index 9dde77d5995f84136bd1c77d4cd15d9399d6644e..bfa88d0c95d6bd7ec87e35643829ede6bf8297b2 100644 --- a/core/modules/user/src/Form/UserPasswordResetForm.php +++ b/core/modules/user/src/Form/UserPasswordResetForm.php @@ -3,6 +3,7 @@ namespace Drupal\user\Form; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Form\WorkspaceSafeFormInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Url; @@ -14,7 +15,7 @@ * * @internal */ -class UserPasswordResetForm extends FormBase { +class UserPasswordResetForm extends FormBase implements WorkspaceSafeFormInterface { /** * {@inheritdoc} diff --git a/core/modules/user/src/Hook/UserHooks.php b/core/modules/user/src/Hook/UserHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ecfc5a1555fcf5ea7d3eb737b9461724403ddcbc --- /dev/null +++ b/core/modules/user/src/Hook/UserHooks.php @@ -0,0 +1,522 @@ +<?php + +namespace Drupal\user\Hook; + +use Drupal\Core\Entity\EntityInterface; +use Drupal\user\Entity\Role; +use Drupal\filter\FilterFormatInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\system\Entity\Action; +use Drupal\Component\Assertion\Inspector; +use Drupal\user\RoleInterface; +use Drupal\Component\Render\PlainTextOutput; +use Drupal\Core\Session\AccountInterface; +use Drupal\image\Plugin\Field\FieldType\ImageItem; +use Drupal\Core\Render\Element; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\user\UserInterface; +use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user. + */ +class UserHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.user': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the <a href=":user_docs">online documentation for the User module</a>.', [':user_docs' => 'https://www.drupal.org/documentation/modules/user']) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating and managing users') . '</dt>'; + $output .= '<dd>' . t('Through the <a href=":people">People administration page</a> you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', [':people' => Url::fromRoute('entity.user.collection')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Configuring user roles') . '</dt>'; + $output .= '<dd>' . t('<em>Roles</em> are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: <em>Anonymous user</em> (users that are not logged in), and <em>Authenticated user</em> (users that are registered and logged in). Depending on how your site was set up, an <em>Administrator</em> role may also be available: users with this role will automatically be assigned any new permissions whenever a module is installed. You can create additional roles on the <a href=":roles">Roles administration page</a>.', [ + ':roles' => Url::fromRoute('entity.user_role.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Setting permissions') . '</dt>'; + $output .= '<dd>' . t('After creating roles, you can set permissions for each role on the <a href=":permissions_user">Permissions page</a>. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', [ + ':permissions_user' => Url::fromRoute('user.admin_permissions')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Other permissions pages') . '</dt>'; + $output .= '<dd>' . t('The main Permissions page can be overwhelming, so each module that defines permissions has its own page for setting them. There are links to these pages on the <a href=":modules">Extend page</a>. When editing a content type, vocabulary, etc., there is also a Manage permissions tab for permissions related to that configuration.', [':modules' => Url::fromRoute('system.modules_list')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Managing account settings') . '</dt>'; + $output .= '<dd>' . t('The <a href=":accounts">Account settings page</a> allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is installed (the Administrator role).', [':accounts' => Url::fromRoute('entity.user.admin_form')->toString()]) . '</dd>'; + $output .= '<dt>' . t('Managing user account fields') . '</dt>'; + $output .= '<dd>' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the <a href=":accounts">Account settings page</a>. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the <a href=":field_help">Field module help page</a>.', [ + ':field_help' => \Drupal::moduleHandler()->moduleExists('field') ? Url::fromRoute('help.page', [ + 'name' => 'field', + ])->toString() : '#', + ':accounts' => Url::fromRoute('entity.user.admin_form')->toString(), + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + + case 'user.admin_create': + return '<p>' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '</p>'; + + case 'user.admin_permissions': + return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href=":role">Roles</a> page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. On the <a href=":settings">Role settings</a> page, you can make any role into an Administrator role for the site, meaning that role will be granted all permissions. You should be careful to ensure that only trusted users are given this access and level of control of your site.', [ + ':role' => Url::fromRoute('entity.user_role.collection')->toString(), + ':settings' => Url::fromRoute('user.role.settings')->toString(), + ]) . '</p>'; + + case 'entity.user_role.collection': + return '<p>' . t('A role defines a group of users that have certain privileges. These privileges are defined on the <a href=":permissions">Permissions page</a>. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', [ + ':permissions' => Url::fromRoute('user.admin_permissions')->toString(), + ]) . '</p>'; + + case 'entity.user.field_ui_fields': + return '<p>' . t('This form lets administrators add and edit fields for storing user data.') . '</p>'; + + case 'entity.entity_form_display.user.default': + return '<p>' . t('This form lets administrators configure how form fields should be displayed when editing a user profile.') . '</p>'; + + case 'entity.entity_view_display.user.default': + return '<p>' . t('This form lets administrators configure how fields should be displayed when rendering a user profile page.') . '</p>'; + } + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + 'user' => [ + 'render element' => 'elements', + ], + 'username' => [ + 'variables' => [ + 'account' => NULL, + 'attributes' => [], + 'link_options' => [], + ], + ], + ]; + } + + /** + * Implements hook_js_settings_alter(). + */ + #[Hook('js_settings_alter')] + public function jsSettingsAlter(&$settings, AttachedAssetsInterface $assets) { + // Provide the user ID in drupalSettings to allow JavaScript code to customize + // the experience for the end user, rather than the server side, which would + // break the render cache. + // Similarly, provide a permissions hash, so that permission-dependent data + // can be reliably cached on the client side. + $user = \Drupal::currentUser(); + $settings['user']['uid'] = $user->id(); + $settings['user']['permissionsHash'] = \Drupal::service('user_permissions_hash_generator')->generate($user); + } + + /** + * Implements hook_entity_extra_field_info(). + */ + #[Hook('entity_extra_field_info')] + public function entityExtraFieldInfo() { + $fields['user']['user']['form']['account'] = [ + 'label' => t('User name and password'), + 'description' => t('User module account form elements.'), + 'weight' => -10, + ]; + $fields['user']['user']['form']['language'] = [ + 'label' => t('Language settings'), + 'description' => t('User module form element.'), + 'weight' => 0, + ]; + if (\Drupal::config('system.date')->get('timezone.user.configurable')) { + $fields['user']['user']['form']['timezone'] = [ + 'label' => t('Timezone'), + 'description' => t('System module form element.'), + 'weight' => 6, + ]; + } + $fields['user']['user']['display']['member_for'] = [ + 'label' => t('Member for'), + 'description' => t("User module 'member for' view element."), + 'weight' => 5, + ]; + return $fields; + } + + /** + * Implements hook_ENTITY_TYPE_presave() for user entities. + * + * @todo https://www.drupal.org/project/drupal/issues/3112704 Move to + * \Drupal\user\Entity\User::preSave(). + */ + #[Hook('user_presave')] + public function userPresave(UserInterface $account) { + $config = \Drupal::config('system.date'); + if ($config->get('timezone.user.configurable') && !$account->getTimeZone() && !$config->get('timezone.user.default')) { + $account->timezone = $config->get('timezone.default'); + } + } + + /** + * Implements hook_ENTITY_TYPE_view() for user entities. + */ + #[Hook('user_view')] + public function userView(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { + if ($account->isAuthenticated() && $display->getComponent('member_for')) { + $build['member_for'] = [ + '#type' => 'item', + '#markup' => '<h4 class="label">' . t('Member for') . '</h4> ' . \Drupal::service('date.formatter')->formatTimeDiffSince($account->getCreatedTime()), + ]; + } + } + + /** + * Implements hook_ENTITY_TYPE_view_alter() for user entities. + * + * This function adds a default alt tag to the user_picture field to maintain + * accessibility. + */ + #[Hook('user_view_alter')] + public function userViewAlter(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { + if (!empty($build['user_picture']) && user_picture_enabled()) { + foreach (Element::children($build['user_picture']) as $key) { + if (!isset($build['user_picture'][$key]['#item']) || !$build['user_picture'][$key]['#item'] instanceof ImageItem) { + // User picture field is provided by standard profile install. If the + // display is configured to use a different formatter, the #item render + // key may not exist, or may not be an image field. + continue; + } + /** @var \Drupal\image\Plugin\Field\FieldType\ImageItem $item */ + $item = $build['user_picture'][$key]['#item']; + if (!$item->get('alt')->getValue()) { + $item->get('alt')->setValue(\Drupal::translation()->translate('Profile picture for user @username', ['@username' => $account->getAccountName()])); + } + } + } + } + + /** + * Implements hook_template_preprocess_default_variables_alter(). + * + * @see user_user_login() + * @see user_user_logout() + */ + #[Hook('template_preprocess_default_variables_alter')] + public function templatePreprocessDefaultVariablesAlter(&$variables) { + $user = \Drupal::currentUser(); + $variables['user'] = clone $user; + // Remove password and session IDs, since themes should not need nor see them. + unset($variables['user']->pass, $variables['user']->sid, $variables['user']->ssid); + $variables['is_admin'] = $user->hasPermission('access administration pages'); + $variables['logged_in'] = $user->isAuthenticated(); + } + + /** + * Implements hook_user_login(). + */ + #[Hook('user_login')] + public function userLogin(UserInterface $account) { + // Reset static cache of default variables in template_preprocess() to reflect + // the new user. + drupal_static_reset('template_preprocess'); + // If the user has a NULL time zone, notify them to set a time zone. + $config = \Drupal::config('system.date'); + if (!$account->getTimezone() && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) { + \Drupal::messenger()->addStatus(t('Configure your <a href=":user-edit">account time zone setting</a>.', [ + ':user-edit' => $account->toUrl('edit-form', [ + 'query' => \Drupal::destination()->getAsArray(), + 'fragment' => 'edit-timezone', + ])->toString(), + ])); + } + } + + /** + * Implements hook_user_logout(). + */ + #[Hook('user_logout')] + public function userLogout(AccountInterface $account) { + // Reset static cache of default variables in template_preprocess() to reflect + // the new user. + drupal_static_reset('template_preprocess'); + } + + /** + * Implements hook_mail(). + */ + #[Hook('mail')] + public function mail($key, &$message, $params) { + $token_service = \Drupal::token(); + $language_manager = \Drupal::languageManager(); + $langcode = $message['langcode']; + $variables = ['user' => $params['account']]; + $language = $language_manager->getLanguage($langcode); + $original_language = $language_manager->getConfigOverrideLanguage(); + $language_manager->setConfigOverrideLanguage($language); + $mail_config = \Drupal::config('user.mail'); + $token_options = ['langcode' => $langcode, 'callback' => 'user_mail_tokens', 'clear' => TRUE]; + $message['subject'] .= PlainTextOutput::renderFromHtml($token_service->replace($mail_config->get($key . '.subject'), $variables, $token_options)); + $message['body'][] = $token_service->replace($mail_config->get($key . '.body'), $variables, $token_options); + $language_manager->setConfigOverrideLanguage($original_language); + } + + /** + * Implements hook_ENTITY_TYPE_insert() for user_role entities. + */ + #[Hook('user_role_insert')] + public function userRoleInsert(RoleInterface $role) { + // Ignore the authenticated and anonymous roles or the role is being synced. + if (in_array($role->id(), [ + RoleInterface::AUTHENTICATED_ID, + RoleInterface::ANONYMOUS_ID, + ]) || $role->isSyncing()) { + return; + } + assert(Inspector::assertStringable($role->label()), 'Role label is expected to be a string.'); + $add_id = 'user_add_role_action.' . $role->id(); + if (!Action::load($add_id)) { + $action = Action::create([ + 'id' => $add_id, + 'type' => 'user', + 'label' => t('Add the @label role to the selected user(s)', [ + '@label' => $role->label(), + ]), + 'configuration' => [ + 'rid' => $role->id(), + ], + 'plugin' => 'user_add_role_action', + ]); + $action->trustData()->save(); + } + $remove_id = 'user_remove_role_action.' . $role->id(); + if (!Action::load($remove_id)) { + $action = Action::create([ + 'id' => $remove_id, + 'type' => 'user', + 'label' => t('Remove the @label role from the selected user(s)', [ + '@label' => $role->label(), + ]), + 'configuration' => [ + 'rid' => $role->id(), + ], + 'plugin' => 'user_remove_role_action', + ]); + $action->trustData()->save(); + } + } + + /** + * Implements hook_ENTITY_TYPE_delete() for user_role entities. + */ + #[Hook('user_role_delete')] + public function userRoleDelete(RoleInterface $role) { + // Delete role references for all users. + $user_storage = \Drupal::entityTypeManager()->getStorage('user'); + $user_storage->deleteRoleReferences([$role->id()]); + // Ignore the authenticated and anonymous roles or the role is being synced. + if (in_array($role->id(), [ + RoleInterface::AUTHENTICATED_ID, + RoleInterface::ANONYMOUS_ID, + ]) || $role->isSyncing()) { + return; + } + $actions = Action::loadMultiple(['user_add_role_action.' . $role->id(), 'user_remove_role_action.' . $role->id()]); + foreach ($actions as $action) { + $action->delete(); + } + } + + /** + * Implements hook_element_info_alter(). + */ + #[Hook('element_info_alter')] + public function elementInfoAlter(array &$types) { + if (isset($types['password_confirm'])) { + $types['password_confirm']['#process'][] = 'user_form_process_password_confirm'; + } + } + + /** + * Implements hook_modules_uninstalled(). + */ + #[Hook('modules_uninstalled')] + public function modulesUninstalled($modules) { + // Remove any potentially orphan module data stored for users. + \Drupal::service('user.data')->delete($modules); + } + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + $user = \Drupal::currentUser(); + $items['user'] = [ + '#type' => 'toolbar_item', + 'tab' => [ + '#type' => 'link', + '#title' => $user->getDisplayName(), + '#url' => Url::fromRoute('user.page'), + '#attributes' => [ + 'title' => t('My account'), + 'class' => [ + 'toolbar-icon', + 'toolbar-icon-user', + ], + ], + '#cache' => [ + // Vary cache for anonymous and authenticated users. + 'contexts' => [ + 'user.roles:anonymous', + ], + ], + ], + 'tray' => [ + '#heading' => t('User account actions'), + ], + '#weight' => 100, + '#attached' => [ + 'library' => [ + 'user/drupal.user.icons', + ], + ], + ]; + if ($user->isAnonymous()) { + $links = [ + 'login' => [ + 'title' => t('Log in'), + 'url' => Url::fromRoute('user.page'), + ], + ]; + $items['user']['tray']['user_links'] = [ + '#theme' => 'links__toolbar_user', + '#links' => $links, + '#attributes' => [ + 'class' => [ + 'toolbar-menu', + ], + ], + ]; + } + else { + $items['user']['tab']['#title'] = [ + '#lazy_builder' => [ + 'user.toolbar_link_builder:renderDisplayName', + [], + ], + '#create_placeholder' => TRUE, + '#lazy_builder_preview' => [ + // Add a line of whitespace to the placeholder to ensure the icon is + // positioned in the same place it will be when the lazy loaded content + // appears. + '#markup' => ' ', + ], + ]; + $items['user']['tray']['user_links'] = [ + '#lazy_builder' => [ + 'user.toolbar_link_builder:renderToolbarLinks', + [], + ], + '#create_placeholder' => TRUE, + '#lazy_builder_preview' => [ + '#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link"> </a>', + ], + ]; + } + return $items; + } + + /** + * Implements hook_form_FORM_ID_alter() for \Drupal\system\Form\RegionalForm. + */ + #[Hook('form_system_regional_settings_alter')] + public function formSystemRegionalSettingsAlter(&$form, FormStateInterface $form_state) : void { + $config = \Drupal::config('system.date'); + $form['timezone']['configurable_timezones'] = [ + '#type' => 'checkbox', + '#title' => t('Users may set their own time zone'), + '#default_value' => $config->get('timezone.user.configurable'), + ]; + $form['timezone']['configurable_timezones_wrapper'] = [ + '#type' => 'container', + '#states' => [ + // Hide the user configured timezone settings when users are forced to use + // the default setting. + 'invisible' => [ + 'input[name="configurable_timezones"]' => [ + 'checked' => FALSE, + ], + ], + ], + ]; + $form['timezone']['configurable_timezones_wrapper']['empty_timezone_message'] = [ + '#type' => 'checkbox', + '#title' => t('Remind users at login if their time zone is not set'), + '#default_value' => $config->get('timezone.user.warn'), + '#description' => t('Only applied if users may set their own time zone.'), + ]; + $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = [ + '#type' => 'radios', + '#title' => t('Time zone for new users'), + '#default_value' => $config->get('timezone.user.default'), + '#options' => [ + UserInterface::TIMEZONE_DEFAULT => t('Default time zone'), + UserInterface::TIMEZONE_EMPTY => t('Empty time zone'), + UserInterface::TIMEZONE_SELECT => t('Users may set their own time zone at registration'), + ], + '#description' => t('Only applied if users may set their own time zone.'), + ]; + $form['#submit'][] = 'user_form_system_regional_settings_submit'; + } + + /** + * Implements hook_filter_format_disable(). + */ + #[Hook('filter_format_disable')] + public function filterFormatDisable(FilterFormatInterface $filter_format) { + // Remove the permission from any roles. + $permission = $filter_format->getPermissionName(); + /** @var \Drupal\user\Entity\Role $role */ + foreach (Role::loadMultiple() as $role) { + if ($role->hasPermission($permission)) { + $role->revokePermission($permission)->save(); + } + } + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) { + // Add Manage permissions link if this entity type defines the permissions + // link template. + if (!$entity->hasLinkTemplate('entity-permissions-form')) { + return []; + } + $bundle_entity_type = $entity->bundle(); + $route = "entity.{$bundle_entity_type}.entity_permissions_form"; + if (empty(\Drupal::service('router.route_provider')->getRoutesByNames([$route]))) { + return []; + } + $url = Url::fromRoute($route, [$bundle_entity_type => $entity->id()]); + if (!$url->access()) { + return []; + } + return [ + 'manage-permissions' => [ + 'title' => t('Manage permissions'), + 'weight' => 50, + 'url' => $url, + ], + ]; + } + +} diff --git a/core/modules/user/src/Hook/UserTokensHooks.php b/core/modules/user/src/Hook/UserTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f52898cffd8f04d51374f4021441cb0c241c878c --- /dev/null +++ b/core/modules/user/src/Hook/UserTokensHooks.php @@ -0,0 +1,151 @@ +<?php + +namespace Drupal\user\Hook; + +use Drupal\user\Entity\User; +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user. + */ +class UserTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $types['user'] = [ + 'name' => t('Users'), + 'description' => t('Tokens related to individual user accounts.'), + 'needs-data' => 'user', + ]; + $types['current-user'] = [ + 'name' => t('Current user'), + 'description' => t('Tokens related to the currently logged in user.'), + 'type' => 'user', + ]; + $user['uid'] = ['name' => t('User ID'), 'description' => t("The unique ID of the user account.")]; + $user['uuid'] = ['name' => t('UUID'), 'description' => t("The UUID of the user account.")]; + $user['name'] = [ + 'name' => t("Deprecated: User Name"), + 'description' => t("Deprecated: Use account-name or display-name instead."), + ]; + $user['account-name'] = [ + 'name' => t("Account Name"), + 'description' => t("The login name of the user account."), + ]; + $user['display-name'] = [ + 'name' => t("Display Name"), + 'description' => t("The display name of the user account."), + ]; + $user['mail'] = [ + 'name' => t("Email"), + 'description' => t("The email address of the user account."), + ]; + $user['url'] = ['name' => t("URL"), 'description' => t("The URL of the account profile page.")]; + $user['edit-url'] = ['name' => t("Edit URL"), 'description' => t("The URL of the account edit page.")]; + $user['last-login'] = [ + 'name' => t("Last login"), + 'description' => t("The date the user last logged in to the site."), + 'type' => 'date', + ]; + $user['created'] = [ + 'name' => t("Created"), + 'description' => t("The date the user account was created."), + 'type' => 'date', + ]; + return ['types' => $types, 'tokens' => ['user' => $user]]; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $token_service = \Drupal::token(); + $url_options = ['absolute' => TRUE]; + if (isset($options['langcode'])) { + $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); + $langcode = $options['langcode']; + } + else { + $langcode = NULL; + } + $replacements = []; + if ($type == 'user' && !empty($data['user'])) { + /** @var \Drupal\user\UserInterface $account */ + $account = $data['user']; + foreach ($tokens as $name => $original) { + switch ($name) { + // Basic user account information. + case 'uid': + // In the case of hook user_presave uid is not set yet. + $replacements[$original] = $account->id() ?: t('not yet assigned'); + break; + + case 'uuid': + $replacements[$original] = $account->uuid(); + break; + + case 'display-name': + $replacements[$original] = $account->getDisplayName(); + if ($account->isAnonymous()) { + $bubbleable_metadata->addCacheableDependency(\Drupal::config('user.settings')); + } + break; + + case 'name': + case 'account-name': + $display_name = $account->getAccountName(); + $replacements[$original] = $display_name; + if ($account->isAnonymous()) { + $bubbleable_metadata->addCacheableDependency(\Drupal::config('user.settings')); + } + break; + + case 'mail': + $replacements[$original] = $account->getEmail(); + break; + + case 'url': + $replacements[$original] = $account->id() ? $account->toUrl('canonical', $url_options)->toString() : t('not yet assigned'); + break; + + case 'edit-url': + $replacements[$original] = $account->id() ? $account->toUrl('edit-form', $url_options)->toString() : t('not yet assigned'); + break; + + // These tokens are default variations on the chained tokens handled below. + case 'last-login': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + $replacements[$original] = $account->getLastLoginTime() ? \Drupal::service('date.formatter')->format($account->getLastLoginTime(), 'medium', '', NULL, $langcode) : t('never'); + break; + + case 'created': + $date_format = DateFormat::load('medium'); + $bubbleable_metadata->addCacheableDependency($date_format); + // In the case of user_presave the created date may not yet be set. + $replacements[$original] = $account->getCreatedTime() ? \Drupal::service('date.formatter')->format($account->getCreatedTime(), 'medium', '', NULL, $langcode) : t('not yet created'); + break; + } + } + if ($login_tokens = $token_service->findWithPrefix($tokens, 'last-login')) { + $replacements += $token_service->generate('date', $login_tokens, ['date' => $account->getLastLoginTime()], $options, $bubbleable_metadata); + } + if ($registered_tokens = $token_service->findWithPrefix($tokens, 'created')) { + $replacements += $token_service->generate('date', $registered_tokens, ['date' => $account->getCreatedTime()], $options, $bubbleable_metadata); + } + } + if ($type == 'current-user') { + $account = User::load(\Drupal::currentUser()->id()); + $bubbleable_metadata->addCacheContexts(['user']); + $replacements += $token_service->generate('user', $tokens, ['user' => $account], $options, $bubbleable_metadata); + } + return $replacements; + } + +} diff --git a/core/modules/user/src/Hook/UserViewsExecutionHooks.php b/core/modules/user/src/Hook/UserViewsExecutionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..0acca99b3ea2d471757d43484a25eee4417424d5 --- /dev/null +++ b/core/modules/user/src/Hook/UserViewsExecutionHooks.php @@ -0,0 +1,23 @@ +<?php + +namespace Drupal\user\Hook; + +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user. + */ +class UserViewsExecutionHooks { + + /** + * Implements hook_views_query_substitutions(). + * + * Allow replacement of current user ID so we can cache these queries. + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + return ['***CURRENT_USER***' => \Drupal::currentUser()->id()]; + } + +} diff --git a/core/modules/user/src/Hook/UserViewsHooks.php b/core/modules/user/src/Hook/UserViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6d3e3e3fb0f95c0aa209f96a2b73e6dda6cf5a03 --- /dev/null +++ b/core/modules/user/src/Hook/UserViewsHooks.php @@ -0,0 +1,26 @@ +<?php + +namespace Drupal\user\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user. + */ +class UserViewsHooks { + /** + * @file + * Provide views data for user.module. + */ + + /** + * Implements hook_views_plugins_argument_validator_alter(). + */ + #[Hook('views_plugins_argument_validator_alter')] + public function viewsPluginsArgumentValidatorAlter(array &$plugins) { + $plugins['entity:user']['title'] = t('User ID'); + $plugins['entity:user']['class'] = 'Drupal\user\Plugin\views\argument_validator\User'; + $plugins['entity:user']['provider'] = 'user'; + } + +} diff --git a/core/modules/user/src/Plugin/Block/UserLoginBlock.php b/core/modules/user/src/Plugin/Block/UserLoginBlock.php index 76b225aa6a117c6970451dd0fb2000e4ad8ee294..cb44c2834ab724722046131fbb401d915db12cff 100644 --- a/core/modules/user/src/Plugin/Block/UserLoginBlock.php +++ b/core/modules/user/src/Plugin/Block/UserLoginBlock.php @@ -46,7 +46,7 @@ class UserLoginBlock extends BlockBase implements ContainerFactoryPluginInterfac * initialize the defined contexts by setting it to an array of context * values keyed by context names. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match diff --git a/core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php b/core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php index 96f127b9fcf4e3f4c3538a8efc53de5ce5c5edce..719538201c4ddbfcd32db68d4ba6646ebd72fdfe 100644 --- a/core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php +++ b/core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php @@ -43,7 +43,7 @@ class UserSelection extends DefaultSelection { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php b/core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php index 55821e00065c34bdc4c297cd36342a4335f65782..fb637bb7abca0221d1c515df2e2b3c9ffa8817d8 100644 --- a/core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php +++ b/core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php @@ -25,7 +25,7 @@ class LoginLogoutMenuLink extends MenuLinkDefault { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Menu\StaticMenuLinkOverridesInterface $static_override diff --git a/core/modules/user/src/Plugin/Search/UserSearch.php b/core/modules/user/src/Plugin/Search/UserSearch.php index cec883895d21efe769e763a81931bd3edb51f4e9..c630f27bb98e9084d5a6ea667add03e09203a2e7 100644 --- a/core/modules/user/src/Plugin/Search/UserSearch.php +++ b/core/modules/user/src/Plugin/Search/UserSearch.php @@ -80,7 +80,7 @@ public static function create(ContainerInterface $container, array $configuratio * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php index 0e4f2d0e00e2927a574a90726ac2438fcd5be220..18ff32256eea96c011639df3a2748036acaae783 100644 --- a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php +++ b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php @@ -79,7 +79,7 @@ class EntityUser extends EntityContentBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/user/src/Plugin/migrate/destination/EntityUserRole.php b/core/modules/user/src/Plugin/migrate/destination/EntityUserRole.php index 5e8390454ba266962c2ec0c18f90ae22c1215344..cfeb6297170cb16800de073a945d6ca777ea8504 100644 --- a/core/modules/user/src/Plugin/migrate/destination/EntityUserRole.php +++ b/core/modules/user/src/Plugin/migrate/destination/EntityUserRole.php @@ -30,7 +30,7 @@ class EntityUserRole extends EntityConfigBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/user/src/Plugin/migrate/destination/UserData.php b/core/modules/user/src/Plugin/migrate/destination/UserData.php index 9ec1d0d20ccea0ee8c04497085a7306a1444354a..b75db3b3b7a5d7ae60cd8ed031a0a34b3b5d6b32 100644 --- a/core/modules/user/src/Plugin/migrate/destination/UserData.php +++ b/core/modules/user/src/Plugin/migrate/destination/UserData.php @@ -27,7 +27,7 @@ class UserData extends DestinationBase implements ContainerFactoryPluginInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\migrate\Plugin\MigrationInterface $migration diff --git a/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php b/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php index fd7aea36bce7b23c3fe993540f6aefc2544a74b0..1cd4efff49b9860222168399a4d9a083fdec37af 100644 --- a/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php +++ b/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php @@ -2,6 +2,7 @@ namespace Drupal\user\Plugin\migrate\process\d6; +use Drupal\Component\Utility\FilterArray; use Drupal\migrate\Attribute\MigrateProcess; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\ProcessPluginBase; @@ -27,7 +28,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable $allowed_values = []; $list = explode("\n", $translation); $list = array_map('trim', $list); - $list = array_filter($list, 'strlen'); + $list = FilterArray::removeEmptyStrings($list); if ($field_type === 'list_string') { foreach ($list as $value) { $allowed_values[] = ['label' => $value]; diff --git a/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php b/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php index f2c9d185d3c8b272771e419fadef8b0d34a601e4..31b205de0905e82705d34b7020504e6a82f8f5c7 100644 --- a/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php +++ b/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php @@ -41,7 +41,7 @@ class UserRegistrationResource extends ResourceBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param array $serializer_formats diff --git a/core/modules/user/src/Plugin/views/access/Permission.php b/core/modules/user/src/Plugin/views/access/Permission.php index 723aca754935b01d29fbb3f2e752974bbe71d4f4..dbb1379eec351fe5593e47cb00bd505c2fb1065e 100644 --- a/core/modules/user/src/Plugin/views/access/Permission.php +++ b/core/modules/user/src/Plugin/views/access/Permission.php @@ -57,7 +57,7 @@ class Permission extends AccessPluginBase implements CacheableDependencyInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\user\PermissionHandlerInterface $permission_handler diff --git a/core/modules/user/src/Plugin/views/access/Role.php b/core/modules/user/src/Plugin/views/access/Role.php index 02f39b4743c0288093a6a9cc5d69ed19b8c83afa..c284c94b0a31e91d6016fe2cfed9eb0050781b1d 100644 --- a/core/modules/user/src/Plugin/views/access/Role.php +++ b/core/modules/user/src/Plugin/views/access/Role.php @@ -45,7 +45,7 @@ class Role extends AccessPluginBase implements CacheableDependencyInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\user\RoleStorageInterface $role_storage diff --git a/core/modules/user/src/Plugin/views/argument/RolesRid.php b/core/modules/user/src/Plugin/views/argument/RolesRid.php index df8599422a8254193f5db2ce6370fc15db08bc93..3377ef82689b356b102e1a81f5a89456e64838fb 100644 --- a/core/modules/user/src/Plugin/views/argument/RolesRid.php +++ b/core/modules/user/src/Plugin/views/argument/RolesRid.php @@ -30,7 +30,7 @@ class RolesRid extends ManyToOne { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/user/src/Plugin/views/argument_default/User.php b/core/modules/user/src/Plugin/views/argument_default/User.php index 5a52e08f7f6de419c835ca41b3a455d0accb0858..51f8a10031a04fc321d4548c431f8facaf7e4817 100644 --- a/core/modules/user/src/Plugin/views/argument_default/User.php +++ b/core/modules/user/src/Plugin/views/argument_default/User.php @@ -35,7 +35,7 @@ class User extends ArgumentDefaultPluginBase implements CacheableDependencyInter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match diff --git a/core/modules/user/src/Plugin/views/field/Permissions.php b/core/modules/user/src/Plugin/views/field/Permissions.php index 6e8d2f015e8b514c0031585c2a74f1221176bc4e..2e7041fcc0beaa1d77045224282d5f83871da5d4 100644 --- a/core/modules/user/src/Plugin/views/field/Permissions.php +++ b/core/modules/user/src/Plugin/views/field/Permissions.php @@ -38,7 +38,7 @@ class Permissions extends PrerenderList { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler diff --git a/core/modules/user/src/Plugin/views/field/Roles.php b/core/modules/user/src/Plugin/views/field/Roles.php index ed121eea6ec182dde937f81cad69cecd3314d468..13b487beb2e0e6592b084ae28da87e1396a645c5 100644 --- a/core/modules/user/src/Plugin/views/field/Roles.php +++ b/core/modules/user/src/Plugin/views/field/Roles.php @@ -31,7 +31,7 @@ class Roles extends PrerenderList { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database diff --git a/core/modules/user/src/Plugin/views/filter/Name.php b/core/modules/user/src/Plugin/views/filter/Name.php index b2d8ff620c6fd335818f4a59630e358477d7dd1d..a5ca2d40b767a848058fd5f7e9684f70fbf626b2 100644 --- a/core/modules/user/src/Plugin/views/filter/Name.php +++ b/core/modules/user/src/Plugin/views/filter/Name.php @@ -21,7 +21,7 @@ class Name extends InOperator { /** * The validated exposed input. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected array $validated_exposed_input; protected function valueForm(&$form, FormStateInterface $form_state) { diff --git a/core/modules/user/src/Plugin/views/filter/Permissions.php b/core/modules/user/src/Plugin/views/filter/Permissions.php index 8974e4c6612ca5c042b0a89c6cdb18b928f72552..d0add56d04ae419392fb4e5d40ab65334fa68ace 100644 --- a/core/modules/user/src/Plugin/views/filter/Permissions.php +++ b/core/modules/user/src/Plugin/views/filter/Permissions.php @@ -45,7 +45,7 @@ class Permissions extends ManyToOne { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\user\PermissionHandlerInterface $permission_handler diff --git a/core/modules/user/src/Plugin/views/filter/Roles.php b/core/modules/user/src/Plugin/views/filter/Roles.php index 0da1f9ee5fd2f8ee8ed5584e6c69cfb588b4c787..d28587b144d93408a7a4887fc787a4f7460b257a 100644 --- a/core/modules/user/src/Plugin/views/filter/Roles.php +++ b/core/modules/user/src/Plugin/views/filter/Roles.php @@ -23,7 +23,7 @@ class Roles extends ManyToOne { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\user\RoleStorageInterface $roleStorage diff --git a/core/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php b/core/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a346f6d40cca177acbf50c0f9a2c8ea25c343b2d --- /dev/null +++ b/core/modules/user/tests/modules/user_access_test/src/Hook/UserAccessTestHooks.php @@ -0,0 +1,71 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\user_access_test\Hook; + +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Access\AccessResult; +use Drupal\user\Entity\User; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user_access_test. + */ +class UserAccessTestHooks { + + /** + * Implements hook_ENTITY_TYPE_access() for entity type "user". + */ + #[Hook('user_access')] + public function userAccess(User $entity, $operation, $account) { + if ($entity->getAccountName() == "no_edit" && $operation == "update") { + // Deny edit access. + return AccessResult::forbidden(); + } + if ($entity->getAccountName() == "no_delete" && $operation == "delete") { + // Deny delete access. + return AccessResult::forbidden(); + } + // Account with role sub-admin can manage users with no roles. + if (count($entity->getRoles()) == 1) { + return AccessResult::allowedIfHasPermission($account, 'sub-admin'); + } + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_create_access(). + */ + #[Hook('entity_create_access')] + public function entityCreateAccess(AccountInterface $account, array $context, $entity_bundle) { + if ($context['entity_type_id'] != 'user') { + return AccessResult::neutral(); + } + // Account with role sub-admin can create users. + return AccessResult::allowedIfHasPermission($account, 'sub-admin'); + } + + /** + * Implements hook_entity_field_access(). + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + // Account with role sub-admin can view the status, init and mail fields for + // user with no roles. + if ($field_definition->getTargetEntityTypeId() == 'user' && $operation === 'view' && in_array($field_definition->getName(), ['status', 'init', 'mail'])) { + if ($items == NULL || count($items->getEntity()->getRoles()) == 1) { + return AccessResult::allowedIfHasPermission($account, 'sub-admin'); + } + } + if (\Drupal::state()->get('user_access_test_forbid_mail_edit', FALSE)) { + if ($operation === 'edit' && $items && $items->getEntity()->getEntityTypeId() === 'user' && $field_definition->getName() === 'mail') { + return AccessResult::forbidden(); + } + } + return AccessResult::neutral(); + } + +} diff --git a/core/modules/user/tests/modules/user_access_test/user_access_test.module b/core/modules/user/tests/modules/user_access_test/user_access_test.module deleted file mode 100644 index d202abd1bab5ea9937c5684ebd10684818a92daf..0000000000000000000000000000000000000000 --- a/core/modules/user/tests/modules/user_access_test/user_access_test.module +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -/** - * @file - * Dummy module implementing hook_user_access() to test if entity access is respected. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\user\Entity\User; - -/** - * Implements hook_ENTITY_TYPE_access() for entity type "user". - */ -function user_access_test_user_access(User $entity, $operation, $account) { - if ($entity->getAccountName() == "no_edit" && $operation == "update") { - // Deny edit access. - return AccessResult::forbidden(); - } - if ($entity->getAccountName() == "no_delete" && $operation == "delete") { - // Deny delete access. - return AccessResult::forbidden(); - } - - // Account with role sub-admin can manage users with no roles. - if (count($entity->getRoles()) == 1) { - return AccessResult::allowedIfHasPermission($account, 'sub-admin'); - } - - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_create_access(). - */ -function user_access_test_entity_create_access(AccountInterface $account, array $context, $entity_bundle) { - if ($context['entity_type_id'] != 'user') { - return AccessResult::neutral(); - } - - // Account with role sub-admin can create users. - return AccessResult::allowedIfHasPermission($account, 'sub-admin'); -} - -/** - * Implements hook_entity_field_access(). - */ -function user_access_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - // Account with role sub-admin can view the status, init and mail fields for - // user with no roles. - if ($field_definition->getTargetEntityTypeId() == 'user' && $operation === 'view' && in_array($field_definition->getName(), ['status', 'init', 'mail'])) { - if (($items == NULL) || (count($items->getEntity()->getRoles()) == 1)) { - return AccessResult::allowedIfHasPermission($account, 'sub-admin'); - } - } - - if (\Drupal::state()->get('user_access_test_forbid_mail_edit', FALSE)) { - if ($operation === 'edit' && $items && $items->getEntity()->getEntityTypeId() === 'user' && $field_definition->getName() === 'mail') { - return AccessResult::forbidden(); - } - } - - return AccessResult::neutral(); -} diff --git a/core/modules/user/tests/modules/user_form_test/src/Hook/UserFormTestHooks.php b/core/modules/user/tests/modules/user_form_test/src/Hook/UserFormTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f49008597f10aeb6aab1e9b198c9c4414ded3435 --- /dev/null +++ b/core/modules/user/tests/modules/user_form_test/src/Hook/UserFormTestHooks.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\user_form_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for user_form_test. + */ +class UserFormTestHooks { + + /** + * Implements hook_form_FORM_ID_alter() for user_cancel_form(). + */ + #[Hook('form_user_cancel_form_alter')] + public function formUserCancelFormAlter(&$form, &$form_state) : void { + $form['user_cancel_confirm']['#default_value'] = FALSE; + $form['access']['#value'] = \Drupal::currentUser()->hasPermission('cancel other accounts'); + } + +} diff --git a/core/modules/user/tests/modules/user_form_test/user_form_test.module b/core/modules/user/tests/modules/user_form_test/user_form_test.module deleted file mode 100644 index 5e3c28e530d03d6215a1e0042e4e183bf4502a50..0000000000000000000000000000000000000000 --- a/core/modules/user/tests/modules/user_form_test/user_form_test.module +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * @file - * Support module for user form testing. - */ - -declare(strict_types=1); - -/** - * Implements hook_form_FORM_ID_alter() for user_cancel_form(). - */ -function user_form_test_form_user_cancel_form_alter(&$form, &$form_state) { - $form['user_cancel_confirm']['#default_value'] = FALSE; - $form['access']['#value'] = \Drupal::currentUser()->hasPermission('cancel other accounts'); -} diff --git a/core/modules/user/tests/modules/user_hooks_test/src/Hook/UserHooksTest.php b/core/modules/user/tests/modules/user_hooks_test/src/Hook/UserHooksTest.php new file mode 100644 index 0000000000000000000000000000000000000000..07086aa5302241acec6a9a0f5077ddb734dc4a02 --- /dev/null +++ b/core/modules/user/tests/modules/user_hooks_test/src/Hook/UserHooksTest.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\user_hooks_test\Hook; + +use Drupal\Component\Render\FormattableMarkup; +use Drupal\Core\Hook\Attribute\Hook; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\State\StateInterface; + +/** + * Contains hook implementations. + */ +class UserHooksTest { + + public function __construct(protected StateInterface $state) { + } + + /** + * Alters the username. + * + * @param string|\Drupal\Component\Render\MarkupInterface $name + * The username that is displayed for a user. + * @param \Drupal\Core\Session\AccountInterface $account + * The object on which the operation is being performed. + * + * @return void + */ + #[Hook('user_format_name_alter')] + public function userFormatNameAlter(&$name, AccountInterface $account) { + if ($this->state->get('user_hooks_test_user_format_name_alter', FALSE)) { + if ($this->state->get('user_hooks_test_user_format_name_alter_safe', FALSE)) { + $name = new FormattableMarkup('<em>@uid</em>', ['@uid' => $account->id()]); + } + else { + $name = '<em>' . $account->id() . '</em>'; + } + } + } + +} diff --git a/core/modules/user/tests/modules/user_hooks_test/user_hooks_test.module b/core/modules/user/tests/modules/user_hooks_test/user_hooks_test.module deleted file mode 100644 index 51448ebce1f46c2721242483b679d3ad34d5bc92..0000000000000000000000000000000000000000 --- a/core/modules/user/tests/modules/user_hooks_test/user_hooks_test.module +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/** - * @file - * Support module for user hooks testing. - */ - -declare(strict_types=1); - -use Drupal\Component\Render\FormattableMarkup; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_user_format_name_alter(). - */ -function user_hooks_test_user_format_name_alter(&$name, AccountInterface $account) { - if (\Drupal::state()->get('user_hooks_test_user_format_name_alter', FALSE)) { - if (\Drupal::state()->get('user_hooks_test_user_format_name_alter_safe', FALSE)) { - $name = new FormattableMarkup('<em>@uid</em>', ['@uid' => $account->id()]); - } - else { - $name = '<em>' . $account->id() . '</em>'; - } - } -} diff --git a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php index d5e24de2dc59b874a8dfb8bb49ac2af74bfacb44..81a6cbc505ee8a66f87662eb90b8dbf986596df7 100644 --- a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php +++ b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php @@ -183,7 +183,7 @@ public function testActualNegotiation(): void { * @param bool $admin_first * Whether the admin negotiation should be first. */ - public function setLanguageNegotiation($admin_first = FALSE) { + public function setLanguageNegotiation($admin_first = FALSE): void { $edit = [ 'language_interface[enabled][language-user-admin]' => TRUE, 'language_interface[enabled][language-url]' => TRUE, @@ -197,7 +197,7 @@ public function setLanguageNegotiation($admin_first = FALSE) { /** * Helper method for adding a custom language. */ - public function addCustomLanguage() { + public function addCustomLanguage(): void { $langcode = 'xx'; // The English name for the language. $name = $this->randomMachineName(16); diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php index 4d4cc84ff95ade5656bb6866cdd3e01ed31b5cb3..773f7c48a1a4c5a3c20e360a8be09fa72f9abad9 100644 --- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php +++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php @@ -74,7 +74,7 @@ protected function setUp(): void { * @return \Psr\Http\Message\ResponseInterface * The HTTP response. */ - protected function loginRequest($name, $pass, $format = 'json') { + protected function loginRequest($name, $pass, $format = 'json'): ResponseInterface { $user_login_url = Url::fromRoute('user.login.http') ->setRouteParameter('_format', $format) ->setAbsolute(); @@ -119,7 +119,7 @@ public function testLogin(): void { * @param string $format * Serialization format. */ - protected function doTestLogin($format) { + protected function doTestLogin($format): void { $client = \Drupal::httpClient(); // Create new user for each iteration to reset flood. // Grant the user administer users permissions to they can see the @@ -217,7 +217,7 @@ protected function doTestLogin($format) { * @return \Psr\Http\Message\ResponseInterface * The HTTP response. */ - protected function passwordRequest(array $request_body, $format = 'json') { + protected function passwordRequest(array $request_body, $format = 'json'): ResponseInterface { $password_reset_url = Url::fromRoute('user.pass.http') ->setRouteParameter('_format', $format) ->setAbsolute(); @@ -282,7 +282,7 @@ protected function getResultValue(ResponseInterface $response, $key, $format) { /** * Resets all flood entries. */ - protected function resetFlood() { + protected function resetFlood(): void { $this->container->get('database')->delete(DatabaseBackend::TABLE_NAME)->execute(); } @@ -442,7 +442,7 @@ public function doTestPerUserLoginFloodControl($format): void { * @return \Psr\Http\Message\ResponseInterface * The HTTP response. */ - protected function logoutRequest($format = 'json', $logout_token = '') { + protected function logoutRequest($format = 'json', $logout_token = ''): ResponseInterface { /** @var \GuzzleHttp\Client $client */ $client = $this->container->get('http_client'); $user_logout_url = Url::fromRoute('user.logout.http') @@ -530,7 +530,7 @@ protected function getLoginStatusUrlString($format = 'json') { * @param \Drupal\user\UserInterface $account * Test account. */ - protected function doTestPasswordReset($format, $account) { + protected function doTestPasswordReset($format, $account): void { $response = $this->passwordRequest([], $format); $this->assertHttpResponseWithMessage($response, 400, 'Missing credentials.name or credentials.mail', $format); @@ -597,7 +597,7 @@ protected function doTestPasswordReset($format, $account) { /** * Login from reset password email. */ - protected function loginFromResetEmail() { + protected function loginFromResetEmail(): void { $_emails = $this->drupalGetMails(); $email = end($_emails); $urls = []; diff --git a/core/modules/user/tests/src/Functional/UserLoginTest.php b/core/modules/user/tests/src/Functional/UserLoginTest.php index 26c7807fe975d39064aafc736dd6a69829cfa327..0e8f8f9bb0e3d72fe51680ad2241f302ccb0ca8a 100644 --- a/core/modules/user/tests/src/Functional/UserLoginTest.php +++ b/core/modules/user/tests/src/Functional/UserLoginTest.php @@ -338,7 +338,7 @@ public function assertFailedLogin(User $account, ?string $flood_trigger = NULL): * @param object $user * A user object. */ - public function resetUserPassword($user) { + public function resetUserPassword($user): void { $this->drupalGet('user/password'); $edit['name'] = $user->getDisplayName(); $this->submitForm($edit, 'Submit'); diff --git a/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php b/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php index cb93659a4f4093445100dd70195d4646bc17ed94..05a0d52d29b657fd6e93d82aa9d4f997d7aa461b 100644 --- a/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php +++ b/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php @@ -11,6 +11,7 @@ use Drupal\Tests\rest\Functional\ResourceTestBase; use Drupal\user\UserInterface; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\ResponseInterface; /** * Tests registration of user using REST. @@ -225,7 +226,7 @@ protected function registerUser($name, $include_password = TRUE, $include_email * @return \Psr\Http\Message\ResponseInterface * Return the Response. */ - protected function registerRequest($name, $include_password = TRUE, $include_email = TRUE) { + protected function registerRequest($name, $include_password = TRUE, $include_email = TRUE): ResponseInterface { $user_register_url = Url::fromRoute('user.register') ->setRouteParameter('_format', static::$format); $request_body = $this->createRequestBody($name, $include_password, $include_email); @@ -238,7 +239,7 @@ protected function registerRequest($name, $include_password = TRUE, $include_ema /** * {@inheritdoc} */ - protected function setUpAuthorization($method) { + protected function setUpAuthorization($method): void { switch ($method) { case 'POST': $this->grantPermissionsToAuthenticatedRole(['restful post user_registration']); diff --git a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php index 44f9a36cb9aab5598abc8deaf95d4f24b900e64f..4e972336bd6c9b71f7c4e38bca5c1a09e273e3f0 100644 --- a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php +++ b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php @@ -94,7 +94,7 @@ public function testCreateUserWithRole(): void { * (optional) Whether to assert that $rid exists (TRUE) or not (FALSE). * Defaults to TRUE. */ - private function userLoadAndCheckRoleAssigned($account, $rid, $is_assigned = TRUE) { + private function userLoadAndCheckRoleAssigned($account, $rid, $is_assigned = TRUE): void { $user_storage = $this->container->get('entity_type.manager')->getStorage('user'); $user_storage->resetCache([$account->id()]); $account = $user_storage->load($account->id()); diff --git a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php index 2c6fcfb04b6023ed0f0f8541a3977f7a36f6c47e..f398d55d26144fbe0c4b7aac39a7bfc991bb730e 100644 --- a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php +++ b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php @@ -70,6 +70,7 @@ public function testUserTokenReplacement(): void { // Generate and test tokens. $tests = []; $tests['[user:uid]'] = $account->id(); + $tests['[user:uuid]'] = $account->uuid(); $tests['[user:name]'] = $account->getAccountName(); $tests['[user:account-name]'] = $account->getAccountName(); $tests['[user:display-name]'] = $account->getDisplayName(); @@ -87,6 +88,7 @@ public function testUserTokenReplacement(): void { $base_bubbleable_metadata = BubbleableMetadata::createFromObject($account); $metadata_tests = []; $metadata_tests['[user:uid]'] = $base_bubbleable_metadata; + $metadata_tests['[user:uuid]'] = $base_bubbleable_metadata; $metadata_tests['[user:name]'] = $base_bubbleable_metadata; $metadata_tests['[user:account-name]'] = $base_bubbleable_metadata; $metadata_tests['[user:display-name]'] = $base_bubbleable_metadata; @@ -122,11 +124,13 @@ public function testUserTokenReplacement(): void { $anonymous_user = User::load(0); $tests = []; $tests['[user:uid]'] = 'not yet assigned'; + $tests['[user:uuid]'] = $anonymous_user->uuid(); $tests['[user:display-name]'] = $anonymous_user->getDisplayName(); $base_bubbleable_metadata = BubbleableMetadata::createFromObject($anonymous_user); $metadata_tests = []; $metadata_tests['[user:uid]'] = $base_bubbleable_metadata; + $metadata_tests['[user:uuid]'] = $base_bubbleable_metadata; $bubbleable_metadata = clone $base_bubbleable_metadata; $bubbleable_metadata->addCacheableDependency(\Drupal::config('user.settings')); $metadata_tests['[user:display-name]'] = $bubbleable_metadata; diff --git a/core/modules/user/tests/src/Functional/UserTranslationUITest.php b/core/modules/user/tests/src/Functional/UserTranslationUITest.php index f61b5526c723841ca7e95b8ae4914bc8743dbfbd..5da6b313cd08020d53809cda573d6ef522d0406c 100644 --- a/core/modules/user/tests/src/Functional/UserTranslationUITest.php +++ b/core/modules/user/tests/src/Functional/UserTranslationUITest.php @@ -77,7 +77,7 @@ protected function getNewEntityValues($langcode) { /** * {@inheritdoc} */ - protected function doTestTranslationEdit() { + protected function doTestTranslationEdit(): void { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php index 6fb7e9e7d9b5576456fe97dc6114f68cb2769383..8fff5e8fbc5d434fe87b6bea015d9f379a0596b1 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php @@ -35,7 +35,7 @@ protected function setUp(): void { * @param \Drupal\migrate\Plugin\MigrateIdMapInterface $id_map * The migration ID map plugin. */ - public function assertMessages(array $role_data, MigrateIdMapInterface $id_map) { + public function assertMessages(array $role_data, MigrateIdMapInterface $id_map): void { foreach ($id_map->getMessages() as $message) { $permissions = implode("', '", $role_data[$message->dest_id]['invalid']); $expected_message = "Permission(s) '" . $permissions . "' not found."; @@ -48,7 +48,7 @@ public function assertMessages(array $role_data, MigrateIdMapInterface $id_map) /** * Asserts there are no duplicate roles. */ - public function assertNoDuplicateRoles() { + public function assertNoDuplicateRoles(): void { $roles = [ 'anonymous1', 'authenticated1', diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php index 07520ce37f0cdb098ca27bf0193f9906260f1ff6..dea7d62d64e859b7eb74a86748c78accdf7f5be9 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php @@ -14,6 +14,9 @@ */ class MigrateUserPictureEntityFormDisplayTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['image', 'file']; /** diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php index 7d8e29de8d0f77d33120af75badaca623e777ca5..3e17d48fc915623b12be93f7baaa343b35c8e068 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php @@ -15,6 +15,9 @@ */ class MigrateUserPictureFieldInstanceTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['image', 'file']; /** diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php index 56a97206e700baf4a634cef17f2ab926539d9b67..e65621a87761171819e2712b53795507e6fc5799 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php @@ -15,6 +15,9 @@ */ class MigrateUserPictureFieldTest extends MigrateDrupal7TestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['image', 'file']; /** diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php index c5b707c6cbe817efcd5f09d256f1693edddb61b4..fea0e5c343d34657783b11d3802a0ac94b78e58f 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php @@ -21,7 +21,6 @@ class UserMigrationClassTest extends MigrateDrupal7TestBase { */ public function testClass(): void { $migration = $this->getMigration('d7_user'); - /** @var \Drupal\migrate\Plugin\MigrationInterface[] $migrations */ $this->assertSame('d7_user', $migration->id()); $process = $migration->getProcess(); $this->assertSame('field_file', $process['field_file'][0]['source']); diff --git a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php index 8f41d069017f928e0a17581f35bd37f10d8395bf..dacf9ed0124a2c86b824ec596bd910babc5d8215 100644 --- a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php +++ b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php @@ -13,6 +13,9 @@ */ class UserRoleEntityTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'user', 'user_permissions_test']; public function testOrderOfPermissions(): void { diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php index 105a1ac787cf8829c23b79f83cc72a587dc931dc..afb0c0ae91c95aef720e229757b261489ea3bd3c 100644 --- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php +++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php @@ -22,8 +22,6 @@ class HandlerFilterPermissionTest extends UserKernelTestBase { */ public static $testViews = ['test_filter_permission']; - protected $columnMap; - /** * Tests the permission filter handler. * diff --git a/core/modules/user/user.install b/core/modules/user/user.install index eb96432eef496adc45b3728a86108d296c1837fa..0d4211433c00f99595c9ed511f0fd1c6a3118c4a 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -68,7 +68,7 @@ function user_schema() { /** * Implements hook_install(). */ -function user_install() { +function user_install(): void { $storage = \Drupal::entityTypeManager()->getStorage('user'); // Insert a row for the anonymous user. $storage @@ -122,6 +122,6 @@ function user_requirements($phase): array { /** * Implements hook_update_last_removed(). */ -function user_update_last_removed() { +function user_update_last_removed(): int { return 10000; } diff --git a/core/modules/user/user.module b/core/modules/user/user.module index ad4002c9c09e3c1f7e28f6f7a85810c0614c6a9e..98fb803fe130d111977fa32070c02c8f046b9042 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -2,107 +2,22 @@ /** * @file - * Enables the user registration and login system. */ -use Drupal\Component\Assertion\Inspector; use Drupal\Component\Utility\Crypt; -use Drupal\Component\Render\PlainTextOutput; use Drupal\Component\Utility\Unicode; use Drupal\Core\Access\AccessibleInterface; -use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Batch\BatchBuilder; -use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AnonymousUserSession; use Drupal\Core\Site\Settings; use Drupal\Core\Url; -use Drupal\image\Plugin\Field\FieldType\ImageItem; -use Drupal\filter\FilterFormatInterface; -use Drupal\system\Entity\Action; use Drupal\user\Entity\Role; use Drupal\user\Entity\User; -use Drupal\user\RoleInterface; use Drupal\user\UserInterface; -/** - * Implements hook_help(). - */ -function user_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.user': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the <a href=":user_docs">online documentation for the User module</a>.', [':user_docs' => 'https://www.drupal.org/documentation/modules/user']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating and managing users') . '</dt>'; - $output .= '<dd>' . t('Through the <a href=":people">People administration page</a> you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', [':people' => Url::fromRoute('entity.user.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring user roles') . '</dt>'; - $output .= '<dd>' . t('<em>Roles</em> are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: <em>Anonymous user</em> (users that are not logged in), and <em>Authenticated user</em> (users that are registered and logged in). Depending on how your site was set up, an <em>Administrator</em> role may also be available: users with this role will automatically be assigned any new permissions whenever a module is installed. You can create additional roles on the <a href=":roles">Roles administration page</a>.', [':roles' => Url::fromRoute('entity.user_role.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Setting permissions') . '</dt>'; - $output .= '<dd>' . t('After creating roles, you can set permissions for each role on the <a href=":permissions_user">Permissions page</a>. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', [':permissions_user' => Url::fromRoute('user.admin_permissions')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Other permissions pages') . '</dt>'; - $output .= '<dd>' . t('The main Permissions page can be overwhelming, so each module that defines permissions has its own page for setting them. There are links to these pages on the <a href=":modules">Extend page</a>. When editing a content type, vocabulary, etc., there is also a Manage permissions tab for permissions related to that configuration.', [':modules' => Url::fromRoute('system.modules_list')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Managing account settings') . '</dt>'; - $output .= '<dd>' . t('The <a href=":accounts">Account settings page</a> allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is installed (the Administrator role).', [':accounts' => Url::fromRoute('entity.user.admin_form')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Managing user account fields') . '</dt>'; - $output .= '<dd>' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the <a href=":accounts">Account settings page</a>. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the <a href=":field_help">Field module help page</a>.', [':field_help' => (\Drupal::moduleHandler()->moduleExists('field')) ? Url::fromRoute('help.page', ['name' => 'field'])->toString() : '#', ':accounts' => Url::fromRoute('entity.user.admin_form')->toString()]) . '</dd>'; - $output .= '</dl>'; - return $output; - - case 'user.admin_create': - return '<p>' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '</p>'; - - case 'user.admin_permissions': - return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href=":role">Roles</a> page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. On the <a href=":settings">Role settings</a> page, you can make any role into an Administrator role for the site, meaning that role will be granted all permissions. You should be careful to ensure that only trusted users are given this access and level of control of your site.', [':role' => Url::fromRoute('entity.user_role.collection')->toString(), ':settings' => Url::fromRoute('user.role.settings')->toString()]) . '</p>'; - - case 'entity.user_role.collection': - return '<p>' . t('A role defines a group of users that have certain privileges. These privileges are defined on the <a href=":permissions">Permissions page</a>. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', [':permissions' => Url::fromRoute('user.admin_permissions')->toString()]) . '</p>'; - - case 'entity.user.field_ui_fields': - return '<p>' . t('This form lets administrators add and edit fields for storing user data.') . '</p>'; - - case 'entity.entity_form_display.user.default': - return '<p>' . t('This form lets administrators configure how form fields should be displayed when editing a user profile.') . '</p>'; - - case 'entity.entity_view_display.user.default': - return '<p>' . t('This form lets administrators configure how fields should be displayed when rendering a user profile page.') . '</p>'; - } -} - -/** - * Implements hook_theme(). - */ -function user_theme() { - return [ - 'user' => [ - 'render element' => 'elements', - ], - 'username' => [ - 'variables' => ['account' => NULL, 'attributes' => [], 'link_options' => []], - ], - ]; -} - -/** - * Implements hook_js_settings_alter(). - */ -function user_js_settings_alter(&$settings, AttachedAssetsInterface $assets) { - // Provide the user ID in drupalSettings to allow JavaScript code to customize - // the experience for the end user, rather than the server side, which would - // break the render cache. - // Similarly, provide a permissions hash, so that permission-dependent data - // can be reliably cached on the client side. - $user = \Drupal::currentUser(); - $settings['user']['uid'] = $user->id(); - $settings['user']['permissionsHash'] = \Drupal::service('user_permissions_hash_generator')->generate($user); -} - /** * Returns whether this site supports the default user picture feature. * @@ -116,50 +31,6 @@ function user_picture_enabled() { return isset($field_definitions['user_picture']); } -/** - * Implements hook_entity_extra_field_info(). - */ -function user_entity_extra_field_info() { - $fields['user']['user']['form']['account'] = [ - 'label' => t('User name and password'), - 'description' => t('User module account form elements.'), - 'weight' => -10, - ]; - $fields['user']['user']['form']['language'] = [ - 'label' => t('Language settings'), - 'description' => t('User module form element.'), - 'weight' => 0, - ]; - if (\Drupal::config('system.date')->get('timezone.user.configurable')) { - $fields['user']['user']['form']['timezone'] = [ - 'label' => t('Timezone'), - 'description' => t('System module form element.'), - 'weight' => 6, - ]; - } - - $fields['user']['user']['display']['member_for'] = [ - 'label' => t('Member for'), - 'description' => t("User module 'member for' view element."), - 'weight' => 5, - ]; - - return $fields; -} - -/** - * Implements hook_ENTITY_TYPE_presave() for user entities. - * - * @todo https://www.drupal.org/project/drupal/issues/3112704 Move to - * \Drupal\user\Entity\User::preSave(). - */ -function user_user_presave(UserInterface $account) { - $config = \Drupal::config('system.date'); - if ($config->get('timezone.user.configurable') && !$account->getTimeZone() && !$config->get('timezone.user.default')) { - $account->timezone = $config->get('timezone.default'); - } -} - /** * Fetches a user object by email address. * @@ -241,42 +112,6 @@ function user_is_blocked($name) { ->execute(); } -/** - * Implements hook_ENTITY_TYPE_view() for user entities. - */ -function user_user_view(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { - if ($account->isAuthenticated() && $display->getComponent('member_for')) { - $build['member_for'] = [ - '#type' => 'item', - '#markup' => '<h4 class="label">' . t('Member for') . '</h4> ' . \Drupal::service('date.formatter')->formatTimeDiffSince($account->getCreatedTime()), - ]; - } -} - -/** - * Implements hook_ENTITY_TYPE_view_alter() for user entities. - * - * This function adds a default alt tag to the user_picture field to maintain - * accessibility. - */ -function user_user_view_alter(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { - if (!empty($build['user_picture']) && user_picture_enabled()) { - foreach (Element::children($build['user_picture']) as $key) { - if (!isset($build['user_picture'][$key]['#item']) || !($build['user_picture'][$key]['#item'] instanceof ImageItem)) { - // User picture field is provided by standard profile install. If the - // display is configured to use a different formatter, the #item render - // key may not exist, or may not be an image field. - continue; - } - /** @var \Drupal\image\Plugin\Field\FieldType\ImageItem $item */ - $item = $build['user_picture'][$key]['#item']; - if (!$item->get('alt')->getValue()) { - $item->get('alt')->setValue(\Drupal::translation()->translate('Profile picture for user @username', ['@username' => $account->getAccountName()])); - } - } - } -} - /** * Implements hook_preprocess_HOOK() for block templates. */ @@ -290,23 +125,6 @@ function user_preprocess_block(&$variables) { } } -/** - * Implements hook_template_preprocess_default_variables_alter(). - * - * @see user_user_login() - * @see user_user_logout() - */ -function user_template_preprocess_default_variables_alter(&$variables) { - $user = \Drupal::currentUser(); - - $variables['user'] = clone $user; - // Remove password and session IDs, since themes should not need nor see them. - unset($variables['user']->pass, $variables['user']->sid, $variables['user']->ssid); - - $variables['is_admin'] = $user->hasPermission('access administration pages'); - $variables['logged_in'] = $user->isAuthenticated(); -} - /** * Prepares variables for username templates. * @@ -419,36 +237,6 @@ function user_login_finalize(UserInterface $account) { \Drupal::moduleHandler()->invokeAll('user_login', [$account]); } -/** - * Implements hook_user_login(). - */ -function user_user_login(UserInterface $account) { - // Reset static cache of default variables in template_preprocess() to reflect - // the new user. - drupal_static_reset('template_preprocess'); - - // If the user has a NULL time zone, notify them to set a time zone. - $config = \Drupal::config('system.date'); - if (!$account->getTimezone() && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) { - \Drupal::messenger() - ->addStatus(t('Configure your <a href=":user-edit">account time zone setting</a>.', [ - ':user-edit' => $account->toUrl('edit-form', [ - 'query' => \Drupal::destination()->getAsArray(), - 'fragment' => 'edit-timezone', - ])->toString(), - ])); - } -} - -/** - * Implements hook_user_logout(). - */ -function user_user_logout(AccountInterface $account) { - // Reset static cache of default variables in template_preprocess() to reflect - // the new user. - drupal_static_reset('template_preprocess'); -} - /** * Generates a unique URL for a user to log in and reset their password. * @@ -715,28 +503,6 @@ function user_cancel_methods() { return $form; } -/** - * Implements hook_mail(). - */ -function user_mail($key, &$message, $params) { - $token_service = \Drupal::token(); - $language_manager = \Drupal::languageManager(); - $langcode = $message['langcode']; - $variables = ['user' => $params['account']]; - - $language = $language_manager->getLanguage($langcode); - $original_language = $language_manager->getConfigOverrideLanguage(); - $language_manager->setConfigOverrideLanguage($language); - $mail_config = \Drupal::config('user.mail'); - - $token_options = ['langcode' => $langcode, 'callback' => 'user_mail_tokens', 'clear' => TRUE]; - $message['subject'] .= PlainTextOutput::renderFromHtml($token_service->replace($mail_config->get($key . '.subject'), $variables, $token_options)); - $message['body'][] = $token_service->replace($mail_config->get($key . '.body'), $variables, $token_options); - - $language_manager->setConfigOverrideLanguage($original_language); - -} - /** * Token callback to add unsafe tokens for user mails. * @@ -764,67 +530,6 @@ function user_mail_tokens(&$replacements, $data, $options) { } } -/** - * Implements hook_ENTITY_TYPE_insert() for user_role entities. - */ -function user_user_role_insert(RoleInterface $role) { - // Ignore the authenticated and anonymous roles or the role is being synced. - if (in_array($role->id(), [RoleInterface::AUTHENTICATED_ID, RoleInterface::ANONYMOUS_ID]) || $role->isSyncing()) { - return; - } - - assert(Inspector::assertStringable($role->label()), 'Role label is expected to be a string.'); - - $add_id = 'user_add_role_action.' . $role->id(); - if (!Action::load($add_id)) { - $action = Action::create([ - 'id' => $add_id, - 'type' => 'user', - 'label' => t('Add the @label role to the selected user(s)', ['@label' => $role->label()]), - 'configuration' => [ - 'rid' => $role->id(), - ], - 'plugin' => 'user_add_role_action', - ]); - $action->trustData()->save(); - } - $remove_id = 'user_remove_role_action.' . $role->id(); - if (!Action::load($remove_id)) { - $action = Action::create([ - 'id' => $remove_id, - 'type' => 'user', - 'label' => t('Remove the @label role from the selected user(s)', ['@label' => $role->label()]), - 'configuration' => [ - 'rid' => $role->id(), - ], - 'plugin' => 'user_remove_role_action', - ]); - $action->trustData()->save(); - } -} - -/** - * Implements hook_ENTITY_TYPE_delete() for user_role entities. - */ -function user_user_role_delete(RoleInterface $role) { - // Delete role references for all users. - $user_storage = \Drupal::entityTypeManager()->getStorage('user'); - $user_storage->deleteRoleReferences([$role->id()]); - - // Ignore the authenticated and anonymous roles or the role is being synced. - if (in_array($role->id(), [RoleInterface::AUTHENTICATED_ID, RoleInterface::ANONYMOUS_ID]) || $role->isSyncing()) { - return; - } - - $actions = Action::loadMultiple([ - 'user_add_role_action.' . $role->id(), - 'user_remove_role_action.' . $role->id(), - ]); - foreach ($actions as $action) { - $action->delete(); - } -} - /** * Change permissions for a user role. * @@ -959,15 +664,6 @@ function _user_mail_notify($op, AccountInterface $account) { return empty($mail) ? NULL : $mail['result']; } -/** - * Implements hook_element_info_alter(). - */ -function user_element_info_alter(array &$types) { - if (isset($types['password_confirm'])) { - $types['password_confirm']['#process'][] = 'user_form_process_password_confirm'; - } -} - /** * Form element process handler for client-side password validation. * @@ -1008,14 +704,6 @@ function user_form_process_password_confirm($element) { return $element; } -/** - * Implements hook_modules_uninstalled(). - */ -function user_modules_uninstalled($modules) { - // Remove any potentially orphan module data stored for users. - \Drupal::service('user.data')->delete($modules); -} - /** * Saves visitor information as a cookie so it can be reused. * @@ -1040,76 +728,6 @@ function user_cookie_delete($cookie_name) { setrawcookie('Drupal.visitor.' . $cookie_name, '', \Drupal::time()->getRequestTime() - 3600, '/'); } -/** - * Implements hook_toolbar(). - */ -function user_toolbar() { - $user = \Drupal::currentUser(); - - $items['user'] = [ - '#type' => 'toolbar_item', - 'tab' => [ - '#type' => 'link', - '#title' => $user->getDisplayName(), - '#url' => Url::fromRoute('user.page'), - '#attributes' => [ - 'title' => t('My account'), - 'class' => ['toolbar-icon', 'toolbar-icon-user'], - ], - '#cache' => [ - // Vary cache for anonymous and authenticated users. - 'contexts' => ['user.roles:anonymous'], - ], - ], - 'tray' => [ - '#heading' => t('User account actions'), - ], - '#weight' => 100, - '#attached' => [ - 'library' => [ - 'user/drupal.user.icons', - ], - ], - ]; - - if ($user->isAnonymous()) { - $links = [ - 'login' => [ - 'title' => t('Log in'), - 'url' => Url::fromRoute('user.page'), - ], - ]; - $items['user']['tray']['user_links'] = [ - '#theme' => 'links__toolbar_user', - '#links' => $links, - '#attributes' => [ - 'class' => ['toolbar-menu'], - ], - ]; - } - else { - $items['user']['tab']['#title'] = [ - '#lazy_builder' => ['user.toolbar_link_builder:renderDisplayName', []], - '#create_placeholder' => TRUE, - '#lazy_builder_preview' => [ - // Add a line of whitespace to the placeholder to ensure the icon is - // positioned in the same place it will be when the lazy loaded content - // appears. - '#markup' => ' ', - ], - ]; - $items['user']['tray']['user_links'] = [ - '#lazy_builder' => ['user.toolbar_link_builder:renderToolbarLinks', []], - '#create_placeholder' => TRUE, - '#lazy_builder_preview' => [ - '#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link"> </a>', - ], - ]; - } - - return $items; -} - /** * Logs the current user out. */ @@ -1150,50 +768,6 @@ function template_preprocess_user(&$variables) { } } -/** - * Implements hook_form_FORM_ID_alter() for \Drupal\system\Form\RegionalForm. - */ -function user_form_system_regional_settings_alter(&$form, FormStateInterface $form_state) { - $config = \Drupal::config('system.date'); - - $form['timezone']['configurable_timezones'] = [ - '#type' => 'checkbox', - '#title' => t('Users may set their own time zone'), - '#default_value' => $config->get('timezone.user.configurable'), - ]; - - $form['timezone']['configurable_timezones_wrapper'] = [ - '#type' => 'container', - '#states' => [ - // Hide the user configured timezone settings when users are forced to use - // the default setting. - 'invisible' => [ - 'input[name="configurable_timezones"]' => ['checked' => FALSE], - ], - ], - ]; - $form['timezone']['configurable_timezones_wrapper']['empty_timezone_message'] = [ - '#type' => 'checkbox', - '#title' => t('Remind users at login if their time zone is not set'), - '#default_value' => $config->get('timezone.user.warn'), - '#description' => t('Only applied if users may set their own time zone.'), - ]; - - $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = [ - '#type' => 'radios', - '#title' => t('Time zone for new users'), - '#default_value' => $config->get('timezone.user.default'), - '#options' => [ - UserInterface::TIMEZONE_DEFAULT => t('Default time zone'), - UserInterface::TIMEZONE_EMPTY => t('Empty time zone'), - UserInterface::TIMEZONE_SELECT => t('Users may set their own time zone at registration'), - ], - '#description' => t('Only applied if users may set their own time zone.'), - ]; - - $form['#submit'][] = 'user_form_system_regional_settings_submit'; -} - /** * Additional submit handler for \Drupal\system\Form\RegionalForm. */ @@ -1204,48 +778,3 @@ function user_form_system_regional_settings_submit($form, FormStateInterface $fo ->set('timezone.user.default', $form_state->getValue('user_default_timezone')) ->save(); } - -/** - * Implements hook_filter_format_disable(). - */ -function user_filter_format_disable(FilterFormatInterface $filter_format) { - // Remove the permission from any roles. - $permission = $filter_format->getPermissionName(); - /** @var \Drupal\user\Entity\Role $role */ - foreach (Role::loadMultiple() as $role) { - if ($role->hasPermission($permission)) { - $role->revokePermission($permission)->save(); - } - } -} - -/** - * Implements hook_entity_operation(). - */ -function user_entity_operation(EntityInterface $entity) { - // Add Manage permissions link if this entity type defines the permissions - // link template. - if (!$entity->hasLinkTemplate('entity-permissions-form')) { - return []; - } - - $bundle_entity_type = $entity->bundle(); - $route = "entity.$bundle_entity_type.entity_permissions_form"; - if (empty(\Drupal::service('router.route_provider')->getRoutesByNames([$route]))) { - return []; - } - - $url = Url::fromRoute($route, [$bundle_entity_type => $entity->id()]); - if (!$url->access()) { - return []; - } - - return [ - 'manage-permissions' => [ - 'title' => t('Manage permissions'), - 'weight' => 50, - 'url' => $url, - ], - ]; - -} diff --git a/core/modules/user/user.post_update.php b/core/modules/user/user.post_update.php index 1279a997e06d58753fa6eba70f5621f26d895c9e..30e225844899d139f1349b595f630e268a0efef3 100644 --- a/core/modules/user/user.post_update.php +++ b/core/modules/user/user.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function user_removed_post_updates() { +function user_removed_post_updates(): array { return [ 'user_post_update_enforce_order_of_permissions' => '9.0.0', 'user_post_update_update_roles' => '10.0.0', diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc deleted file mode 100644 index 9baf90d10ebda469d1c633f5ea534fc9efba8eb2..0000000000000000000000000000000000000000 --- a/core/modules/user/user.tokens.inc +++ /dev/null @@ -1,160 +0,0 @@ -<?php - -/** - * @file - * Builds placeholder replacement tokens for user-related data. - */ - -use Drupal\Core\Datetime\Entity\DateFormat; -use Drupal\Core\Render\BubbleableMetadata; -use Drupal\user\Entity\User; - -/** - * Implements hook_token_info(). - */ -function user_token_info() { - $types['user'] = [ - 'name' => t('Users'), - 'description' => t('Tokens related to individual user accounts.'), - 'needs-data' => 'user', - ]; - $types['current-user'] = [ - 'name' => t('Current user'), - 'description' => t('Tokens related to the currently logged in user.'), - 'type' => 'user', - ]; - - $user['uid'] = [ - 'name' => t('User ID'), - 'description' => t("The unique ID of the user account."), - ]; - $user['name'] = [ - 'name' => t("Deprecated: User Name"), - 'description' => t("Deprecated: Use account-name or display-name instead."), - ]; - $user['account-name'] = [ - 'name' => t("Account Name"), - 'description' => t("The login name of the user account."), - ]; - $user['display-name'] = [ - 'name' => t("Display Name"), - 'description' => t("The display name of the user account."), - ]; - $user['mail'] = [ - 'name' => t("Email"), - 'description' => t("The email address of the user account."), - ]; - $user['url'] = [ - 'name' => t("URL"), - 'description' => t("The URL of the account profile page."), - ]; - $user['edit-url'] = [ - 'name' => t("Edit URL"), - 'description' => t("The URL of the account edit page."), - ]; - - $user['last-login'] = [ - 'name' => t("Last login"), - 'description' => t("The date the user last logged in to the site."), - 'type' => 'date', - ]; - $user['created'] = [ - 'name' => t("Created"), - 'description' => t("The date the user account was created."), - 'type' => 'date', - ]; - - return [ - 'types' => $types, - 'tokens' => ['user' => $user], - ]; -} - -/** - * Implements hook_tokens(). - */ -function user_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - - $token_service = \Drupal::token(); - $url_options = ['absolute' => TRUE]; - if (isset($options['langcode'])) { - $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); - $langcode = $options['langcode']; - } - else { - $langcode = NULL; - } - $replacements = []; - - if ($type == 'user' && !empty($data['user'])) { - /** @var \Drupal\user\UserInterface $account */ - $account = $data['user']; - foreach ($tokens as $name => $original) { - switch ($name) { - // Basic user account information. - case 'uid': - // In the case of hook user_presave uid is not set yet. - $replacements[$original] = $account->id() ?: t('not yet assigned'); - break; - - case 'display-name': - $replacements[$original] = $account->getDisplayName(); - if ($account->isAnonymous()) { - $bubbleable_metadata->addCacheableDependency(\Drupal::config('user.settings')); - } - break; - - case 'name': - case 'account-name': - $display_name = $account->getAccountName(); - $replacements[$original] = $display_name; - if ($account->isAnonymous()) { - $bubbleable_metadata->addCacheableDependency(\Drupal::config('user.settings')); - } - break; - - case 'mail': - $replacements[$original] = $account->getEmail(); - break; - - case 'url': - $replacements[$original] = $account->id() ? $account->toUrl('canonical', $url_options)->toString() : t('not yet assigned'); - break; - - case 'edit-url': - $replacements[$original] = $account->id() ? $account->toUrl('edit-form', $url_options)->toString() : t('not yet assigned'); - break; - - // These tokens are default variations on the chained tokens handled below. - case 'last-login': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - $replacements[$original] = $account->getLastLoginTime() ? \Drupal::service('date.formatter')->format($account->getLastLoginTime(), 'medium', '', NULL, $langcode) : t('never'); - break; - - case 'created': - $date_format = DateFormat::load('medium'); - $bubbleable_metadata->addCacheableDependency($date_format); - // In the case of user_presave the created date may not yet be set. - $replacements[$original] = $account->getCreatedTime() ? \Drupal::service('date.formatter')->format($account->getCreatedTime(), 'medium', '', NULL, $langcode) : t('not yet created'); - break; - } - } - - if ($login_tokens = $token_service->findWithPrefix($tokens, 'last-login')) { - $replacements += $token_service->generate('date', $login_tokens, ['date' => $account->getLastLoginTime()], $options, $bubbleable_metadata); - } - - if ($registered_tokens = $token_service->findWithPrefix($tokens, 'created')) { - $replacements += $token_service->generate('date', $registered_tokens, ['date' => $account->getCreatedTime()], $options, $bubbleable_metadata); - } - } - - if ($type == 'current-user') { - $account = User::load(\Drupal::currentUser()->id()); - $bubbleable_metadata->addCacheContexts(['user']); - $replacements += $token_service->generate('user', $tokens, ['user' => $account], $options, $bubbleable_metadata); - } - - return $replacements; -} diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc deleted file mode 100644 index 5e3bd251e02cf242fb0ee1aa3a9757c15b757468..0000000000000000000000000000000000000000 --- a/core/modules/user/user.views.inc +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * @file - * Provide views data for user.module. - */ - -/** - * Implements hook_views_plugins_argument_validator_alter(). - */ -function user_views_plugins_argument_validator_alter(array &$plugins) { - $plugins['entity:user']['title'] = t('User ID'); - $plugins['entity:user']['class'] = 'Drupal\user\Plugin\views\argument_validator\User'; - $plugins['entity:user']['provider'] = 'user'; -} diff --git a/core/modules/user/user.views_execution.inc b/core/modules/user/user.views_execution.inc deleted file mode 100644 index e0c5c0c635d19f5fbf91a826cdda2116d8ba9fa9..0000000000000000000000000000000000000000 --- a/core/modules/user/user.views_execution.inc +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @file - * Provide views runtime hooks for user.module. - */ - -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_query_substitutions(). - * - * Allow replacement of current user ID so we can cache these queries. - */ -function user_views_query_substitutions(ViewExecutable $view) { - return ['***CURRENT_USER***' => \Drupal::currentUser()->id()]; -} diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index e3f9dbe92790ab7a64b1de4affed5b5186a1d482..b93be8c7e0bcc85d7dd0fb79bb102d0bac7b4ac0 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -2,6 +2,8 @@ namespace Drupal\views\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\Entity\ConfigEntityBase; @@ -13,36 +15,34 @@ /** * Defines a View configuration entity class. - * - * @ConfigEntityType( - * id = "view", - * label = @Translation("View", context = "View entity type"), - * label_collection = @Translation("Views", context = "View entity type"), - * label_singular = @Translation("view", context = "View entity type"), - * label_plural = @Translation("views", context = "View entity type"), - * label_count = @PluralTranslation( - * singular = "@count view", - * plural = "@count views", - * context = "View entity type", - * ), - * admin_permission = "administer views", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "status" = "status" - * }, - * config_export = { - * "id", - * "label", - * "module", - * "description", - * "tag", - * "base_table", - * "base_field", - * "display", - * } - * ) */ +#[ConfigEntityType( + id: 'view', + label: new TranslatableMarkup('View', ['context' => 'View entity type']), + label_collection: new TranslatableMarkup('Views', ['context' => 'View entity type']), + label_singular: new TranslatableMarkup('view', ['context' => 'View entity type']), + label_plural: new TranslatableMarkup('views', ['context' => 'View entity type']), + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'status' => 'status', + ], + admin_permission: 'administer views', + label_count: [ + 'singular' => '@count view', + 'plural' => '@count views', + ], + config_export: [ + 'id', + 'label', + 'module', + 'description', + 'tag', + 'base_table', + 'base_field', + 'display', + ], +)] class View extends ConfigEntityBase implements ViewEntityInterface { /** diff --git a/core/modules/views/src/Hook/ViewsHooks.php b/core/modules/views/src/Hook/ViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ee64d34d60b5afa41ce7ed6cf6eb34567eb68efc --- /dev/null +++ b/core/modules/views/src/Hook/ViewsHooks.php @@ -0,0 +1,378 @@ +<?php + +namespace Drupal\views\Hook; + +use Drupal\views\ViewsConfigUpdater; +use Drupal\views\ViewEntityInterface; +use Drupal\views\Plugin\Derivative\ViewsLocalTask; +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\views\ViewExecutable; +use Drupal\views\Views; +use Drupal\Component\Utility\Html; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views. + */ +class ViewsHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.views': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Views module provides a back end to fetch information from content, user accounts, taxonomy terms, and other entities from the database and present it to the user as a grid, HTML list, table, unformatted list, etc. The resulting displays are known generally as <em>views</em>.') . '</p>'; + $output .= '<p>' . t('For more information, see the <a href=":views">online documentation for the Views module</a>.', [':views' => 'https://www.drupal.org/documentation/modules/views']) . '</p>'; + $output .= '<p>' . t('In order to create and modify your own views using the administration and configuration user interface, you will need to install either the Views UI module in core or a contributed module that provides a user interface for Views. See the <a href=":views-ui">Views UI module help page</a> for more information.', [ + ':views-ui' => \Drupal::moduleHandler()->moduleExists('views_ui') ? Url::fromRoute('help.page', [ + 'name' => 'views_ui', + ])->toString() : '#', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Adding functionality to administrative pages') . '</dt>'; + $output .= '<dd>' . t('The Views module adds functionality to some core administration pages. For example, <em>admin/content</em> uses Views to filter and sort content. With Views uninstalled, <em>admin/content</em> is more limited.') . '</dd>'; + $output .= '<dt>' . t('Expanding Views functionality') . '</dt>'; + $output .= '<dd>' . t('Contributed projects that support the Views module can be found in the <a href=":node">online documentation for Views-related contributed modules</a>.', [':node' => 'https://www.drupal.org/documentation/modules/views/add-ons']) . '</dd>'; + $output .= '<dt>' . t('Improving table accessibility') . '</dt>'; + $output .= '<dd>' . t('Views tables include semantic markup to improve accessibility. Data cells are automatically associated with header cells through id and header attributes. To improve the accessibility of your tables you can add descriptive elements within the Views table settings. The <em>caption</em> element can introduce context for a table, making it easier to understand. The <em>summary</em> element can provide an overview of how the data has been organized and how to navigate the table. Both the caption and summary are visible by default and also implemented according to HTML5 guidelines.') . '</dd>'; + $output .= '<dt>' . t('Working with multilingual views') . '</dt>'; + $output .= '<dd>' . t('If your site has multiple languages and translated entities, each result row in a view will contain one translation of each involved entity (a view can involve multiple entities if it uses relationships). You can use a filter to restrict your view to one language: without filtering, if an entity has three translations it will add three rows to the results; if you filter by language, at most one result will appear (it could be zero if that particular entity does not have a translation matching your language filter choice). If a view uses relationships, each entity in the relationship needs to be filtered separately. You can filter a view to a fixed language choice, such as English or Spanish, or to the language selected by the page the view is displayed on (the language that is selected for the page by the language detection settings either for Content or User interface).') . '</dd>'; + $output .= '<dd>' . t('Because each result row contains a specific translation of each entity, field-level filters are also relative to these entity translations. For example, if your view has a filter that specifies that the entity title should contain a particular English word, you will presumably filter out all rows containing Chinese translations, since they will not contain the English word. If your view also has a second filter specifying that the title should contain a particular Chinese word, and if you are using "And" logic for filtering, you will presumably end up with no results in the view, because there are probably not any entity translations containing both the English and Chinese words in the title.') . '</dd>'; + $output .= '<dd>' . t('Independent of filtering, you can choose the display language (the language used to display the entities and their fields) via a setting on the display. Your language choices are the same as the filter language choices, with an additional choice of "Content language of view row" and "Original language of content in view row", which means to display each entity in the result row using the language that entity has or in which it was originally created. In theory, this would give you the flexibility to filter to French translations, for instance, and then display the results in Spanish. The more usual choices would be to use the same language choices for the display language and each entity filter in the view, or to use the Row language setting for the display.') . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_views_pre_render(). + */ + #[Hook('views_pre_render')] + public function viewsPreRender($view) { + // If using AJAX, send identifying data about this view. + if ($view->ajaxEnabled() && empty($view->is_attachment) && empty($view->live_preview)) { + $view->element['#attached']['drupalSettings']['views'] = [ + 'ajax_path' => Url::fromRoute('views.ajax')->toString(), + 'ajaxViews' => [ + 'views_dom_id:' . $view->dom_id => [ + 'view_name' => $view->storage->id(), + 'view_display_id' => $view->current_display, + 'view_args' => Html::escape(implode('/', $view->args)), + 'view_path' => Html::escape(\Drupal::service('path.current')->getPath()), + 'view_base_path' => $view->getPath(), + 'view_dom_id' => $view->dom_id, + // To fit multiple views on a page, the programmer may have + // overridden the display's pager_element. + 'pager_element' => isset($view->pager) ? $view->pager->getPagerId() : 0, + ], + ], + ]; + $view->element['#attached']['library'][] = 'views/views.ajax'; + } + return $view; + } + + /** + * Implements hook_theme(). + * + * Register views theming functions and those that are defined via views plugin + * definitions. + */ + #[Hook('theme')] + public function theme($existing, $type, $theme, $path) : array { + \Drupal::moduleHandler()->loadInclude('views', 'inc', 'views.theme'); + // Some quasi clever array merging here. + $base = ['file' => 'views.theme.inc']; + // Our extra version of pager + $hooks['views_mini_pager'] = $base + [ + 'variables' => [ + 'tags' => [], + 'quantity' => 9, + 'element' => 0, + 'pagination_heading_level' => 'h4', + 'parameters' => [], + ], + ]; + $variables = [ + // For displays, we pass in a dummy array as the first parameter, since + // $view is an object but the core contextual_preprocess() function only + // attaches contextual links when the primary theme argument is an array. + 'display' => [ + 'view_array' => [], + 'view' => NULL, + 'rows' => [], + 'header' => [], + 'footer' => [], + 'empty' => [], + 'exposed' => [], + 'more' => [], + 'feed_icons' => [], + 'pager' => [], + 'title' => '', + 'attachment_before' => [], + 'attachment_after' => [], + ], + 'style' => [ + 'view' => NULL, + 'options' => NULL, + 'rows' => NULL, + 'title' => NULL, + ], + 'row' => [ + 'view' => NULL, + 'options' => NULL, + 'row' => NULL, + 'field_alias' => NULL, + ], + 'exposed_form' => [ + 'view' => NULL, + 'options' => NULL, + ], + 'pager' => [ + 'view' => NULL, + 'options' => NULL, + 'tags' => [], + 'quantity' => 9, + 'element' => 0, + 'pagination_heading_level' => 'h4', + 'parameters' => [], + ], + ]; + // Default view themes + $hooks['views_view_field'] = $base + ['variables' => ['view' => NULL, 'field' => NULL, 'row' => NULL]]; + $hooks['views_view_grouping'] = $base + [ + 'variables' => [ + 'view' => NULL, + 'grouping' => NULL, + 'grouping_level' => NULL, + 'rows' => NULL, + 'title' => NULL, + ], + ]; + // Only display, pager, row, and style plugins can provide theme hooks. + $plugin_types = ['display', 'pager', 'row', 'style', 'exposed_form']; + $plugins = []; + foreach ($plugin_types as $plugin_type) { + $plugins[$plugin_type] = Views::pluginManager($plugin_type)->getDefinitions(); + } + $module_handler = \Drupal::moduleHandler(); + // Register theme functions for all style plugins. It provides a basic auto + // implementation of theme functions or template files by using the plugin + // definitions (theme, theme_file, module, register_theme). Template files are + // assumed to be located in the templates folder. + foreach ($plugins as $type => $info) { + foreach ($info as $def) { + // Not all plugins have theme functions, and they can also explicitly + // prevent a theme function from being registered automatically. + if (!isset($def['theme']) || empty($def['register_theme'])) { + continue; + } + // For each theme registration, we have a base directory to check for the + // templates folder. This will be relative to the root of the given module + // folder, so we always need a module definition. + // @todo Watchdog or exception? + if (!isset($def['provider']) || !$module_handler->moduleExists($def['provider'])) { + continue; + } + $hooks[$def['theme']] = ['variables' => $variables[$type]]; + // We always use the module directory as base dir. + $module_dir = \Drupal::service('extension.list.module')->getPath($def['provider']); + $hooks[$def['theme']]['path'] = $module_dir; + // For the views module we ensure views.theme.inc is included. + if ($def['provider'] == 'views') { + if (!isset($hooks[$def['theme']]['includes'])) { + $hooks[$def['theme']]['includes'] = []; + } + if (!in_array('views.theme.inc', $hooks[$def['theme']]['includes'])) { + $hooks[$def['theme']]['includes'][] = $module_dir . '/views.theme.inc'; + } + } + elseif (!empty($def['theme_file'])) { + $hooks[$def['theme']]['file'] = $def['theme_file']; + } + // Whenever we have a theme file, we include it directly so we can + // auto-detect the theme function. + if (isset($def['theme_file'])) { + $include = \Drupal::root() . '/' . $module_dir . '/' . $def['theme_file']; + if (is_file($include)) { + require_once $include; + } + } + // By default any templates for a module are located in the /templates + // directory of the module's folder. If a module wants to define its own + // location it has to set register_theme of the plugin to FALSE and + // implement hook_theme() by itself. + $hooks[$def['theme']]['path'] .= '/templates'; + $hooks[$def['theme']]['template'] = Html::cleanCssIdentifier($def['theme']); + } + } + $hooks['views_form_views_form'] = $base + ['render element' => 'form']; + $hooks['views_exposed_form'] = $base + ['render element' => 'form']; + return $hooks; + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_node_alter')] + public function themeSuggestionsNodeAlter(array &$suggestions, array $variables) { + $node = $variables['elements']['#node']; + if (!empty($node->view) && $node->view->storage->id()) { + $suggestions[] = 'node__view__' . $node->view->storage->id(); + if (!empty($node->view->current_display)) { + $suggestions[] = 'node__view__' . $node->view->storage->id() . '__' . $node->view->current_display; + } + } + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_comment_alter')] + public function themeSuggestionsCommentAlter(array &$suggestions, array $variables) { + $comment = $variables['elements']['#comment']; + if (!empty($comment->view) && $comment->view->storage->id()) { + $suggestions[] = 'comment__view__' . $comment->view->storage->id(); + if (!empty($comment->view->current_display)) { + $suggestions[] = 'comment__view__' . $comment->view->storage->id() . '__' . $comment->view->current_display; + } + } + } + + /** + * Implements hook_theme_suggestions_HOOK_alter(). + */ + #[Hook('theme_suggestions_container_alter')] + public function themeSuggestionsContainerAlter(array &$suggestions, array $variables) { + if (!empty($variables['element']['#type']) && $variables['element']['#type'] == 'more_link' && !empty($variables['element']['#view']) && $variables['element']['#view'] instanceof ViewExecutable) { + $suggestions = array_merge( + $suggestions, + // Theme suggestions use the reverse order compared to #theme hooks. + array_reverse($variables['element']['#view']->buildThemeFunctions('container__more_link')) + ); + } + } + + /** + * Implements hook_ENTITY_TYPE_insert() for 'field_config'. + */ + #[Hook('field_config_insert')] + public function fieldConfigInsert(EntityInterface $field) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_ENTITY_TYPE_update() for 'field_config'. + */ + #[Hook('field_config_update')] + public function fieldConfigUpdate(EntityInterface $entity) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_ENTITY_TYPE_delete() for 'field_config'. + */ + #[Hook('field_config_delete')] + public function fieldConfigDelete(EntityInterface $entity) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_ENTITY_TYPE_insert(). + */ + #[Hook('base_field_override_insert')] + public function baseFieldOverrideInsert(EntityInterface $entity) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_ENTITY_TYPE_update(). + */ + #[Hook('base_field_override_update')] + public function baseFieldOverrideUpdate(EntityInterface $entity) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_ENTITY_TYPE_delete(). + */ + #[Hook('base_field_override_delete')] + public function baseFieldOverrideDelete(EntityInterface $entity) { + Views::viewsData()->clear(); + } + + /** + * Implements hook_form_FORM_ID_alter() for the exposed form. + * + * Since the exposed form is a GET form, we don't want it to send a wide + * variety of information. + */ + #[Hook('form_views_exposed_form_alter')] + public function formViewsExposedFormAlter(&$form, FormStateInterface $form_state) : void { + $form['form_build_id']['#access'] = FALSE; + $form['form_token']['#access'] = FALSE; + $form['form_id']['#access'] = FALSE; + } + + /** + * Implements hook_query_TAG_alter(). + * + * This is the hook_query_alter() for queries tagged by Views and is used to + * add in substitutions from hook_views_query_substitutions(). + */ + #[Hook('query_views_alter')] + public function queryViewsAlter(AlterableInterface $query) { + $substitutions = $query->getMetaData('views_substitutions'); + $tables =& $query->getTables(); + $where =& $query->conditions(); + // Replaces substitutions in tables. + foreach ($tables as $table_name => $table_metadata) { + foreach ($table_metadata['arguments'] as $replacement_key => $value) { + if (!is_array($value)) { + if (isset($substitutions[$value])) { + $tables[$table_name]['arguments'][$replacement_key] = $substitutions[$value]; + } + } + else { + foreach ($value as $sub_key => $sub_value) { + if (isset($substitutions[$sub_value])) { + $tables[$table_name]['arguments'][$replacement_key][$sub_key] = $substitutions[$sub_value]; + } + } + } + } + } + // Replaces substitutions in filter criteria. + _views_query_tag_alter_condition($query, $where, $substitutions); + } + + /** + * Implements hook_local_tasks_alter(). + */ + #[Hook('local_tasks_alter')] + public function localTasksAlter(&$local_tasks) { + $container = \Drupal::getContainer(); + $local_task = ViewsLocalTask::create($container, 'views_view'); + $local_task->alterLocalTasks($local_tasks); + } + + /** + * Implements hook_ENTITY_TYPE_presave(). + */ + #[Hook('view_presave')] + public function viewPresave(ViewEntityInterface $view) { + /** @var \Drupal\views\ViewsConfigUpdater $config_updater */ + $config_updater = \Drupal::classResolver(ViewsConfigUpdater::class); + $config_updater->updateAll($view); + } + +} diff --git a/core/modules/views/src/Hook/ViewsTokensHooks.php b/core/modules/views/src/Hook/ViewsTokensHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2609e5bb1dbef7bea4f8d69e4460a3a973576b4b --- /dev/null +++ b/core/modules/views/src/Hook/ViewsTokensHooks.php @@ -0,0 +1,133 @@ +<?php + +namespace Drupal\views\Hook; + +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views. + */ +class ViewsTokensHooks { + + /** + * Implements hook_token_info(). + */ + #[Hook('token_info')] + public function tokenInfo() { + $info['types']['view'] = [ + 'name' => t('View', [], [ + 'context' => 'View entity type', + ]), + 'description' => t('Tokens related to views.'), + 'needs-data' => 'view', + ]; + $info['tokens']['view']['label'] = ['name' => t('Label'), 'description' => t('The label of the view.')]; + $info['tokens']['view']['description'] = ['name' => t('Description'), 'description' => t('The description of the view.')]; + $info['tokens']['view']['id'] = ['name' => t('ID'), 'description' => t('The machine-readable ID of the view.')]; + $info['tokens']['view']['title'] = [ + 'name' => t('Title'), + 'description' => t('The title of current display of the view.'), + ]; + $info['tokens']['view']['url'] = ['name' => t('URL'), 'description' => t('The URL of the view.'), 'type' => 'url']; + $info['tokens']['view']['base-table'] = [ + 'name' => t('Base table'), + 'description' => t('The base table used for this view.'), + ]; + $info['tokens']['view']['base-field'] = [ + 'name' => t('Base field'), + 'description' => t('The base field used for this view.'), + ]; + $info['tokens']['view']['total-rows'] = [ + 'name' => t('Total rows'), + 'description' => t('The total amount of results returned from the view. The current display will be used.'), + ]; + $info['tokens']['view']['items-per-page'] = [ + 'name' => t('Items per page'), + 'description' => t('The number of items per page.'), + ]; + $info['tokens']['view']['current-page'] = [ + 'name' => t('Current page'), + 'description' => t('The current page of results the view is on.'), + ]; + $info['tokens']['view']['page-count'] = ['name' => t('Page count'), 'description' => t('The total page count.')]; + return $info; + } + + /** + * Implements hook_tokens(). + */ + #[Hook('tokens')] + public function tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { + $url_options = ['absolute' => TRUE]; + if (isset($options['language'])) { + $url_options['language'] = $options['language']; + } + $replacements = []; + if ($type == 'view' && !empty($data['view'])) { + /** @var \Drupal\views\ViewExecutable $view */ + $view = $data['view']; + $bubbleable_metadata->addCacheableDependency($view->storage); + foreach ($tokens as $name => $original) { + switch ($name) { + case 'label': + $replacements[$original] = $view->storage->label(); + break; + + case 'description': + $replacements[$original] = $view->storage->get('description'); + break; + + case 'id': + $replacements[$original] = $view->storage->id(); + break; + + case 'title': + $title = $view->getTitle(); + $replacements[$original] = $title; + break; + + case 'url': + try { + if ($url = $view->getUrl()) { + $replacements[$original] = $url->setOptions($url_options)->toString(); + } + } + catch (\InvalidArgumentException) { + // The view has no URL so we leave the value empty. + $replacements[$original] = ''; + } + break; + + case 'base-table': + $replacements[$original] = $view->storage->get('base_table'); + break; + + case 'base-field': + $replacements[$original] = $view->storage->get('base_field'); + break; + + case 'total-rows': + $replacements[$original] = (int) $view->total_rows; + break; + + case 'items-per-page': + $replacements[$original] = (int) $view->getItemsPerPage(); + break; + + case 'current-page': + $replacements[$original] = (int) $view->getCurrentPage() + 1; + break; + + case 'page-count': + // If there are no items per page, set this to 1 for the division. + $per_page = $view->getItemsPerPage() ?: 1; + $replacements[$original] = max(1, (int) ceil($view->total_rows / $per_page)); + break; + } + } + } + return $replacements; + } + +} diff --git a/core/modules/views/src/Hook/ViewsViewsExecutionHooks.php b/core/modules/views/src/Hook/ViewsViewsExecutionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..62b4b91e4936315c0b09f189253ec58c63898d63 --- /dev/null +++ b/core/modules/views/src/Hook/ViewsViewsExecutionHooks.php @@ -0,0 +1,51 @@ +<?php + +namespace Drupal\views\Hook; + +use Drupal\views\Plugin\views\PluginBase; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views. + */ +class ViewsViewsExecutionHooks { + + /** + * Implements hook_views_query_substitutions(). + * + * Makes the following substitutions: + * - Current time. + * - Drupal version. + * - Special language codes; see + * \Drupal\views\Plugin\views\PluginBase::listLanguages(). + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + $substitutions = [ + '***CURRENT_VERSION***' => \Drupal::VERSION, + '***CURRENT_TIME***' => \Drupal::time()->getRequestTime(), + ] + PluginBase::queryLanguageSubstitutions(); + return $substitutions; + } + + /** + * Implements hook_views_form_substitutions(). + */ + #[Hook('views_form_substitutions')] + public function viewsFormSubstitutions() { + $select_all = [ + '#type' => 'checkbox', + '#default_value' => FALSE, + '#attributes' => [ + 'class' => [ + 'action-table-select-all', + ], + ], + ]; + return [ + '<!--action-bulk-form-select-all-->' => \Drupal::service('renderer')->render($select_all), + ]; + } + +} diff --git a/core/modules/views/src/Hook/ViewsViewsHooks.php b/core/modules/views/src/Hook/ViewsViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..70af0d1f00329df8f0c5dcd56576389c0593a6b4 --- /dev/null +++ b/core/modules/views/src/Hook/ViewsViewsHooks.php @@ -0,0 +1,291 @@ +<?php + +namespace Drupal\views\Hook; + +use Drupal\Core\Entity\ContentEntityTypeInterface; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\Component\Utility\NestedArray; +use Drupal\system\ActionConfigEntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views. + */ +class ViewsViewsHooks { + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + $data['views']['table']['group'] = t('Global'); + $data['views']['table']['join'] = ['#global' => []]; + $data['views']['random'] = [ + 'title' => t('Random'), + 'help' => t('Randomize the display order.'), + 'sort' => [ + 'id' => 'random', + ], + ]; + $data['views']['null'] = [ + 'title' => t('Null'), + 'help' => t('Allow a contextual filter value to be ignored. The query will not be altered by this contextual filter value. Can be used when contextual filter values come from the URL, and a part of the URL needs to be ignored.'), + 'argument' => [ + 'id' => 'null', + ], + ]; + $data['views']['nothing'] = [ + 'title' => t('Custom text'), + 'help' => t('Provide custom text or link.'), + 'field' => [ + 'id' => 'custom', + 'click sortable' => FALSE, + ], + ]; + $data['views']['counter'] = [ + 'title' => t('View result counter'), + 'help' => t('Displays the actual position of the view result'), + 'field' => [ + 'id' => 'counter', + ], + ]; + $data['views']['area'] = [ + 'title' => t('Text area'), + 'help' => t('Provide markup for the area using any available text format.'), + 'area' => [ + 'id' => 'text', + ], + ]; + $data['views']['area_text_custom'] = [ + 'title' => t('Unfiltered text'), + 'help' => t('Provide markup for the area with minimal filtering.'), + 'area' => [ + 'id' => 'text_custom', + ], + ]; + $data['views']['title'] = [ + 'title' => t('Title override'), + 'help' => t('Override the default view title for this view. This is useful to display an alternative title when a view is empty.'), + 'area' => [ + 'id' => 'title', + 'sub_type' => 'empty', + ], + ]; + $data['views']['view'] = [ + 'title' => t('View area'), + 'help' => t('Insert a view inside an area.'), + 'area' => [ + 'id' => 'view', + ], + ]; + $data['views']['result'] = [ + 'title' => t('Result summary'), + 'help' => t('Shows result summary, for example the items per page.'), + 'area' => [ + 'id' => 'result', + ], + ]; + $data['views']['messages'] = [ + 'title' => t('Messages'), + 'help' => t('Displays messages in an area.'), + 'area' => [ + 'id' => 'messages', + ], + ]; + $data['views']['http_status_code'] = [ + 'title' => t('Response status code'), + 'help' => t('Alter the HTTP response status code used by this view, mostly helpful for empty results.'), + 'area' => [ + 'id' => 'http_status_code', + ], + ]; + $data['views']['combine'] = [ + 'title' => t('Combine fields filter'), + 'help' => t('Combine multiple fields together and search by them.'), + 'filter' => [ + 'id' => 'combine', + ], + ]; + $data['views']['dropbutton'] = [ + 'title' => t('Dropbutton'), + 'help' => t('Display fields in a dropbutton.'), + 'field' => [ + 'id' => 'dropbutton', + ], + ]; + $data['views']['display_link'] = [ + 'title' => t('Link to display'), + 'help' => t('Displays a link to a path-based display of this view while keeping the filter criteria, sort criteria, pager settings and contextual filters.'), + 'area' => [ + 'id' => 'display_link', + ], + ]; + // Registers an entity area handler per entity type. + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { + // Excludes entity types, which cannot be rendered. + if ($entity_type->hasViewBuilderClass()) { + $label = $entity_type->getLabel(); + $data['views']['entity_' . $entity_type_id] = [ + 'title' => t('Rendered entity - @label', [ + '@label' => $label, + ]), + 'help' => t('Displays a rendered @label entity in an area.', [ + '@label' => $label, + ]), + 'area' => [ + 'entity_type' => $entity_type_id, + 'id' => 'entity', + ], + ]; + } + } + // Registers an action bulk form per entity. + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type => $entity_info) { + $actions = array_filter(\Drupal::entityTypeManager()->getStorage('action')->loadMultiple(), function (ActionConfigEntityInterface $action) use ($entity_type) { + return $action->getType() == $entity_type; + }); + if (empty($actions)) { + continue; + } + $data[$entity_info->getBaseTable()][$entity_type . '_bulk_form'] = [ + 'title' => t('Bulk update'), + 'help' => t('Allows users to apply an action to one or more items.'), + 'field' => [ + 'id' => 'bulk_form', + ], + ]; + } + // Registers views data for the entity itself. + foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { + if ($entity_type->hasHandlerClass('views_data')) { + /** @var \Drupal\views\EntityViewsDataInterface $views_data */ + $views_data = \Drupal::entityTypeManager()->getHandler($entity_type_id, 'views_data'); + $data = NestedArray::mergeDeep($data, $views_data->getViewsData()); + } + } + // Field modules can implement hook_field_views_data() to override the default + // behavior for adding fields. + $module_handler = \Drupal::moduleHandler(); + $entity_type_manager = \Drupal::entityTypeManager(); + if ($entity_type_manager->hasDefinition('field_storage_config')) { + /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ + foreach ($entity_type_manager->getStorage('field_storage_config')->loadMultiple() as $field_storage) { + if (_views_field_get_entity_type_storage($field_storage)) { + $provider = $field_storage->getTypeProvider(); + $result = (array) $module_handler->invoke($provider === 'core' ? 'views' : $provider, 'field_views_data', [$field_storage]); + if (empty($result)) { + $result = views_field_default_views_data($field_storage); + } + $module_handler->alter('field_views_data', $result, $field_storage); + if (is_array($result)) { + $data = NestedArray::mergeDeep($result, $data); + } + } + } + } + return $data; + } + + /** + * Implements hook_views_data_alter(). + * + * Field modules can implement hook_field_views_data_views_data_alter() to + * alter the views data on a per field basis. This is weirdly named so as + * not to conflict with the \Drupal::moduleHandler()->alter('field_views_data') + * in views_views_data(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $entity_type_manager = \Drupal::entityTypeManager(); + if (!$entity_type_manager->hasDefinition('field_storage_config')) { + return; + } + /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ + foreach ($entity_type_manager->getStorage('field_storage_config')->loadMultiple() as $field_storage) { + if (_views_field_get_entity_type_storage($field_storage)) { + \Drupal::moduleHandler()->invoke($field_storage->getTypeProvider(), 'field_views_data_views_data_alter', [&$data, $field_storage]); + } + } + } + + /** + * Implements hook_field_views_data(). + * + * The function implements the hook on behalf of 'core' because it adds a + * relationship and a reverse relationship to entity_reference field type, which + * is provided by core. This function also provides an argument plugin for + * entity_reference fields that handles title token replacement. + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + $data = views_field_default_views_data($field_storage); + // The code below only deals with the Entity reference field type. + if ($field_storage->getType() != 'entity_reference') { + return $data; + } + $entity_type_manager = \Drupal::entityTypeManager(); + $entity_type_id = $field_storage->getTargetEntityTypeId(); + /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ + $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); + foreach ($data as $table_name => $table_data) { + // Add a relationship to the target entity type. + $target_entity_type_id = $field_storage->getSetting('target_type'); + $target_entity_type = $entity_type_manager->getDefinition($target_entity_type_id); + $entity_type_id = $field_storage->getTargetEntityTypeId(); + $entity_type = $entity_type_manager->getDefinition($entity_type_id); + $target_base_table = $target_entity_type->getDataTable() ?: $target_entity_type->getBaseTable(); + $field_name = $field_storage->getName(); + if ($target_entity_type instanceof ContentEntityTypeInterface) { + // Provide a relationship for the entity type with the entity reference + // field. + $args = ['@label' => $target_entity_type->getLabel(), '@field_name' => $field_name]; + $data[$table_name][$field_name]['relationship'] = [ + 'title' => t('@label referenced from @field_name', $args), + 'label' => t('@field_name: @label', $args), + 'group' => $entity_type->getLabel(), + 'help' => t('Appears in: @bundles.', [ + '@bundles' => implode(', ', $field_storage->getBundles()), + ]), + 'id' => 'standard', + 'base' => $target_base_table, + 'entity type' => $target_entity_type_id, + 'base field' => $target_entity_type->getKey('id'), + 'relationship field' => $field_name . '_target_id', + ]; + // Provide a reverse relationship for the entity type that is referenced by + // the field. + $args['@entity'] = $entity_type->getLabel(); + $args['@label'] = $target_entity_type->getSingularLabel(); + $pseudo_field_name = 'reverse__' . $entity_type_id . '__' . $field_name; + $data[$target_base_table][$pseudo_field_name]['relationship'] = [ + 'title' => t('@entity using @field_name', $args), + 'label' => t('@field_name', [ + '@field_name' => $field_name, + ]), + 'group' => $target_entity_type->getLabel(), + 'help' => t('Relate each @entity with a @field_name set to the @label.', $args), + 'id' => 'entity_reverse', + 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), + 'entity_type' => $entity_type_id, + 'base field' => $entity_type->getKey('id'), + 'field_name' => $field_name, + 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), + 'field field' => $field_name . '_target_id', + 'join_extra' => [ + [ + 'field' => 'deleted', + 'value' => 0, + 'numeric' => TRUE, + ], + ], + ]; + } + // Provide an argument plugin that has a meaningful titleQuery() + // implementation getting the entity label. + $data[$table_name][$field_name . '_target_id']['argument']['id'] = 'entity_target_id'; + $data[$table_name][$field_name . '_target_id']['argument']['target_entity_type_id'] = $target_entity_type_id; + } + return $data; + } + +} diff --git a/core/modules/views/src/Plugin/Block/ViewsBlock.php b/core/modules/views/src/Plugin/Block/ViewsBlock.php index 8c4bd7542cf9a673d271872978443e9931f9cb5f..20350fa556267f707b45f822a35ecec6411a7e20 100644 --- a/core/modules/views/src/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/src/Plugin/Block/ViewsBlock.php @@ -60,8 +60,13 @@ public function build() { // #pre_render callback has already been applied. $output = View::preRenderViewElement($output); - // Override the label to the dynamic title configured in the view. - if (empty($this->configuration['views_label']) && $this->view->getTitle()) { + // Inject the overridden block title into the view. + if (!empty($this->configuration['views_label'])) { + $this->view->setTitle($this->configuration['views_label']); + } + + // Override the block title to match the view title. + if ($this->view->getTitle()) { $output['#title'] = ['#markup' => $this->view->getTitle(), '#allowed_tags' => Xss::getHtmlTagList()]; } diff --git a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php index 3cd675153413444a4ee966e02f996e8e271b644b..9064c86f1c99a4be53f703264e9ca1bd928854af 100644 --- a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php +++ b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php @@ -51,7 +51,7 @@ abstract class ViewsBlockBase extends BlockBase implements ContainerFactoryPlugi * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\views\ViewExecutableFactory $executable_factory diff --git a/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php b/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php index b907ff59fb622aed40e71b813f9154d63735854e..3f6b1c5695e4bad786f597071f0883d46145194c 100644 --- a/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php +++ b/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php @@ -72,7 +72,7 @@ class ViewsSelection extends SelectionPluginBase implements ContainerFactoryPlug * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/Menu/ViewsMenuLink.php b/core/modules/views/src/Plugin/Menu/ViewsMenuLink.php index 7ec581eb5aa4c10afa582091db70a1ec1751bb08..76dcd5594acfed0e998361772879e1bdf47fb4f4 100644 --- a/core/modules/views/src/Plugin/Menu/ViewsMenuLink.php +++ b/core/modules/views/src/Plugin/Menu/ViewsMenuLink.php @@ -55,7 +55,7 @@ class ViewsMenuLink extends MenuLinkBase implements ContainerFactoryPluginInterf * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index 00f0e18def02d25a7ac836e040d40daefe15c473..7f40d5ec2a94ebe5c4bace1be898cfd7791e573c 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -2,6 +2,7 @@ namespace Drupal\views\Plugin\views; +use Drupal\Component\Utility\FilterArray; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\UrlHelper; @@ -85,7 +86,7 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface { /** * Tracks whether the plugin is a handler. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public bool $is_handler; /** @@ -94,7 +95,7 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ @@ -333,6 +334,12 @@ public function usesGroupBy() { /** * Provide a form for aggregation settings. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildGroupByForm(&$form, FormStateInterface $form_state) { $display_id = $form_state->get('display_id'); @@ -360,6 +367,12 @@ public function buildGroupByForm(&$form, FormStateInterface $form_state) { * Perform any necessary changes to the form values prior to storage. * * There is no need for this function to actually store the data. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitGroupByForm(&$form, FormStateInterface $form_state) { $form_state->get('handler')->options['group_type'] = $form_state->getValue(['options', 'group_type']); @@ -382,11 +395,22 @@ public function defineExtraOptions(&$option) {} /** * Provide a form for setting options. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) {} /** * Validate the options form. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function validateExtraOptionsForm($form, FormStateInterface $form_state) {} @@ -394,6 +418,11 @@ public function validateExtraOptionsForm($form, FormStateInterface $form_state) * Perform any necessary changes to the form values prior to storage. * * There is no need for this function to actually store the data. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitExtraOptionsForm($form, FormStateInterface $form_state) {} @@ -416,26 +445,55 @@ public function exposedInfo() {} /** * Render our chunk of the exposed handler form when selecting. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildExposedForm(&$form, FormStateInterface $form_state) {} /** * Validate the exposed handler form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function validateExposed(&$form, FormStateInterface $form_state) {} /** * Submit the exposed handler form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitExposed(&$form, FormStateInterface $form_state) {} /** * Form for exposed handler options. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildExposeForm(&$form, FormStateInterface $form_state) {} /** * Validate the options form. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function validateExposeForm($form, FormStateInterface $form_state) {} @@ -443,16 +501,33 @@ public function validateExposeForm($form, FormStateInterface $form_state) {} * Perform any necessary changes to the form exposes prior to storage. * * There is no need for this function to actually store the data. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitExposeForm($form, FormStateInterface $form_state) {} /** * Shortcut to display the expose/hide button. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function showExposeButton(&$form, FormStateInterface $form_state) {} /** * Shortcut to display the exposed options form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function showExposeForm(&$form, FormStateInterface $form_state) { if (empty($this->options['exposed'])) { @@ -758,7 +833,7 @@ public static function breakString($str, $force_int = FALSE) { // Filter any empty matches (Like from '++' in a string) and reset the // array keys. 'strlen' is used as the filter callback so we do not lose // 0 values (would otherwise evaluate == FALSE). - $value = array_values(array_filter($value, 'strlen')); + $value = array_values(FilterArray::removeEmptyStrings($value)); if ($force_int) { $value = array_map('intval', $value); @@ -769,6 +844,11 @@ public static function breakString($str, $force_int = FALSE) { /** * Displays the Expose form. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function displayExposedForm($form, FormStateInterface $form_state) { $item = &$this->options; diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 0863bca03d27c2168010f1b247712d300f6531fd..0e9633c0cad03eda66c35e0b3e684ef2841a0e99 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -117,7 +117,7 @@ abstract class PluginBase extends ComponentPluginBase implements ContainerFactor * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ diff --git a/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php b/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php index 8a61d56548c3a99756f072784e7f24e9640fed82..cf060c0aa6c5510a6c2204951805442b6f577466 100644 --- a/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php +++ b/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php @@ -109,6 +109,11 @@ public function postExecute(&$values); /** * Shortcut to display the exposed options form. + * + * @param array $form + * The form array to alter, passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function showExposeForm(&$form, FormStateInterface $form_state); diff --git a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php index 4304be07d8dbfe0d01aa9268ad30daffb7dd9450..7caf2faab0bf3f55ccae605aa602e9219871f508 100644 --- a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php +++ b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php @@ -43,6 +43,12 @@ public function filterByDefinedOptions(array &$storage); /** * Validate the options form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function validateOptionsForm(&$form, FormStateInterface $form_state); @@ -82,6 +88,12 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$ /** * Handle any special handling on the validate form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitOptionsForm(&$form, FormStateInterface $form_state); diff --git a/core/modules/views/src/Plugin/views/area/Entity.php b/core/modules/views/src/Plugin/views/area/Entity.php index 84894c942c875ae666dbec220b85271086151e03..64117e8683446087a5d830e1a03eabee0750179a 100644 --- a/core/modules/views/src/Plugin/views/area/Entity.php +++ b/core/modules/views/src/Plugin/views/area/Entity.php @@ -53,7 +53,7 @@ class Entity extends TokenizeAreaPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/area/View.php b/core/modules/views/src/Plugin/views/area/View.php index e9956063d30def7f27d100be84fd3907ee40ffbf..1f1b28ebce6016065bf687ecbd150c097cd9a51c 100644 --- a/core/modules/views/src/Plugin/views/area/View.php +++ b/core/modules/views/src/Plugin/views/area/View.php @@ -36,7 +36,7 @@ class View extends AreaPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityStorageInterface $view_storage diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index fc14e355c5153026cfb048e7482c0c1448d06ddb..ab4f399f72b0e0efce06f3a082d759ec41ee53ae 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -63,13 +63,13 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend * The table to use for the name, should it not be in the same table as the argument. * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $name_table; /** * The name table alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $name_table_alias; /** @@ -80,37 +80,37 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $name_field; /** * The alias for the field. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $name_alias; /** * The base table alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $base_alias; /** * The alias count. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $count_alias; /** * Is argument validated. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public ?bool $argument_validated; /** * Is argument a default. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public bool $is_default; /** @@ -121,7 +121,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend /** * The title set by argument validation. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public ?string $validated_title; /** diff --git a/core/modules/views/src/Plugin/views/argument/Date.php b/core/modules/views/src/Plugin/views/argument/Date.php index 5285a8173f3fe6db33787bf1b9c385bfb54214df..c98371221f3d5bdd0bf0b228729f962e5f43211f 100644 --- a/core/modules/views/src/Plugin/views/argument/Date.php +++ b/core/modules/views/src/Plugin/views/argument/Date.php @@ -44,7 +44,7 @@ class Date extends Formula implements ContainerFactoryPluginInterface { */ protected $argFormat = 'Y-m-d'; - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $option_name = 'default_argument_date'; /** @@ -67,7 +67,7 @@ class Date extends Formula implements ContainerFactoryPluginInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match diff --git a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php index 6988c7b15dde50608a83c95f0428dd467acebeec..50e55c59bfc802fac21496bb19c1da4e043bcba3 100644 --- a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php @@ -40,7 +40,7 @@ abstract class ArgumentDefaultPluginBase extends PluginBase { /** * The option name. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $option_name; /** diff --git a/core/modules/views/src/Plugin/views/argument_default/Raw.php b/core/modules/views/src/Plugin/views/argument_default/Raw.php index 324da297970ef59f6ff4df752060e4182d23ff0a..1818f97d61b5b0b482a78b85e8242708976ce44a 100644 --- a/core/modules/views/src/Plugin/views/argument_default/Raw.php +++ b/core/modules/views/src/Plugin/views/argument_default/Raw.php @@ -43,7 +43,7 @@ class Raw extends ArgumentDefaultPluginBase implements CacheableDependencyInterf * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\path_alias\AliasManagerInterface $alias_manager diff --git a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php index 26ec3aadac8d363c77d80607f4662a416a298a72..80cd882e24a456ee4e963be46fdac3384ea99d8f 100644 --- a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php @@ -43,7 +43,7 @@ abstract class ArgumentValidatorPluginBase extends PluginBase { /** * The option name. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $option_name; /** diff --git a/core/modules/views/src/Plugin/views/argument_validator/Entity.php b/core/modules/views/src/Plugin/views/argument_validator/Entity.php index caea24cf510f567d202fc479a6098236fea5f17a..5719ac4d63f7ea97e44e465811bc78ed77ee70da 100644 --- a/core/modules/views/src/Plugin/views/argument_validator/Entity.php +++ b/core/modules/views/src/Plugin/views/argument_validator/Entity.php @@ -48,7 +48,7 @@ class Entity extends ArgumentValidatorPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/cache/Time.php b/core/modules/views/src/Plugin/views/cache/Time.php index 648c157bf48b78cf35c5b497cb77d3e7ff661ec0..043d283882545d1f01df435e4b84d88e7b02b19a 100644 --- a/core/modules/views/src/Plugin/views/cache/Time.php +++ b/core/modules/views/src/Plugin/views/cache/Time.php @@ -40,7 +40,7 @@ class Time extends CachePluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter diff --git a/core/modules/views/src/Plugin/views/display/Block.php b/core/modules/views/src/Plugin/views/display/Block.php index d297daa440cd27b879c70aca173081dfa3272983..6532990b8d3eaf87f6d1e2ee3994ee1c32306f30 100644 --- a/core/modules/views/src/Plugin/views/display/Block.php +++ b/core/modules/views/src/Plugin/views/display/Block.php @@ -60,7 +60,7 @@ class Block extends DisplayPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 95511c21561478b05c60891dc723311e6e68e7ba..d54d448b2ebb696c34e5a3216c80fd83bd1a8771 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -128,13 +128,13 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte /** * Keeps track whether the display uses exposed filters. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public bool $has_exposed; /** * The default display. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public DisplayPluginInterface $default_display; /** @@ -151,7 +151,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ @@ -2148,10 +2148,8 @@ protected function getMoreUrl() { $parts['fragment'] = $this->viewsTokenReplace($parts['fragment'], $tokens); // Handle query parameters where the key is part of an array. - // For example, f[0] for facets. - array_walk_recursive($parts['query'], function (&$value) use ($tokens) { - $value = $this->viewsTokenReplace($value, $tokens); - }); + // For example, f[0] for facets or field_name[id]=id for exposed filters. + $parts['query'] = $this->recursiveReplaceTokens($parts['query'], $tokens); $options = $parts; } @@ -2170,6 +2168,34 @@ protected function getMoreUrl() { return $url; } + /** + * Replace the query parameters recursively, both key and value. + * + * @param array $parts + * Query parts of the request. + * @param array $tokens + * Tokens for replacement. + * + * @return array + * The parameters with replacements done. + */ + protected function recursiveReplaceTokens(array $parts, array $tokens): array { + foreach ($parts as $key => $value) { + if (is_array($value)) { + $value = $this->recursiveReplaceTokens($value, $tokens); + } + else { + $value = $this->viewsTokenReplace($value, $tokens); + } + if (!is_int($key)) { + unset($parts[$key]); + $key = $this->viewsTokenReplace($key, $tokens); + } + $parts[$key] = $value; + } + return $parts; + } + /** * {@inheritdoc} */ diff --git a/core/modules/views/src/Plugin/views/display/EntityReference.php b/core/modules/views/src/Plugin/views/display/EntityReference.php index 577321ed0bfd6f374d98ccce1c827c010b69186d..177e478b19f9b7d8d2dcbc7b59a602f277ec12d9 100644 --- a/core/modules/views/src/Plugin/views/display/EntityReference.php +++ b/core/modules/views/src/Plugin/views/display/EntityReference.php @@ -53,7 +53,7 @@ class EntityReference extends DisplayPluginBase { /** * The id field alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $id_field_alias; /** @@ -62,7 +62,7 @@ class EntityReference extends DisplayPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $connection diff --git a/core/modules/views/src/Plugin/views/display/Feed.php b/core/modules/views/src/Plugin/views/display/Feed.php index 024458b45b609e0387278c07e8471af3dbc62a8c..e153656452cfef8185b5ae8f9a3ec74b3307332f 100644 --- a/core/modules/views/src/Plugin/views/display/Feed.php +++ b/core/modules/views/src/Plugin/views/display/Feed.php @@ -57,7 +57,7 @@ class Feed extends PathPluginBase implements ResponseDisplayPluginInterface { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 89b10ea0813494d1d53186098606328067398f7c..b4b7b76e3a7b549881ed3ab8d4cf3c36aa7c816d 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -65,7 +65,7 @@ class Page extends PathPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php index 984d740e57bc50df7415162a1adb56a77bc0c9fd..d784ca4788ab464639c2104bae45faaa254f2ddf 100644 --- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php @@ -44,7 +44,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider diff --git a/core/modules/views/src/Plugin/views/field/EntityField.php b/core/modules/views/src/Plugin/views/field/EntityField.php index 4c29b9a178e3a7f4f907daf68532bce85e68e2d7..82630b4b4eac964fe50d35e6430099cda635b13d 100644 --- a/core/modules/views/src/Plugin/views/field/EntityField.php +++ b/core/modules/views/src/Plugin/views/field/EntityField.php @@ -62,7 +62,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $limit_values; /** @@ -70,7 +70,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $base_table; /** @@ -139,7 +139,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac /** * The fields that we are actually grouping on. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public array $group_fields; /** @@ -148,7 +148,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/field/EntityLabel.php b/core/modules/views/src/Plugin/views/field/EntityLabel.php index be511de8eabd40e8f9f9cb22b81e95f2f90b6f77..707eb0efb0cc33468285d1cd3efb2a07a1985f20 100644 --- a/core/modules/views/src/Plugin/views/field/EntityLabel.php +++ b/core/modules/views/src/Plugin/views/field/EntityLabel.php @@ -38,7 +38,7 @@ class EntityLabel extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/field/EntityOperations.php b/core/modules/views/src/Plugin/views/field/EntityOperations.php index b397d477824e2eab697774eacd6d018b7a0146fb..4f05a990fce9a6b5afdc6d46eb6a19a32821c34d 100644 --- a/core/modules/views/src/Plugin/views/field/EntityOperations.php +++ b/core/modules/views/src/Plugin/views/field/EntityOperations.php @@ -57,7 +57,7 @@ class EntityOperations extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 09ee61b40f4ece26b1e00c34c1499744c1a345ed..4b0e4d57fd446550923a03487cc9b28f9d373c26 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -72,9 +72,11 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf const RENDER_TEXT_PHASE_EMPTY = 2; /** + * The alias for the field plugin. + * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $field_alias = 'unknown'; public $aliases = []; @@ -83,7 +85,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf * * @var mixed */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $original_value = NULL; /** @@ -93,7 +95,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $additional_fields = []; /** @@ -113,19 +115,19 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf /** * The last rendered value. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string|MarkupInterface|NULL $last_render; /** * The last rendered text. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string|MarkupInterface|NULL $last_render_text; /** * The last rendered tokens. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public array $last_tokens; /** diff --git a/core/modules/views/src/Plugin/views/field/LinkBase.php b/core/modules/views/src/Plugin/views/field/LinkBase.php index 7bfb7e6ce2865a22d885a32eefbb989d0918bdf4..13615e9c21b60deca9338ec3cadfca0e378e15a9 100644 --- a/core/modules/views/src/Plugin/views/field/LinkBase.php +++ b/core/modules/views/src/Plugin/views/field/LinkBase.php @@ -64,7 +64,7 @@ abstract class LinkBase extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Access\AccessManagerInterface $access_manager diff --git a/core/modules/views/src/Plugin/views/field/Links.php b/core/modules/views/src/Plugin/views/field/Links.php index 9e2fbb7bdcac8e4819be1d27e7c93ed19e6d48a9..ad28e4a83ad1e0a2eda5f5f1c2f8357524c158ff 100644 --- a/core/modules/views/src/Plugin/views/field/Links.php +++ b/core/modules/views/src/Plugin/views/field/Links.php @@ -21,7 +21,7 @@ abstract class Links extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RedirectDestinationInterface $redirectDestination diff --git a/core/modules/views/src/Plugin/views/field/RenderedEntity.php b/core/modules/views/src/Plugin/views/field/RenderedEntity.php index e880dcb8f969bbccdb245c5a9bab55b539dcb741..cad1a157e314a2ddaf952abfc7c3c8f4fb32a3b9 100644 --- a/core/modules/views/src/Plugin/views/field/RenderedEntity.php +++ b/core/modules/views/src/Plugin/views/field/RenderedEntity.php @@ -58,7 +58,7 @@ class RenderedEntity extends FieldPluginBase implements CacheableDependencyInter * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/field/TimeInterval.php b/core/modules/views/src/Plugin/views/field/TimeInterval.php index eda7576973571cb21cb98f2353adba5ed2d08918..ccf66c12fe71888ddc3908d7f73765fa17da95d1 100644 --- a/core/modules/views/src/Plugin/views/field/TimeInterval.php +++ b/core/modules/views/src/Plugin/views/field/TimeInterval.php @@ -29,7 +29,7 @@ class TimeInterval extends FieldPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter diff --git a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php index 5b60df09c0fb18050081bdd13805071f4679fb1c..fd7ffd683b5411b5cd3c746b520c7c377fb8d6f9 100644 --- a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php +++ b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php @@ -52,13 +52,13 @@ class BooleanOperator extends FilterPluginBase implements FilterOperatorsInterfa * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $accept_null = FALSE; /** * The value title. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $value_value; /** diff --git a/core/modules/views/src/Plugin/views/filter/Bundle.php b/core/modules/views/src/Plugin/views/filter/Bundle.php index ca00305cd66eb1881b5aa813155651331f99e968..94b389eb4bc880ffef25cb28aea4efa119c9d8db 100644 --- a/core/modules/views/src/Plugin/views/filter/Bundle.php +++ b/core/modules/views/src/Plugin/views/filter/Bundle.php @@ -48,7 +48,7 @@ class Bundle extends InOperator { /** * The bundle key. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $real_field; /** @@ -57,7 +57,7 @@ class Bundle extends InOperator { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index f817f88fb137a5d00e095de7e452cd50ced3adf1..21c4a81a725997bedf2d441318cda7be0be31a17 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -85,7 +85,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $group_info = NULL; /** @@ -100,7 +100,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $no_operator = FALSE; /** @@ -108,7 +108,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $always_required = FALSE; /** @@ -242,6 +242,12 @@ public function isAGroup() { * If overridden, it is best to call through to the parent, * or to at least make sure all of the functions in this form * are called. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); @@ -283,6 +289,12 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { /** * Simple validate handler. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function validateOptionsForm(&$form, FormStateInterface $form_state) { $this->operatorValidate($form, $form_state); @@ -297,6 +309,12 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) { /** * Simple submit handler. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function submitOptionsForm(&$form, FormStateInterface $form_state) { // Do not store these values. @@ -330,6 +348,12 @@ public function showOperatorForm(&$form, FormStateInterface $form_state) { * This may be overridden by child classes, and it must * define $form['operator']; * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. + * * @see buildOptionsForm() */ protected function operatorForm(&$form, FormStateInterface $form_state) { @@ -355,6 +379,11 @@ public function operatorOptions() { /** * Validate the operator form. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function operatorValidate($form, FormStateInterface $form_state) {} @@ -362,11 +391,22 @@ protected function operatorValidate($form, FormStateInterface $form_state) {} * Perform any necessary changes to the form values prior to storage. * * There is no need for this function to actually store the data. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function operatorSubmit($form, FormStateInterface $form_state) {} /** * Shortcut to display the value form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function showValueForm(&$form, FormStateInterface $form_state) { $this->valueForm($form, $form_state); @@ -382,6 +422,12 @@ protected function showValueForm(&$form, FormStateInterface $form_state) { * This should be overridden by all child classes and it must * define $form['value'] * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. + * * @see buildOptionsForm() */ protected function valueForm(&$form, FormStateInterface $form_state) { @@ -390,6 +436,11 @@ protected function valueForm(&$form, FormStateInterface $form_state) { /** * Validate the options form. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function valueValidate($form, FormStateInterface $form_state) {} @@ -397,11 +448,22 @@ protected function valueValidate($form, FormStateInterface $form_state) {} * Perform any necessary changes to the form values prior to storage. * * There is no need for this function to actually store the data. + * + * @param array $form + * Associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function valueSubmit($form, FormStateInterface $form_state) {} /** * Shortcut to display the exposed options form. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function showBuildGroupForm(&$form, FormStateInterface $form_state) { if (empty($this->options['is_grouped'])) { @@ -425,6 +487,12 @@ public function showBuildGroupForm(&$form, FormStateInterface $form_state) { /** * Shortcut to display the build_group/hide button. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function showBuildGroupButton(&$form, FormStateInterface $form_state) { @@ -502,6 +570,12 @@ public function buildGroupForm($form, FormStateInterface $form_state) { /** * Shortcut to display the expose/hide button. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function showExposeButton(&$form, FormStateInterface $form_state) { $form['expose_button'] = [ @@ -552,6 +626,12 @@ public function showExposeButton(&$form, FormStateInterface $form_state) { /** * Options form subform for exposed filter options. * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. + * * @see buildOptionsForm() */ public function buildExposeForm(&$form, FormStateInterface $form_state) { @@ -945,6 +1025,12 @@ public function groupForm(&$form, FormStateInterface $form_state) { * Render our chunk of the exposed filter form when selecting. * * You can override this if it doesn't do what you expect. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ public function buildExposedForm(&$form, FormStateInterface $form_state) { if (empty($this->options['exposed'])) { @@ -1041,6 +1127,12 @@ protected function buildValueWrapper(&$form, $wrapper_identifier) { * Build the form to let users create the group of exposed filters. * * This form is displayed when users click on button 'Build group'. + * + * @param array $form + * An alterable, associative array containing the structure of the form, + * passed by reference. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. */ protected function buildExposedFiltersGroupForm(&$form, FormStateInterface $form_state) { if (empty($this->options['exposed']) || empty($this->options['is_grouped'])) { diff --git a/core/modules/views/src/Plugin/views/filter/LanguageFilter.php b/core/modules/views/src/Plugin/views/filter/LanguageFilter.php index d05e8e0fa059db0a3f06d9908c08216cf2f197d0..ea75139b11870e10b4134f5f732002b2bc5570a5 100644 --- a/core/modules/views/src/Plugin/views/filter/LanguageFilter.php +++ b/core/modules/views/src/Plugin/views/filter/LanguageFilter.php @@ -31,7 +31,7 @@ class LanguageFilter extends InOperator implements ContainerFactoryPluginInterfa * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager diff --git a/core/modules/views/src/Plugin/views/filter/LatestRevision.php b/core/modules/views/src/Plugin/views/filter/LatestRevision.php index 8c1fc00d7927ff75b76ba01f9b864194952b8d0f..90a6d202697f65687bf1d0b1ff69d71c33fb7797 100644 --- a/core/modules/views/src/Plugin/views/filter/LatestRevision.php +++ b/core/modules/views/src/Plugin/views/filter/LatestRevision.php @@ -37,7 +37,7 @@ class LatestRevision extends FilterPluginBase implements ContainerFactoryPluginI * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php b/core/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php index a283644b8a8ca7c5c9baccec5ce74fbbc62548d3..9afc64e929ead7ff49cc304922cc511b47fcf23d 100644 --- a/core/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php +++ b/core/modules/views/src/Plugin/views/filter/LatestTranslationAffectedRevision.php @@ -37,7 +37,7 @@ class LatestTranslationAffectedRevision extends FilterPluginBase implements Cont * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index f20bfee37615bb1b8bcdb3b56446779cbb2da418..fb6c55cb4413aa5e0321b0a2b3b1e4e6cbb858c7 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -42,7 +42,7 @@ class StringFilter extends FilterPluginBase implements FilterOperatorsInterface * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $connection diff --git a/core/modules/views/src/Plugin/views/join/Subquery.php b/core/modules/views/src/Plugin/views/join/Subquery.php index 474036b2c85d54cffcc910a61d69b1ce214819f9..d6f48ee8147ddd78f99cfe47239c3349358d6a3b 100644 --- a/core/modules/views/src/Plugin/views/join/Subquery.php +++ b/core/modules/views/src/Plugin/views/join/Subquery.php @@ -24,7 +24,7 @@ class Subquery extends JoinPluginBase { /** * The left join query. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $left_query; /** diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php index b2cb87a6b8b573208e827e137401ff0c5213c55e..4d368a6a77170dfc82f69795ad7529767d217160 100644 --- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php @@ -27,10 +27,16 @@ */ abstract class PagerPluginBase extends PluginBase { - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + /** + * The current page. + */ + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $current_page = NULL; - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + /** + * The total number of lines. + */ + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $total_items = 0; /** diff --git a/core/modules/views/src/Plugin/views/pager/SqlBase.php b/core/modules/views/src/Plugin/views/pager/SqlBase.php index 062998a579a7c0e6a4fc74934a0bbea14058a344..5804ba275586a6884924de328ed43bd4429ce24a 100644 --- a/core/modules/views/src/Plugin/views/pager/SqlBase.php +++ b/core/modules/views/src/Plugin/views/pager/SqlBase.php @@ -35,7 +35,7 @@ abstract class SqlBase extends PagerPluginBase implements CacheableDependencyInt * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Pager\PagerManagerInterface $pager_manager diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 7e5d216b148484e7bbc02820e11b746df0ab2727..9ca4b8e127996fef925d7154238379f8a68305a4 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -161,7 +161,7 @@ class Sql extends QueryPluginBase { /** * The count field definition. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public array $count_field; /** @@ -170,7 +170,7 @@ class Sql extends QueryPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php index 5f5f95d4b106f779a8431545c2b487362e7acb8d..ce3f08b54370c1b8cc8ca4c23868454841ec0e22 100644 --- a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php +++ b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php @@ -23,7 +23,7 @@ class EntityReverse extends RelationshipPluginBase { /** * The alias for the left table. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $first_alias; /** @@ -32,7 +32,7 @@ class EntityReverse extends RelationshipPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\views\Plugin\ViewsHandlerManager $join_manager diff --git a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php index 1347de51a7ccba052ae5598591009701463a007b..40af0a77a41b39c1962274fb9b7460ba7f8d7a8c 100644 --- a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php +++ b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php @@ -64,7 +64,7 @@ class GroupwiseMax extends RelationshipPluginBase { /** * The namespace of the subquery. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $subquery_namespace; /** diff --git a/core/modules/views/src/Plugin/views/row/EntityRow.php b/core/modules/views/src/Plugin/views/row/EntityRow.php index 3305ec2fe0462f88d17364eb9c5729344ebab02c..eba9d3fc0a39254f76fdddf6d105e5a1b118b335 100644 --- a/core/modules/views/src/Plugin/views/row/EntityRow.php +++ b/core/modules/views/src/Plugin/views/row/EntityRow.php @@ -29,7 +29,7 @@ class EntityRow extends RowPluginBase { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $base_table; /** @@ -80,7 +80,7 @@ class EntityRow extends RowPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/row/RowPluginBase.php b/core/modules/views/src/Plugin/views/row/RowPluginBase.php index 53e6ec663e0c15c6def9805778052c420f40a22c..a055b5ee70f8604615628bcf7dc56f6c858ffe9b 100644 --- a/core/modules/views/src/Plugin/views/row/RowPluginBase.php +++ b/core/modules/views/src/Plugin/views/row/RowPluginBase.php @@ -52,13 +52,13 @@ abstract class RowPluginBase extends PluginBase { /** * The actual field used. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $base_field; /** * The field alias. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string $field_alias; /** diff --git a/core/modules/views/src/Plugin/views/row/RssPluginBase.php b/core/modules/views/src/Plugin/views/row/RssPluginBase.php index 59d26b8074577b1b31a9a26d75ec58c301d9900c..3de7d7af3a7be389a7e0277ed1c9d49458759549 100644 --- a/core/modules/views/src/Plugin/views/row/RssPluginBase.php +++ b/core/modules/views/src/Plugin/views/row/RssPluginBase.php @@ -32,7 +32,7 @@ abstract class RssPluginBase extends RowPluginBase { * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager diff --git a/core/modules/views/src/Plugin/views/style/Rss.php b/core/modules/views/src/Plugin/views/style/Rss.php index 4e9c21bafff95a4426a451b0602cc4498f640fd6..206739403c44f75a21f4a4af5f7273dfefd841ab 100644 --- a/core/modules/views/src/Plugin/views/style/Rss.php +++ b/core/modules/views/src/Plugin/views/style/Rss.php @@ -29,7 +29,7 @@ class Rss extends StylePluginBase { /** * The channel elements. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public array $channel_elements; /** diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index d73136e7811460b574c54ba786da3d5643405f76..75791cd794540aa0161d68a5ea99faa2d80ea1dc 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -90,7 +90,7 @@ abstract class StylePluginBase extends PluginBase { * * @var array|null */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $rendered_fields; /** @@ -117,7 +117,7 @@ abstract class StylePluginBase extends PluginBase { * * @var string[] */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public array $render_tokens = []; /** diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php index b18e1b3e10193e0986f85bd2ca25c270c87fe8c6..f625dc6cb8709b08c10036c707a4036c991e3f4e 100644 --- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -42,7 +42,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $base_table; /** @@ -67,7 +67,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $validated_views = []; /** @@ -106,7 +106,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $filter_defaults = [ 'id' => NULL, 'expose' => ['operator' => FALSE], diff --git a/core/modules/views/src/ResultRow.php b/core/modules/views/src/ResultRow.php index 144531573587503446558acea1bdbea5c0633adb..8929ba4c5346fa450fd5232d20898cbc8e1d9c66 100644 --- a/core/modules/views/src/ResultRow.php +++ b/core/modules/views/src/ResultRow.php @@ -13,7 +13,7 @@ class ResultRow { * * @var \Drupal\Core\Entity\EntityInterface */ - // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $_entity = NULL; /** @@ -21,7 +21,7 @@ class ResultRow { * * @var \Drupal\Core\Entity\EntityInterface[] */ - // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $_relationship_entities = []; /** diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 16c0821e2159812cf1c76abc0c46a5f679e0a2ad..fc40f6a32e09285fcd1cf5df4236cef09691a8e3 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -67,7 +67,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $build_info = []; /** @@ -80,13 +80,13 @@ class ViewExecutable { /** * The plugin name. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public ?string $plugin_name; /** * The build execution time. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public string|float $build_time; /** @@ -105,7 +105,7 @@ class ViewExecutable { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $current_page = NULL; /** @@ -113,7 +113,7 @@ class ViewExecutable { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $items_per_page = NULL; /** @@ -121,7 +121,7 @@ class ViewExecutable { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $offset = NULL; /** @@ -129,7 +129,7 @@ class ViewExecutable { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $total_rows = NULL; /** @@ -137,7 +137,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $attachment_before = []; /** @@ -145,7 +145,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $attachment_after = []; /** @@ -153,7 +153,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $feedIcons = []; // Exposed widget input @@ -163,7 +163,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $exposed_data = []; /** @@ -171,7 +171,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected $exposed_input = []; /** @@ -179,7 +179,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $exposed_raw_input = []; /** @@ -187,7 +187,7 @@ class ViewExecutable { * * @var \Drupal\views\ViewExecutable[] */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $old_view = []; /** @@ -195,7 +195,7 @@ class ViewExecutable { * * @var \Drupal\views\ViewExecutable[] */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $parent_views = []; /** @@ -203,7 +203,7 @@ class ViewExecutable { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $is_attachment = NULL; /** @@ -211,7 +211,7 @@ class ViewExecutable { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $current_display; /** @@ -226,7 +226,7 @@ class ViewExecutable { * * @var \Drupal\views\Plugin\views\pager\PagerPluginBase */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $pager = NULL; /** @@ -234,7 +234,7 @@ class ViewExecutable { * * @var \Drupal\views\Plugin\views\display\DisplayPluginBase */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $display_handler; /** @@ -252,7 +252,7 @@ class ViewExecutable { * * @var \Drupal\views\Plugin\views\style\StylePluginBase */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $style_plugin; /** @@ -267,7 +267,7 @@ class ViewExecutable { * * @var int */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $row_index; /** @@ -275,7 +275,7 @@ class ViewExecutable { * * @var \Drupal\Core\Url */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $override_url; @@ -284,7 +284,7 @@ class ViewExecutable { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $override_path = NULL; /** @@ -292,7 +292,7 @@ class ViewExecutable { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $base_database = NULL; // Handlers which are active on this view. @@ -386,7 +386,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $exposed_widgets; /** @@ -403,7 +403,7 @@ class ViewExecutable { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $get_total_rows; /** @@ -413,7 +413,7 @@ class ViewExecutable { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $build_sort; /** @@ -421,7 +421,7 @@ class ViewExecutable { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $many_to_one_tables; /** @@ -429,7 +429,7 @@ class ViewExecutable { * * @var string */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $dom_id; /** diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php index 1d443d4093d72e2efb858c8939aed706822a015d..930162697874bcc43201e069c9690fb9cfdca827 100644 --- a/core/modules/views/src/Views.php +++ b/core/modules/views/src/Views.php @@ -127,7 +127,7 @@ public static function getView($id) { } /** - * Fetches a list of all base tables available. + * Fetches a list of plugin names for a given type. * * @param string $type * Either 'display', 'style' or 'row'. @@ -138,7 +138,8 @@ public static function getView($id) { * An array of possible base tables. * * @return array - * A keyed array of in the form of 'base_table' => 'Description'. + * A sorted associative array of in the form 'plugin_id' => 'Plugin title'. + * If no plugins are found, an empty array is returned. */ public static function fetchPluginNames($type, $key = NULL, array $base = []) { $definitions = static::pluginManager($type)->getDefinitions(); diff --git a/core/modules/views/tests/modules/views_config_entity_test/src/Entity/ViewsConfigEntityTest.php b/core/modules/views/tests/modules/views_config_entity_test/src/Entity/ViewsConfigEntityTest.php index 42f74a3ba58f14c14974d3bf142b0c4333b9db3a..fc2560359a754f1a5821963988959c4bbc4e01f4 100644 --- a/core/modules/views/tests/modules/views_config_entity_test/src/Entity/ViewsConfigEntityTest.php +++ b/core/modules/views/tests/modules/views_config_entity_test/src/Entity/ViewsConfigEntityTest.php @@ -4,29 +4,32 @@ namespace Drupal\views_config_entity_test\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\EntityListBuilder; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\views_config_entity_test\ViewsConfigEntityTestViewsData; /** * Defines a configuration-based entity type used for testing Views data. - * - * @ConfigEntityType( - * id = "views_config_entity_test", - * label = @Translation("Test config entity type with Views data"), - * handlers = { - * "list_builder" = "Drupal\Core\Entity\EntityListBuilder", - * "views_data" = "Drupal\views_config_entity_test\ViewsConfigEntityTestViewsData" - * }, - * admin_permission = "administer modules", - * config_prefix = "type", - * entity_keys = { - * "id" = "id", - * "label" = "name" - * }, - * config_export = { - * "id", - * "label", - * } - * ) */ +#[ConfigEntityType( + id: 'views_config_entity_test', + label: new TranslatableMarkup('Test config entity type with Views data'), + config_prefix: 'type', + entity_keys: [ + 'id' => 'id', + 'label' => 'name', + ], + handlers: [ + 'list_builder' => EntityListBuilder::class, + 'views_data' => ViewsConfigEntityTestViewsData::class, + ], + admin_permission: 'administer modules', + config_export: [ + 'id', + 'label', + ], +)] class ViewsConfigEntityTest extends ConfigEntityBase { } diff --git a/core/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php b/core/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..27c861c8a910410da197438399021ea99e83d440 --- /dev/null +++ b/core/modules/views/tests/modules/views_entity_test/src/Hook/ViewsEntityTestHooks.php @@ -0,0 +1,67 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_entity_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_entity_test. + */ +class ViewsEntityTestHooks { + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + if ($entity_type->id() == 'entity_test') { + $definitions['test_text_access'] = BaseFieldDefinition::create('string')->setLabel(t('Test access'))->setTranslatable(FALSE)->setSetting('max_length', 64)->setDisplayOptions('form', ['type' => 'string_textfield', 'weight' => 10]); + return $definitions; + } + } + + /** + * Implements hook_entity_field_access(). + * + * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() + */ + #[Hook('entity_field_access')] + public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { + if ($field_definition->getName() == 'test_text_access') { + if ($items) { + if ($items->value == 'no access value') { + return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); + } + } + } + // No opinion. + return AccessResult::neutral(); + } + + /** + * Implements hook_entity_load(). + * + * @see \Drupal\Tests\views\Kernel\Handler\FieldFieldTest::testSimpleExecute() + */ + #[Hook('entity_load')] + public function entityLoad(array $entities, $entity_type_id) { + if ($entity_type_id === 'entity_test') { + // Cast the value of an entity field to be something else than a string so + // we can check that + // \Drupal\views\Tests\ViewResultAssertionTrait::assertIdenticalResultsetHelper() + // takes care of converting all field values to strings. + foreach ($entities as $entity) { + $entity->user_id->target_id = (int) $entity->user_id->target_id; + } + } + } + +} diff --git a/core/modules/views/tests/modules/views_entity_test/views_entity_test.module b/core/modules/views/tests/modules/views_entity_test/views_entity_test.module deleted file mode 100644 index 60e410b99ebc3a0f1d37428f32b511e0b71ba298..0000000000000000000000000000000000000000 --- a/core/modules/views/tests/modules/views_entity_test/views_entity_test.module +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * @file - * Contains main module functionality. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Field\BaseFieldDefinition; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_entity_bundle_field_info(). - */ -function views_entity_test_entity_base_field_info(EntityTypeInterface $entity_type) { - if ($entity_type->id() == 'entity_test') { - $definitions['test_text_access'] = BaseFieldDefinition::create('string') - ->setLabel(t('Test access')) - ->setTranslatable(FALSE) - ->setSetting('max_length', 64) - ->setDisplayOptions('form', [ - 'type' => 'string_textfield', - 'weight' => 10, - ]); - return $definitions; - } -} - -/** - * Implements hook_entity_field_access(). - * - * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess() - */ -function views_entity_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) { - if ($field_definition->getName() == 'test_text_access') { - if ($items) { - if ($items->value == 'no access value') { - return AccessResult::forbidden()->addCacheableDependency($items->getEntity()); - } - } - } - // No opinion. - return AccessResult::neutral(); -} - -/** - * Implements hook_entity_load(). - * - * @see \Drupal\Tests\views\Kernel\Handler\FieldFieldTest::testSimpleExecute() - */ -function views_entity_test_entity_load(array $entities, $entity_type_id) { - if ($entity_type_id === 'entity_test') { - // Cast the value of an entity field to be something else than a string so - // we can check that - // \Drupal\views\Tests\ViewResultAssertionTrait::assertIdenticalResultsetHelper() - // takes care of converting all field values to strings. - foreach ($entities as $entity) { - $entity->user_id->target_id = (int) $entity->user_id->target_id; - } - } -} diff --git a/core/modules/views/tests/modules/views_form_test/src/Hook/ViewsFormTestHooks.php b/core/modules/views/tests/modules/views_form_test/src/Hook/ViewsFormTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..5a15d7f85163cc10ce4a7a95289c6586bc095849 --- /dev/null +++ b/core/modules/views/tests/modules/views_form_test/src/Hook/ViewsFormTestHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_form_test\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_form_test. + */ +class ViewsFormTestHooks { + + /** + * Implements hook_form_BASE_FORM_ID_alter(). + */ + #[Hook('form_views_form_media_media_page_list_alter')] + public function formViewsFormMediaMediaPageListAlter(&$form, FormStateInterface $form_state, $form_id) : void { + $state = \Drupal::state(); + $count = $state->get('hook_form_BASE_FORM_ID_alter_count', 0); + $state->set('hook_form_BASE_FORM_ID_alter_count', $count + 1); + } + +} diff --git a/core/modules/views/tests/modules/views_form_test/views_form_test.module b/core/modules/views/tests/modules/views_form_test/views_form_test.module deleted file mode 100644 index 820466ba6e9a585615d9b87723e6e47844ada78e..0000000000000000000000000000000000000000 --- a/core/modules/views/tests/modules/views_form_test/views_form_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Hook implementations for this module. - */ - -declare(strict_types=1); - -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_form_BASE_FORM_ID_alter(). - */ -function views_form_test_form_views_form_media_media_page_list_alter(&$form, FormStateInterface $form_state, $form_id) { - $state = \Drupal::state(); - $count = $state->get('hook_form_BASE_FORM_ID_alter_count', 0); - $state->set('hook_form_BASE_FORM_ID_alter_count', $count + 1); -} diff --git a/core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php b/core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php index 849c50bc8dfd70e9b5205831b47b3268e7dbbe40..111707645538df6e93f3d09b07376024311b70a3 100644 --- a/core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php +++ b/core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php @@ -37,7 +37,7 @@ class CacheableMetadataCalculationTest extends AccessPluginBase implements Cache * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id - * The plugin_id for the plugin instance. + * The plugin ID for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\State\StateInterface $state diff --git a/core/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php b/core/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..ae21dd62c260b12260dbf298cb7746610d0a6fa1 --- /dev/null +++ b/core/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php @@ -0,0 +1,91 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_config\Hook; + +use Drupal\views\Plugin\views\cache\CachePluginBase; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_config. + */ +class ViewsTestConfigHooks { + + /** + * Implements hook_ENTITY_TYPE_load(). + */ + #[Hook('view_load')] + public function viewLoad(array $views) { + // Emulate a severely broken view: this kind of view configuration cannot be + // saved, it can likely be returned only by a corrupt active configuration. + $broken_view_id = \Drupal::state()->get('views_test_config.broken_view'); + if (isset($views[$broken_view_id])) { + $display =& $views[$broken_view_id]->getDisplay('default'); + $display['display_options']['fields']['id_broken'] = NULL; + } + } + + /** + * Implements hook_views_post_render(). + */ + #[Hook('views_post_render')] + public function viewsPostRender(ViewExecutable $view, &$output, CachePluginBase $cache) { + if (\Drupal::state()->get('views_test_config.views_post_render_cache_tag')) { + \Drupal::state()->set('views_test_config.views_post_render_called', TRUE); + // Set a cache key on output to ensure ViewsSelection::stripAdminAndAnchorTagsFromResults + // correctly handles elements that aren't result rows. + $output['#cache']['tags'][] = 'foo'; + } + } + + /** + * Implements hook_views_plugins_area_alter(). + */ + #[Hook('views_plugins_area_alter')] + public function viewsPluginsAreaAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'area'); + } + + /** + * Implements hook_views_plugins_argument_alter(). + */ + #[Hook('views_plugins_argument_alter')] + public function viewsPluginsArgumentAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'argument'); + } + + /** + * Implements hook_views_plugins_field_alter(). + */ + #[Hook('views_plugins_field_alter')] + public function viewsPluginsFieldAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'field'); + } + + /** + * Implements hook_views_plugins_filter_alter(). + */ + #[Hook('views_plugins_filter_alter')] + public function viewsPluginsFilterAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'filter'); + } + + /** + * Implements hook_views_plugins_relationship_alter(). + */ + #[Hook('views_plugins_relationship_alter')] + public function viewsPluginsRelationshipAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'relationship'); + } + + /** + * Implements hook_views_plugins_sort_alter(). + */ + #[Hook('views_plugins_sort_alter')] + public function viewsPluginsSortAlter(array &$definitions) : void { + _views_test_config_disable_broken_handler($definitions, 'sort'); + } + +} diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_multivalue_basefield.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_multivalue_basefield.yml index 3fb24ce48a43e2eaf050c967748269d7b7d06500..c9a3150010a15b6727f2dd7eea96e06b99340672 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_multivalue_basefield.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_multivalue_basefield.yml @@ -1,3 +1,4 @@ +# cspell:ignore basefield langcode: en status: true dependencies: diff --git a/core/modules/views/tests/modules/views_test_config/views_test_config.module b/core/modules/views/tests/modules/views_test_config/views_test_config.module index 8618e6cd3e1fc4eeafffc23d7b6b490e77eaa743..71a25f9b017ac0b5a4e5bf3be40541efe32a03de 100644 --- a/core/modules/views/tests/modules/views_test_config/views_test_config.module +++ b/core/modules/views/tests/modules/views_test_config/views_test_config.module @@ -7,60 +7,8 @@ declare(strict_types=1); -use Drupal\views\Plugin\views\cache\CachePluginBase; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_ENTITY_TYPE_load(). - */ -function views_test_config_view_load(array $views) { - // Emulate a severely broken view: this kind of view configuration cannot be - // saved, it can likely be returned only by a corrupt active configuration. - $broken_view_id = \Drupal::state()->get('views_test_config.broken_view'); - if (isset($views[$broken_view_id])) { - $display =& $views[$broken_view_id]->getDisplay('default'); - $display['display_options']['fields']['id_broken'] = NULL; - } -} - -/** - * Implements hook_views_post_render(). - */ -function views_test_config_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) { - if (\Drupal::state()->get('views_test_config.views_post_render_cache_tag')) { - \Drupal::state()->set('views_test_config.views_post_render_called', TRUE); - // Set a cache key on output to ensure ViewsSelection::stripAdminAndAnchorTagsFromResults - // correctly handles elements that aren't result rows. - $output['#cache']['tags'][] = 'foo'; - } -} - function _views_test_config_disable_broken_handler(array &$definitions, string $handler_type): void { if (in_array($handler_type, \Drupal::state()->get('views_test_config_disable_broken_handler', []))) { unset($definitions['broken']); } } - -function views_test_config_views_plugins_area_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'area'); -} - -function views_test_config_views_plugins_argument_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'argument'); -} - -function views_test_config_views_plugins_field_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'field'); -} - -function views_test_config_views_plugins_filter_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'filter'); -} - -function views_test_config_views_plugins_relationship_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'relationship'); -} - -function views_test_config_views_plugins_sort_alter(array &$definitions): void { - _views_test_config_disable_broken_handler($definitions, 'sort'); -} diff --git a/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataHooks.php b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..14be3dfaf4f331b4dedea2c7fcafd6f07abc41ce --- /dev/null +++ b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataHooks.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_data\Hook; + +use Drupal\views\ViewEntityInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_data. + */ +class ViewsTestDataHooks { + + /** + * Implements hook_form_BASE_FORM_ID_alter(). + */ + #[Hook('form_views_form_test_form_multiple_default_alter')] + public function formViewsFormTestFormMultipleDefaultAlter(&$form, FormStateInterface $form_state, $form_id) : void { + \Drupal::messenger()->addStatus(t('Test base form ID with Views forms and arguments.')); + } + + /** + * Implements hook_ENTITY_TYPE_update() for the 'view' entity type. + */ + #[Hook('view_update')] + public function viewUpdate(ViewEntityInterface $view) { + // Use state to keep track of how many times a file is saved. + $view_save_count = \Drupal::state()->get('views_test_data.view_save_count', []); + $view_save_count[$view->id()] = isset($view_save_count[$view->id()]) ? $view_save_count[$view->id()] + 1 : 1; + \Drupal::state()->set('views_test_data.view_save_count', $view_save_count); + } + +} diff --git a/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..624bb6b21e269559634fd8b3132eaa4ce0d0741c --- /dev/null +++ b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php @@ -0,0 +1,146 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_data\Hook; + +use Drupal\views\Plugin\views\cache\CachePluginBase; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_data. + */ +class ViewsTestDataViewsExecutionHooks { + + /** + * Implements hook_views_query_substitutions(). + */ + #[Hook('views_query_substitutions')] + public function viewsQuerySubstitutions(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_query_substitutions', TRUE); + } + + /** + * Implements hook_views_form_substitutions(). + */ + #[Hook('views_form_substitutions')] + public function viewsFormSubstitutions() { + \Drupal::state()->set('views_hook_test_views_form_substitutions', TRUE); + $render = ['#markup' => '<em>unescaped</em>']; + return [ + '<!--will-be-escaped-->' => '<em>escaped</em>', + '<!--will-be-not-escaped-->' => \Drupal::service('renderer')->renderInIsolation($render), + ]; + } + + /** + * Implements hook_field_views_data(). + */ + #[Hook('field_views_data')] + public function fieldViewsData(FieldStorageConfigInterface $field_storage) { + \Drupal::state()->set('views_hook_test_field_views_data', TRUE); + } + + /** + * Implements hook_field_views_data_alter(). + */ + #[Hook('field_views_data_alter')] + public function fieldViewsDataAlter(&$data, FieldStorageConfigInterface $field_storage, $module) { + \Drupal::state()->set('views_hook_test_field_views_data_alter', TRUE); + } + + /** + * Implements hook_views_pre_render(). + * + * @see \Drupal\views\Tests\Plugin\CacheTest + * @see \Drupal\views\Tests\Plugin\RenderTest + */ + #[Hook('views_pre_render')] + public function viewsPreRender(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_pre_render', TRUE); + if (isset($view) && $view->storage->id() == 'test_cache_header_storage') { + $view->element['#attached']['library'][] = 'views_test_data/test'; + $view->element['#attached']['drupalSettings']['foo'] = 'bar'; + $view->element['#attached']['placeholders']['non-existing-placeholder-just-for-testing-purposes']['#lazy_builder'] = [ + 'Drupal\views_test_data\Controller\ViewsTestDataController::placeholderLazyBuilder', + [ + 'bar', + ], + ]; + $view->element['#cache']['tags'][] = 'views_test_data:1'; + $view->build_info['pre_render_called'] = TRUE; + } + } + + /** + * Implements hook_views_post_render(). + */ + #[Hook('views_post_render')] + public function viewsPostRender(ViewExecutable $view, &$output, CachePluginBase $cache) { + \Drupal::state()->set('views_hook_test_views_post_render', TRUE); + if ($view->storage->id() === 'test_page_display' && $view->current_display === 'empty_row') { + for ($i = 0; $i < 5; $i++) { + $output['#rows'][0]['#rows'][] = []; + } + } + } + + /** + * Implements hook_views_pre_build(). + */ + #[Hook('views_pre_build')] + public function viewsPreBuild(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_pre_build', TRUE); + } + + /** + * Implements hook_views_post_build(). + */ + #[Hook('views_post_build')] + public function viewsPostBuild(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_post_build', TRUE); + if (isset($view) && $view->storage->id() == 'test_page_display') { + if ($view->current_display == 'page_1') { + $view->build_info['denied'] = TRUE; + } + elseif ($view->current_display == 'page_2') { + $view->build_info['fail'] = TRUE; + } + } + } + + /** + * Implements hook_views_pre_view(). + */ + #[Hook('views_pre_view')] + public function viewsPreView(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_pre_view', TRUE); + } + + /** + * Implements hook_views_pre_execute(). + */ + #[Hook('views_pre_execute')] + public function viewsPreExecute(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_pre_execute', TRUE); + } + + /** + * Implements hook_views_post_execute(). + */ + #[Hook('views_post_execute')] + public function viewsPostExecute(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_post_execute', TRUE); + } + + /** + * Implements hook_views_query_alter(). + */ + #[Hook('views_query_alter')] + public function viewsQueryAlter(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_query_alter', TRUE); + } + +} diff --git a/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a795434a6fc84f656a45c0708649b480e77a07a1 --- /dev/null +++ b/core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php @@ -0,0 +1,64 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_data\Hook; + +use Drupal\views\Analyzer; +use Drupal\views\ViewExecutable; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_data. + */ +class ViewsTestDataViewsHooks { + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + $state = \Drupal::service('state'); + $state->set('views_hook_test_views_data', TRUE); + // We use a state variable to keep track of how many times this function is + // called so we can assert that calls to + // \Drupal\views\ViewsData::delete() trigger a rebuild of views data. + if (!($count = $state->get('views_test_data_views_data_count'))) { + $count = 0; + } + $count++; + $state->set('views_test_data_views_data_count', $count); + return $state->get('views_test_data_views_data', []); + } + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(array &$data) { + \Drupal::state()->set('views_hook_test_views_data_alter', TRUE); + \Drupal::state()->set('views_hook_test_views_data_alter_data', $data); + } + + /** + * Implements hook_views_analyze(). + */ + #[Hook('views_analyze')] + public function viewsAnalyze(ViewExecutable $view) { + \Drupal::state()->set('views_hook_test_views_analyze', TRUE); + $ret = []; + $ret[] = Analyzer::formatMessage(t('Test ok message'), 'ok'); + $ret[] = Analyzer::formatMessage(t('Test warning message'), 'warning'); + $ret[] = Analyzer::formatMessage(t('Test error message'), 'error'); + return $ret; + } + + /** + * Implements hook_views_invalidate_cache(). + */ + #[Hook('views_invalidate_cache')] + public function viewsInvalidateCache() { + \Drupal::state()->set('views_hook_test_views_invalidate_cache', TRUE); + } + +} diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php index 23440e562a85c1145fcd4ccd8848b7f2b74c96bf..a2376affe88a2c165ce536e8ddb51ed154e1e432 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php @@ -151,7 +151,8 @@ public function calculateDependencies() { */ public function validate() { $errors = parent::validate(); - foreach ($this->view->displayHandlers as $display_handler) { + $displayHandlersCount = count($this->view->displayHandlers); + for ($i = 0; $i < $displayHandlersCount; $i++) { $errors[] = 'error'; } return $errors; diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.install b/core/modules/views/tests/modules/views_test_data/views_test_data.install index 0b2df3e2511086f8789b183089d1a06e0f803107..97535ef92ecba61d783f41a5b3debd8cdba2e3d5 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.install +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.install @@ -17,7 +17,7 @@ function views_test_data_schema() { /** * Implements hook_install(). */ -function views_test_data_install() { +function views_test_data_install(): void { // Add the marquee tag to possible html elements to test the field handler. $values = [ 'div' => 'DIV', diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.module b/core/modules/views/tests/modules/views_test_data/views_test_data.module index 558a475eacc170aa082d71d408a6602157d041b1..3d49926c628c3e747156b80c9d42436e2047f69d 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.module +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.module @@ -7,9 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Form\FormStateInterface; -use Drupal\views\ViewEntityInterface; - /** * Access callback for the generic handler test. * @@ -113,20 +110,3 @@ function template_preprocess_views_view_mapping_test(&$variables) { } } } - -/** - * Implements hook_form_BASE_FORM_ID_alter(). - */ -function views_test_data_form_views_form_test_form_multiple_default_alter(&$form, FormStateInterface $form_state, $form_id) { - \Drupal::messenger()->addStatus(t('Test base form ID with Views forms and arguments.')); -} - -/** - * Implements hook_ENTITY_TYPE_update() for the 'view' entity type. - */ -function views_test_data_view_update(ViewEntityInterface $view) { - // Use state to keep track of how many times a file is saved. - $view_save_count = \Drupal::state()->get('views_test_data.view_save_count', []); - $view_save_count[$view->id()] = isset($view_save_count[$view->id()]) ? $view_save_count[$view->id()] + 1 : 1; - \Drupal::state()->set('views_test_data.view_save_count', $view_save_count); -} diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.views.inc b/core/modules/views/tests/modules/views_test_data/views_test_data.views.inc deleted file mode 100644 index 2c704f7f7a50a1373bae2e813f5e7080769070bd..0000000000000000000000000000000000000000 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.views.inc +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/** - * @file - * Provides views data and hooks for views_test_data module. - */ - -declare(strict_types=1); - -use Drupal\views\ViewExecutable; -use Drupal\views\Analyzer; - -/** - * Implements hook_views_data(). - */ -function views_test_data_views_data() { - $state = \Drupal::service('state'); - $state->set('views_hook_test_views_data', TRUE); - // We use a state variable to keep track of how many times this function is - // called so we can assert that calls to - // \Drupal\views\ViewsData::delete() trigger a rebuild of views data. - if (!($count = $state->get('views_test_data_views_data_count'))) { - $count = 0; - } - $count++; - $state->set('views_test_data_views_data_count', $count); - - return $state->get('views_test_data_views_data', []); -} - -/** - * Implements hook_views_data_alter(). - */ -function views_test_data_views_data_alter(array &$data) { - \Drupal::state()->set('views_hook_test_views_data_alter', TRUE); - \Drupal::state()->set('views_hook_test_views_data_alter_data', $data); -} - -/** - * Implements hook_views_analyze(). - */ -function views_test_data_views_analyze(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_analyze', TRUE); - - $ret = []; - - $ret[] = Analyzer::formatMessage(t('Test ok message'), 'ok'); - $ret[] = Analyzer::formatMessage(t('Test warning message'), 'warning'); - $ret[] = Analyzer::formatMessage(t('Test error message'), 'error'); - - return $ret; -} - -/** - * Implements hook_views_invalidate_cache(). - */ -function views_test_data_views_invalidate_cache() { - \Drupal::state()->set('views_hook_test_views_invalidate_cache', TRUE); -} diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc b/core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc deleted file mode 100644 index 380a853eaa48946c08a0f20dc8c61c406490aa75..0000000000000000000000000000000000000000 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -/** - * @file - * Provides views data and hooks for views_test_data module. - */ - -declare(strict_types=1); - -use Drupal\field\FieldStorageConfigInterface; -use Drupal\views\Plugin\views\cache\CachePluginBase; -use Drupal\views\ViewExecutable; - -/** - * Implements hook_views_query_substitutions(). - */ -function views_test_data_views_query_substitutions(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_query_substitutions', TRUE); -} - -/** - * Implements hook_views_form_substitutions(). - */ -function views_test_data_views_form_substitutions() { - \Drupal::state()->set('views_hook_test_views_form_substitutions', TRUE); - $render = ['#markup' => '<em>unescaped</em>']; - return [ - '<!--will-be-escaped-->' => '<em>escaped</em>', - '<!--will-be-not-escaped-->' => \Drupal::service('renderer')->renderInIsolation($render), - ]; -} - -/** - * Implements hook_field_views_data(). - */ -function views_test_data_field_views_data(FieldStorageConfigInterface $field_storage) { - \Drupal::state()->set('views_hook_test_field_views_data', TRUE); -} - -/** - * Implements hook_field_views_data_alter(). - */ -function views_test_data_field_views_data_alter(&$data, FieldStorageConfigInterface $field_storage, $module) { - \Drupal::state()->set('views_hook_test_field_views_data_alter', TRUE); -} - -/** - * Implements hook_views_pre_render(). - * - * @see \Drupal\views\Tests\Plugin\CacheTest - * @see \Drupal\views\Tests\Plugin\RenderTest - */ -function views_test_data_views_pre_render(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_pre_render', TRUE); - - if (isset($view) && ($view->storage->id() == 'test_cache_header_storage')) { - $view->element['#attached']['library'][] = 'views_test_data/test'; - $view->element['#attached']['drupalSettings']['foo'] = 'bar'; - $view->element['#attached']['placeholders']['non-existing-placeholder-just-for-testing-purposes']['#lazy_builder'] = ['Drupal\views_test_data\Controller\ViewsTestDataController::placeholderLazyBuilder', ['bar']]; - $view->element['#cache']['tags'][] = 'views_test_data:1'; - $view->build_info['pre_render_called'] = TRUE; - } - -} - -/** - * Implements hook_views_post_render(). - */ -function views_test_data_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) { - \Drupal::state()->set('views_hook_test_views_post_render', TRUE); - if ($view->storage->id() === 'test_page_display' && $view->current_display === 'empty_row') { - for ($i = 0; $i < 5; $i++) { - $output['#rows'][0]['#rows'][] = []; - } - } -} - -/** - * Implements hook_views_pre_build(). - */ -function views_test_data_views_pre_build(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_pre_build', TRUE); -} - -/** - * Implements hook_views_post_build(). - */ -function views_test_data_views_post_build(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_post_build', TRUE); - - if (isset($view) && ($view->storage->id() == 'test_page_display')) { - if ($view->current_display == 'page_1') { - $view->build_info['denied'] = TRUE; - } - elseif ($view->current_display == 'page_2') { - $view->build_info['fail'] = TRUE; - } - } -} - -/** - * Implements hook_views_pre_view(). - */ -function views_test_data_views_pre_view(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_pre_view', TRUE); -} - -/** - * Implements hook_views_pre_execute(). - */ -function views_test_data_views_pre_execute(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_pre_execute', TRUE); -} - -/** - * Implements hook_views_post_execute(). - */ -function views_test_data_views_post_execute(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_post_execute', TRUE); -} - -/** - * Implements hook_views_query_alter(). - */ -function views_test_data_views_query_alter(ViewExecutable $view) { - \Drupal::state()->set('views_hook_test_views_query_alter', TRUE); -} diff --git a/core/modules/views/tests/modules/views_test_entity_reference/src/Hook/ViewsTestEntityReferenceHooks.php b/core/modules/views/tests/modules/views_test_entity_reference/src/Hook/ViewsTestEntityReferenceHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..8add41eef5a4887e21f1838652efd68fc586e2d3 --- /dev/null +++ b/core/modules/views/tests/modules/views_test_entity_reference/src/Hook/ViewsTestEntityReferenceHooks.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_entity_reference\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_entity_reference. + */ +class ViewsTestEntityReferenceHooks { + + /** + * Implements hook_views_data_alter(). + */ + #[Hook('views_data_alter')] + public function viewsDataAlter(&$data) { + $manager = \Drupal::entityTypeManager(); + $field_config_storage = $manager->getStorage('field_config'); + /** @var \Drupal\field\FieldConfigInterface[] $field_configs */ + $field_configs = $field_config_storage->loadByProperties(['field_type' => 'entity_reference']); + foreach ($field_configs as $field_config) { + $table_name = $field_config->getTargetEntityTypeId() . '__' . $field_config->getName(); + $column_name = $field_config->getName() . '_target_id'; + if (isset($data[$table_name][$column_name]['filter']['id']) && in_array($data[$table_name][$column_name]['filter']['id'], ['numeric', 'string'])) { + $data[$table_name][$column_name]['filter']['id'] = 'entity_reference'; + } + } + } + +} diff --git a/core/modules/views/tests/modules/views_test_entity_reference/views_test_entity_reference.module b/core/modules/views/tests/modules/views_test_entity_reference/views_test_entity_reference.module deleted file mode 100644 index a4075cf4ab6c82c7e361904ff21fe919aa896705..0000000000000000000000000000000000000000 --- a/core/modules/views/tests/modules/views_test_entity_reference/views_test_entity_reference.module +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * Views data altering to test use of the entity reference plugin. - */ - -declare(strict_types=1); - -/** - * Implements hook_views_data_alter(). - */ -function views_test_entity_reference_views_data_alter(&$data) { - $manager = \Drupal::entityTypeManager(); - $field_config_storage = $manager->getStorage('field_config'); - /** @var \Drupal\field\FieldConfigInterface[] $field_configs */ - $field_configs = $field_config_storage->loadByProperties([ - 'field_type' => 'entity_reference', - ]); - foreach ($field_configs as $field_config) { - $table_name = $field_config->getTargetEntityTypeId() . '__' . $field_config->getName(); - $column_name = $field_config->getName() . '_target_id'; - if ( - isset($data[$table_name][$column_name]['filter']['id']) - && in_array($data[$table_name][$column_name]['filter']['id'], ['numeric', 'string']) - ) { - $data[$table_name][$column_name]['filter']['id'] = 'entity_reference'; - } - } -} diff --git a/core/modules/views/tests/modules/views_test_query_access/src/Hook/ViewsTestQueryAccessHooks.php b/core/modules/views/tests/modules/views_test_query_access/src/Hook/ViewsTestQueryAccessHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..14f298de4b3501d0b5ab7c9356f101125db3b5f2 --- /dev/null +++ b/core/modules/views/tests/modules/views_test_query_access/src/Hook/ViewsTestQueryAccessHooks.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_test_query_access\Hook; + +use Drupal\Core\Database\Query\AlterableInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_test_query_access. + */ +class ViewsTestQueryAccessHooks { + + /** + * Implements hook_query_TAG_alter() for the 'media_access' query tag. + */ + #[Hook('query_media_access_alter')] + public function queryMediaAccessAlter(AlterableInterface $query) { + _views_test_query_access_restrict_by_uuid($query); + } + + /** + * Implements hook_query_TAG_alter() for the 'block_content_access' query tag. + */ + #[Hook('query_block_content_access_alter')] + public function queryBlockContentAccessAlter(AlterableInterface $query) { + _views_test_query_access_restrict_by_uuid($query); + } + +} diff --git a/core/modules/views/tests/modules/views_test_query_access/views_test_query_access.module b/core/modules/views/tests/modules/views_test_query_access/views_test_query_access.module index 47c77c4cfd578cf64e8c857e57a5618d40168cec..ab1a1c11fe94a6a0885719ce4d786ae909d179a2 100644 --- a/core/modules/views/tests/modules/views_test_query_access/views_test_query_access.module +++ b/core/modules/views/tests/modules/views_test_query_access/views_test_query_access.module @@ -12,20 +12,6 @@ use Drupal\Core\Entity\Sql\SqlEntityStorageInterface; use Drupal\Core\Entity\Sql\DefaultTableMapping; -/** - * Implements hook_query_TAG_alter() for the 'media_access' query tag. - */ -function views_test_query_access_query_media_access_alter(AlterableInterface $query) { - _views_test_query_access_restrict_by_uuid($query); -} - -/** - * Implements hook_query_TAG_alter() for the 'block_content_access' query tag. - */ -function views_test_query_access_query_block_content_access_alter(AlterableInterface $query) { - _views_test_query_access_restrict_by_uuid($query); -} - /** * Excludes entities with the 'hidden-ENTITY_TYPE_ID' UUID from a query. * diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php index 6cdc4d67393d6c69806de04768148f9982001aeb..5cb8d0cd51e33d88be13dc0d0aced07a0de2619b 100644 --- a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php @@ -108,7 +108,7 @@ public function testDateFilter(): void { /** * Tests the general offset functionality. */ - protected function _testOffset() { + protected function _testOffset(): void { $view = Views::getView('test_filter_date_between'); // Test offset for simple operator. @@ -139,7 +139,7 @@ protected function _testOffset() { /** * Tests the filter operator between/not between. */ - protected function _testBetween() { + protected function _testBetween(): void { $view = Views::getView('test_filter_date_between'); // Test between with min and max. @@ -195,7 +195,7 @@ protected function _testBetween() { /** * Make sure the validation callbacks works. */ - protected function _testUiValidation() { + protected function _testUiValidation(): void { $this->drupalLogin($this->drupalCreateUser([ 'administer views', @@ -215,7 +215,7 @@ protected function _testUiValidation() { /** * Tests date filter UI. */ - protected function _testFilterDateUI() { + protected function _testFilterDateUI(): void { $this->drupalLogin($this->drupalCreateUser(['administer views'])); $this->drupalGet('admin/structure/views/nojs/handler/test_filter_date_between/default/filter/created'); $this->submitForm([], 'Expose filter'); @@ -306,7 +306,7 @@ protected function _testFilterDateUI() { /** * Tests datetime grouped filter UI. */ - protected function _testFilterDatetimeUI() { + protected function _testFilterDatetimeUI(): void { $this->drupalLogin($this->drupalCreateUser(['administer views'])); $this->drupalGet('admin/structure/views/nojs/add-handler/test_filter_date_between/default/filter'); $this->submitForm([ diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php index 5feef69641b89d2bbb8d16dc5f60cec4703db73f..bc15241bb86fb4a7ad43015ebd6118cb9256adf7 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php @@ -140,7 +140,7 @@ public function testFeedFieldOutput(): void { * @param \Drupal\node\Entity\Node $node * The node entity that's been created. */ - protected function checkFeedResults($link_style, Node $node) { + protected function checkFeedResults($link_style, Node $node): void { /** @var \Drupal\Core\Language\LanguageManagerInterface $languageManager */ $language_manager = \Drupal::languageManager()->reset(); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index c56c73b65677b7c8c8213397382dd5f8d76000cb..b8d7726b05d3a162eb6c153b6e79c64988030938 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php @@ -300,6 +300,14 @@ public function testReadMoreCustomURL(): void { $output = (string) $renderer->renderRoot($output); $this->assertStringContainsString('/node/22?date=22&foo=bar', $output, 'The read more link with href "/node/22?date=22&foo=bar" was found.'); + // Test more link with array arguments in path. + $view->display_handler->setOption('link_url', 'node/{{ raw_arguments.age }}?date[{{ raw_arguments.age }}]={{ raw_arguments.age }}&foo=bar'); + $view->setArguments([22]); + $this->executeView($view); + $output = $view->preview(); + $output = (string) $renderer->renderRoot($output); + $this->assertStringContainsString('/node/22?date%5B22%5D=22&foo=bar', $output, 'The read more link with href "/node/22?date[22]=22&foo=bar" was found.'); + // Test more link with arguments in fragment. $view->display_handler->setOption('link_url', 'node?date={{ raw_arguments.age }}&foo=bar#{{ raw_arguments.age }}'); $view->setArguments([22]); @@ -455,7 +463,7 @@ public function testTranslationSetting(): void { * Whether the node based view should be expected to support translation * settings. */ - protected function checkTranslationSetting($expected_node_translatability = FALSE) { + protected function checkTranslationSetting($expected_node_translatability = FALSE): void { $not_supported_text = 'The view is not based on a translatable entity type or the site is not multilingual.'; $supported_text = 'All content that supports translations will be displayed in the selected language.'; diff --git a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php index 4af556d14f107cbc8e556562a30165d1f186f5ee..fff20aa1c206a7d4b630c45e52383787038e6335 100644 --- a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\views\Functional\Plugin; +use Drupal\Core\Entity\EntityInterface; use Drupal\Component\Gettext\PoHeader; use Drupal\Component\Gettext\PoItem; use Drupal\file\Entity\File; @@ -151,7 +152,7 @@ public function testNumericFormatPlural(): void { * @return \Drupal\Core\Entity\EntityInterface * A file entity. */ - protected function createFile() { + protected function createFile(): EntityInterface { // Create a new file entity. $file = File::create([ 'uid' => 1, diff --git a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php index 9c3d45a467e28dfbfbb8b84cbbca39badf15bc54..f74019779600a4687eddb80de7688d82f773b7b9 100644 --- a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php +++ b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php @@ -26,7 +26,7 @@ class ViewsEscapingTest extends ViewTestBase { /** * {@inheritdoc} * - * We need theme_test for testing against test_basetheme and test_subtheme. + * We need theme_test for testing against test_base_theme and test_subtheme. * * @var array * diff --git a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php index 0111f34e936cab5b6dcd6d36c5ffe2067a2220b3..bca85f6d955e35ba8b2fa10fca07ce59e3ee9377 100644 --- a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php +++ b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php @@ -7,7 +7,7 @@ /** * Tests the Views theme integration. * - * We test against test_basetheme and test_subtheme provided by theme_test + * We test against test_base_theme and test_subtheme provided by theme_test * * @group views */ @@ -29,7 +29,7 @@ class ViewsThemeIntegrationTest extends ViewTestBase { /** * {@inheritdoc} * - * We need theme_test for testing against test_basetheme and test_subtheme. + * We need theme_test for testing against test_base_theme and test_subtheme. * * @var array * @@ -51,19 +51,19 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf */ public function testThemedViewPage(): void { - \Drupal::service('theme_installer')->install(['test_basetheme', 'test_subtheme']); + \Drupal::service('theme_installer')->install(['test_base_theme', 'test_subtheme']); // Make base theme default then test for hook invocations. $this->config('system.theme') - ->set('default', 'test_basetheme') + ->set('default', 'test_base_theme') ->save(); - $this->assertEquals('test_basetheme', $this->config('system.theme')->get('default')); + $this->assertEquals('test_base_theme', $this->config('system.theme')->get('default')); // Make sure a views rendered page is touched. $this->drupalGet('test_page_display_200'); - $this->assertSession()->responseContains("test_basetheme_views_pre_render"); - $this->assertSession()->responseContains("test_basetheme_views_post_render"); + $this->assertSession()->responseContains("test_base_theme_views_pre_render"); + $this->assertSession()->responseContains("test_base_theme_views_post_render"); // Make sub theme default to test for hook invocation // from both sub and base theme. @@ -78,8 +78,8 @@ public function testThemedViewPage(): void { $this->assertSession()->responseContains("test_subtheme_views_pre_render"); $this->assertSession()->responseContains("test_subtheme_views_post_render"); - $this->assertSession()->responseContains("test_basetheme_views_pre_render"); - $this->assertSession()->responseContains("test_basetheme_views_post_render"); + $this->assertSession()->responseContains("test_base_theme_views_pre_render"); + $this->assertSession()->responseContains("test_base_theme_views_post_render"); // Verify that the views group title is added. $this->assertSession()->responseContains('<em class="placeholder">' . count($this->dataSet()) . '</em> items found.'); diff --git a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php index 76e37c0cd5d5756fe4a9ee0edef1c1d824bd9a5b..dc5a7de6b9c0b0f6e1907b37ab07e0d0168976b7 100644 --- a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php @@ -51,7 +51,7 @@ public function testPager(): void { * @param bool $pager * A boolean for whether the View created should use a pager. */ - protected function createViewAtPath($path, $pager = TRUE) { + protected function createViewAtPath($path, $pager = TRUE): void { $view = []; $view['label'] = $this->randomMachineName(16); $view['id'] = $this->randomMachineName(16); diff --git a/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php b/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php index ed28481f551b956cd8f2318779c1b6365d20f69c..a44976bb1563e48e485795f253d40f079eb5e25c 100644 --- a/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php +++ b/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php @@ -108,7 +108,7 @@ protected function assertCacheableMetadataHasBeenCalculated(bool $expected_resul /** * Resets the state so we are ready for a new test. */ - protected function resetState() { + protected function resetState(): void { $this->state->set('views_test_cacheable_metadata_has_been_accessed', FALSE); } diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php index 1d123bf94c396195c16dfe7a1a4f1700fccb5d4e..b65f135d93d5f3a83e3827f4bde67b89d267d633 100644 --- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php @@ -147,7 +147,7 @@ protected function setUp(): void { * @param \Drupal\Core\Field\BaseFieldDefinition[] $base_fields * An array of base field definitions */ - protected function setUpEntityType(EntityTypeInterface $definition, array $base_fields = []) { + protected function setUpEntityType(EntityTypeInterface $definition, array $base_fields = []): void { // Replace the cache backend in the entity type manager so it returns // our test entity type in addition to the existing ones. $definitions = $this->entityTypeManager->getDefinitions(); @@ -852,7 +852,7 @@ class ViewsTestEntity extends ContentEntityBase { * The array of base field definitions to mock. These are added to the * defaults ones from the parent class. */ - public static function setMockedBaseFieldDefinitions(string $entity_type_id, array $definitions) { + public static function setMockedBaseFieldDefinitions(string $entity_type_id, array $definitions): void { static::$mockedBaseFieldDefinitions[$entity_type_id] = $definitions; } diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBaseFieldTest.php similarity index 81% rename from core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php rename to core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBaseFieldTest.php index 30e001a85c53346ccc516eaac4f8d4644f066d78..de43c56a62b8459f1393e277ca431c29db5f67d4 100644 --- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBaseFieldTest.php @@ -4,16 +4,18 @@ namespace Drupal\Tests\views\Kernel\Entity; -use Drupal\entity_test\Entity\EntityTestMultiValueBasefield; +use Drupal\entity_test\Entity\EntityTestMultiValueBaseField; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; use Drupal\views\Views; +// cspell:ignore basefield + /** * Tests entity views with multivalue base fields. * * @group views */ -class EntityViewsWithMultivalueBasefieldTest extends ViewsKernelTestBase { +class EntityViewsWithMultivalueBaseFieldTest extends ViewsKernelTestBase { /** * {@inheritdoc} @@ -38,10 +40,10 @@ protected function setUp($import_test_views = TRUE): void { * Tests entity views with multivalue base fields. */ public function testView(): void { - EntityTestMultiValueBasefield::create([ + EntityTestMultiValueBaseField::create([ 'name' => 'test', ])->save(); - EntityTestMultiValueBasefield::create([ + EntityTestMultiValueBaseField::create([ 'name' => ['test2', 'test3'], ])->save(); diff --git a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php index b9b30d308c87fe1a48207b1eeefd9bc8b57d8724..32c0c16e966fc505cae53e2490f3f1a2f4633fbd 100644 --- a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php @@ -210,7 +210,7 @@ public function testRevisionBaseTable(): void { * associated with language keys appropriate for the translation of that * node. */ - protected function checkLanguageRenderers($display, $values) { + protected function checkLanguageRenderers($display, $values): void { $expected = [ $values[0]['en'], $values[0]['en'], @@ -294,7 +294,7 @@ protected function checkLanguageRenderers($display, $values) { * associated with language keys appropriate for the translation of that * node. */ - protected function checkLanguageRenderersRelationship($display, $values) { + protected function checkLanguageRenderersRelationship($display, $values): void { $expected = [ $values[1]['en'], $values[1]['en'], diff --git a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php index e0ea1b9a55cb5a462f8c7ade8a56783432cf1be7..ba1a191f45e53c7234b45208fa490cccf8083f9d 100644 --- a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php +++ b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php @@ -267,7 +267,6 @@ public function testEntityFieldFilter(): void { 'field_name_3' => 'field name 3: es', ]); $node1->save(); - /** @var \Drupal\node\NodeInterface $translation */ $node1->addTranslation('fr', [ 'title' => $node1->title->value, 'field_name_1' => 'field name 1: fr', diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php index 1f1866d8b13c999d71fa782186664119b80fefc6..f53032e9a3065132b7cdde484e0db96bab5f4419 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php @@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE): void { /** * {@inheritdoc} */ - protected function setUpFixtures() { + protected function setUpFixtures(): void { // Install the themes used for this test. $this->container->get('theme_installer')->install(['olivero']); $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'olivero')->save(); @@ -119,7 +119,7 @@ public function testEntityArea(): void { * @param \Drupal\Core\Entity\EntityInterface[] $entities * The entities. */ - public function doTestRender($entities) { + public function doTestRender($entities): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $view = Views::getView('test_entity_area'); @@ -188,7 +188,7 @@ public function doTestRender($entities) { /** * Tests the calculation of the rendered dependencies. */ - public function doTestCalculateDependencies() { + public function doTestCalculateDependencies(): void { $view = View::load('test_entity_area'); $dependencies = $view->calculateDependencies()->getDependencies(); diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php index feadd4453c470491dc2a55fd2a616d3d22ac7826..1f4c6d5cb1a8249f7373fc08b7ae7b7298fd2c4e 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php @@ -33,7 +33,7 @@ class AreaOrderTest extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUpFixtures() { + protected function setUpFixtures(): void { // Install the themes used for this test. $this->container->get('theme_installer')->install(['olivero']); diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php index a05c1d923cc95dddc0921606e3c463894c64c55e..089c37c90288f35e598d8ba5d0ba116f190dfe75 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php @@ -15,6 +15,9 @@ */ class AreaTextTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'user', 'filter']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTokenTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTokenTest.php index 04fce742be685a81d654c5b70794ef621d646025..0ac5617897d6346d641d360ff1dfcd470b971cd4 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTokenTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTokenTest.php @@ -15,6 +15,9 @@ */ class AreaTextTokenTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system', 'user', 'filter']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php index 74a4df42c0881bcf3119f698be709b26c4fe7a03..1f87dfc544244930ebe9c8bac650e8ddc2d48d37 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php @@ -137,7 +137,7 @@ public function testDropbuttonMarkupShouldNotLeakBetweenRows(): void { // Render each row and field in turn - the dropbutton plugin relies on // output being set in previous versions. - foreach ($view->result as $index => $row) { + foreach ($view->result as $row) { foreach (array_keys($view->field) as $field) { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $row, $field) { return $view->field[$field]->advancedRender($row); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php index 387a9a4a5db3ad7a013003c1743c5d4d4c59cfb2..55d1c4da290e0b2a595bcc22db27a76251c9218f 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php @@ -42,7 +42,7 @@ class FieldEntityLinkTest extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUpFixtures() { + protected function setUpFixtures(): void { parent::setUpFixtures(); // Create the anonymous user account and set it as current user. @@ -85,7 +85,7 @@ public function testEntityLink(): void { * @param bool[] $expected_results * An associative array of expected results keyed by link template name. */ - protected function doTestEntityLink(AccountInterface $account, $expected_results) { + protected function doTestEntityLink(AccountInterface $account, $expected_results): void { \Drupal::currentUser()->setAccount($account); $view = Views::getView('test_entity_test_link'); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php index 351c1de1b729a529d20f464ed5a90a0e60f9af88..423b01625c614e0e4762f7b59534d01c15442440 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php @@ -17,6 +17,9 @@ */ class FieldKernelTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['user']; /** @@ -395,7 +398,7 @@ public function testEmpty(): void { * This tests alters the result to get easier and less coupled results. It is * important that assertSame() is used in this test since in PHP 0 == ''. */ - public function _testHideIfEmpty() { + public function _testHideIfEmpty(): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = \Drupal::service('renderer'); @@ -676,7 +679,7 @@ public function _testHideIfEmpty() { /** * Tests the usage of the empty text. */ - public function _testEmptyText() { + public function _testEmptyText(): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = \Drupal::service('renderer'); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php index f1aa263e8b23bd12c588f4efbfb8be739d40d427..f21b3f11924e5d0aca471be7bb7cd9fcf3255383 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php @@ -44,7 +44,7 @@ class FieldRenderedEntityTest extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUpFixtures() { + protected function setUpFixtures(): void { $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); $this->installConfig(['entity_test']); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php index ee5255d2fe678f58d8178a646e58a13b8a779059..71437e6e7e0fb77b50ed44a13b86e22bafd9e165 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php @@ -16,6 +16,9 @@ */ class FieldUrlTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php index 94c6db047baee1793086841482bbf746cea53df0..a2ba005a0bdbd93eaab4b197535936e0c78078f6 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php @@ -14,6 +14,9 @@ */ class FilterEqualityTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php index 9676a2c65cfb1bd652479aeeaea8bb952863af75..e16e6f2cff878de353de66df9c20c0578a8065a5 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php @@ -19,6 +19,9 @@ class FilterInOperatorTest extends ViewsKernelTestBase { use StringTranslationTrait; + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php index 4ac73995ac5d7a6418f766f38d5b615fd986be86..27deea250d00e8887eb5e4dc9318222abdc05819 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php @@ -15,6 +15,9 @@ */ class FilterNumericTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php index 83b566b5366abde3781f9e34dfceac338f42e1bc..48ccf9aabc7f7ea4f02b346eadb64d05cd52c46e 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php @@ -15,6 +15,9 @@ */ class FilterStringTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php index bf594bba9c4d982805ea4e0936bf8e4ea5578aea..26d9ab1c73653436a573b99d9ab0da450f0493af 100644 --- a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php @@ -14,6 +14,9 @@ */ class HandlerAliasTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['user']; /** diff --git a/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php b/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php index c7e8212a3e2d1562093c35f142aad3a636718584..6cbf304ff639bc3c1d5d2601939845e28376d803 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php +++ b/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php @@ -4,7 +4,6 @@ namespace Drupal\Tests\views\Kernel\Plugin; -use Drupal\Core\Database\Database; use Drupal\KernelTests\Core\Database\DriverSpecificKernelTestBase; use Drupal\user\Entity\User; use Drupal\views\Plugin\views\join\CastedIntFieldJoin; @@ -100,8 +99,6 @@ public function testBuildJoin(): void { $view->initDisplay(); $view->initQuery(); - $connection = Database::getConnection(); - // First define a simple join without an extra condition. // Set the various options on the join object. $configuration = [ diff --git a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php index 52b29887ed7aa0013b8c7b53d565c565bc1a9611..22276d9e2dbb504431df1c07102e6c67f1c3be7b 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php @@ -41,7 +41,7 @@ public function testQuery(): void { /** * Tests the ViewExecutable::initQuery method. */ - public function _testInitQuery() { + public function _testInitQuery(): void { $view = Views::getView('test_view'); $view->setDisplay(); @@ -49,7 +49,7 @@ public function _testInitQuery() { $this->assertInstanceOf(QueryTestPlugin::class, $view->query); } - public function _testQueryExecute() { + public function _testQueryExecute(): void { $view = Views::getView('test_view'); $view->setDisplay(); @@ -65,7 +65,7 @@ public function _testQueryExecute() { * * @see \Drupal\views\Plugin\views\query\QueryPluginBase */ - protected function queryMethodsTests() { + protected function queryMethodsTests(): void { $view = Views::getView('test_view'); $view->setDisplay(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php index 7545478c5dd518588e3c444131852bfd01c85139..f5ca6d233b65b98c04da9cd3a288e5e585b54b9b 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php @@ -59,7 +59,7 @@ class RowRenderCacheTest extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUpFixtures() { + protected function setUpFixtures(): void { parent::setUpFixtures(); $this->installEntitySchema('user'); @@ -143,7 +143,7 @@ public function testNoCaching(): void { * @param bool $check_cache * (optional) Whether explicitly test render cache entries. */ - protected function doTestRenderedOutput(AccountInterface $account, $check_cache = FALSE) { + protected function doTestRenderedOutput(AccountInterface $account, $check_cache = FALSE): void { $this->setCurrentUser($account); $view = Views::getView('test_row_render_cache'); $view->setDisplay(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php index 04cc6c53c16decec0eb21af7fb6ee1682e287caf..8f1af2694ed6b38e117daa78ed007d1511a529da 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php @@ -60,7 +60,6 @@ public function testResponsiveGrid(array $options, array $expected): void { // markup structure is correct. $result = $this->xpath('//div[contains(@class, "views-view-responsive-grid")]/div[contains(@class, "views-view-responsive-grid__item")]/div[contains(@class, "views-view-responsive-grid__item-inner")]'); // There are five results for this test view. See ViewTestData::dataSet(). - $expected_count = 5; $this->assertCount(5, $result, "The expected number of items are rendered in the correct structure."); } diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php index 008dfad6aadae4196d93ad0e4e4e762944ca46a8..46032cc0aeb4b95057c5a78701c00d3dc872b769 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php @@ -14,6 +14,9 @@ */ class StyleMappingTest extends StyleTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php index 4cb2286514392149140ab46a0b8a913323af22eb..1e94692d9e8d6056aea994589e761fc39c11a586 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php @@ -148,7 +148,7 @@ public function testTable(): void { * @param \Drupal\views\ViewExecutable $view * The executable to prepare. */ - protected function prepareView(ViewExecutable $view) { + protected function prepareView(ViewExecutable $view): void { $view->setDisplay(); $view->initStyle(); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php index a88ee3ae0ed6e881db9ae6e60b35aeec2ff16afb..24ebfa36b28c1657ab293c98d84075505ff30d7c 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php @@ -86,7 +86,7 @@ public function testGrouping(): void { /** * Provides reusable code for ::testGrouping(). */ - protected function doTestGrouping($stripped = FALSE) { + protected function doTestGrouping($stripped = FALSE): void { $view = Views::getView('test_view'); $view->setDisplay(); // Setup grouping by the job and the age field. diff --git a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php index a28114501753280e7ed4cd1384e7428fa448166d..d63fbb97043d449d901b0f0deccf9a871fa7ac02 100644 --- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php +++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php @@ -107,7 +107,7 @@ public function testAggregateCountFunction(): void { * @param array $values * The expected views result. */ - public function groupByTestHelper($aggregation_function, $values) { + public function groupByTestHelper($aggregation_function, $values): void { $this->setupTestEntities(); $view = Views::getView('test_group_by_count'); @@ -138,7 +138,7 @@ public function groupByTestHelper($aggregation_function, $values) { /** * Helper method that creates some test entities. */ - protected function setupTestEntities() { + protected function setupTestEntities(): void { // Create 4 entities with name1 and 3 entities with name2. $entity_1 = [ 'name' => 'name1', diff --git a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php index 95d11df2050db018615a0f3ed81800c2a809cf46..b90e98f3ad89440f18dbe546c07f3ea7322d137c 100644 --- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php +++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php @@ -15,6 +15,9 @@ */ class TokenReplaceTest extends ViewsKernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['system']; /** diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php index 501633cbbaef3ab0edc0b35d4dba740af2c734aa..011d0af37542d4ecf68f5dab7cc495f0084dadd4 100644 --- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php @@ -36,6 +36,9 @@ class ViewExecutableTest extends ViewsKernelTestBase { use CommentTestTrait; + /** + * {@inheritdoc} + */ protected static $modules = [ 'system', 'node', @@ -89,7 +92,7 @@ class ViewExecutableTest extends ViewsKernelTestBase { 'parent_views', ]; - protected function setUpFixtures() { + protected function setUpFixtures(): void { $this->installEntitySchema('user'); $this->installEntitySchema('node'); $this->installEntitySchema('comment'); diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php index 216a410ff6bc6e356a3b122b7901c74845ffb42a..ef1db569f0ea55fab4472cd932fa082b8c588750 100644 --- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php +++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php @@ -78,7 +78,7 @@ public function testConfigurationEntityCRUD(): void { /** * Tests loading configuration entities. */ - protected function loadTests() { + protected function loadTests(): void { $view = View::load('test_view_storage'); $data = $this->config('views.view.test_view_storage')->get(); @@ -114,7 +114,7 @@ protected function loadTests() { /** * Tests creating configuration entities. */ - protected function createTests() { + protected function createTests(): void { // Create a new View instance with empty values. $created = $this->controller->create([]); @@ -151,7 +151,7 @@ protected function createTests() { /** * Tests adding, saving, and loading displays on configuration entities. */ - protected function displayTests() { + protected function displayTests(): void { // Check whether a display can be added and saved to a View. $view = View::load('test_view_storage_new'); @@ -179,7 +179,7 @@ protected function displayTests() { /** * Tests the display related functions like getDisplaysList(). */ - protected function displayMethodTests() { + protected function displayMethodTests(): void { $config['display'] = [ 'page_1' => [ 'display_options' => ['path' => 'test'], diff --git a/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php b/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php index de3656686b31123fd8172257c87ff6299198da69..5775163aa2eb39473a240c8337e95881ee3803a1 100644 --- a/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php +++ b/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php @@ -24,7 +24,7 @@ class ViewsTemplateTest extends ViewsKernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Enable Twig debugging. $parameters = $container->getParameter('twig.config'); @@ -45,7 +45,7 @@ public function testTemplate(): void { } /** - * @covers views_theme_suggestions_container_alter + * @covers \Drupal\views\Hook\ViewsHooks::themeSuggestionsContainerAlter * @throws \Exception */ public function testThemeSuggestionsContainerAlter(): void { diff --git a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php index ce904683b91cb5fc6810c674d519b31b37503a98..75b22bd86a84ecc43a551dc68f9e1fb771b4d5a0 100644 --- a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php +++ b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php @@ -10,6 +10,7 @@ use Drupal\Tests\UnitTestCase; use Drupal\views\Ajax\ViewAjaxResponse; use Drupal\views\Controller\ViewAjaxController; +use Drupal\views\ViewExecutable; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpFoundation\RequestStack; @@ -194,7 +195,7 @@ public function testAjaxView(): void { $request->query->set('ajax_page_state', 'drupal.settings[]'); $request->query->set('type', 'article'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $this->redirectDestination->expects($this->atLeastOnce()) ->method('set') @@ -231,7 +232,7 @@ public function testAjaxViewViewPathNoSlash(): void { $request->query->set('ajax_page_state', 'drupal.settings[]'); $request->query->set('type', 'article'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $this->redirectDestination->expects($this->atLeastOnce()) ->method('set') @@ -275,7 +276,7 @@ public function testAjaxViewWithArguments(): void { $request->request->set('view_display_id', 'page_1'); $request->request->set('view_args', 'arg1/arg2'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $executable->expects($this->once()) ->method('preview') ->with('page_1', ['arg1', 'arg2']); @@ -296,7 +297,7 @@ public function testAjaxViewWithEmptyArguments(): void { // Simulate a request that has a second, empty argument. $request->request->set('view_args', 'arg1/'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $executable->expects($this->once()) ->method('preview') ->with('page_1', $this->identicalTo(['arg1', NULL])); @@ -316,7 +317,7 @@ public function testAjaxViewWithHtmlEntityArguments(): void { $request->request->set('view_display_id', 'page_1'); $request->request->set('view_args', 'arg1 & arg2/arg3'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $executable->expects($this->once()) ->method('preview') ->with('page_1', ['arg1 & arg2', 'arg3']); @@ -338,7 +339,7 @@ public function testAjaxViewWithPager(): void { $request->request->set('view_dom_id', $dom_id); $request->request->set('pager_element', '0'); - [$view, $executable] = $this->setupValidMocks(); + $executable = $this->setupValidMocks(); $display_handler = $this->getMockBuilder('Drupal\views\Plugin\views\display\DisplayPluginBase') ->disableOriginalConstructor() @@ -367,16 +368,16 @@ public function testAjaxViewWithPager(): void { } /** - * Sets up a bunch of valid mocks like the view entity and executable. + * Sets up a bunch of valid mocks of the view executable. * * @param bool $use_ajax * Whether the 'use_ajax' option is set on the view display. Defaults to * using ajax (TRUE). * - * @return array - * A pair of view storage entity and executable. + * @return \Drupal\views\ViewExecutable + * The view executable. */ - protected function setupValidMocks($use_ajax = self::USE_AJAX): array { + protected function setupValidMocks($use_ajax = self::USE_AJAX): ViewExecutable { $view = $this->getMockBuilder('Drupal\views\Entity\View') ->disableOriginalConstructor() ->getMock(); @@ -432,7 +433,7 @@ protected function setupValidMocks($use_ajax = self::USE_AJAX): array { $executable->display_handler = $display_handler; $executable->displayHandlers = $display_collection; - return [$view, $executable]; + return $executable; } /** diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php index 05cf8840cf60896c2011674edfead1ff54d41bf7..f0dde96d809148c400290ce7495bc1cc02c5b75a 100644 --- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php @@ -388,7 +388,7 @@ class TestViewsLocalTask extends ViewsLocalTask { /** * Sets applicable views result. */ - public function setApplicableMenuViews($result) { + public function setApplicableMenuViews($result): void { $this->result = $result; } diff --git a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php index 486238298869a8c86b7c03464ac2715edc7b38c0..189b3f5da96f227b8126ef247e5176101bc826a5 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php @@ -127,7 +127,7 @@ protected function setUp(): void { /** * Ensures that the entity type manager returns an entity storage. */ - protected function setupEntityTypeManager() { + protected function setupEntityTypeManager(): void { $this->entityTypeManager->expects($this->any()) ->method('getStorage') ->with('entity_test') diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php index 224eba343a47192afd9e9b3c2d77e1d1c2fb2dda..c42eb70b7096cf6f7064fa01e0a28e3064bb818f 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php @@ -122,7 +122,7 @@ public static function providerTestResultArea() { * @param int $items_per_page * The value to return from getItemsPerPage(). */ - protected function setupViewPager($items_per_page = 0) { + protected function setupViewPager($items_per_page = 0): void { $pager = $this->prophesize(PagerPluginBase::class); $pager->getItemsPerPage() ->willReturn($items_per_page) diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php index d97e70eaa3f5f50f6708dec16214be890f0a5adb..79b5280b807cd219b22b032777f75e8e5baa23dc 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { */ public function testCalculateDependencies(): void { /** @var \Drupal\views\Entity\View $view_this */ - /** @var \Drupal\views\Entity\View $view_other */ $view_this = $this->createMock('Drupal\views\ViewEntityInterface'); $view_this->expects($this->any())->method('getConfigDependencyKey')->willReturn('config'); $view_this->expects($this->any())->method('getConfigDependencyName')->willReturn('view.this'); diff --git a/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php b/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php index 533e579e720a47a75d63abf52bb6e1cde6bcad90..d2791fabad1f8a3322d58391da7c69a6ecc2af89 100644 --- a/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php @@ -6,6 +6,7 @@ use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Tests\Core\Entity\StubEntityBase; use Drupal\Tests\UnitTestCase; use Drupal\views\Plugin\views\argument_validator\Entity; @@ -59,7 +60,10 @@ protected function setUp(): void { $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->entityTypeBundleInfo = $this->createMock(EntityTypeBundleInfoInterface::class); - $mock_entity = $this->getMockForAbstractClass('Drupal\Core\Entity\EntityBase', [], '', FALSE, TRUE, TRUE, ['bundle', 'access']); + $mock_entity = $this->getMockBuilder(StubEntityBase::class) + ->disableOriginalConstructor() + ->onlyMethods(['bundle', 'access']) + ->getMock(); $mock_entity->expects($this->any()) ->method('bundle') ->willReturn('test_bundle'); @@ -71,7 +75,10 @@ protected function setUp(): void { ['test_op_3', NULL, FALSE, TRUE], ]); - $mock_entity_bundle_2 = $this->getMockForAbstractClass('Drupal\Core\Entity\EntityBase', [], '', FALSE, TRUE, TRUE, ['bundle', 'access']); + $mock_entity_bundle_2 = $this->getMockBuilder(StubEntityBase::class) + ->disableOriginalConstructor() + ->onlyMethods(['bundle', 'access']) + ->getMock(); $mock_entity_bundle_2->expects($this->any()) ->method('bundle') ->willReturn('test_bundle_2'); diff --git a/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php index 77a9c45861ea222d0b264be5cfc6180138fcdf21..5a45763620dbe55dbb8f54a66ceec9f5f823e724 100644 --- a/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php @@ -61,7 +61,7 @@ protected function setUp(): void { /** * Setup access plugin manager and config factory in the Drupal class. */ - public function setupContainer() { + public function setupContainer(): void { $this->accessPluginManager = $this->getMockBuilder('\Drupal\views\Plugin\ViewsPluginManager') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php index 4ed625afa8f5f062c60bff08470852d44bb0ddd2..c8795b47e6fd6b77bb5a60b638a6b08f08da6ef4 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php @@ -169,7 +169,7 @@ protected function setUp(): void { /** * Sets up the unrouted URL assembler and the link generator. */ - protected function setUpUrlIntegrationServices() { + protected function setUpUrlIntegrationServices(): void { $this->pathProcessor = $this->createMock('Drupal\Core\PathProcessor\OutboundPathProcessorInterface'); $this->unroutedUrlAssembler = new UnroutedUrlAssembler($this->requestStack, $this->pathProcessor); @@ -197,7 +197,7 @@ function (&$elements, $is_root_call = FALSE) { /** * Sets up a display with empty arguments and fields. */ - protected function setupDisplayWithEmptyArgumentsAndFields() { + protected function setupDisplayWithEmptyArgumentsAndFields(): void { $this->display->expects($this->any()) ->method('getHandlers') ->willReturnMap([ @@ -858,7 +858,7 @@ public function testElementClassesWithTokens(): void { class FieldPluginBaseTestField extends FieldPluginBase { - public function setLinkGenerator(LinkGeneratorInterface $link_generator) { + public function setLinkGenerator(LinkGeneratorInterface $link_generator): void { $this->linkGenerator = $link_generator; } diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php index c9c04a97d893cc87167bf9ae35e9fad2034032c9..d9f371c41c58adb98961f79c0113052fe5ddf858 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php @@ -723,7 +723,7 @@ public static function providerSortOrders() { * @param $definition * An array with entity type definition data. */ - protected function setupLanguageRenderer(EntityField $handler, $definition) { + protected function setupLanguageRenderer(EntityField $handler, $definition): void { $display_handler = $this->getMockBuilder('\Drupal\views\Plugin\views\display\DisplayPluginBase') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php index 2a48cb4a81e7022ddf722463a1889b7433c6fddf..15ebd1e7b91fc6fbc629ef0f59050803c579b30b 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { ->disableOriginalConstructor() ->getMockForAbstractClass(); - /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ $this->view = $this->getMockBuilder('Drupal\views\ViewExecutable') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php b/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php index 6daac05a3516eb4317aef7aefdfc0da4cd8f7015..868bfda31c4ec33ce13e555dac6719a17540b4c0 100644 --- a/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php @@ -123,7 +123,7 @@ public function testGetCacheMaxAge(): void { * @param \Drupal\views\ViewsData $views_data * The views data. */ - protected function setupViewsData(ViewsData $views_data) { + protected function setupViewsData(ViewsData $views_data): void { $container = \Drupal::hasContainer() ? \Drupal::getContainer() : new ContainerBuilder(); $container->set('views.views_data', $views_data); \Drupal::setContainer($container); @@ -135,7 +135,7 @@ protected function setupViewsData(ViewsData $views_data) { * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager. */ - protected function setupEntityTypeManager(EntityTypeManagerInterface $entity_type_manager) { + protected function setupEntityTypeManager(EntityTypeManagerInterface $entity_type_manager): void { $container = \Drupal::hasContainer() ? \Drupal::getContainer() : new ContainerBuilder(); $container->set('entity_type.manager', $entity_type_manager); \Drupal::setContainer($container); @@ -316,7 +316,7 @@ public function testLoadEntitiesWithNoRelationshipAndNoRevision(): void { /** * Create a view with a relationship. */ - protected function setupViewWithRelationships(ViewExecutable $view, $base = 'entity_second') { + protected function setupViewWithRelationships(ViewExecutable $view, $base = 'entity_second'): void { // We don't use prophecy, because prophecy enforces methods. $relationship = $this->getMockBuilder(RelationshipPluginBase::class)->disableOriginalConstructor()->getMock(); $relationship->definition['base'] = $base; diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php index d12dc8f529c01a46170d81306b1dbaa081ed81bc..149e8b55a842d9fc9fac2d5b7030bbdd69756bc4 100644 --- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php @@ -594,8 +594,7 @@ protected function setupBaseViewAndDisplay(): array { */ public function testSetItemsPerPageBeforePreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $view->setItemsPerPage(12); $this->assertEquals(12, $view->getItemsPerPage()); @@ -608,8 +607,7 @@ public function testSetItemsPerPageBeforePreRender(): void { */ public function testSetItemsPerPageDuringPreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $elements = &$view->element; $elements['#cache'] += ['keys' => []]; @@ -626,8 +624,7 @@ public function testSetItemsPerPageDuringPreRender(): void { */ public function testSetOffsetBeforePreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $view->setOffset(12); $this->assertEquals(12, $view->getOffset()); @@ -640,8 +637,7 @@ public function testSetOffsetBeforePreRender(): void { */ public function testSetOffsetDuringPreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $elements = &$view->element; $elements['#cache'] += ['keys' => []]; @@ -658,8 +654,7 @@ public function testSetOffsetDuringPreRender(): void { */ public function testSetCurrentPageBeforePreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $view->setCurrentPage(12); $this->assertEquals(12, $view->getCurrentPage()); @@ -672,8 +667,7 @@ public function testSetCurrentPageBeforePreRender(): void { */ public function testSetCurrentPageDuringPreRender(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); $elements = &$view->element; $elements['#cache'] += ['keys' => []]; @@ -689,8 +683,7 @@ public function testSetCurrentPageDuringPreRender(): void { */ public function testCacheIsIgnoredDuringPreview(): void { /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */ - /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */ - [$view, $display] = $this->setupBaseViewAndDisplay(); + $view = current($this->setupBaseViewAndDisplay()); // Pager needs to be set to avoid false test failures. $view->pager = $this->getMockBuilder(NonePager::class) diff --git a/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php b/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php index dc7212df44935b45c9361da4d485595aceb54b6f..ae74cb7641668b60a7321816054931e4606598b0 100644 --- a/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php +++ b/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php @@ -56,7 +56,7 @@ protected function setUp(): void { /** * Setups of the plugin factory. */ - protected function setupMockedFactory() { + protected function setupMockedFactory(): void { $this->factory = $this->createMock('Drupal\Component\Plugin\Factory\FactoryInterface'); $reflection = new \ReflectionClass($this->handlerManager); diff --git a/core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme b/core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme index 26abda05aa52f06dbc9374456d21fd0db14b33c1..b52cbd345c7409cfa8d4e0e66ec824525cee7ba6 100644 --- a/core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme +++ b/core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme @@ -12,7 +12,7 @@ /** * Changes an exposed "type" filter from a multi-select to checkboxes. */ -function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) { +function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state): void { if (isset($form['type'])) { $form['type']['#type'] = 'checkboxes'; } diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index ab6f7f63b15a26bd5969af23508071a233f05201..a2185d57a687269025bd27b1768dadb17c5fe4ec 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -5,6 +5,11 @@ * Describes hooks and plugins provided by the Views module. */ +use Drupal\views\Analyzer; +use Drupal\field\FieldStorageConfigInterface; +use Drupal\views\Plugin\views\pager\Full; +use Drupal\views\Plugin\views\cache\Time; +use Drupal\Core\Cache\Cache; use Drupal\Core\Language\LanguageInterface; use Drupal\views\Plugin\views\cache\CachePluginBase; use Drupal\views\Plugin\views\PluginBase; @@ -84,11 +89,11 @@ * Array of warning messages built by Analyzer::formatMessage to be displayed * to the user following analysis of the view. */ -function hook_views_analyze(\Drupal\views\ViewExecutable $view) { +function hook_views_analyze(ViewExecutable $view) { $messages = []; if ($view->display_handler->options['pager']['type'] == 'none') { - $messages[] = Drupal\views\Analyzer::formatMessage(t('This view has no pager. This could cause performance issues when the view contains many items.'), 'warning'); + $messages[] = Analyzer::formatMessage(t('This view has no pager. This could cause performance issues when the view contains many items.'), 'warning'); } return $messages; @@ -544,7 +549,7 @@ function hook_views_data_alter(array &$data) { * @see hook_field_views_data_alter() * @see hook_field_views_data_views_data_alter() */ -function hook_field_views_data(\Drupal\field\FieldStorageConfigInterface $field_storage) { +function hook_field_views_data(FieldStorageConfigInterface $field_storage) { $data = views_field_default_views_data($field_storage); foreach ($data as $table_name => $table_data) { // Add the relationship only on the target_id field. @@ -577,7 +582,7 @@ function hook_field_views_data(\Drupal\field\FieldStorageConfigInterface $field_ * @see hook_field_views_data() * @see hook_field_views_data_views_data_alter() */ -function hook_field_views_data_alter(array &$data, \Drupal\field\FieldStorageConfigInterface $field_storage) { +function hook_field_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) { $entity_type_id = $field_storage->getTargetEntityTypeId(); $field_name = $field_storage->getName(); $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id); @@ -633,7 +638,7 @@ function hook_field_views_data_alter(array &$data, \Drupal\field\FieldStorageCon * @see hook_field_views_data_alter() * @see views_views_data_alter() */ -function hook_field_views_data_views_data_alter(array &$data, \Drupal\field\FieldStorageConfigInterface $field) { +function hook_field_views_data_views_data_alter(array &$data, FieldStorageConfigInterface $field) { $field_name = $field->getName(); $data_key = 'field_data_' . $field_name; $entity_type_id = $field->getTargetEntityTypeId(); @@ -878,7 +883,7 @@ function hook_views_pre_render(ViewExecutable $view) { function hook_views_post_render(ViewExecutable $view, array &$output, CachePluginBase $cache) { // When using full pager, disable any time-based caching if there are fewer // than 10 results. - if ($view->pager instanceof Drupal\views\Plugin\views\pager\Full && $cache instanceof Drupal\views\Plugin\views\cache\Time && count($view->result) < 10) { + if ($view->pager instanceof Full && $cache instanceof Time && count($view->result) < 10) { $cache->options['results_lifespan'] = 0; $cache->options['output_lifespan'] = 0; } @@ -956,7 +961,7 @@ function hook_views_preview_info_alter(array &$rows, ViewExecutable $view) { * @see views_invalidate_cache() */ function hook_views_invalidate_cache() { - \Drupal\Core\Cache\Cache::invalidateTags(['views']); + Cache::invalidateTags(['views']); } /** diff --git a/core/modules/views/views.install b/core/modules/views/views.install index a7ed0b99a85b3120761bcbf4b7b3f50b19fcd832..2f61cda6032354dd23fc25782610c7a68b2a977c 100644 --- a/core/modules/views/views.install +++ b/core/modules/views/views.install @@ -8,13 +8,13 @@ /** * Implements hook_install(). */ -function views_install() { +function views_install(): void { module_set_weight('views', 10); } /** * Implements hook_update_last_removed(). */ -function views_update_last_removed() { +function views_update_last_removed(): int { return 8500; } diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 58f87e70eff5d1934e2a8c913c188da05ccce219..59a4f0b47430936198a77572f9f7406622d4fd91 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -2,228 +2,13 @@ /** * @file - * Primarily Drupal hooks and global API functions to manipulate views. */ -use Drupal\Component\Utility\Html; use Drupal\Core\Database\Query\AlterableInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; -use Drupal\views\Plugin\Derivative\ViewsLocalTask; -use Drupal\views\ViewEntityInterface; use Drupal\views\ViewExecutable; use Drupal\views\Entity\View; use Drupal\views\Views; -use Drupal\views\ViewsConfigUpdater; - -/** - * Implements hook_help(). - */ -function views_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.views': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Views module provides a back end to fetch information from content, user accounts, taxonomy terms, and other entities from the database and present it to the user as a grid, HTML list, table, unformatted list, etc. The resulting displays are known generally as <em>views</em>.') . '</p>'; - $output .= '<p>' . t('For more information, see the <a href=":views">online documentation for the Views module</a>.', [':views' => 'https://www.drupal.org/documentation/modules/views']) . '</p>'; - $output .= '<p>' . t('In order to create and modify your own views using the administration and configuration user interface, you will need to install either the Views UI module in core or a contributed module that provides a user interface for Views. See the <a href=":views-ui">Views UI module help page</a> for more information.', [':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? Url::fromRoute('help.page', ['name' => 'views_ui'])->toString() : '#']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Adding functionality to administrative pages') . '</dt>'; - $output .= '<dd>' . t('The Views module adds functionality to some core administration pages. For example, <em>admin/content</em> uses Views to filter and sort content. With Views uninstalled, <em>admin/content</em> is more limited.') . '</dd>'; - $output .= '<dt>' . t('Expanding Views functionality') . '</dt>'; - $output .= '<dd>' . t('Contributed projects that support the Views module can be found in the <a href=":node">online documentation for Views-related contributed modules</a>.', [':node' => 'https://www.drupal.org/documentation/modules/views/add-ons']) . '</dd>'; - $output .= '<dt>' . t('Improving table accessibility') . '</dt>'; - $output .= '<dd>' . t('Views tables include semantic markup to improve accessibility. Data cells are automatically associated with header cells through id and header attributes. To improve the accessibility of your tables you can add descriptive elements within the Views table settings. The <em>caption</em> element can introduce context for a table, making it easier to understand. The <em>summary</em> element can provide an overview of how the data has been organized and how to navigate the table. Both the caption and summary are visible by default and also implemented according to HTML5 guidelines.') . '</dd>'; - $output .= '<dt>' . t('Working with multilingual views') . '</dt>'; - $output .= '<dd>' . t('If your site has multiple languages and translated entities, each result row in a view will contain one translation of each involved entity (a view can involve multiple entities if it uses relationships). You can use a filter to restrict your view to one language: without filtering, if an entity has three translations it will add three rows to the results; if you filter by language, at most one result will appear (it could be zero if that particular entity does not have a translation matching your language filter choice). If a view uses relationships, each entity in the relationship needs to be filtered separately. You can filter a view to a fixed language choice, such as English or Spanish, or to the language selected by the page the view is displayed on (the language that is selected for the page by the language detection settings either for Content or User interface).') . '</dd>'; - $output .= '<dd>' . t('Because each result row contains a specific translation of each entity, field-level filters are also relative to these entity translations. For example, if your view has a filter that specifies that the entity title should contain a particular English word, you will presumably filter out all rows containing Chinese translations, since they will not contain the English word. If your view also has a second filter specifying that the title should contain a particular Chinese word, and if you are using "And" logic for filtering, you will presumably end up with no results in the view, because there are probably not any entity translations containing both the English and Chinese words in the title.') . '</dd>'; - $output .= '<dd>' . t('Independent of filtering, you can choose the display language (the language used to display the entities and their fields) via a setting on the display. Your language choices are the same as the filter language choices, with an additional choice of "Content language of view row" and "Original language of content in view row", which means to display each entity in the result row using the language that entity has or in which it was originally created. In theory, this would give you the flexibility to filter to French translations, for instance, and then display the results in Spanish. The more usual choices would be to use the same language choices for the display language and each entity filter in the view, or to use the Row language setting for the display.') . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_views_pre_render(). - */ -function views_views_pre_render($view) { - // If using AJAX, send identifying data about this view. - if ($view->ajaxEnabled() && empty($view->is_attachment) && empty($view->live_preview)) { - $view->element['#attached']['drupalSettings']['views'] = [ - 'ajax_path' => Url::fromRoute('views.ajax')->toString(), - 'ajaxViews' => [ - 'views_dom_id:' . $view->dom_id => [ - 'view_name' => $view->storage->id(), - 'view_display_id' => $view->current_display, - 'view_args' => Html::escape(implode('/', $view->args)), - 'view_path' => Html::escape(\Drupal::service('path.current')->getPath()), - 'view_base_path' => $view->getPath(), - 'view_dom_id' => $view->dom_id, - // To fit multiple views on a page, the programmer may have - // overridden the display's pager_element. - 'pager_element' => isset($view->pager) ? $view->pager->getPagerId() : 0, - ], - ], - ]; - $view->element['#attached']['library'][] = 'views/views.ajax'; - } - - return $view; -} - -/** - * Implements hook_theme(). - * - * Register views theming functions and those that are defined via views plugin - * definitions. - */ -function views_theme($existing, $type, $theme, $path) { - \Drupal::moduleHandler()->loadInclude('views', 'inc', 'views.theme'); - - // Some quasi clever array merging here. - $base = [ - 'file' => 'views.theme.inc', - ]; - - // Our extra version of pager - $hooks['views_mini_pager'] = $base + [ - 'variables' => [ - 'tags' => [], - 'quantity' => 9, - 'element' => 0, - 'pagination_heading_level' => 'h4', - 'parameters' => [], - ], - ]; - - $variables = [ - // For displays, we pass in a dummy array as the first parameter, since - // $view is an object but the core contextual_preprocess() function only - // attaches contextual links when the primary theme argument is an array. - 'display' => [ - 'view_array' => [], - 'view' => NULL, - 'rows' => [], - 'header' => [], - 'footer' => [], - 'empty' => [], - 'exposed' => [], - 'more' => [], - 'feed_icons' => [], - 'pager' => [], - 'title' => '', - 'attachment_before' => [], - 'attachment_after' => [], - ], - 'style' => ['view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL], - 'row' => ['view' => NULL, 'options' => NULL, 'row' => NULL, 'field_alias' => NULL], - 'exposed_form' => ['view' => NULL, 'options' => NULL], - 'pager' => [ - 'view' => NULL, - 'options' => NULL, - 'tags' => [], - 'quantity' => 9, - 'element' => 0, - 'pagination_heading_level' => 'h4', - 'parameters' => [], - ], - ]; - - // Default view themes - $hooks['views_view_field'] = $base + [ - 'variables' => ['view' => NULL, 'field' => NULL, 'row' => NULL], - ]; - $hooks['views_view_grouping'] = $base + [ - 'variables' => ['view' => NULL, 'grouping' => NULL, 'grouping_level' => NULL, 'rows' => NULL, 'title' => NULL], - ]; - - // Only display, pager, row, and style plugins can provide theme hooks. - $plugin_types = [ - 'display', - 'pager', - 'row', - 'style', - 'exposed_form', - ]; - $plugins = []; - foreach ($plugin_types as $plugin_type) { - $plugins[$plugin_type] = Views::pluginManager($plugin_type)->getDefinitions(); - } - - $module_handler = \Drupal::moduleHandler(); - - // Register theme functions for all style plugins. It provides a basic auto - // implementation of theme functions or template files by using the plugin - // definitions (theme, theme_file, module, register_theme). Template files are - // assumed to be located in the templates folder. - foreach ($plugins as $type => $info) { - foreach ($info as $def) { - // Not all plugins have theme functions, and they can also explicitly - // prevent a theme function from being registered automatically. - if (!isset($def['theme']) || empty($def['register_theme'])) { - continue; - } - // For each theme registration, we have a base directory to check for the - // templates folder. This will be relative to the root of the given module - // folder, so we always need a module definition. - // @todo Watchdog or exception? - if (!isset($def['provider']) || !$module_handler->moduleExists($def['provider'])) { - continue; - } - - $hooks[$def['theme']] = [ - 'variables' => $variables[$type], - ]; - - // We always use the module directory as base dir. - $module_dir = \Drupal::service('extension.list.module')->getPath($def['provider']); - $hooks[$def['theme']]['path'] = $module_dir; - - // For the views module we ensure views.theme.inc is included. - if ($def['provider'] == 'views') { - if (!isset($hooks[$def['theme']]['includes'])) { - $hooks[$def['theme']]['includes'] = []; - } - if (!in_array('views.theme.inc', $hooks[$def['theme']]['includes'])) { - $hooks[$def['theme']]['includes'][] = $module_dir . '/views.theme.inc'; - } - } - // The theme_file definition is always relative to the modules directory. - elseif (!empty($def['theme_file'])) { - $hooks[$def['theme']]['file'] = $def['theme_file']; - } - - // Whenever we have a theme file, we include it directly so we can - // auto-detect the theme function. - if (isset($def['theme_file'])) { - $include = \Drupal::root() . '/' . $module_dir . '/' . $def['theme_file']; - if (is_file($include)) { - require_once $include; - } - } - - // By default any templates for a module are located in the /templates - // directory of the module's folder. If a module wants to define its own - // location it has to set register_theme of the plugin to FALSE and - // implement hook_theme() by itself. - $hooks[$def['theme']]['path'] .= '/templates'; - $hooks[$def['theme']]['template'] = Html::cleanCssIdentifier($def['theme']); - } - } - - $hooks['views_form_views_form'] = $base + [ - 'render element' => 'form', - ]; - - $hooks['views_exposed_form'] = $base + [ - 'render element' => 'form', - ]; - - return $hooks; -} /** * Allows view-based node templates if called from a view. @@ -252,19 +37,6 @@ function views_preprocess_node(&$variables) { } } -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function views_theme_suggestions_node_alter(array &$suggestions, array $variables) { - $node = $variables['elements']['#node']; - if (!empty($node->view) && $node->view->storage->id()) { - $suggestions[] = 'node__view__' . $node->view->storage->id(); - if (!empty($node->view->current_display)) { - $suggestions[] = 'node__view__' . $node->view->storage->id() . '__' . $node->view->current_display; - } - } -} - /** * Allows view-based comment templates if called from a view. */ @@ -276,32 +48,6 @@ function views_preprocess_comment(&$variables) { } } -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function views_theme_suggestions_comment_alter(array &$suggestions, array $variables) { - $comment = $variables['elements']['#comment']; - if (!empty($comment->view) && $comment->view->storage->id()) { - $suggestions[] = 'comment__view__' . $comment->view->storage->id(); - if (!empty($comment->view->current_display)) { - $suggestions[] = 'comment__view__' . $comment->view->storage->id() . '__' . $comment->view->current_display; - } - } -} - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function views_theme_suggestions_container_alter(array &$suggestions, array $variables) { - if (!empty($variables['element']['#type']) && $variables['element']['#type'] == 'more_link' && !empty($variables['element']['#view']) && $variables['element']['#view'] instanceof ViewExecutable) { - $suggestions = array_merge( - $suggestions, - // Theme suggestions use the reverse order compared to #theme hooks. - array_reverse($variables['element']['#view']->buildThemeFunctions('container__more_link')) - ); - } -} - /** * Adds contextual links associated with a view display to a renderable array. * @@ -444,48 +190,6 @@ function views_add_contextual_links(&$render_element, $location, $display_id, ?a } } -/** - * Implements hook_ENTITY_TYPE_insert() for 'field_config'. - */ -function views_field_config_insert(EntityInterface $field) { - Views::viewsData()->clear(); -} - -/** - * Implements hook_ENTITY_TYPE_update() for 'field_config'. - */ -function views_field_config_update(EntityInterface $entity) { - Views::viewsData()->clear(); -} - -/** - * Implements hook_ENTITY_TYPE_delete() for 'field_config'. - */ -function views_field_config_delete(EntityInterface $entity) { - Views::viewsData()->clear(); -} - -/** - * Implements hook_ENTITY_TYPE_insert(). - */ -function views_base_field_override_insert(EntityInterface $entity) { - Views::viewsData()->clear(); -} - -/** - * Implements hook_ENTITY_TYPE_update(). - */ -function views_base_field_override_update(EntityInterface $entity) { - Views::viewsData()->clear(); -} - -/** - * Implements hook_ENTITY_TYPE_delete(). - */ -function views_base_field_override_delete(EntityInterface $entity) { - Views::viewsData()->clear(); -} - /** * Invalidate the views cache, forcing a rebuild on the next grab of table data. */ @@ -626,51 +330,6 @@ function views_disable_view(View $view) { $view->disable()->save(); } -/** - * Implements hook_form_alter() for the exposed form. - * - * Since the exposed form is a GET form, we don't want it to send a wide - * variety of information. - */ -function views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) { - $form['form_build_id']['#access'] = FALSE; - $form['form_token']['#access'] = FALSE; - $form['form_id']['#access'] = FALSE; -} - -/** - * Implements hook_query_TAG_alter(). - * - * This is the hook_query_alter() for queries tagged by Views and is used to - * add in substitutions from hook_views_query_substitutions(). - */ -function views_query_views_alter(AlterableInterface $query) { - $substitutions = $query->getMetaData('views_substitutions'); - $tables = &$query->getTables(); - $where = &$query->conditions(); - - // Replaces substitutions in tables. - foreach ($tables as $table_name => $table_metadata) { - foreach ($table_metadata['arguments'] as $replacement_key => $value) { - if (!is_array($value)) { - if (isset($substitutions[$value])) { - $tables[$table_name]['arguments'][$replacement_key] = $substitutions[$value]; - } - } - else { - foreach ($value as $sub_key => $sub_value) { - if (isset($substitutions[$sub_value])) { - $tables[$table_name]['arguments'][$replacement_key][$sub_key] = $substitutions[$sub_value]; - } - } - } - } - } - - // Replaces substitutions in filter criteria. - _views_query_tag_alter_condition($query, $where, $substitutions); -} - /** * Replaces the substitutions recursive foreach condition. */ @@ -689,7 +348,7 @@ function _views_query_tag_alter_condition(AlterableInterface $query, &$condition if (is_object($condition['value'])) { $subquery = $condition['value']; $subquery->addMetaData('views_substitutions', $query->getMetaData('views_substitutions')); - views_query_views_alter($condition['value']); + \Drupal::moduleHandler()->invoke('views', 'query_views_alter', [$condition['value']]); } elseif (isset($condition['value'])) { // We can not use a simple str_replace() here because it always returns @@ -726,18 +385,14 @@ function _views_query_tag_alter_condition(AlterableInterface $query, &$condition * @param $display_id * The display id to embed. If unsure, use 'default', as it will always be * valid. But things like 'page' or 'block' should work here. - * @param ... + * @param ...$args * Any additional parameters will be passed as arguments. * * @return array|null * A renderable array containing the view output or NULL if the display ID * of the view to be executed doesn't exist. */ -function views_embed_view($name, $display_id = 'default') { - $args = func_get_args(); - // Remove $name and $display_id from the arguments. - unset($args[0], $args[1]); - +function views_embed_view($name, $display_id = 'default', ...$args) { $view = Views::getView($name); if (!$view || !$view->access($display_id)) { return; @@ -763,17 +418,13 @@ function views_embed_view($name, $display_id = 'default') { * want to use. A URL will appear in the status bar of your browser. This is * usually at the bottom of the window, in the chrome. Everything after * #views-tab- is the display ID, e.g. page_1. - * @param ... + * @param ...$args * Any additional parameters will be passed as arguments. * * @return array * An array containing an object for each view item. */ -function views_get_view_result($name, $display_id = NULL) { - $args = func_get_args(); - // Remove $name and $display_id from the arguments. - unset($args[0], $args[1]); - +function views_get_view_result($name, $display_id = NULL, ...$args) { $view = Views::getView($name); if (is_object($view)) { if (is_array($args)) { @@ -806,21 +457,3 @@ function views_element_validate_tags($element, FormStateInterface $form_state) { } } } - -/** - * Implements hook_local_tasks_alter(). - */ -function views_local_tasks_alter(&$local_tasks) { - $container = \Drupal::getContainer(); - $local_task = ViewsLocalTask::create($container, 'views_view'); - $local_task->alterLocalTasks($local_tasks); -} - -/** - * Implements hook_ENTITY_TYPE_presave(). - */ -function views_view_presave(ViewEntityInterface $view) { - /** @var \Drupal\views\ViewsConfigUpdater $config_updater */ - $config_updater = \Drupal::classResolver(ViewsConfigUpdater::class); - $config_updater->updateAll($view); -} diff --git a/core/modules/views/views.post_update.php b/core/modules/views/views.post_update.php index 136a82ed193cbff9fc7ae31c79ffadaaaae8974e..19bb3b9be37bec397d24fcb73fe5a2c35abc3010 100644 --- a/core/modules/views/views.post_update.php +++ b/core/modules/views/views.post_update.php @@ -12,7 +12,7 @@ /** * Implements hook_removed_post_updates(). */ -function views_removed_post_updates() { +function views_removed_post_updates(): array { return [ 'views_post_update_update_cacheability_metadata' => '9.0.0', 'views_post_update_cleanup_duplicate_views_data' => '9.0.0', diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index faa7da0d300c08c6bdc02016f98144fb61ea4b72..859ede62114dda024225e51943c8619ebb299b0c 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -2,7 +2,6 @@ /** * @file - * Preprocessors and helper functions to make theming easier. */ use Drupal\Component\Utility\Html; diff --git a/core/modules/views/views.tokens.inc b/core/modules/views/views.tokens.inc deleted file mode 100644 index e980580248d8416d449bb244ce8fc58b8f0a3154..0000000000000000000000000000000000000000 --- a/core/modules/views/views.tokens.inc +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -/** - * @file - * Token integration for the views module. - */ - -use Drupal\Core\Render\BubbleableMetadata; - -/** - * Implements hook_token_info(). - */ -function views_token_info() { - $info['types']['view'] = [ - 'name' => t('View', [], ['context' => 'View entity type']), - 'description' => t('Tokens related to views.'), - 'needs-data' => 'view', - ]; - $info['tokens']['view']['label'] = [ - 'name' => t('Label'), - 'description' => t('The label of the view.'), - ]; - $info['tokens']['view']['description'] = [ - 'name' => t('Description'), - 'description' => t('The description of the view.'), - ]; - $info['tokens']['view']['id'] = [ - 'name' => t('ID'), - 'description' => t('The machine-readable ID of the view.'), - ]; - $info['tokens']['view']['title'] = [ - 'name' => t('Title'), - 'description' => t('The title of current display of the view.'), - ]; - $info['tokens']['view']['url'] = [ - 'name' => t('URL'), - 'description' => t('The URL of the view.'), - 'type' => 'url', - ]; - $info['tokens']['view']['base-table'] = [ - 'name' => t('Base table'), - 'description' => t('The base table used for this view.'), - ]; - $info['tokens']['view']['base-field'] = [ - 'name' => t('Base field'), - 'description' => t('The base field used for this view.'), - ]; - $info['tokens']['view']['total-rows'] = [ - 'name' => t('Total rows'), - 'description' => t('The total amount of results returned from the view. The current display will be used.'), - ]; - $info['tokens']['view']['items-per-page'] = [ - 'name' => t('Items per page'), - 'description' => t('The number of items per page.'), - ]; - $info['tokens']['view']['current-page'] = [ - 'name' => t('Current page'), - 'description' => t('The current page of results the view is on.'), - ]; - $info['tokens']['view']['page-count'] = [ - 'name' => t('Page count'), - 'description' => t('The total page count.'), - ]; - - return $info; -} - -/** - * Implements hook_tokens(). - */ -function views_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { - $url_options = ['absolute' => TRUE]; - if (isset($options['language'])) { - $url_options['language'] = $options['language']; - } - $replacements = []; - - if ($type == 'view' && !empty($data['view'])) { - /** @var \Drupal\views\ViewExecutable $view */ - $view = $data['view']; - - $bubbleable_metadata->addCacheableDependency($view->storage); - - foreach ($tokens as $name => $original) { - switch ($name) { - case 'label': - $replacements[$original] = $view->storage->label(); - break; - - case 'description': - $replacements[$original] = $view->storage->get('description'); - break; - - case 'id': - $replacements[$original] = $view->storage->id(); - break; - - case 'title': - $title = $view->getTitle(); - $replacements[$original] = $title; - break; - - case 'url': - try { - if ($url = $view->getUrl()) { - $replacements[$original] = $url->setOptions($url_options) - ->toString(); - } - } - catch (\InvalidArgumentException) { - // The view has no URL so we leave the value empty. - $replacements[$original] = ''; - } - break; - - case 'base-table': - $replacements[$original] = $view->storage->get('base_table'); - break; - - case 'base-field': - $replacements[$original] = $view->storage->get('base_field'); - break; - - case 'total-rows': - $replacements[$original] = (int) $view->total_rows; - break; - - case 'items-per-page': - $replacements[$original] = (int) $view->getItemsPerPage(); - break; - - case 'current-page': - $replacements[$original] = (int) $view->getCurrentPage() + 1; - break; - - case 'page-count': - // If there are no items per page, set this to 1 for the division. - $per_page = $view->getItemsPerPage() ?: 1; - $replacements[$original] = max(1, (int) ceil($view->total_rows / $per_page)); - break; - } - } - } - - return $replacements; -} diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc index ebde44706bbb6ecacdd5d415a27cc92f94ec0c57..3a08f62c900949377212658a26a4775357601f16 100644 --- a/core/modules/views/views.views.inc +++ b/core/modules/views/views.views.inc @@ -2,233 +2,14 @@ /** * @file - * Provide views data that isn't tied to any other module. */ -use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\Sql\SqlContentEntityStorage; use Drupal\Core\Render\Markup; use Drupal\field\Entity\FieldConfig; use Drupal\field\FieldConfigInterface; use Drupal\field\FieldStorageConfigInterface; -use Drupal\system\ActionConfigEntityInterface; - -/** - * Implements hook_views_data(). - */ -function views_views_data() { - $data['views']['table']['group'] = t('Global'); - $data['views']['table']['join'] = [ - // #global is a special flag which allows a table to appear all the time. - '#global' => [], - ]; - - $data['views']['random'] = [ - 'title' => t('Random'), - 'help' => t('Randomize the display order.'), - 'sort' => [ - 'id' => 'random', - ], - ]; - - $data['views']['null'] = [ - 'title' => t('Null'), - 'help' => t('Allow a contextual filter value to be ignored. The query will not be altered by this contextual filter value. Can be used when contextual filter values come from the URL, and a part of the URL needs to be ignored.'), - 'argument' => [ - 'id' => 'null', - ], - ]; - - $data['views']['nothing'] = [ - 'title' => t('Custom text'), - 'help' => t('Provide custom text or link.'), - 'field' => [ - 'id' => 'custom', - 'click sortable' => FALSE, - ], - ]; - - $data['views']['counter'] = [ - 'title' => t('View result counter'), - 'help' => t('Displays the actual position of the view result'), - 'field' => [ - 'id' => 'counter', - ], - ]; - - $data['views']['area'] = [ - 'title' => t('Text area'), - 'help' => t('Provide markup for the area using any available text format.'), - 'area' => [ - 'id' => 'text', - ], - ]; - - $data['views']['area_text_custom'] = [ - 'title' => t('Unfiltered text'), - 'help' => t('Provide markup for the area with minimal filtering.'), - 'area' => [ - 'id' => 'text_custom', - ], - ]; - - $data['views']['title'] = [ - 'title' => t('Title override'), - 'help' => t('Override the default view title for this view. This is useful to display an alternative title when a view is empty.'), - 'area' => [ - 'id' => 'title', - 'sub_type' => 'empty', - ], - ]; - - $data['views']['view'] = [ - 'title' => t('View area'), - 'help' => t('Insert a view inside an area.'), - 'area' => [ - 'id' => 'view', - ], - ]; - - $data['views']['result'] = [ - 'title' => t('Result summary'), - 'help' => t('Shows result summary, for example the items per page.'), - 'area' => [ - 'id' => 'result', - ], - ]; - - $data['views']['messages'] = [ - 'title' => t('Messages'), - 'help' => t('Displays messages in an area.'), - 'area' => [ - 'id' => 'messages', - ], - ]; - - $data['views']['http_status_code'] = [ - 'title' => t('Response status code'), - 'help' => t('Alter the HTTP response status code used by this view, mostly helpful for empty results.'), - 'area' => [ - 'id' => 'http_status_code', - ], - ]; - - $data['views']['combine'] = [ - 'title' => t('Combine fields filter'), - 'help' => t('Combine multiple fields together and search by them.'), - 'filter' => [ - 'id' => 'combine', - ], - ]; - - $data['views']['dropbutton'] = [ - 'title' => t('Dropbutton'), - 'help' => t('Display fields in a dropbutton.'), - 'field' => [ - 'id' => 'dropbutton', - ], - ]; - - $data['views']['display_link'] = [ - 'title' => t('Link to display'), - 'help' => t('Displays a link to a path-based display of this view while keeping the filter criteria, sort criteria, pager settings and contextual filters.'), - 'area' => [ - 'id' => 'display_link', - ], - ]; - - // Registers an entity area handler per entity type. - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { - // Excludes entity types, which cannot be rendered. - if ($entity_type->hasViewBuilderClass()) { - $label = $entity_type->getLabel(); - $data['views']['entity_' . $entity_type_id] = [ - 'title' => t('Rendered entity - @label', ['@label' => $label]), - 'help' => t('Displays a rendered @label entity in an area.', ['@label' => $label]), - 'area' => [ - 'entity_type' => $entity_type_id, - 'id' => 'entity', - ], - ]; - } - } - - // Registers an action bulk form per entity. - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type => $entity_info) { - $actions = array_filter(\Drupal::entityTypeManager()->getStorage('action')->loadMultiple(), function (ActionConfigEntityInterface $action) use ($entity_type) { - return $action->getType() == $entity_type; - }); - if (empty($actions)) { - continue; - } - $data[$entity_info->getBaseTable()][$entity_type . '_bulk_form'] = [ - 'title' => t('Bulk update'), - 'help' => t('Allows users to apply an action to one or more items.'), - 'field' => [ - 'id' => 'bulk_form', - ], - ]; - } - - // Registers views data for the entity itself. - foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type->hasHandlerClass('views_data')) { - /** @var \Drupal\views\EntityViewsDataInterface $views_data */ - $views_data = \Drupal::entityTypeManager()->getHandler($entity_type_id, 'views_data'); - $data = NestedArray::mergeDeep($data, $views_data->getViewsData()); - } - } - - // Field modules can implement hook_field_views_data() to override the default - // behavior for adding fields. - $module_handler = \Drupal::moduleHandler(); - - $entity_type_manager = \Drupal::entityTypeManager(); - if ($entity_type_manager->hasDefinition('field_storage_config')) { - /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ - foreach ($entity_type_manager->getStorage('field_storage_config')->loadMultiple() as $field_storage) { - if (_views_field_get_entity_type_storage($field_storage)) { - $result = (array) $module_handler->invoke($field_storage->getTypeProvider(), 'field_views_data', [$field_storage]); - if (empty($result)) { - $result = views_field_default_views_data($field_storage); - } - $module_handler->alter('field_views_data', $result, $field_storage); - - if (is_array($result)) { - $data = NestedArray::mergeDeep($result, $data); - } - } - } - } - - return $data; -} - -/** - * Implements hook_views_data_alter(). - * - * Field modules can implement hook_field_views_data_views_data_alter() to - * alter the views data on a per field basis. This is weirdly named so as - * not to conflict with the \Drupal::moduleHandler()->alter('field_views_data') - * in views_views_data(). - */ -function views_views_data_alter(&$data) { - $entity_type_manager = \Drupal::entityTypeManager(); - if (!$entity_type_manager->hasDefinition('field_storage_config')) { - return; - } - /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ - foreach ($entity_type_manager->getStorage('field_storage_config')->loadMultiple() as $field_storage) { - if (_views_field_get_entity_type_storage($field_storage)) { - $function = $field_storage->getTypeProvider() . '_field_views_data_views_data_alter'; - if (function_exists($function)) { - $function($data, $field_storage); - } - } - } -} /** * Determines whether the entity type the field appears in is SQL based. @@ -763,88 +544,3 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora return $data; } - -/** - * Implements hook_field_views_data(). - * - * The function implements the hook on behalf of 'core' because it adds a - * relationship and a reverse relationship to entity_reference field type, which - * is provided by core. This function also provides an argument plugin for - * entity_reference fields that handles title token replacement. - */ -function core_field_views_data(FieldStorageConfigInterface $field_storage) { - $data = views_field_default_views_data($field_storage); - - // The code below only deals with the Entity reference field type. - if ($field_storage->getType() != 'entity_reference') { - return $data; - } - - $entity_type_manager = \Drupal::entityTypeManager(); - $entity_type_id = $field_storage->getTargetEntityTypeId(); - /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */ - $table_mapping = $entity_type_manager->getStorage($entity_type_id)->getTableMapping(); - - foreach ($data as $table_name => $table_data) { - // Add a relationship to the target entity type. - $target_entity_type_id = $field_storage->getSetting('target_type'); - $target_entity_type = $entity_type_manager->getDefinition($target_entity_type_id); - $entity_type_id = $field_storage->getTargetEntityTypeId(); - $entity_type = $entity_type_manager->getDefinition($entity_type_id); - $target_base_table = $target_entity_type->getDataTable() ?: $target_entity_type->getBaseTable(); - $field_name = $field_storage->getName(); - - if ($target_entity_type instanceof ContentEntityTypeInterface) { - // Provide a relationship for the entity type with the entity reference - // field. - $args = [ - '@label' => $target_entity_type->getLabel(), - '@field_name' => $field_name, - ]; - $data[$table_name][$field_name]['relationship'] = [ - 'title' => t('@label referenced from @field_name', $args), - 'label' => t('@field_name: @label', $args), - 'group' => $entity_type->getLabel(), - 'help' => t('Appears in: @bundles.', ['@bundles' => implode(', ', $field_storage->getBundles())]), - 'id' => 'standard', - 'base' => $target_base_table, - 'entity type' => $target_entity_type_id, - 'base field' => $target_entity_type->getKey('id'), - 'relationship field' => $field_name . '_target_id', - ]; - - // Provide a reverse relationship for the entity type that is referenced by - // the field. - $args['@entity'] = $entity_type->getLabel(); - $args['@label'] = $target_entity_type->getSingularLabel(); - $pseudo_field_name = 'reverse__' . $entity_type_id . '__' . $field_name; - $data[$target_base_table][$pseudo_field_name]['relationship'] = [ - 'title' => t('@entity using @field_name', $args), - 'label' => t('@field_name', ['@field_name' => $field_name]), - 'group' => $target_entity_type->getLabel(), - 'help' => t('Relate each @entity with a @field_name set to the @label.', $args), - 'id' => 'entity_reverse', - 'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(), - 'entity_type' => $entity_type_id, - 'base field' => $entity_type->getKey('id'), - 'field_name' => $field_name, - 'field table' => $table_mapping->getDedicatedDataTableName($field_storage), - 'field field' => $field_name . '_target_id', - 'join_extra' => [ - [ - 'field' => 'deleted', - 'value' => 0, - 'numeric' => TRUE, - ], - ], - ]; - } - - // Provide an argument plugin that has a meaningful titleQuery() - // implementation getting the entity label. - $data[$table_name][$field_name . '_target_id']['argument']['id'] = 'entity_target_id'; - $data[$table_name][$field_name . '_target_id']['argument']['target_entity_type_id'] = $target_entity_type_id; - } - - return $data; -} diff --git a/core/modules/views/views.views_execution.inc b/core/modules/views/views.views_execution.inc deleted file mode 100644 index 3647f52abccc5dcb3f262edd497fead992f51526..0000000000000000000000000000000000000000 --- a/core/modules/views/views.views_execution.inc +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @file - * Provides views runtime hooks for views.module. - */ - -use Drupal\views\ViewExecutable; -use Drupal\views\Plugin\views\PluginBase; - -/** - * Implements hook_views_query_substitutions(). - * - * Makes the following substitutions: - * - Current time. - * - Drupal version. - * - Special language codes; see - * \Drupal\views\Plugin\views\PluginBase::listLanguages(). - */ -function views_views_query_substitutions(ViewExecutable $view) { - $substitutions = [ - '***CURRENT_VERSION***' => \Drupal::VERSION, - '***CURRENT_TIME***' => \Drupal::time()->getRequestTime(), - ] + PluginBase::queryLanguageSubstitutions(); - - return $substitutions; -} - -/** - * Implements hook_views_form_substitutions(). - */ -function views_views_form_substitutions() { - $select_all = [ - '#type' => 'checkbox', - '#default_value' => FALSE, - '#attributes' => ['class' => ['action-table-select-all']], - ]; - return [ - '<!--action-bulk-form-select-all-->' => \Drupal::service('renderer')->render($select_all), - ]; -} diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 2bff41b07c78eb63092866a0e9f1d3551f1efbc0..d9ba648c72e92a3154345d610773126cf69e5dc7 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -2,7 +2,6 @@ /** * @file - * Provides the Views' administrative interface. */ use Drupal\Component\Utility\NestedArray; diff --git a/core/modules/views_ui/src/Hook/ViewsUiHooks.php b/core/modules/views_ui/src/Hook/ViewsUiHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..94d0dc78a702a986ba2757d487b01069273a72f0 --- /dev/null +++ b/core/modules/views_ui/src/Hook/ViewsUiHooks.php @@ -0,0 +1,246 @@ +<?php + +namespace Drupal\views_ui\Hook; + +use Drupal\views\Entity\View; +use Drupal\block\BlockInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\views\Analyzer; +use Drupal\views\ViewExecutable; +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_ui. + */ +class ViewsUiHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.views_ui': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Views UI module provides an interface for managing views for the <a href=":views">Views module</a>. For more information, see the <a href=":handbook">online documentation for the Views UI module</a>.', [ + ':views' => Url::fromRoute('help.page', [ + 'name' => 'views', + ])->toString(), + ':handbook' => 'https://www.drupal.org/documentation/modules/views_ui', + ]) . '</p>'; + $output .= '<h2>' . t('Uses') . '</h2>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Creating and managing views') . '</dt>'; + $output .= '<dd>' . t('Views can be created from the <a href=":list">Views list page</a> by using the "Add view" action. Existing views can be managed from the <a href=":list">Views list page</a> by locating the view in the "Enabled" or "Disabled" list and selecting the desired operation action, for example "Edit".', [ + ':list' => Url::fromRoute('entity.view.collection', [ + 'name' => 'views_ui', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Enabling and disabling views') . '<dt>'; + $output .= '<dd>' . t('Views can be enabled or disabled from the <a href=":list">Views list page</a>. To enable a view, find the view within the "Disabled" list and select the "Enable" operation. To disable a view find the view within the "Enabled" list and select the "Disable" operation.', [ + ':list' => Url::fromRoute('entity.view.collection', [ + 'name' => 'views_ui', + ])->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Exporting and importing views') . '</dt>'; + $output .= '<dd>' . t('Views can be exported and imported as configuration files by using the <a href=":config">Configuration Manager module</a>.', [ + ':config' => \Drupal::moduleHandler()->moduleExists('config') ? Url::fromRoute('help.page', [ + 'name' => 'config', + ])->toString() : '#', + ]) . '</dd>'; + $output .= '</dl>'; + return $output; + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + $entity_types['view']->setFormClass('edit', 'Drupal\views_ui\ViewEditForm')->setFormClass('add', 'Drupal\views_ui\ViewAddForm')->setFormClass('preview', 'Drupal\views_ui\ViewPreviewForm')->setFormClass('duplicate', 'Drupal\views_ui\ViewDuplicateForm')->setFormClass('delete', 'Drupal\Core\Entity\EntityDeleteForm')->setFormClass('break_lock', 'Drupal\views_ui\Form\BreakLockForm')->setListBuilderClass('Drupal\views_ui\ViewListBuilder')->setLinkTemplate('edit-form', '/admin/structure/views/view/{view}')->setLinkTemplate('edit-display-form', '/admin/structure/views/view/{view}/edit/{display_id}')->setLinkTemplate('preview-form', '/admin/structure/views/view/{view}/preview/{display_id}')->setLinkTemplate('duplicate-form', '/admin/structure/views/view/{view}/duplicate')->setLinkTemplate('delete-form', '/admin/structure/views/view/{view}/delete')->setLinkTemplate('enable', '/admin/structure/views/view/{view}/enable')->setLinkTemplate('disable', '/admin/structure/views/view/{view}/disable')->setLinkTemplate('break-lock-form', '/admin/structure/views/view/{view}/break-lock')->setLinkTemplate('collection', '/admin/structure/views'); + } + + /** + * Implements hook_theme(). + */ + #[Hook('theme')] + public function theme() : array { + return [ + // Edit a view + 'views_ui_display_tab_setting' => [ + 'variables' => [ + 'description' => '', + 'link' => '', + 'settings_links' => [], + 'overridden' => FALSE, + 'defaulted' => FALSE, + 'description_separator' => TRUE, + 'class' => [], + ], + 'file' => 'views_ui.theme.inc', + ], + 'views_ui_display_tab_bucket' => [ + 'render element' => 'element', + 'file' => 'views_ui.theme.inc', + ], + 'views_ui_rearrange_filter_form' => [ + 'render element' => 'form', + 'file' => 'views_ui.theme.inc', + ], + 'views_ui_expose_filter_form' => [ + 'render element' => 'form', + 'file' => 'views_ui.theme.inc', + ], + // Legacy theme hook for displaying views info. + 'views_ui_view_info' => [ + 'variables' => [ + 'view' => NULL, + 'displays' => NULL, + ], + 'file' => 'views_ui.theme.inc', + ], + // List views. + 'views_ui_views_listing_table' => [ + 'variables' => [ + 'headers' => NULL, + 'rows' => NULL, + 'attributes' => [], + ], + 'file' => 'views_ui.theme.inc', + ], + 'views_ui_view_displays_list' => [ + 'variables' => [ + 'displays' => [], + ], + ], + // Group of filters. + 'views_ui_build_group_filter_form' => [ + 'render element' => 'form', + 'file' => 'views_ui.theme.inc', + ], + // On behalf of a plugin + 'views_ui_style_plugin_table' => [ + 'render element' => 'form', + 'file' => 'views_ui.theme.inc', + ], + // When previewing a view. + 'views_ui_view_preview_section' => [ + 'variables' => [ + 'view' => NULL, + 'section' => NULL, + 'content' => NULL, + 'links' => '', + ], + 'file' => 'views_ui.theme.inc', + ], + // Generic container wrapper, to use instead of theme_container when an id + // is not desired. + 'views_ui_container' => [ + 'variables' => [ + 'children' => NULL, + 'attributes' => [], + ], + 'file' => 'views_ui.theme.inc', + ], + ]; + } + + /** + * Implements hook_views_plugins_display_alter(). + */ + #[Hook('views_plugins_display_alter')] + public function viewsPluginsDisplayAlter(&$plugins) { + // Attach contextual links to each display plugin. The links will point to + // paths underneath "admin/structure/views/view/{$view->id()}" (i.e., paths + // for editing and performing other contextual actions on the view). + foreach ($plugins as &$display) { + $display['contextual links']['entity.view.edit_form'] = [ + 'route_name' => 'entity.view.edit_form', + 'route_parameters_names' => [ + 'view' => 'id', + ], + ]; + } + } + + /** + * Implements hook_contextual_links_view_alter(). + */ + #[Hook('contextual_links_view_alter')] + public function contextualLinksViewAlter(&$element, $items) { + // Remove contextual links from being rendered, when so desired, such as + // within a View preview. + if (views_ui_contextual_links_suppress()) { + $element['#links'] = []; + } + elseif (!empty($element['#links']['entityviewedit-form'])) { + $display_id = $items['entity.view.edit_form']['metadata']['display_id']; + $route_parameters = $element['#links']['entityviewedit-form']['url']->getRouteParameters() + ['display_id' => $display_id]; + $element['#links']['entityviewedit-form']['url'] = Url::fromRoute('entity.view.edit_display_form', $route_parameters); + } + } + + /** + * Implements hook_views_analyze(). + * + * This is the basic views analysis that checks for very minimal problems. + * There are other analysis tools in core specific sections, such as + * node.views.inc as well. + */ + #[Hook('views_analyze')] + public function viewsAnalyze(ViewExecutable $view) { + $ret = []; + // Check for something other than the default display: + if (count($view->displayHandlers) < 2) { + $ret[] = Analyzer::formatMessage(t('This view has only a default display and therefore will not be placed anywhere on your site; perhaps you want to add a page or a block display.'), 'warning'); + } + // If a display has a path, check that it does not match an existing path + // alias. This results in the path alias not working. + foreach ($view->displayHandlers as $display) { + if (empty($display)) { + continue; + } + if ($display->hasPath() && ($path = $display->getOption('path'))) { + $normal_path = \Drupal::service('path_alias.manager')->getPathByAlias($path); + if ($path != $normal_path) { + $ret[] = Analyzer::formatMessage(t('You have configured display %display with a path which is an path alias as well. This might lead to unwanted effects so better use an internal path.', ['%display' => $display->display['display_title']]), 'warning'); + } + } + } + return $ret; + } + + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $entity) : array { + $operations = []; + if ($entity instanceof BlockInterface) { + $plugin = $entity->getPlugin(); + if ($plugin->getBaseId() === 'views_block') { + $view_id_parts = explode('-', $plugin->getDerivativeId()); + $view_id = $view_id_parts[0] ?? ''; + $display_id = $view_id_parts[1] ?? ''; + $view = View::load($view_id); + if ($view && $view->access('edit')) { + $operations['view-edit'] = [ + 'title' => t('Edit view'), + 'url' => Url::fromRoute('entity.view.edit_display_form', [ + 'view' => $view_id, + 'display_id' => $display_id, + ]), + 'weight' => 50, + ]; + } + } + } + return $operations; + } + +} diff --git a/core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php b/core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php index 9ef21bfa965c0ec746e108631afb2dd3f1330690..5281a69c61873cfb24f39c11e4c79fb4215ae757 100644 --- a/core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php +++ b/core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php @@ -7,15 +7,20 @@ namespace Drupal\views_ui\ProxyClass\ParamConverter { + use Drupal\Core\ParamConverter\ParamConverterInterface; + use Drupal\Core\DependencyInjection\DependencySerializationTrait; + use Symfony\Component\DependencyInjection\ContainerInterface; + use Symfony\Component\Routing\Route; + /** * Provides a proxy class for \Drupal\views_ui\ParamConverter\ViewUIConverter. * * @see \Drupal\Component\ProxyBuilder */ - class ViewUIConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface + class ViewUIConverter implements ParamConverterInterface { - use \Drupal\Core\DependencyInjection\DependencySerializationTrait; + use DependencySerializationTrait; /** * The id of the original proxied service. @@ -46,7 +51,7 @@ class ViewUIConverter implements \Drupal\Core\ParamConverter\ParamConverterInter * @param string $drupal_proxy_original_service_id * The service ID of the original service. */ - public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) + public function __construct(ContainerInterface $container, $drupal_proxy_original_service_id) { $this->container = $container; $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id; @@ -78,7 +83,7 @@ public function convert($value, $definition, $name, array $defaults) /** * {@inheritdoc} */ - public function applies($definition, $name, \Symfony\Component\Routing\Route $route) + public function applies($definition, $name, Route $route) { return $this->lazyLoadItself()->applies($definition, $name, $route); } diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index 131a224ce771460f983f800768ed2bd4e446696e..bc57728304788e94f7f63aa8377d2d89dcce134c 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -16,6 +16,7 @@ use Drupal\Core\Url; use Drupal\views\Views; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Exception\BadRequestException; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -464,7 +465,7 @@ public function getDisplayDetails($view, $display) { if ($path && (!str_contains($path, '%'))) { // Wrap this in a try/catch as trying to generate links to some - // routes may throw a NotAcceptableHttpException if they do not + // routes may throw an exception, for example if they do not // respond to HTML, such as RESTExports. try { if (!parse_url($path, PHP_URL_SCHEME)) { @@ -476,7 +477,7 @@ public function getDisplayDetails($view, $display) { $url = Url::fromUri("base:$path"); } } - catch (NotAcceptableHttpException) { + catch (BadRequestException | NotAcceptableHttpException) { $url = '/' . $path; } diff --git a/core/modules/views_ui/src/ViewListBuilder.php b/core/modules/views_ui/src/ViewListBuilder.php index 06c422e2a18249d96d1ba15a03a8e9598cc00b41..3ad105a8ce55307df90066b373a300af32db5188 100644 --- a/core/modules/views_ui/src/ViewListBuilder.php +++ b/core/modules/views_ui/src/ViewListBuilder.php @@ -10,6 +10,7 @@ use Drupal\Core\Link; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Exception\BadRequestException; use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; /** @@ -261,14 +262,14 @@ protected function getDisplaysList(EntityInterface $view) { $path = $display->getPath(); if ($view->status() && !str_contains($path, '%')) { // Wrap this in a try/catch as trying to generate links to some - // routes may throw a NotAcceptableHttpException if they do not + // routes may throw an exception, for example if they do not // respond to HTML, such as RESTExports. try { // @todo Views should expect and store a leading /. See: // https://www.drupal.org/node/2423913 $rendered_path = Link::fromTextAndUrl('/' . $path, Url::fromUserInput('/' . $path))->toString(); } - catch (NotAcceptableHttpException) { + catch (BadRequestException | NotAcceptableHttpException) { $rendered_path = '/' . $path; } } diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index ef72a2c449d69a05eca2c21d41709a5d517f452d..6fced03dd17fe637acc3aa23deb5906bae6208ef 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -39,7 +39,7 @@ class ViewUI implements ViewEntityInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $changed_display; /** @@ -47,7 +47,7 @@ class ViewUI implements ViewEntityInterface { * * @var float */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $render_time; /** @@ -72,7 +72,7 @@ class ViewUI implements ViewEntityInterface { * * @var array */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $temporary_options; /** @@ -87,11 +87,9 @@ class ViewUI implements ViewEntityInterface { * * @var bool */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing public $live_preview; - public $renderPreview = FALSE; - /** * The View storage object. * diff --git a/core/modules/views_ui/tests/modules/views_ui_test/config/install/views.view.sa_contrib_2013_035.yml b/core/modules/views_ui/tests/modules/views_ui_test/config/install/views.view.sa_contrib_2013_035.yml index 80029fb944ac8c7705aa48fc9123f85df361a7db..d6280799790c9b196fa5ceaf522d3c8cbcadeaaf 100644 --- a/core/modules/views_ui/tests/modules/views_ui_test/config/install/views.view.sa_contrib_2013_035.yml +++ b/core/modules/views_ui/tests/modules/views_ui_test/config/install/views.view.sa_contrib_2013_035.yml @@ -183,4 +183,4 @@ display: display_plugin: page position: 2 display_options: - path: foobar + path: 'foobar ' diff --git a/core/modules/views_ui/tests/modules/views_ui_test/src/Hook/ViewsUiTestHooks.php b/core/modules/views_ui/tests/modules/views_ui_test/src/Hook/ViewsUiTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..e564b9637ee77b06ea64797687025982d3d57fff --- /dev/null +++ b/core/modules/views_ui/tests/modules/views_ui_test/src/Hook/ViewsUiTestHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_ui_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_ui_test. + */ +class ViewsUiTestHooks { + + /** + * Implements hook_views_preview_info_alter(). + * + * Add a row count row to the live preview area. + */ + #[Hook('views_preview_info_alter')] + public function viewsPreviewInfoAlter(&$rows, $view) { + $data = ['#markup' => t('Test row count')]; + $data['#attached']['library'][] = 'views_ui_test/views_ui_test.test'; + $rows['query'][] = [['data' => $data], count($view->result)]; + } + +} diff --git a/core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module b/core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module deleted file mode 100644 index d963d7fcc6a37c5e76ed7ca80e22d15c6ce1cf72..0000000000000000000000000000000000000000 --- a/core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Helper module for Views UI tests. - */ - -declare(strict_types=1); - -/** - * Implements hook_views_preview_info_alter(). - * - * Add a row count row to the live preview area. - */ -function views_ui_test_views_preview_info_alter(&$rows, $view) { - $data = ['#markup' => t('Test row count')]; - $data['#attached']['library'][] = 'views_ui_test/views_ui_test.test'; - $rows['query'][] = [['data' => $data], count($view->result)]; -} diff --git a/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldHooks.php b/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..795982f64b5885a6eaf236c40af0f8a467fab5b6 --- /dev/null +++ b/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldHooks.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_ui_test_field\Hook; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_ui_test_field. + */ +class ViewsUiTestFieldHooks { + + /** + * Implements hook_form_FORM_ID_alter() for views_ui_add_handler_form. + * + * Changes the label for one of the tests fields to validate this label is not + * searched on. + */ + #[Hook('form_views_ui_add_handler_form_alter')] + public function formViewsUiAddHandlerFormAlter(&$form, FormStateInterface $form_state) : void { + $form['options']['name']['#options']['views.views_test_field_1']['title']['data']['#title'] .= ' FIELD_1_LABEL'; + } + +} diff --git a/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldViewsHooks.php b/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldViewsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..def022e945b0826ffb8b5e51597677d6f0874a62 --- /dev/null +++ b/core/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldViewsHooks.php @@ -0,0 +1,36 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\views_ui_test_field\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for views_ui_test_field. + */ +class ViewsUiTestFieldViewsHooks { + + /** + * Implements hook_views_data(). + */ + #[Hook('views_data')] + public function viewsData() { + $data['views']['views_test_field_1'] = [ + 'title' => t('Views test field 1 - FIELD_1_TITLE'), + 'help' => t('Field 1 for testing purposes - FIELD_1_DESCRIPTION'), + 'field' => [ + 'id' => 'views_test_field_1', + ], + ]; + $data['views']['views_test_field_2'] = [ + 'title' => t('Views test field 2 - FIELD_2_TITLE'), + 'help' => t('Field 2 for testing purposes - FIELD_2_DESCRIPTION'), + 'field' => [ + 'id' => 'views_test_field_2', + ], + ]; + return $data; + } + +} diff --git a/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module b/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module deleted file mode 100644 index 8c1ab18e92f46542c2bb5d311d17a264c49cdb62..0000000000000000000000000000000000000000 --- a/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * @file - * ViewsUI Test field module. - */ - -declare(strict_types=1); - -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_form_FORM_ID_alter() for views_ui_add_handler_form. - * - * Changes the label for one of the tests fields to validate this label is not - * searched on. - */ -function views_ui_test_field_form_views_ui_add_handler_form_alter(&$form, FormStateInterface $form_state) { - $form['options']['name']['#options']['views.views_test_field_1']['title']['data']['#title'] .= ' FIELD_1_LABEL'; -} diff --git a/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.views.inc b/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.views.inc deleted file mode 100644 index 33cefbf8ef2e2aabbcd88d37d7a827b86035da1c..0000000000000000000000000000000000000000 --- a/core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.views.inc +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @file - * Provide views data for testing purposes. - */ - -declare(strict_types=1); - -/** - * Implements hook_views_data(). - */ -function views_ui_test_field_views_data() { - - $data['views']['views_test_field_1'] = [ - 'title' => t('Views test field 1 - FIELD_1_TITLE'), - 'help' => t('Field 1 for testing purposes - FIELD_1_DESCRIPTION'), - 'field' => [ - 'id' => 'views_test_field_1', - ], - ]; - $data['views']['views_test_field_2'] = [ - 'title' => t('Views test field 2 - FIELD_2_TITLE'), - 'help' => t('Field 2 for testing purposes - FIELD_2_DESCRIPTION'), - 'field' => [ - 'id' => 'views_test_field_2', - ], - ]; - - return $data; -} diff --git a/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php index 241f64944a19d896730473c0a0df1fdbfa2b282b..7a8bbcbb8ca01456990ab5a6444275c14b5975e1 100644 --- a/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php +++ b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php @@ -52,7 +52,7 @@ public function testSpecifyValidation(): void { * @param bool $specify_validation * The form validation. */ - protected function saveArgumentHandlerWithValidationOptions($specify_validation) { + protected function saveArgumentHandlerWithValidationOptions($specify_validation): void { $options = [ 'options[validate][type]' => 'entity---node', 'options[specify_validation]' => $specify_validation, diff --git a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php index f35bae650ac3b8bd64509a06cf05fd489d7b1e64..cdaa10c90d3d8de0cdf7c0fcc20dd67075ed8258 100644 --- a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php +++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php @@ -211,15 +211,15 @@ public function testPathDestination(): void { * various views listing pages, and they might have tokens in them. So we * need special code to find the correct one to click. * - * @param $label + * @param string $label * Text between the anchor tags of the desired link. - * @param $unique_href_part + * @param string $unique_href_part * A unique string that is expected to occur within the href of the desired * link. For example, if the link URL is expected to look like * "admin/structure/views/view/glossary/*", then "/glossary/" could be * passed as the expected unique string. */ - public function clickViewsOperationLink($label, $unique_href_part) { + public function clickViewsOperationLink($label, $unique_href_part): void { $this->assertSession()->elementExists('xpath', "//a[normalize-space(text())='$label' and contains(@href, '$unique_href_part')]")->click(); } diff --git a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php index 9457e9e5d77e7ddfbb7b6f418d37783f31ba831c..d9be7f43a7564249c19dd2b2fed6f583795b66d9 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php @@ -45,7 +45,7 @@ public function testFeedUI(): void { * @param string $view_name * The view name to check against. */ - protected function checkFeedViewUi($view_name) { + protected function checkFeedViewUi($view_name): void { $this->drupalGet('admin/structure/views'); // Verify that the page lists the $view_name view. // Regression test: ViewListBuilder::getDisplayPaths() did not properly diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php index 8b2701b4f92bbfaa4c9ca6160ff0be995cb01b3d..aad252a3e85c7a743477804cc72ff9486cf21fe1 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php @@ -53,7 +53,7 @@ public function testPathUI(): void { /** * Tests basic functionality in configuring a view. */ - protected function doBasicPathUITest() { + protected function doBasicPathUITest(): void { $this->drupalGet('admin/structure/views/view/test_view'); // Add a new page display and check the appearing text. @@ -77,7 +77,7 @@ protected function doBasicPathUITest() { /** * Tests that View paths are properly filtered for XSS. */ - public function doPathXssFilterTest() { + public function doPathXssFilterTest(): void { $this->drupalGet('admin/structure/views/view/test_view'); $this->submitForm([], 'Add Page'); $this->drupalGet('admin/structure/views/nojs/display/test_view/page_2/path'); @@ -103,7 +103,7 @@ public function doPathXssFilterTest() { /** * Tests a couple of invalid path patterns. */ - protected function doAdvancedPathsValidationTest() { + protected function doAdvancedPathsValidationTest(): void { $url = 'admin/structure/views/nojs/display/test_view/page_1/path'; $this->drupalGet($url); diff --git a/core/modules/views_ui/tests/src/Functional/XssTest.php b/core/modules/views_ui/tests/src/Functional/XssTest.php index 2c3ca64b5f708e38b8d09cb13fafc1fdf1b23204..887bdfae72c77c252584fe60a169f4a25bd028a9 100644 --- a/core/modules/views_ui/tests/src/Functional/XssTest.php +++ b/core/modules/views_ui/tests/src/Functional/XssTest.php @@ -37,6 +37,8 @@ public function testViewsUi(): void { */ public function testNoDoubleEscaping(): void { $this->drupalGet('admin/structure/views'); + $this->assertSession()->pageTextContains('sa_contrib_2013_035'); + $this->assertSession()->pageTextContains('Page (/foobar )'); $this->assertSession()->assertNoEscaped('<'); $this->drupalGet('admin/structure/views/view/sa_contrib_2013_035'); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php index 9e55481c9cdc7b5b640bb3e0fcc4a687b76ad528..f5ad7de3ba705b7e0212c11420268359fd121230 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php @@ -151,7 +151,7 @@ public function testPageContextualLinks(): void { * @param string $selector * The selector for the element that contains the contextual Rink. */ - protected function toggleContextualTriggerVisibility($selector) { + protected function toggleContextualTriggerVisibility($selector): void { // Hovering over the element itself with should be enough, but does not // work. Manually remove the visually-hidden class. $this->getSession()->executeScript("jQuery('{$selector} .contextual .trigger').toggleClass('visually-hidden');"); @@ -190,7 +190,7 @@ public function testAddDisplayBlockTranslation(): void { /** * Helper function for adding interface text translations. */ - private function addTranslation($langcode, $source_string, $translation_string) { + private function addTranslation($langcode, $source_string, $translation_string): void { $storage = \Drupal::service('locale.storage'); $string = $storage->findString(['source' => $source_string]); if (is_null($string)) { diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php index edb025c2fa362336e2be3e4d0e6d9342eb1984e3..7864b7286f73570ceed9ee42b14bf46c29aa6243 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php @@ -77,7 +77,7 @@ public function testRemoveFieldHandler(): void { /** * Uses the 'And/Or Rearrange' link for fields to open a dialog. */ - protected function openFieldDialog() { + protected function openFieldDialog(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $dropbutton = $page->find('css', '.views-ui-display-tab-bucket.field .dropbutton-toggle button'); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php index 8dffc12aa43005791a12bacf1c5ff94952343883..f2580e7457e1e4b1e6e4fc327ea586226628e9d4 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -178,7 +178,7 @@ public function testOperatorLabels(): void { /** * Uses the 'And/Or Rearrange' link for filters to open a dialog. */ - protected function openFilterDialog() { + protected function openFilterDialog(): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $dropbutton = $page->find('css', '.views-ui-display-tab-bucket.filter .dropbutton-toggle button'); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php index 1348617280835b0c22981a180c2097d9ef362c7f..b759976d7147fcce1e0849ae2524e518d0037450 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php @@ -66,7 +66,7 @@ protected function setUp(): void { * Because the schema of views_test_data.module is dependent on the test * using it, it cannot be enabled normally. */ - protected function enableViewsTestModule() { + protected function enableViewsTestModule(): void { // Define the schema and views data variable before enabling the test module. \Drupal::state()->set('views_test_data_schema', $this->schemaDefinition()); \Drupal::state()->set('views_test_data_views_data', $this->viewsData()); @@ -259,7 +259,7 @@ public function testPreviewSortLink(): void { * @param int $row_count * The expected number of rows in the preview. */ - protected function getPreviewAJAX($view_name, $panel_id, $row_count) { + protected function getPreviewAJAX($view_name, $panel_id, $row_count): void { $this->drupalGet('admin/structure/views/view/' . $view_name . '/edit/' . $panel_id); $this->getSession()->getPage()->pressButton('Update preview'); $this->assertSession()->assertWaitOnAjaxRequest(); @@ -274,7 +274,7 @@ protected function getPreviewAJAX($view_name, $panel_id, $row_count) { * @param int $row_count * The expected number of rows in the preview. */ - protected function clickPreviewLinkAJAX(NodeElement $element, $row_count) { + protected function clickPreviewLinkAJAX(NodeElement $element, $row_count): void { $element->click(); $this->assertSession()->assertWaitOnAjaxRequest(); $this->assertPreviewAJAX($row_count); diff --git a/core/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php b/core/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php index da792a4047b306e711dda9a74571e4122bca448e..48fe83df982d8cc0e31a3d6fb3ab1dd030d86928 100644 --- a/core/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php +++ b/core/modules/views_ui/tests/src/Kernel/ViewsBlockTest.php @@ -9,6 +9,7 @@ use Drupal\Tests\user\Traits\UserCreationTrait; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; use Drupal\views\Tests\ViewTestData; +use Drupal\views_ui\Hook\ViewsUiHooks; /** * Tests ViewsBlock. @@ -60,7 +61,8 @@ public function testOperationLinks(): void { ]); // The anonymous user doesn't have the "administer block" permission. - $this->assertEmpty(views_ui_entity_operation($block)); + $viewsUiEntityOperation = new ViewsUiHooks(); + $this->assertEmpty($viewsUiEntityOperation->entityOperation($block)); $this->setUpCurrentUser(['uid' => 1], ['administer views']); @@ -74,7 +76,7 @@ public function testOperationLinks(): void { ]), 'weight' => 50, ], - ], views_ui_entity_operation($block)); + ], $viewsUiEntityOperation->entityOperation($block)); } } diff --git a/core/modules/views_ui/views_ui.api.php b/core/modules/views_ui/views_ui.api.php index d623fd4f4c5121e95f05acbb5db2192f344d15d6..65b14c6fdbe87b8b9916be3e33432463b9f6e427 100644 --- a/core/modules/views_ui/views_ui.api.php +++ b/core/modules/views_ui/views_ui.api.php @@ -1,5 +1,11 @@ <?php +/** + * @file + */ + +use Drupal\views_ui\ViewUI; + /** * @file * Describes hooks provided by the Views UI module. @@ -28,7 +34,7 @@ * * @see \Drupal\views_ui\ViewUI::renderDisplayTop() */ -function hook_views_ui_display_top_alter(&$build, \Drupal\views_ui\ViewUI $view, $display_id) { +function hook_views_ui_display_top_alter(&$build, ViewUI $view, $display_id) { $build['custom']['#markup'] = 'This text should always appear'; } @@ -50,7 +56,7 @@ function hook_views_ui_display_top_alter(&$build, \Drupal\views_ui\ViewUI $view, * * @see \Drupal\views_ui\ViewEditForm::getDisplayTab() */ -function hook_views_ui_display_tab_alter(&$build, \Drupal\views_ui\ViewUI $view, $display_id) { +function hook_views_ui_display_tab_alter(&$build, ViewUI $view, $display_id) { $build['custom']['#markup'] = 'This text should always appear'; } diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index f008218525d98671b702c000a920dc952ad2ea3f..f84be5ec62d2634169050cb82d1d2afce17eef21 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -2,132 +2,11 @@ /** * @file - * Provide structure for the administrative interface to Views. */ -use Drupal\block\BlockInterface; use Drupal\Component\Utility\Xss; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; -use Drupal\views\Entity\View; use Drupal\views\ViewExecutable; -use Drupal\views\Analyzer; - -/** - * Implements hook_help(). - */ -function views_ui_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.views_ui': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Views UI module provides an interface for managing views for the <a href=":views">Views module</a>. For more information, see the <a href=":handbook">online documentation for the Views UI module</a>.', [':views' => Url::fromRoute('help.page', ['name' => 'views'])->toString(), ':handbook' => 'https://www.drupal.org/documentation/modules/views_ui']) . '</p>'; - $output .= '<h2>' . t('Uses') . '</h2>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Creating and managing views') . '</dt>'; - $output .= '<dd>' . t('Views can be created from the <a href=":list">Views list page</a> by using the "Add view" action. Existing views can be managed from the <a href=":list">Views list page</a> by locating the view in the "Enabled" or "Disabled" list and selecting the desired operation action, for example "Edit".', [':list' => Url::fromRoute('entity.view.collection', ['name' => 'views_ui'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Enabling and disabling views') . '<dt>'; - $output .= '<dd>' . t('Views can be enabled or disabled from the <a href=":list">Views list page</a>. To enable a view, find the view within the "Disabled" list and select the "Enable" operation. To disable a view find the view within the "Enabled" list and select the "Disable" operation.', [':list' => Url::fromRoute('entity.view.collection', ['name' => 'views_ui'])->toString()]) . '</dd>'; - $output .= '<dt>' . t('Exporting and importing views') . '</dt>'; - $output .= '<dd>' . t('Views can be exported and imported as configuration files by using the <a href=":config">Configuration Manager module</a>.', [':config' => (\Drupal::moduleHandler()->moduleExists('config')) ? Url::fromRoute('help.page', ['name' => 'config'])->toString() : '#']) . '</dd>'; - $output .= '</dl>'; - return $output; - } -} - -/** - * Implements hook_entity_type_build(). - */ -function views_ui_entity_type_build(array &$entity_types) { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ - $entity_types['view'] - ->setFormClass('edit', 'Drupal\views_ui\ViewEditForm') - ->setFormClass('add', 'Drupal\views_ui\ViewAddForm') - ->setFormClass('preview', 'Drupal\views_ui\ViewPreviewForm') - ->setFormClass('duplicate', 'Drupal\views_ui\ViewDuplicateForm') - ->setFormClass('delete', 'Drupal\Core\Entity\EntityDeleteForm') - ->setFormClass('break_lock', 'Drupal\views_ui\Form\BreakLockForm') - ->setListBuilderClass('Drupal\views_ui\ViewListBuilder') - ->setLinkTemplate('edit-form', '/admin/structure/views/view/{view}') - ->setLinkTemplate('edit-display-form', '/admin/structure/views/view/{view}/edit/{display_id}') - ->setLinkTemplate('preview-form', '/admin/structure/views/view/{view}/preview/{display_id}') - ->setLinkTemplate('duplicate-form', '/admin/structure/views/view/{view}/duplicate') - ->setLinkTemplate('delete-form', '/admin/structure/views/view/{view}/delete') - ->setLinkTemplate('enable', '/admin/structure/views/view/{view}/enable') - ->setLinkTemplate('disable', '/admin/structure/views/view/{view}/disable') - ->setLinkTemplate('break-lock-form', '/admin/structure/views/view/{view}/break-lock') - ->setLinkTemplate('collection', '/admin/structure/views'); -} - -/** - * Implements hook_theme(). - */ -function views_ui_theme() { - return [ - // Edit a view - 'views_ui_display_tab_setting' => [ - 'variables' => ['description' => '', 'link' => '', 'settings_links' => [], 'overridden' => FALSE, 'defaulted' => FALSE, 'description_separator' => TRUE, 'class' => []], - 'file' => 'views_ui.theme.inc', - ], - 'views_ui_display_tab_bucket' => [ - 'render element' => 'element', - 'file' => 'views_ui.theme.inc', - ], - 'views_ui_rearrange_filter_form' => [ - 'render element' => 'form', - 'file' => 'views_ui.theme.inc', - ], - 'views_ui_expose_filter_form' => [ - 'render element' => 'form', - 'file' => 'views_ui.theme.inc', - ], - - // Legacy theme hook for displaying views info. - 'views_ui_view_info' => [ - 'variables' => ['view' => NULL, 'displays' => NULL], - 'file' => 'views_ui.theme.inc', - ], - - // List views. - 'views_ui_views_listing_table' => [ - 'variables' => [ - 'headers' => NULL, - 'rows' => NULL, - 'attributes' => [], - ], - 'file' => 'views_ui.theme.inc', - ], - 'views_ui_view_displays_list' => [ - 'variables' => ['displays' => []], - ], - - // Group of filters. - 'views_ui_build_group_filter_form' => [ - 'render element' => 'form', - 'file' => 'views_ui.theme.inc', - ], - - // On behalf of a plugin - 'views_ui_style_plugin_table' => [ - 'render element' => 'form', - 'file' => 'views_ui.theme.inc', - ], - - // When previewing a view. - 'views_ui_view_preview_section' => [ - 'variables' => ['view' => NULL, 'section' => NULL, 'content' => NULL, 'links' => ''], - 'file' => 'views_ui.theme.inc', - ], - - // Generic container wrapper, to use instead of theme_container when an id - // is not desired. - 'views_ui_container' => [ - 'variables' => ['children' => NULL, 'attributes' => []], - 'file' => 'views_ui.theme.inc', - ], - ]; -} /** * Implements hook_preprocess_HOOK() for views templates. @@ -236,40 +115,6 @@ function views_ui_view_preview_section_rows_links(ViewExecutable $view) { return $links; } -/** - * Implements hook_views_plugins_display_alter(). - */ -function views_ui_views_plugins_display_alter(&$plugins) { - // Attach contextual links to each display plugin. The links will point to - // paths underneath "admin/structure/views/view/{$view->id()}" (i.e., paths - // for editing and performing other contextual actions on the view). - foreach ($plugins as &$display) { - $display['contextual links']['entity.view.edit_form'] = [ - 'route_name' => 'entity.view.edit_form', - 'route_parameters_names' => ['view' => 'id'], - ]; - } -} - -/** - * Implements hook_contextual_links_view_alter(). - */ -function views_ui_contextual_links_view_alter(&$element, $items) { - // Remove contextual links from being rendered, when so desired, such as - // within a View preview. - if (views_ui_contextual_links_suppress()) { - $element['#links'] = []; - } - // Append the display ID to the Views UI edit links, so that clicking on the - // contextual link takes you directly to the correct display tab on the edit - // screen. - elseif (!empty($element['#links']['entityviewedit-form'])) { - $display_id = $items['entity.view.edit_form']['metadata']['display_id']; - $route_parameters = $element['#links']['entityviewedit-form']['url']->getRouteParameters() + ['display_id' => $display_id]; - $element['#links']['entityviewedit-form']['url'] = Url::fromRoute('entity.view.edit_display_form', $route_parameters); - } -} - /** * Sets a static variable for controlling whether contextual links are rendered. * @@ -307,61 +152,3 @@ function views_ui_contextual_links_suppress_push() { function views_ui_contextual_links_suppress_pop() { views_ui_contextual_links_suppress(((int) views_ui_contextual_links_suppress()) - 1); } - -/** - * Implements hook_views_analyze(). - * - * This is the basic views analysis that checks for very minimal problems. - * There are other analysis tools in core specific sections, such as - * node.views.inc as well. - */ -function views_ui_views_analyze(ViewExecutable $view) { - $ret = []; - // Check for something other than the default display: - if (count($view->displayHandlers) < 2) { - $ret[] = Analyzer::formatMessage(t('This view has only a default display and therefore will not be placed anywhere on your site; perhaps you want to add a page or a block display.'), 'warning'); - } - // If a display has a path, check that it does not match an existing path - // alias. This results in the path alias not working. - foreach ($view->displayHandlers as $display) { - if (empty($display)) { - continue; - } - if ($display->hasPath() && $path = $display->getOption('path')) { - $normal_path = \Drupal::service('path_alias.manager')->getPathByAlias($path); - if ($path != $normal_path) { - $ret[] = Analyzer::formatMessage(t('You have configured display %display with a path which is an path alias as well. This might lead to unwanted effects so better use an internal path.', ['%display' => $display->display['display_title']]), 'warning'); - } - } - } - - return $ret; -} - -/** - * Implements hook_entity_operation(). - */ -function views_ui_entity_operation(EntityInterface $entity): array { - $operations = []; - if ($entity instanceof BlockInterface) { - $plugin = $entity->getPlugin(); - if ($plugin->getBaseId() === 'views_block') { - $view_id_parts = explode('-', $plugin->getDerivativeId()); - $view_id = $view_id_parts[0] ?? ''; - $display_id = $view_id_parts[1] ?? ''; - $view = View::load($view_id); - if ($view && $view->access('edit')) { - $operations['view-edit'] = [ - 'title' => t('Edit view'), - 'url' => Url::fromRoute('entity.view.edit_display_form', [ - 'view' => $view_id, - 'display_id' => $display_id, - ]), - 'weight' => 50, - ]; - } - } - } - - return $operations; -} diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index e94e38e802759d35a056fb96d44e01b81298d93e..996c700aa08d6cc31cba78a0322c48f99f6173df 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -2,7 +2,6 @@ /** * @file - * Preprocessors and theme functions for the Views UI. */ use Drupal\Component\Render\FormattableMarkup; diff --git a/core/modules/workflows/src/Entity/Workflow.php b/core/modules/workflows/src/Entity/Workflow.php index bb10c0271aac7926b22a4d0f6ba5819e595efe7b..7ab9e20f77e4d90af140dd7cf3e19794f3bed6b3 100644 --- a/core/modules/workflows/src/Entity/Workflow.php +++ b/core/modules/workflows/src/Entity/Workflow.php @@ -2,67 +2,78 @@ namespace Drupal\workflows\Entity; +use Drupal\Core\Entity\Attribute\ConfigEntityType; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityWithPluginCollectionInterface; use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection; use Drupal\workflows\Exception\RequiredStateMissingException; +use Drupal\workflows\Form\WorkflowAddForm; +use Drupal\workflows\Form\WorkflowDeleteForm; +use Drupal\workflows\Form\WorkflowEditForm; +use Drupal\workflows\Form\WorkflowStateAddForm; +use Drupal\workflows\Form\WorkflowStateDeleteForm; +use Drupal\workflows\Form\WorkflowStateEditForm; +use Drupal\workflows\Form\WorkflowTransitionAddForm; +use Drupal\workflows\Form\WorkflowTransitionDeleteForm; +use Drupal\workflows\Form\WorkflowTransitionEditForm; +use Drupal\workflows\WorkflowAccessControlHandler; use Drupal\workflows\WorkflowInterface; +use Drupal\workflows\WorkflowListBuilder; /** * Defines the workflow entity. - * - * @ConfigEntityType( - * id = "workflow", - * label = @Translation("Workflow"), - * label_collection = @Translation("Workflows"), - * label_singular = @Translation("workflow"), - * label_plural = @Translation("workflows"), - * label_count = @PluralTranslation( - * singular = "@count workflow", - * plural = "@count workflows", - * ), - * handlers = { - * "access" = "Drupal\workflows\WorkflowAccessControlHandler", - * "list_builder" = "Drupal\workflows\WorkflowListBuilder", - * "form" = { - * "add" = "Drupal\workflows\Form\WorkflowAddForm", - * "edit" = "Drupal\workflows\Form\WorkflowEditForm", - * "delete" = "Drupal\workflows\Form\WorkflowDeleteForm", - * "add-state" = "Drupal\workflows\Form\WorkflowStateAddForm", - * "edit-state" = "Drupal\workflows\Form\WorkflowStateEditForm", - * "delete-state" = "Drupal\workflows\Form\WorkflowStateDeleteForm", - * "add-transition" = "Drupal\workflows\Form\WorkflowTransitionAddForm", - * "edit-transition" = "Drupal\workflows\Form\WorkflowTransitionEditForm", - * "delete-transition" = "Drupal\workflows\Form\WorkflowTransitionDeleteForm", - * }, - * "route_provider" = { - * "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider", - * }, - * }, - * config_prefix = "workflow", - * admin_permission = "administer workflows", - * entity_keys = { - * "id" = "id", - * "label" = "label", - * "uuid" = "uuid", - * }, - * links = { - * "add-form" = "/admin/config/workflow/workflows/add", - * "edit-form" = "/admin/config/workflow/workflows/manage/{workflow}", - * "delete-form" = "/admin/config/workflow/workflows/manage/{workflow}/delete", - * "add-state-form" = "/admin/config/workflow/workflows/manage/{workflow}/add_state", - * "add-transition-form" = "/admin/config/workflow/workflows/manage/{workflow}/add_transition", - * "collection" = "/admin/config/workflow/workflows", - * }, - * config_export = { - * "id", - * "label", - * "type", - * "type_settings", - * }, - * ) */ +#[ConfigEntityType( + id: 'workflow', + label: new TranslatableMarkup('Workflow'), + label_collection: new TranslatableMarkup('Workflows'), + label_singular: new TranslatableMarkup('workflow'), + label_plural: new TranslatableMarkup('workflows'), + config_prefix: 'workflow', + entity_keys: [ + 'id' => 'id', + 'label' => 'label', + 'uuid' => 'uuid', + ], + handlers: [ + 'access' => WorkflowAccessControlHandler::class, + 'list_builder' => WorkflowListBuilder::class, + 'form' => [ + 'add' => WorkflowAddForm::class, + 'edit' => WorkflowEditForm::class, + 'delete' => WorkflowDeleteForm::class, + 'add-state' => WorkflowStateAddForm::class, + 'edit-state' => WorkflowStateEditForm::class, + 'delete-state' => WorkflowStateDeleteForm::class, + 'add-transition' => WorkflowTransitionAddForm::class, + 'edit-transition' => WorkflowTransitionEditForm::class, + 'delete-transition' => WorkflowTransitionDeleteForm::class, + ], + 'route_provider' => ['html' => AdminHtmlRouteProvider::class], + ], + links: [ + 'add-form' => '/admin/config/workflow/workflows/add', + 'edit-form' => '/admin/config/workflow/workflows/manage/{workflow}', + 'delete-form' => '/admin/config/workflow/workflows/manage/{workflow}/delete', + 'add-state-form' => '/admin/config/workflow/workflows/manage/{workflow}/add_state', + 'add-transition-form' => '/admin/config/workflow/workflows/manage/{workflow}/add_transition', + 'collection' => '/admin/config/workflow/workflows', + ], + admin_permission: 'administer workflows', + label_count: [ + 'singular' => '@count workflow', + 'plural' => '@count workflows', + ], + config_export: [ + 'id', + 'label', + 'type', + 'type_settings', + ], +)] class Workflow extends ConfigEntityBase implements WorkflowInterface, EntityWithPluginCollectionInterface { /** diff --git a/core/modules/workflows/src/Hook/WorkflowsHooks.php b/core/modules/workflows/src/Hook/WorkflowsHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..6fe0cf68dca0d8a24bd811151e54c079882baf15 --- /dev/null +++ b/core/modules/workflows/src/Hook/WorkflowsHooks.php @@ -0,0 +1,62 @@ +<?php + +namespace Drupal\workflows\Hook; + +use Drupal\Core\Url; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for workflows. + */ +class WorkflowsHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.workflows': + $content_moderation_url = NULL; + if (\Drupal::moduleHandler()->moduleExists('content_moderation')) { + $content_moderation_url = Url::fromRoute('help.page', ['name' => 'content_moderation'])->toString(); + } + $output = '<h2>' . t('About') . '</h2>'; + if ($content_moderation_url) { + $output .= '<p>' . t('The Workflows module provides an API and an interface to create workflows with transitions between different states (for example publication or user status). These have to be provided by other modules such as the <a href=":moderation">Content Moderation module</a>. For more information, see the <a href=":workflow">online documentation for the Workflows module</a>.', [ + ':moderation' => $content_moderation_url, + ':workflow' => 'https://www.drupal.org/documentation/modules/workflows', + ]) . '</p>'; + } + else { + $output .= '<p>' . t('The Workflows module provides an API and an interface to create workflows with transitions between different states (for example publication or user status). These have to be provided by other modules such as the Content Moderation module. For more information, see the <a href=":workflow">online documentation for the Workflows module</a>.', [':workflow' => 'https://www.drupal.org/documentation/modules/workflows']) . '</p>'; + } + $output .= '<h3>' . t('Uses') . '</h3>'; + $output .= '<dl>'; + $output .= '<dt>' . t('Adding workflows') . '</dt>'; + if ($content_moderation_url) { + $output .= '<dd>' . t('You can <em>only</em> add workflows on the <a href=":workflows">Workflows page</a>, after you have installed a module that leverages the API such as the <a href=":moderation">Content Moderation module</a>.', [ + ':moderation' => $content_moderation_url, + ':workflows' => Url::fromRoute('entity.workflow.collection')->toString(), + ]) . '</dd>'; + } + else { + $output .= '<dd>' . t('You can <em>only</em> add workflows on the <a href=":workflows">Workflows page</a>, after you have installed a module that leverages the API such as the Content Moderation module.', [':workflow' => 'https://www.drupal.org/documentation/modules/workflows']) . '</dd>'; + } + $output .= '<dt>' . t('Adding states') . '<dt>'; + $output .= '<dd>' . t('A workflow requires at least two states. States can be added when you add or edit a workflow on the <a href=":workflows">Workflows page</a>.', [ + ':workflows' => Url::fromRoute('entity.workflow.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Adding transitions') . '</dt>'; + $output .= '<dd>' . t('A transition defines in which state an item can be save as next. It has one destination state, but can have several states <em>from</em> which the transition can be applied. Transitions can be added when you add or edit a workflow on the <a href=":workflows">Workflows page</a>.', [ + ':workflows' => Url::fromRoute('entity.workflow.collection')->toString(), + ]) . '</dd>'; + $output .= '<dt>' . t('Configuring workflows further') . '</dt>'; + $output .= '<dd>' . t('Depending on the installed workflow type, additional configuration can be available in the edit form of a workflow.') . '</dd>'; + $output .= '<dl>'; + return $output; + } + } + +} diff --git a/core/modules/workflows/src/StateInterface.php b/core/modules/workflows/src/StateInterface.php index 3335ea7452a597f239071616783101b21532baf4..d4fe9871c46d62487554638c775a3668f66e1fdc 100644 --- a/core/modules/workflows/src/StateInterface.php +++ b/core/modules/workflows/src/StateInterface.php @@ -60,7 +60,7 @@ public function canTransitionTo($to_state_id); * @return \Drupal\workflows\TransitionInterface * The Transition object for the provided state ID. * - * @throws \InvalidArgumentException() + * @throws \InvalidArgumentException * Exception thrown when the provided state ID can not be transitioned to. */ public function getTransitionTo($to_state_id); diff --git a/core/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php b/core/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..30c1ef1713e4c16fa62aaa65f96d904ff7aa3fea --- /dev/null +++ b/core/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\workflow_type_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\workflow_type_test\Plugin\WorkflowType\WorkflowCustomAccessType; +use Drupal\Core\Session\AccountInterface; +use Drupal\workflows\WorkflowInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for workflow_type_test. + */ +class WorkflowTypeTestHooks { + + /** + * Implements hook_workflow_type_info_alter(). + */ + #[Hook('workflow_type_info_alter')] + public function workflowTypeInfoAlter(&$definitions) { + // Allow tests to override the workflow type definitions. + $state = \Drupal::state(); + if ($state->get('workflow_type_test.plugin_definitions') !== NULL) { + $definitions = $state->get('workflow_type_test.plugin_definitions'); + } + } + + /** + * Implements hook_ENTITY_TYPE_access() for the Workflow entity type. + */ + #[Hook('workflow_access')] + public function workflowAccess(WorkflowInterface $entity, $operation, AccountInterface $account) { + if ($entity->getTypePlugin()->getPluginId() === 'workflow_custom_access_type') { + return WorkflowCustomAccessType::workflowAccess($entity, $operation, $account); + } + return AccessResult::neutral(); + } + +} diff --git a/core/modules/workflows/tests/modules/workflow_type_test/workflow_type_test.module b/core/modules/workflows/tests/modules/workflow_type_test/workflow_type_test.module index ed2b138463f93f642408f736ee72e514c8210419..f74b802cdfb0c73fd34e11a6d7a03ef11a615c51 100644 --- a/core/modules/workflows/tests/modules/workflow_type_test/workflow_type_test.module +++ b/core/modules/workflows/tests/modules/workflow_type_test/workflow_type_test.module @@ -7,22 +7,6 @@ declare(strict_types=1); -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Session\AccountInterface; -use Drupal\workflow_type_test\Plugin\WorkflowType\WorkflowCustomAccessType; -use Drupal\workflows\WorkflowInterface; - -/** - * Implements hook_workflow_type_info_alter(). - */ -function workflow_type_test_workflow_type_info_alter(&$definitions) { - // Allow tests to override the workflow type definitions. - $state = \Drupal::state(); - if ($state->get('workflow_type_test.plugin_definitions') !== NULL) { - $definitions = $state->get('workflow_type_test.plugin_definitions'); - } -} - /** * Sets the type plugin definitions override and clear the cache. * @@ -33,13 +17,3 @@ function workflow_type_test_set_definitions($definitions) { \Drupal::state()->set('workflow_type_test.plugin_definitions', $definitions); \Drupal::service('plugin.manager.workflows.type')->clearCachedDefinitions(); } - -/** - * Implements hook_ENTITY_TYPE_access() for the Workflow entity type. - */ -function workflow_type_test_workflow_access(WorkflowInterface $entity, $operation, AccountInterface $account) { - if ($entity->getTypePlugin()->getPluginId() === 'workflow_custom_access_type') { - return WorkflowCustomAccessType::workflowAccess($entity, $operation, $account); - } - return AccessResult::neutral(); -} diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php index 6b9c3cd9b0bc5b69df546673ce7456aabd5ed82f..df13fac20658853c16480a97eda4081da412867e 100644 --- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php +++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php @@ -118,7 +118,6 @@ public function testStateMachineNameValidation(): void { */ public function testWorkflowCreation(): void { $workflow_storage = $this->container->get('entity_type.manager')->getStorage('workflow'); - /** @var \Drupal\workflows\WorkflowInterface $workflow */ $this->drupalLogin($this->createUser(['access administration pages', 'administer workflows'])); $this->drupalGet('admin/config/workflow'); $this->assertSession()->linkByHrefExists('admin/config/workflow/workflows'); @@ -135,6 +134,7 @@ public function testWorkflowCreation(): void { $this->clickLink('Add a new state'); $this->submitForm(['label' => 'Published', 'id' => 'published'], 'Save'); $this->assertSession()->pageTextContains('Created Published state.'); + /** @var \Drupal\workflows\WorkflowInterface $workflow */ $workflow = $workflow_storage->loadUnchanged('test'); $this->assertFalse($workflow->getTypePlugin()->getState('published')->canTransitionTo('published'), 'No default transition from published to published exists.'); diff --git a/core/modules/workflows/workflows.module b/core/modules/workflows/workflows.module deleted file mode 100644 index 7b29bba3854c787a0e7c87ddfab765917683ded4..0000000000000000000000000000000000000000 --- a/core/modules/workflows/workflows.module +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @file - * Provides hook implementations for the Workflows module. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function workflows_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - case 'help.page.workflows': - $content_moderation_url = NULL; - if (\Drupal::moduleHandler()->moduleExists('content_moderation')) { - $content_moderation_url = Url::fromRoute('help.page', ['name' => 'content_moderation'])->toString(); - } - $output = '<h2>' . t('About') . '</h2>'; - if ($content_moderation_url) { - $output .= '<p>' . t('The Workflows module provides an API and an interface to create workflows with transitions between different states (for example publication or user status). These have to be provided by other modules such as the <a href=":moderation">Content Moderation module</a>. For more information, see the <a href=":workflow">online documentation for the Workflows module</a>.', [':moderation' => $content_moderation_url, ':workflow' => 'https://www.drupal.org/documentation/modules/workflows']) . '</p>'; - } - else { - $output .= '<p>' . t('The Workflows module provides an API and an interface to create workflows with transitions between different states (for example publication or user status). These have to be provided by other modules such as the Content Moderation module. For more information, see the <a href=":workflow">online documentation for the Workflows module</a>.', [':workflow' => 'https://www.drupal.org/documentation/modules/workflows']) . '</p>'; - } - $output .= '<h3>' . t('Uses') . '</h3>'; - $output .= '<dl>'; - $output .= '<dt>' . t('Adding workflows') . '</dt>'; - if ($content_moderation_url) { - $output .= '<dd>' . t('You can <em>only</em> add workflows on the <a href=":workflows">Workflows page</a>, after you have installed a module that leverages the API such as the <a href=":moderation">Content Moderation module</a>.', [':moderation' => $content_moderation_url, ':workflows' => Url::fromRoute('entity.workflow.collection')->toString()]) . '</dd>'; - } - else { - $output .= '<dd>' . t('You can <em>only</em> add workflows on the <a href=":workflows">Workflows page</a>, after you have installed a module that leverages the API such as the Content Moderation module.', [':workflow' => 'https://www.drupal.org/documentation/modules/workflows']) . '</dd>'; - } - $output .= '<dt>' . t('Adding states') . '<dt>'; - $output .= '<dd>' . t('A workflow requires at least two states. States can be added when you add or edit a workflow on the <a href=":workflows">Workflows page</a>.', [':workflows' => Url::fromRoute('entity.workflow.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Adding transitions') . '</dt>'; - $output .= '<dd>' . t('A transition defines in which state an item can be save as next. It has one destination state, but can have several states <em>from</em> which the transition can be applied. Transitions can be added when you add or edit a workflow on the <a href=":workflows">Workflows page</a>.', [':workflows' => Url::fromRoute('entity.workflow.collection')->toString()]) . '</dd>'; - $output .= '<dt>' . t('Configuring workflows further') . '</dt>'; - $output .= '<dd>' . t('Depending on the installed workflow type, additional configuration can be available in the edit form of a workflow.') . '</dd>'; - $output .= '<dl>'; - return $output; - } -} diff --git a/core/modules/workspaces/src/Entity/Workspace.php b/core/modules/workspaces/src/Entity/Workspace.php index 1e16282ed1bb5b878c5a8cdb3b82187be57f4440..edf75c94f5603cfa25507550bfb697f7ee1ca7b7 100644 --- a/core/modules/workspaces/src/Entity/Workspace.php +++ b/core/modules/workspaces/src/Entity/Workspace.php @@ -2,69 +2,78 @@ namespace Drupal\workspaces\Entity; +use Drupal\Core\Entity\Attribute\ContentEntityType; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\user\EntityOwnerTrait; +use Drupal\views\EntityViewsData; +use Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler; +use Drupal\workspaces\Form\WorkspaceActivateForm; +use Drupal\workspaces\Form\WorkspaceDeleteForm; +use Drupal\workspaces\Form\WorkspaceForm; +use Drupal\workspaces\WorkspaceAccessControlHandler; use Drupal\workspaces\WorkspaceInterface; +use Drupal\workspaces\WorkspaceListBuilder; +use Drupal\workspaces\WorkspaceViewBuilder; /** * The workspace entity class. - * - * @ContentEntityType( - * id = "workspace", - * label = @Translation("Workspace"), - * label_collection = @Translation("Workspaces"), - * label_singular = @Translation("workspace"), - * label_plural = @Translation("workspaces"), - * label_count = @PluralTranslation( - * singular = "@count workspace", - * plural = "@count workspaces" - * ), - * handlers = { - * "list_builder" = "\Drupal\workspaces\WorkspaceListBuilder", - * "view_builder" = "Drupal\workspaces\WorkspaceViewBuilder", - * "access" = "Drupal\workspaces\WorkspaceAccessControlHandler", - * "views_data" = "Drupal\views\EntityViewsData", - * "route_provider" = { - * "html" = "\Drupal\Core\Entity\Routing\AdminHtmlRouteProvider", - * }, - * "form" = { - * "default" = "\Drupal\workspaces\Form\WorkspaceForm", - * "add" = "\Drupal\workspaces\Form\WorkspaceForm", - * "edit" = "\Drupal\workspaces\Form\WorkspaceForm", - * "delete" = "\Drupal\workspaces\Form\WorkspaceDeleteForm", - * "activate" = "\Drupal\workspaces\Form\WorkspaceActivateForm", - * }, - * "workspace" = "\Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler", - * }, - * admin_permission = "administer workspaces", - * base_table = "workspace", - * revision_table = "workspace_revision", - * data_table = "workspace_field_data", - * revision_data_table = "workspace_field_revision", - * field_ui_base_route = "entity.workspace.collection", - * entity_keys = { - * "id" = "id", - * "revision" = "revision_id", - * "uuid" = "uuid", - * "label" = "label", - * "uid" = "uid", - * "owner" = "uid", - * }, - * links = { - * "canonical" = "/admin/config/workflow/workspaces/manage/{workspace}", - * "add-form" = "/admin/config/workflow/workspaces/add", - * "edit-form" = "/admin/config/workflow/workspaces/manage/{workspace}/edit", - * "delete-form" = "/admin/config/workflow/workspaces/manage/{workspace}/delete", - * "activate-form" = "/admin/config/workflow/workspaces/manage/{workspace}/activate", - * "collection" = "/admin/config/workflow/workspaces", - * }, - * ) */ +#[ContentEntityType( + id: 'workspace', + label: new TranslatableMarkup('Workspace'), + label_collection: new TranslatableMarkup('Workspaces'), + label_singular: new TranslatableMarkup('workspace'), + label_plural: new TranslatableMarkup('workspaces'), + entity_keys: [ + 'id' => 'id', + 'revision' => 'revision_id', + 'uuid' => 'uuid', + 'label' => 'label', + 'uid' => 'uid', + 'owner' => 'uid', + ], + handlers: [ + 'list_builder' => WorkspaceListBuilder::class, + 'view_builder' => WorkspaceViewBuilder::class, + 'access' => WorkspaceAccessControlHandler::class, + 'views_data' => EntityViewsData::class, + 'route_provider' => [ + 'html' => AdminHtmlRouteProvider::class, + ], + 'form' => [ + 'default' => WorkspaceForm::class, + 'add' => WorkspaceForm::class, + 'edit' => WorkspaceForm::class, + 'delete' => WorkspaceDeleteForm::class, + 'activate' => WorkspaceActivateForm::class, + ], + 'workspace' => IgnoredWorkspaceHandler::class, + ], + links: [ + 'canonical' => '/admin/config/workflow/workspaces/manage/{workspace}', + 'add-form' => '/admin/config/workflow/workspaces/add', + 'edit-form' => '/admin/config/workflow/workspaces/manage/{workspace}/edit', + 'delete-form' => '/admin/config/workflow/workspaces/manage/{workspace}/delete', + 'activate-form' => '/admin/config/workflow/workspaces/manage/{workspace}/activate', + 'collection' => '/admin/config/workflow/workspaces', + ], + admin_permission: 'administer workspaces', + base_table: 'workspace', + data_table: 'workspace_field_data', + revision_table: 'workspace_revision', + revision_data_table: 'workspace_field_revision', + label_count: [ + 'singular' => '@count workspace', + 'plural' => '@count workspaces', + ], + field_ui_base_route: 'entity.workspace.collection', +)] class Workspace extends ContentEntityBase implements WorkspaceInterface { use EntityChangedTrait; diff --git a/core/modules/workspaces/src/EntityQuery/QueryTrait.php b/core/modules/workspaces/src/EntityQuery/QueryTrait.php index 415ef4b7a08633e04ba32d516a735fb2ba65edb5..eef973cc45639c56507af443be2586153b0014a4 100644 --- a/core/modules/workspaces/src/EntityQuery/QueryTrait.php +++ b/core/modules/workspaces/src/EntityQuery/QueryTrait.php @@ -4,6 +4,7 @@ use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\workspaces\WorkspaceAssociation; use Drupal\workspaces\WorkspaceInformationInterface; use Drupal\workspaces\WorkspaceManagerInterface; @@ -76,7 +77,8 @@ public function prepare() { // can properly include live content along with a possible workspace // revision. $id_field = $this->entityType->getKey('id'); - $this->sqlQuery->leftJoin('workspace_association', 'workspace_association', "[%alias].[target_entity_type_id] = '{$this->entityTypeId}' AND [%alias].[target_entity_id] = [base_table].[$id_field] AND [%alias].[workspace] = '{$active_workspace->id()}'"); + $target_id_field = WorkspaceAssociation::getIdField($this->entityTypeId); + $this->sqlQuery->leftJoin('workspace_association', 'workspace_association', "[%alias].[target_entity_type_id] = '{$this->entityTypeId}' AND [%alias].[$target_id_field] = [base_table].[$id_field] AND [%alias].[workspace] = '{$active_workspace->id()}'"); } return $this; diff --git a/core/modules/workspaces/src/EntityQuery/Tables.php b/core/modules/workspaces/src/EntityQuery/Tables.php index e67e107bfbb04390855653a093112c4af32c8a81..199d5cc1559729921f1263198464db62162cf1f6 100644 --- a/core/modules/workspaces/src/EntityQuery/Tables.php +++ b/core/modules/workspaces/src/EntityQuery/Tables.php @@ -6,6 +6,7 @@ use Drupal\Core\Entity\EntityType; use Drupal\Core\Entity\Query\Sql\Tables as BaseTables; use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\workspaces\WorkspaceAssociation; /** * Alters entity queries to use a workspace revision instead of the default one. @@ -144,10 +145,11 @@ public function addWorkspaceAssociationJoin($entity_type_id, $base_table_alias, if (!isset($this->contentWorkspaceTables[$base_table_alias])) { $entity_type = $this->entityTypeManager->getActiveDefinition($entity_type_id); $id_field = $entity_type->getKey('id'); + $target_id_field = WorkspaceAssociation::getIdField($entity_type_id); // LEFT join the Workspace association entity's table so we can properly // include live content along with a possible workspace-specific revision. - $this->contentWorkspaceTables[$base_table_alias] = $this->sqlQuery->leftJoin('workspace_association', NULL, "[%alias].[target_entity_type_id] = '$entity_type_id' AND [%alias].[target_entity_id] = [$base_table_alias].[$id_field] AND [%alias].[workspace] = '$active_workspace_id'"); + $this->contentWorkspaceTables[$base_table_alias] = $this->sqlQuery->leftJoin('workspace_association', NULL, "[%alias].[target_entity_type_id] = '$entity_type_id' AND [%alias].[$target_id_field] = [$base_table_alias].[$id_field] AND [%alias].[workspace] = '$active_workspace_id'"); $this->baseTablesEntityType[$base_table_alias] = $entity_type->id(); } diff --git a/core/modules/workspaces/src/Hook/WorkspacesHooks.php b/core/modules/workspaces/src/Hook/WorkspacesHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..a12a66edc7b1821c83359351da6b5ffc4cc9a67a --- /dev/null +++ b/core/modules/workspaces/src/Hook/WorkspacesHooks.php @@ -0,0 +1,289 @@ +<?php + +namespace Drupal\workspaces\Hook; + +use Drupal\Core\Url; +use Drupal\workspaces\ViewsQueryAlter; +use Drupal\views\Plugin\views\query\QueryPluginBase; +use Drupal\views\ViewExecutable; +use Drupal\Core\Cache\Cache; +use Drupal\workspaces\EntityAccess; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\workspaces\FormOperations; +use Drupal\workspaces\EntityOperations; +use Drupal\Core\Entity\EntityFormInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\workspaces\EntityTypeInfo; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for workspaces. + */ +class WorkspacesHooks { + + /** + * Implements hook_help(). + */ + #[Hook('help')] + public function help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the Workspaces module. + case 'help.page.workspaces': + $output = ''; + $output .= '<h2>' . t('About') . '</h2>'; + $output .= '<p>' . t('The Workspaces module allows workspaces to be defined and switched between. Content is then assigned to the active workspace when created. For more information, see the <a href=":workspaces">online documentation for the Workspaces module</a>.', [':workspaces' => 'https://www.drupal.org/docs/8/core/modules/workspace/overview']) . '</p>'; + return $output; + } + } + + /** + * Implements hook_module_preinstall(). + */ + #[Hook('module_preinstall')] + public function modulePreinstall($module) { + if ($module !== 'workspaces') { + return; + } + + /** @var \Drupal\workspaces\WorkspaceInformationInterface $workspace_info */ + $workspace_info = \Drupal::service('workspaces.information'); + $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); + foreach ($entity_definition_update_manager->getEntityTypes() as $entity_type) { + if ($workspace_info->isEntityTypeSupported($entity_type)) { + $entity_type->setRevisionMetadataKey('workspace', 'workspace'); + $entity_definition_update_manager->updateEntityType($entity_type); + } + } + } + + /** + * Implements hook_entity_type_build(). + */ + #[Hook('entity_type_build')] + public function entityTypeBuild(array &$entity_types) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityTypeBuild($entity_types); + } + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityTypeAlter($entity_types); + } + + /** + * Implements hook_form_alter(). + */ + #[Hook('form_alter')] + public function formAlter(&$form, FormStateInterface $form_state, $form_id) : void { + if ($form_state->getFormObject() instanceof EntityFormInterface) { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityFormAlter($form, $form_state, $form_id); + } + \Drupal::service('class_resolver')->getInstanceFromDefinition(FormOperations::class)->formAlter($form, $form_state, $form_id); + } + + /** + * Implements hook_field_info_alter(). + */ + #[Hook('field_info_alter')] + public function fieldInfoAlter(&$definitions) { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->fieldInfoAlter($definitions); + } + + /** + * Implements hook_entity_base_field_info(). + */ + #[Hook('entity_base_field_info')] + public function entityBaseFieldInfo(EntityTypeInterface $entity_type) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityTypeInfo::class)->entityBaseFieldInfo($entity_type); + } + + /** + * Implements hook_entity_preload(). + */ + #[Hook('entity_preload')] + public function entityPreload(array $ids, $entity_type_id) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityPreload($ids, $entity_type_id); + } + + /** + * Implements hook_entity_presave(). + */ + #[Hook('entity_presave')] + public function entityPresave(EntityInterface $entity) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityPresave($entity); + } + + /** + * Implements hook_entity_insert(). + */ + #[Hook('entity_insert')] + public function entityInsert(EntityInterface $entity) { + if ($entity->getEntityTypeId() === 'workspace') { + \Drupal::service('workspaces.association')->workspaceInsert($entity); + \Drupal::service('workspaces.repository')->resetCache(); + } + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityInsert($entity); + } + + /** + * Implements hook_entity_update(). + */ + #[Hook('entity_update')] + public function entityUpdate(EntityInterface $entity) { + if ($entity->getEntityTypeId() === 'workspace') { + \Drupal::service('workspaces.repository')->resetCache(); + } + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityUpdate($entity); + } + + /** + * Implements hook_entity_translation_insert(). + */ + #[Hook('entity_translation_insert')] + public function entityTranslationInsert(EntityInterface $translation) : void { + \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityTranslationInsert($translation); + } + + /** + * Implements hook_entity_predelete(). + */ + #[Hook('entity_predelete')] + public function entityPredelete(EntityInterface $entity) { + if ($entity->getEntityTypeId() === 'workspace') { + \Drupal::service('workspaces.repository')->resetCache(); + } + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)->entityPredelete($entity); + } + + /** + * Implements hook_entity_delete(). + */ + #[Hook('entity_delete')] + public function entityDelete(EntityInterface $entity) { + if (\Drupal::service('workspaces.information')->isEntityTypeSupported($entity->getEntityType())) { + \Drupal::service('workspaces.association')->deleteAssociations(NULL, $entity->getEntityTypeId(), [$entity->id()]); + } + } + + /** + * Implements hook_entity_revision_delete(). + */ + #[Hook('entity_revision_delete')] + public function entityRevisionDelete(EntityInterface $entity) { + if (\Drupal::service('workspaces.information')->isEntityTypeSupported($entity->getEntityType())) { + \Drupal::service('workspaces.association')->deleteAssociations(NULL, $entity->getEntityTypeId(), [$entity->id()], [$entity->getRevisionId()]); + } + } + + /** + * Implements hook_entity_access(). + * + * @see \Drupal\workspaces\EntityAccess + */ + #[Hook('entity_access')] + public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityAccess::class)->entityOperationAccess($entity, $operation, $account); + } + + /** + * Implements hook_entity_create_access(). + * + * @see \Drupal\workspaces\EntityAccess + */ + #[Hook('entity_create_access')] + public function entityCreateAccess(AccountInterface $account, array $context, $entity_bundle) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityAccess::class)->entityCreateAccess($account, $context, $entity_bundle); + } + + /** + * Implements hook_ENTITY_TYPE_update() for the 'menu_link_content' entity type. + */ + #[Hook('menu_link_content_update')] + public function menuLinkContentUpdate(EntityInterface $entity) { + /** @var \Drupal\menu_link_content\MenuLinkContentInterface $entity */ + if ($entity->getLoadedRevisionId() != $entity->getRevisionId()) { + // We are not updating the menu tree definitions when a custom menu link + // entity is saved as a pending revision (because the parent can not be + // changed), so we need to clear the system menu cache manually. However, + // inserting or deleting a custom menu link updates the menu tree + // definitions, so we don't have to do anything in those cases. + $cache_tags = Cache::buildTags('config:system.menu', [$entity->getMenuName()], '.'); + \Drupal::service('cache_tags.invalidator')->invalidateTags($cache_tags); + } + } + + /** + * Implements hook_views_query_alter(). + */ + #[Hook('views_query_alter')] + public function viewsQueryAlter(ViewExecutable $view, QueryPluginBase $query) { + return \Drupal::service('class_resolver')->getInstanceFromDefinition(ViewsQueryAlter::class)->alterQuery($view, $query); + } + + /** + * Implements hook_cron(). + */ + #[Hook('cron')] + public function cron() { + \Drupal::service('workspaces.manager')->purgeDeletedWorkspacesBatch(); + } + + /** + * Implements hook_toolbar(). + */ + #[Hook('toolbar')] + public function toolbar() { + $items['workspace'] = ['#cache' => ['contexts' => ['user.permissions']]]; + $current_user = \Drupal::currentUser(); + if (!$current_user->hasPermission('administer workspaces') && !$current_user->hasPermission('view own workspace') && !$current_user->hasPermission('view any workspace')) { + return $items; + } + /** @var \Drupal\workspaces\WorkspaceInterface $active_workspace */ + $active_workspace = \Drupal::service('workspaces.manager')->getActiveWorkspace(); + $items['workspace'] += [ + '#type' => 'toolbar_item', + 'tab' => [ + '#lazy_builder' => [ + 'workspaces.lazy_builders:renderToolbarTab', + [], + ], + '#create_placeholder' => TRUE, + '#lazy_builder_preview' => [ + '#type' => 'link', + '#title' => $active_workspace ? $active_workspace->label() : t('Live'), + '#url' => Url::fromRoute('entity.workspace.collection'), + '#attributes' => [ + 'class' => [ + 'toolbar-tray-lazy-placeholder-link', + ], + ], + ], + ], + '#wrapper_attributes' => [ + 'class' => [ + 'workspaces-toolbar-tab', + ], + ], + '#weight' => 500, + ]; + // Add a special class to the wrapper if we don't have an active workspace so + // we can highlight it with a different color. + if (!$active_workspace) { + $items['workspace']['#wrapper_attributes']['class'][] = 'workspaces-toolbar-tab--is-default'; + } + // \Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem adds an + // #attributes property to each toolbar item's tab child automatically. + // Lazy builders don't support an #attributes property so we need to + // add another render callback to remove the #attributes property. We start by + // adding the defaults, and then we append our own pre render callback. + $items['workspace'] += \Drupal::service('plugin.manager.element_info')->getInfo('toolbar_item'); + $items['workspace']['#pre_render'][] = 'workspaces.lazy_builders:removeTabAttributes'; + return $items; + } + +} diff --git a/core/modules/workspaces/src/ViewsQueryAlter.php b/core/modules/workspaces/src/ViewsQueryAlter.php index 4cfb5d78dad3e6582a811d5991351c72995f862f..f409a20b0d9c5fc52793bda381dc25b9d2e16501 100644 --- a/core/modules/workspaces/src/ViewsQueryAlter.php +++ b/core/modules/workspaces/src/ViewsQueryAlter.php @@ -311,7 +311,7 @@ protected function ensureWorkspaceAssociationTable($entity_type_id, Sql $query, // Construct the join. $definition = [ 'table' => 'workspace_association', - 'field' => 'target_entity_id', + 'field' => WorkspaceAssociation::getIdField($entity_type_id), 'left_table' => $relationship, 'left_field' => $table_data['table']['base']['field'], 'extra' => [ diff --git a/core/modules/workspaces/src/WorkspaceAssociation.php b/core/modules/workspaces/src/WorkspaceAssociation.php index 02d6924c4e4bbc8993cdfbea29e0688bff7edfeb..25b476fab864e4c0ef65a82be426c613fb08bcf3 100644 --- a/core/modules/workspaces/src/WorkspaceAssociation.php +++ b/core/modules/workspaces/src/WorkspaceAssociation.php @@ -2,6 +2,7 @@ namespace Drupal\workspaces; +use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Core\Database\Connection; use Drupal\Core\Database\Query\PagerSelectExtender; use Drupal\Core\Entity\EntityTypeManagerInterface; @@ -60,6 +61,7 @@ public function trackEntity(RevisionableInterface $entity, WorkspaceInterface $w if (isset($tracked[$entity->getEntityTypeId()])) { $tracked_revision_id = key($tracked[$entity->getEntityTypeId()]); } + $id_field = static::getIdField($entity->getEntityTypeId()); try { $transaction = $this->database->startTransaction(); @@ -72,7 +74,7 @@ public function trackEntity(RevisionableInterface $entity, WorkspaceInterface $w ]) ->condition('workspace', $affected_workspaces, 'IN') ->condition('target_entity_type_id', $entity->getEntityTypeId()) - ->condition('target_entity_id', $entity->id()) + ->condition($id_field, $entity->id()) // Only update descendant workspaces if they have the same initial // revision, which means they are currently inheriting content. ->condition('target_entity_revision_id', $tracked_revision_id) @@ -86,15 +88,15 @@ public function trackEntity(RevisionableInterface $entity, WorkspaceInterface $w $insert_query = $this->database->insert(static::TABLE) ->fields([ 'workspace', - 'target_entity_revision_id', 'target_entity_type_id', - 'target_entity_id', + $id_field, + 'target_entity_revision_id', ]); foreach ($missing_workspaces as $workspace_id) { $insert_query->values([ 'workspace' => $workspace_id, 'target_entity_type_id' => $entity->getEntityTypeId(), - 'target_entity_id' => $entity->id(), + $id_field => $entity->id(), 'target_entity_revision_id' => $entity->getRevisionId(), ]); } @@ -128,8 +130,13 @@ public function workspaceInsert(WorkspaceInterface $workspace) { */ public function getTrackedEntities($workspace_id, $entity_type_id = NULL, $entity_ids = NULL) { $query = $this->database->select(static::TABLE); + $query->fields(static::TABLE, [ + 'target_entity_type_id', + 'target_entity_id', + 'target_entity_id_string', + 'target_entity_revision_id', + ]); $query - ->fields(static::TABLE, ['target_entity_type_id', 'target_entity_id', 'target_entity_revision_id']) ->orderBy('target_entity_revision_id', 'ASC') ->condition('workspace', $workspace_id); @@ -137,13 +144,14 @@ public function getTrackedEntities($workspace_id, $entity_type_id = NULL, $entit $query->condition('target_entity_type_id', $entity_type_id, '='); if ($entity_ids) { - $query->condition('target_entity_id', $entity_ids, 'IN'); + $query->condition(static::getIdField($entity_type_id), $entity_ids, 'IN'); } } $tracked_revisions = []; foreach ($query->execute() as $record) { - $tracked_revisions[$record->target_entity_type_id][$record->target_entity_revision_id] = $record->target_entity_id; + $target_id = $record->{static::getIdField($record->target_entity_type_id)}; + $tracked_revisions[$record->target_entity_type_id][$record->target_entity_revision_id] = $target_id; } return $tracked_revisions; @@ -160,15 +168,21 @@ public function getTrackedEntitiesForListing($workspace_id, ?int $pager_id = NUL $query->element($pager_id); } + $query->fields(static::TABLE, [ + 'target_entity_type_id', + 'target_entity_id', + 'target_entity_id_string', + 'target_entity_revision_id', + ]); $query - ->fields(static::TABLE, ['target_entity_type_id', 'target_entity_id', 'target_entity_revision_id']) ->orderBy('target_entity_type_id', 'ASC') ->orderBy('target_entity_revision_id', 'DESC') ->condition('workspace', $workspace_id); $tracked_revisions = []; foreach ($query->execute() as $record) { - $tracked_revisions[$record->target_entity_type_id][$record->target_entity_revision_id] = $record->target_entity_id; + $target_id = $record->{static::getIdField($record->target_entity_type_id)}; + $tracked_revisions[$record->target_entity_type_id][$record->target_entity_revision_id] = $target_id; } return $tracked_revisions; @@ -291,17 +305,18 @@ public function getAssociatedInitialRevisions(string $workspace_id, string $enti * {@inheritdoc} */ public function getEntityTrackingWorkspaceIds(RevisionableInterface $entity, bool $latest_revision = FALSE) { + $id_field = static::getIdField($entity->getEntityTypeId()); $query = $this->database->select(static::TABLE, 'wa') ->fields('wa', ['workspace']) ->condition('[wa].[target_entity_type_id]', $entity->getEntityTypeId()) - ->condition('[wa].[target_entity_id]', $entity->id()); + ->condition("[wa].[$id_field]", $entity->id()); // Use a self-join to get only the workspaces in which the latest revision // of the entity is tracked. if ($latest_revision) { $inner_select = $this->database->select(static::TABLE, 'wai') ->condition('[wai].[target_entity_type_id]', $entity->getEntityTypeId()) - ->condition('[wai].[target_entity_id]', $entity->id()); + ->condition("[wai].[$id_field]", $entity->id()); $inner_select->addExpression('MAX([wai].[target_entity_revision_id])', 'max_revision_id'); $query->join($inner_select, 'waj', '[wa].[target_entity_revision_id] = [waj].[max_revision_id]'); @@ -341,7 +356,18 @@ public function deleteAssociations($workspace_id = NULL, $entity_type_id = NULL, $query->condition('target_entity_type_id', $entity_type_id, '='); if ($entity_ids) { - $query->condition('target_entity_id', $entity_ids, 'IN'); + try { + $query->condition(static::getIdField($entity_type_id), $entity_ids, 'IN'); + } + catch (PluginNotFoundException) { + // When an entity type is being deleted, we no longer have the ability + // to retrieve its identifier field type, so we try both. + $query->condition( + $query->orConditionGroup() + ->condition('target_entity_id', $entity_ids, 'IN') + ->condition('target_entity_id_string', $entity_ids, 'IN') + ); + } } if ($revision_ids) { @@ -366,6 +392,7 @@ public function initializeWorkspace(WorkspaceInterface $workspace) { $indexed_rows->fields(static::TABLE, [ 'target_entity_type_id', 'target_entity_id', + 'target_entity_id_string', 'target_entity_revision_id', ]); $indexed_rows->condition('workspace', $parent_id); @@ -391,7 +418,39 @@ public static function getSubscribedEvents(): array { * The workspace publish event. */ public function onPostPublish(WorkspacePublishEvent $event): void { - $this->deleteAssociations($event->getWorkspace()->id()); + // Cleanup associations for the published workspace as well as its + // descendants. + $affected_workspaces = $this->workspaceRepository->getDescendantsAndSelf($event->getWorkspace()->id()); + foreach ($affected_workspaces as $workspace_id) { + $this->deleteAssociations($workspace_id); + } + } + + /** + * Determines the target ID field name for an entity type. + * + * @param string $entity_type_id + * The entity type ID. + * + * @return string + * The name of the workspace association target ID field. + * + * @internal + */ + public static function getIdField(string $entity_type_id): string { + static $id_field_map = []; + + if (!isset($id_field_map[$entity_type_id])) { + $id_field = \Drupal::entityTypeManager()->getDefinition($entity_type_id) + ->getKey('id'); + $field_map = \Drupal::service('entity_field.manager')->getFieldMap()[$entity_type_id]; + + $id_field_map[$entity_type_id] = $field_map[$id_field]['type'] !== 'integer' + ? 'target_entity_id_string' + : 'target_entity_id'; + } + + return $id_field_map[$entity_type_id]; } } diff --git a/core/modules/workspaces/src/WorkspaceMerger.php b/core/modules/workspaces/src/WorkspaceMerger.php index 0cf34c3e26d36a1697ecfc3d15c5a4a19b8e21f5..56a198ee0d898e82e68c6982772973247e341022 100644 --- a/core/modules/workspaces/src/WorkspaceMerger.php +++ b/core/modules/workspaces/src/WorkspaceMerger.php @@ -4,6 +4,7 @@ use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Site\Settings; use Drupal\Core\Utility\Error; use Psr\Log\LoggerInterface; @@ -31,6 +32,10 @@ public function merge() { try { $transaction = $this->database->startTransaction(); + $max_execution_time = ini_get('max_execution_time'); + $step_size = Settings::get('entity_update_batch_size', 50); + $counter = 0; + foreach ($this->getDifferringRevisionIdsOnSource() as $entity_type_id => $revision_difference) { $entity_type = $this->entityTypeManager->getDefinition($entity_type_id); $revisions_on_source = $this->entityTypeManager->getStorage($entity_type_id) @@ -48,6 +53,14 @@ public function merge() { $revision->{$field_name}->target_id = $this->targetWorkspace->id(); $revision->setSyncing(TRUE); $revision->save(); + $counter++; + + // Extend the execution time in order to allow processing workspaces + // that contain a large number of items. + if ((int) ($counter / $step_size) >= 1) { + set_time_limit($max_execution_time); + $counter = 0; + } } } } diff --git a/core/modules/workspaces/src/WorkspacePublisher.php b/core/modules/workspaces/src/WorkspacePublisher.php index 1c568b46b41b9a367d316a99723c1026c9a4f711..f8610247269386eb1fe135a547458a27bea303a6 100644 --- a/core/modules/workspaces/src/WorkspacePublisher.php +++ b/core/modules/workspaces/src/WorkspacePublisher.php @@ -4,6 +4,7 @@ use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Site\Settings; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Utility\Error; use Drupal\workspaces\Event\WorkspacePostPublishEvent; @@ -45,9 +46,11 @@ public function publish() { try { $transaction = $this->database->startTransaction(); - // @todo Handle the publishing of a workspace with a batch operation in - // https://www.drupal.org/node/2958752. $this->workspaceManager->executeOutsideWorkspace(function () use ($tracked_entities) { + $max_execution_time = ini_get('max_execution_time'); + $step_size = Settings::get('entity_update_batch_size', 50); + $counter = 0; + foreach ($tracked_entities as $entity_type_id => $revision_difference) { $entity_revisions = $this->entityTypeManager->getStorage($entity_type_id) ->loadMultipleRevisions(array_keys($revision_difference)); @@ -68,6 +71,14 @@ public function publish() { $entity->original = $default_revisions[$entity->id()]; $entity->save(); + $counter++; + + // Extend the execution time in order to allow processing workspaces + // that contain a large number of items. + if ((int) ($counter / $step_size) >= 1) { + set_time_limit($max_execution_time); + $counter = 0; + } } } }); diff --git a/core/modules/workspaces/src/WorkspacesAliasRepository.php b/core/modules/workspaces/src/WorkspacesAliasRepository.php index a05793b7971910056a7603afdb496a3988e7198e..b748ff6197d457f3944c16ec143717078523f817 100644 --- a/core/modules/workspaces/src/WorkspacesAliasRepository.php +++ b/core/modules/workspaces/src/WorkspacesAliasRepository.php @@ -40,11 +40,12 @@ protected function getBaseQuery() { $active_workspace = $this->workspaceManager->getActiveWorkspace(); - $query = $this->connection->select('path_alias', 'base_table_2'); - $wa_join = $query->leftJoin('workspace_association', NULL, "[%alias].[target_entity_type_id] = 'path_alias' AND [%alias].[target_entity_id] = [base_table_2].[id] AND [%alias].[workspace] = :active_workspace_id", [ + $query = $this->connection->select('path_alias', 'original_base_table'); + $wa_join = $query->leftJoin('workspace_association', NULL, "[%alias].[target_entity_type_id] = 'path_alias' AND [%alias].[target_entity_id] = [original_base_table].[id] AND [%alias].[workspace] = :active_workspace_id", [ ':active_workspace_id' => $active_workspace->id(), ]); - $query->innerJoin('path_alias_revision', 'base_table', "[%alias].[revision_id] = COALESCE([$wa_join].[target_entity_revision_id], [base_table_2].[revision_id])"); + $query->innerJoin('path_alias_revision', 'base_table', "[%alias].[revision_id] = COALESCE([$wa_join].[target_entity_revision_id], [original_base_table].[revision_id]) AND [%alias].[langcode] = [original_base_table].[langcode]"); + $query->condition('base_table.status', 1); return $query; } diff --git a/core/modules/workspaces/tests/fixtures/update/workspaces.php b/core/modules/workspaces/tests/fixtures/update/workspaces.php new file mode 100644 index 0000000000000000000000000000000000000000..6928ddb66ced4356046fb9966121ee780fbf02dd --- /dev/null +++ b/core/modules/workspaces/tests/fixtures/update/workspaces.php @@ -0,0 +1,90 @@ +<?php +// phpcs:ignoreFile + +use Drupal\Core\Database\Database; +use Drupal\Core\Entity\EntityTypeInterface; + +$connection = Database::getConnection(); + +// Set the schema version. +$connection->merge('key_value') + ->fields([ + 'value' => 'i:10000;', + 'name' => 'workspaces', + 'collection' => 'system.schema', + ]) + ->condition('collection', 'system.schema') + ->condition('name', 'workspaces') + ->execute(); + +// Update core.extension. +$extensions = $connection->select('config') + ->fields('config', ['data']) + ->condition('collection', '') + ->condition('name', 'core.extension') + ->execute() + ->fetchField(); +$extensions = unserialize($extensions); +$extensions['module']['workspaces'] = 0; +$connection->update('config') + ->fields(['data' => serialize($extensions)]) + ->condition('collection', '') + ->condition('name', 'core.extension') + ->execute(); + +// Add all workspaces_removed_post_updates() as existing updates. +require_once __DIR__ . '/../../../../workspaces/workspaces.post_update.php'; +$existing_updates = $connection->select('key_value') + ->fields('key_value', ['value']) + ->condition('collection', 'post_update') + ->condition('name', 'existing_updates') + ->execute() + ->fetchField(); +$existing_updates = unserialize($existing_updates); +$existing_updates = array_merge( + $existing_updates, + array_keys(workspaces_removed_post_updates()) +); +$connection->update('key_value') + ->fields(['value' => serialize($existing_updates)]) + ->condition('collection', 'post_update') + ->condition('name', 'existing_updates') + ->execute(); + +// Create the 'workspace_association' table. +$spec = [ + 'description' => 'Stores the association between entity revisions and their workspace.', + 'fields' => [ + 'workspace' => [ + 'type' => 'varchar_ascii', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + 'description' => 'The workspace ID.', + ], + 'target_entity_type_id' => [ + 'type' => 'varchar_ascii', + 'length' => EntityTypeInterface::ID_MAX_LENGTH, + 'not null' => TRUE, + 'default' => '', + 'description' => 'The ID of the associated entity type.', + ], + 'target_entity_id' => [ + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'description' => 'The ID of the associated entity.', + ], + 'target_entity_revision_id' => [ + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'description' => 'The revision ID of the associated entity.', + ], + ], + 'indexes' => [ + 'target_entity_revision_id' => ['target_entity_revision_id'], + ], + 'primary key' => ['workspace', 'target_entity_type_id', 'target_entity_id'], +]; +$connection->schema()->createTable('workspace_association', $spec); diff --git a/core/modules/workspaces/tests/modules/workspace_access_test/src/Hook/WorkspaceAccessTestHooks.php b/core/modules/workspaces/tests/modules/workspace_access_test/src/Hook/WorkspaceAccessTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..7f47e13df26b46885451a4e8ff7c384ba81ccda1 --- /dev/null +++ b/core/modules/workspaces/tests/modules/workspace_access_test/src/Hook/WorkspaceAccessTestHooks.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\workspace_access_test\Hook; + +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for workspace_access_test. + */ +class WorkspaceAccessTestHooks { + + /** + * Implements hook_ENTITY_TYPE_access() for the 'workspace' entity type. + */ + #[Hook('workspace_access')] + public function workspaceAccess(EntityInterface $entity, $operation, AccountInterface $account) { + return \Drupal::state()->get("workspace_access_test.result.{$operation}", AccessResult::neutral()); + } + +} diff --git a/core/modules/workspaces/tests/modules/workspace_access_test/workspace_access_test.module b/core/modules/workspaces/tests/modules/workspace_access_test/workspace_access_test.module deleted file mode 100644 index 8b54f6a99b3ccdbac23e3f18e71b8eafb954b89e..0000000000000000000000000000000000000000 --- a/core/modules/workspaces/tests/modules/workspace_access_test/workspace_access_test.module +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provides supporting code for testing access for workspaces. - */ - -declare(strict_types=1); - -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Session\AccountInterface; - -/** - * Implements hook_ENTITY_TYPE_access() for the 'workspace' entity type. - */ -function workspace_access_test_workspace_access(EntityInterface $entity, $operation, AccountInterface $account) { - return \Drupal::state()->get("workspace_access_test.result.$operation", AccessResult::neutral()); -} diff --git a/core/modules/workspaces/tests/modules/workspaces_test/src/Entity/EntityTestMulRevPubStringId.php b/core/modules/workspaces/tests/modules/workspaces_test/src/Entity/EntityTestMulRevPubStringId.php new file mode 100644 index 0000000000000000000000000000000000000000..f782cfee86622ff1b1d215be7fe3bdd7376ec6d3 --- /dev/null +++ b/core/modules/workspaces/tests/modules/workspaces_test/src/Entity/EntityTestMulRevPubStringId.php @@ -0,0 +1,73 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\workspaces_test\Entity; + +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity_test\Entity\EntityTestMulRevPub; + +/** + * Defines the test entity class. + * + * @ContentEntityType( + * id = "entity_test_mulrevpub_string_id", + * label = @Translation("Test entity - revisions, data table, and published interface"), + * handlers = { + * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", + * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestForm", + * "delete" = "Drupal\entity_test\EntityTestDeleteForm", + * "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm" + * }, + * "views_data" = "Drupal\views\EntityViewsData", + * "route_provider" = { + * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", + * }, + * }, + * base_table = "entity_test_mulrevpub_string_id", + * data_table = "entity_test_mulrevpub_string_id_property_data", + * revision_table = "entity_test_mulrevpub_string_id_revision", + * revision_data_table = "entity_test_mulrevpub_string_id_property_revision", + * admin_permission = "administer entity_test content", + * translatable = TRUE, + * show_revision_ui = TRUE, + * entity_keys = { + * "id" = "id", + * "uuid" = "uuid", + * "bundle" = "type", + * "revision" = "revision_id", + * "label" = "name", + * "langcode" = "langcode", + * "published" = "status", + * }, + * links = { + * "add-form" = "/entity_test_mulrevpub/add", + * "canonical" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}", + * "delete-form" = "/entity_test/delete/entity_test_mulrevpub/{entity_test_mulrevpub}", + * "delete-multiple-form" = "/entity_test/delete", + * "edit-form" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}/edit", + * "revision" = "/entity_test_mulrevpub/{entity_test_mulrevpub}/revision/{entity_test_mulrevpub_revision}/view", + * } + * ) + */ +class EntityTestMulRevPubStringId extends EntityTestMulRevPub { + + /** + * {@inheritdoc} + */ + public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { + $fields = parent::baseFieldDefinitions($entity_type); + $fields['id'] = BaseFieldDefinition::create('string') + ->setLabel(t('ID')) + ->setDescription(t('The ID of the test entity.')) + ->setReadOnly(TRUE) + // In order to work around the InnoDB 191 character limit on utf8mb4 + // primary keys, we set the character set for the field to ASCII. + ->setSetting('is_ascii', TRUE); + return $fields; + } + +} diff --git a/core/modules/workspaces/tests/modules/workspaces_test/src/Hook/WorkspacesTestHooks.php b/core/modules/workspaces/tests/modules/workspaces_test/src/Hook/WorkspacesTestHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..09ab54054ff6e5b97888ece8944079cb335fc944 --- /dev/null +++ b/core/modules/workspaces/tests/modules/workspaces_test/src/Hook/WorkspacesTestHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\workspaces_test\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for workspaces_test. + */ +class WorkspacesTestHooks { + + /** + * Implements hook_entity_type_alter(). + */ + #[Hook('entity_type_alter')] + public function entityTypeAlter(array &$entity_types) : void { + $state = \Drupal::state(); + // Allow all entity types to have their definition changed dynamically for + // testing purposes. + foreach ($entity_types as $entity_type_id => $entity_type) { + $entity_types[$entity_type_id] = $state->get("{$entity_type_id}.entity_type", $entity_types[$entity_type_id]); + } + } + +} diff --git a/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.info.yml b/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.info.yml index 62886a0b12d219768250c0ad9c3f212734061789..532cbad02f45cdd33e73e272b4f56846e12d28ab 100644 --- a/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.info.yml +++ b/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.info.yml @@ -4,4 +4,5 @@ description: 'Provides supporting code for testing workspaces.' package: Testing version: VERSION dependencies: + - drupal:entity_test - drupal:workspaces diff --git a/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.module b/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.module deleted file mode 100644 index a6a9d43538087cee1af029b2cc7f79fcb7bd11b7..0000000000000000000000000000000000000000 --- a/core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.module +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * @file - * Provides supporting code for testing workspaces. - */ - -declare(strict_types=1); - -/** - * Implements hook_entity_type_alter(). - */ -function workspaces_test_entity_type_alter(array &$entity_types) { - $state = \Drupal::state(); - - // Allow all entity types to have their definition changed dynamically for - // testing purposes. - foreach ($entity_types as $entity_type_id => $entity_type) { - $entity_types[$entity_type_id] = $state->get("$entity_type_id.entity_type", $entity_types[$entity_type_id]); - } -} diff --git a/core/modules/workspaces/tests/src/Functional/Update/WorkspaceAssociationStringIdsUpdatePathTest.php b/core/modules/workspaces/tests/src/Functional/Update/WorkspaceAssociationStringIdsUpdatePathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d36a8b3aa15c828f1f6139772f320a2830cad633 --- /dev/null +++ b/core/modules/workspaces/tests/src/Functional/Update/WorkspaceAssociationStringIdsUpdatePathTest.php @@ -0,0 +1,49 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\workspaces\Functional\Update; + +use Drupal\FunctionalTests\Update\UpdatePathTestBase; + +/** + * Tests the update path for string IDs in workspace_association. + * + * @group workspaces + */ +class WorkspaceAssociationStringIdsUpdatePathTest extends UpdatePathTestBase { + + /** + * {@inheritdoc} + */ + protected $checkEntityFieldDefinitionUpdates = FALSE; + + /** + * {@inheritdoc} + */ + protected function setDatabaseDumpFiles(): void { + $this->databaseDumpFiles = [ + __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz', + __DIR__ . '/../../../fixtures/update/workspaces.php', + ]; + } + + /** + * Tests the update path for string IDs in workspace_association. + */ + public function testRunUpdates(): void { + $schema = \Drupal::database()->schema(); + $find_primary_key_columns = new \ReflectionMethod(get_class($schema), 'findPrimaryKeyColumns'); + + $this->assertFalse($schema->fieldExists('workspace_association', 'target_entity_id_string')); + $primary_key_columns = ['workspace', 'target_entity_type_id', 'target_entity_id']; + $this->assertEquals($primary_key_columns, $find_primary_key_columns->invoke($schema, 'workspace_association')); + + $this->runUpdates(); + + $this->assertTrue($schema->fieldExists('workspace_association', 'target_entity_id_string')); + $primary_key_columns = ['workspace', 'target_entity_type_id', 'target_entity_id', 'target_entity_id_string']; + $this->assertEquals($primary_key_columns, $find_primary_key_columns->invoke($schema, 'workspace_association')); + } + +} diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php index 082948728edcf66b43807ecd2c8ba26774340e40..899dfec2780f9072b927789ce827fd24c20bb621 100644 --- a/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\workspaces\Functional; +use Drupal\Core\Entity\EntityInterface; use Drupal\Tests\block\Traits\BlockCreationTrait; use Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler; use Drupal\workspaces\Entity\Workspace; @@ -34,7 +35,7 @@ trait WorkspaceTestUtilities { * @return \Drupal\Core\Entity\EntityInterface * The entity. */ - protected function getOneEntityByLabel($type, $label) { + protected function getOneEntityByLabel($type, $label): EntityInterface { /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */ $entity_type_manager = \Drupal::service('entity_type.manager'); $property = $entity_type_manager->getDefinition($type)->getKey('label'); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php index 4d7e8d80e62862232a1f4e9e5fe101ed6fa17bf0..7cb8f5515a4e1c19ebd7ffc830dc85e65943664c 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php @@ -5,8 +5,6 @@ namespace Drupal\Tests\workspaces\Kernel; use Drupal\KernelTests\KernelTestBase; -use Drupal\Tests\node\Traits\ContentTypeCreationTrait; -use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\Tests\user\Traits\UserCreationTrait; use Drupal\workspaces\Entity\Workspace; @@ -19,8 +17,6 @@ */ class WorkspaceAssociationTest extends KernelTestBase { - use ContentTypeCreationTrait; - use NodeCreationTrait; use UserCreationTrait; use WorkspaceTestTrait; @@ -35,13 +31,11 @@ class WorkspaceAssociationTest extends KernelTestBase { * {@inheritdoc} */ protected static $modules = [ - 'field', - 'filter', - 'node', - 'text', + 'entity_test', 'user', 'system', 'workspaces', + 'workspaces_test', ]; /** @@ -52,17 +46,15 @@ protected function setUp(): void { $this->entityTypeManager = \Drupal::entityTypeManager(); - $this->installEntitySchema('node'); + $this->installEntitySchema('entity_test_mulrevpub'); + $this->installEntitySchema('entity_test_mulrevpub_string_id'); $this->installEntitySchema('user'); $this->installEntitySchema('workspace'); - $this->installConfig(['filter', 'node', 'system']); + $this->installConfig(['system']); - $this->installSchema('node', ['node_access']); $this->installSchema('workspaces', ['workspace_association']); - $this->createContentType(['type' => 'article']); - $permissions = array_intersect([ 'administer nodes', 'create workspace', @@ -80,27 +72,33 @@ protected function setUp(): void { /** * Tests the revisions tracked by a workspace. * + * @param string $entity_type_id + * The ID of the entity type to test. + * @param array $entity_values + * An array of values for the entities created in this test. + * * @covers ::getTrackedEntities * @covers ::getAssociatedRevisions + * + * @dataProvider getEntityTypeIds */ - public function testWorkspaceAssociation(): void { - $this->createNode(['title' => 'Test article 1 - live - unpublished', 'type' => 'article', 'status' => 0]); - $this->createNode(['title' => 'Test article 2 - live - published', 'type' => 'article']); + public function testWorkspaceAssociation(string $entity_type_id, array $entity_values): void { + $entity_1 = $this->createEntity($entity_type_id, $entity_values[1]); + $this->createEntity($entity_type_id, $entity_values[2]); // Edit one of the existing nodes in 'stage'. $this->switchToWorkspace('stage'); - $node = $this->entityTypeManager->getStorage('node')->load(1); - $node->setTitle('Test article 1 - stage - published'); - $node->setPublished(); + $entity_1->set('name', 'Test entity 1 - stage - published'); + $entity_1->setPublished(); // This creates rev. 3. - $node->save(); + $entity_1->save(); // Generate content with the following structure: // Stage: - // - Test article 3 - stage - unpublished (rev. 4) - // - Test article 4 - stage - published (rev. 5 and 6) - $this->createNode(['title' => 'Test article 3 - stage - unpublished', 'type' => 'article', 'status' => 0]); - $this->createNode(['title' => 'Test article 4 - stage - published', 'type' => 'article']); + // - Test entity 3 - stage - unpublished (rev. 4) + // - Test entity 4 - stage - published (rev. 5 and 6) + $this->createEntity($entity_type_id, $entity_values[3]); + $this->createEntity($entity_type_id, $entity_values[4]); $expected_latest_revisions = [ 'stage' => [3, 4, 6], @@ -111,17 +109,17 @@ public function testWorkspaceAssociation(): void { $expected_initial_revisions = [ 'stage' => [4, 5], ]; - $this->assertWorkspaceAssociations('node', $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); + $this->assertWorkspaceAssociations($entity_type_id, $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); // Dev: - // - Test article 1 - stage - published (rev. 3) - // - Test article 3 - stage - unpublished (rev. 4) - // - Test article 4 - stage - published (rev. 5 and 6) - // - Test article 5 - dev - unpublished (rev. 7) - // - Test article 6 - dev - published (rev. 8 and 9) + // - Test entity 1 - stage - published (rev. 3) + // - Test entity 3 - stage - unpublished (rev. 4) + // - Test entity 4 - stage - published (rev. 5 and 6) + // - Test entity 5 - dev - unpublished (rev. 7) + // - Test entity 6 - dev - published (rev. 8 and 9) $this->switchToWorkspace('dev'); - $this->createNode(['title' => 'Test article 5 - dev - unpublished', 'type' => 'article', 'status' => 0]); - $this->createNode(['title' => 'Test article 6 - dev - published', 'type' => 'article']); + $this->createEntity($entity_type_id, $entity_values[5]); + $this->createEntity($entity_type_id, $entity_values[6]); $expected_latest_revisions += [ 'dev' => [3, 4, 6, 7, 9], @@ -134,7 +132,7 @@ public function testWorkspaceAssociation(): void { $expected_initial_revisions += [ 'dev' => [7, 8], ]; - $this->assertWorkspaceAssociations('node', $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); + $this->assertWorkspaceAssociations($entity_type_id, $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); // Merge 'dev' into 'stage' and check the workspace associations. /** @var \Drupal\workspaces\WorkspaceMergerInterface $workspace_merger */ @@ -155,7 +153,45 @@ public function testWorkspaceAssociation(): void { // Which leaves revision 8 as the only remaining initial revision in 'dev'. $expected_initial_revisions['dev'] = [8]; - $this->assertWorkspaceAssociations('node', $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); + $this->assertWorkspaceAssociations($entity_type_id, $expected_latest_revisions, $expected_all_revisions, $expected_initial_revisions); + + // Publish 'stage' and check the workspace associations. + /** @var \Drupal\workspaces\WorkspacePublisherInterface $workspace_publisher */ + $workspace_publisher = \Drupal::service('workspaces.operation_factory')->getPublisher($this->workspaces['stage']); + $workspace_publisher->publish(); + + $expected_revisions['stage'] = $expected_revisions['dev'] = []; + $this->assertWorkspaceAssociations($entity_type_id, $expected_revisions, $expected_revisions, $expected_revisions); + } + + /** + * The data provider for ::testWorkspaceAssociation(). + */ + public static function getEntityTypeIds(): array { + return [ + [ + 'entity_type_id' => 'entity_test_mulrevpub', + 'entity_values' => [ + 1 => ['name' => 'Test entity 1 - live - unpublished', 'status' => FALSE], + 2 => ['name' => 'Test entity 2 - live - published', 'status' => TRUE], + 3 => ['name' => 'Test entity 3 - stage - unpublished', 'status' => FALSE], + 4 => ['name' => 'Test entity 4 - stage - published', 'status' => TRUE], + 5 => ['name' => 'Test entity 5 - dev - unpublished', 'status' => FALSE], + 6 => ['name' => 'Test entity 6 - dev - published', 'status' => TRUE], + ], + ], + [ + 'entity_type_id' => 'entity_test_mulrevpub_string_id', + 'entity_values' => [ + 1 => ['id' => 'test_1', 'name' => 'Test entity 1 - live - unpublished', 'status' => FALSE], + 2 => ['id' => 'test_2', 'name' => 'Test entity 2 - live - published', 'status' => TRUE], + 3 => ['id' => 'test_3', 'name' => 'Test entity 3 - stage - unpublished', 'status' => FALSE], + 4 => ['id' => 'test_4', 'name' => 'Test entity 4 - stage - published', 'status' => TRUE], + 5 => ['id' => 'test_5', 'name' => 'Test entity 5 - dev - unpublished', 'status' => FALSE], + 6 => ['id' => 'test_6', 'name' => 'Test entity 6 - dev - published', 'status' => TRUE], + ], + ], + ]; } /** @@ -171,7 +207,7 @@ public function testWorkspaceAssociation(): void { * An array of expected values for the initial revisions, i.e. for the * entities that were created in the specified workspace. */ - protected function assertWorkspaceAssociations($entity_type_id, array $expected_latest_revisions, array $expected_all_revisions, array $expected_initial_revisions) { + protected function assertWorkspaceAssociations($entity_type_id, array $expected_latest_revisions, array $expected_all_revisions, array $expected_initial_revisions): void { $workspace_association = \Drupal::service('workspaces.association'); foreach ($expected_latest_revisions as $workspace_id => $expected_tracked_revision_ids) { $tracked_entities = $workspace_association->getTrackedEntities($workspace_id, $entity_type_id); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php index 504a1aa30fa5c7bf27ab7c54110b84012fb844aa..8391859f46bff01970e9d38ac44293cc202f0249 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\workspaces\Kernel; +use Drupal\Core\Entity\EntityInterface; use Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler; use Drupal\workspaces\Entity\Workspace; @@ -163,4 +164,24 @@ protected function ignoreEntityType(string $entity_type_id): void { \Drupal::entityTypeManager()->clearCachedDefinitions(); } + /** + * Creates an entity. + * + * @param string $entity_type_id + * The entity type ID. + * @param array $values + * An array of values for the entity. + * + * @return \Drupal\Core\Entity\EntityInterface + * The created entity. + */ + protected function createEntity(string $entity_type_id, array $values = []): EntityInterface { + $storage = \Drupal::entityTypeManager()->getStorage($entity_type_id); + + $entity = $storage->create($values); + $entity->save(); + + return $entity; + } + } diff --git a/core/modules/workspaces/workspaces.install b/core/modules/workspaces/workspaces.install index 0223678a686ac0fccd9b4f3e119e2bb8f1aac9f5..1a1eb1f98fa2ce6b53b358d55d00791994400241 100644 --- a/core/modules/workspaces/workspaces.install +++ b/core/modules/workspaces/workspaces.install @@ -27,29 +27,10 @@ function workspaces_requirements($phase) { return $requirements; } -/** - * Implements hook_module_preinstall(). - */ -function workspaces_module_preinstall($module) { - if ($module !== 'workspaces') { - return; - } - - /** @var \Drupal\workspaces\WorkspaceInformationInterface $workspace_info */ - $workspace_info = \Drupal::service('workspaces.information'); - $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); - foreach ($entity_definition_update_manager->getEntityTypes() as $entity_type) { - if ($workspace_info->isEntityTypeSupported($entity_type)) { - $entity_type->setRevisionMetadataKey('workspace', 'workspace'); - $entity_definition_update_manager->updateEntityType($entity_type); - } - } -} - /** * Implements hook_install(). */ -function workspaces_install() { +function workspaces_install(): void { // Set the owner of these default workspaces to be first user which has the // 'administrator' role. This way we avoid hard coding user ID 1 for sites // that prefer to not give it any special meaning. @@ -102,8 +83,16 @@ function workspaces_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, + 'default' => 0, 'description' => 'The ID of the associated entity.', ], + 'target_entity_id_string' => [ + 'type' => 'varchar_ascii', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + 'description' => 'The string ID of the associated entity.', + ], 'target_entity_revision_id' => [ 'type' => 'int', 'unsigned' => TRUE, @@ -111,10 +100,10 @@ function workspaces_schema() { 'description' => 'The revision ID of the associated entity.', ], ], + 'primary key' => ['workspace', 'target_entity_type_id', 'target_entity_id', 'target_entity_id_string'], 'indexes' => [ 'target_entity_revision_id' => ['target_entity_revision_id'], ], - 'primary key' => ['workspace', 'target_entity_type_id', 'target_entity_id'], ]; return $schema; @@ -123,6 +112,33 @@ function workspaces_schema() { /** * Implements hook_update_last_removed(). */ -function workspaces_update_last_removed() { +function workspaces_update_last_removed(): int { return 8803; } + +/** + * Update workspace associations to support entity types with string IDs. + */ +function workspaces_update_11101(): void { + $schema = \Drupal::database()->schema(); + + $target_id_spec = [ + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'description' => 'The ID of the associated entity.', + ]; + $schema->changeField('workspace_association', 'target_entity_id', 'target_entity_id', $target_id_spec); + + $target_id_string_spec = [ + 'type' => 'varchar_ascii', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + 'description' => 'The string ID of the associated entity.', + ]; + $schema->addField('workspace_association', 'target_entity_id_string', $target_id_string_spec, [ + 'primary key' => ['workspace', 'target_entity_type_id', 'target_entity_id', 'target_entity_id_string'], + ]); +} diff --git a/core/modules/workspaces/workspaces.module b/core/modules/workspaces/workspaces.module index cc8cf8e1dabdf76000f7b4a3b7887a77c633e8f3..39864fd9f3e28a38eaf724942f485fb69a1e5b8f 100644 --- a/core/modules/workspaces/workspaces.module +++ b/core/modules/workspaces/workspaces.module @@ -2,39 +2,8 @@ /** * @file - * Provides full-site preview functionality for content staging. */ -use Drupal\Core\Cache\Cache; -use Drupal\Core\Entity\EntityFormInterface; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Url; -use Drupal\views\Plugin\views\query\QueryPluginBase; -use Drupal\views\ViewExecutable; -use Drupal\workspaces\EntityAccess; -use Drupal\workspaces\EntityOperations; -use Drupal\workspaces\EntityTypeInfo; -use Drupal\workspaces\FormOperations; -use Drupal\workspaces\ViewsQueryAlter; - -/** - * Implements hook_help(). - */ -function workspaces_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - // Main module help for the Workspaces module. - case 'help.page.workspaces': - $output = ''; - $output .= '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Workspaces module allows workspaces to be defined and switched between. Content is then assigned to the active workspace when created. For more information, see the <a href=":workspaces">online documentation for the Workspaces module</a>.', [':workspaces' => 'https://www.drupal.org/docs/8/core/modules/workspace/overview']) . '</p>'; - return $output; - } -} - /** * Implements hook_module_implements_alter(). */ @@ -57,252 +26,3 @@ function workspaces_module_implements_alter(&$implementations, $hook): void { $implementations['workspaces'] = $group; } } - -/** - * Implements hook_entity_type_build(). - */ -function workspaces_entity_type_build(array &$entity_types) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityTypeBuild($entity_types); -} - -/** - * Implements hook_entity_type_alter(). - */ -function workspaces_entity_type_alter(array &$entity_types) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityTypeAlter($entity_types); -} - -/** - * Implements hook_form_alter(). - */ -function workspaces_form_alter(&$form, FormStateInterface $form_state, $form_id) { - if ($form_state->getFormObject() instanceof EntityFormInterface) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityFormAlter($form, $form_state, $form_id); - } - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(FormOperations::class) - ->formAlter($form, $form_state, $form_id); -} - -/** - * Implements hook_field_info_alter(). - */ -function workspaces_field_info_alter(&$definitions) { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->fieldInfoAlter($definitions); -} - -/** - * Implements hook_entity_base_field_info(). - */ -function workspaces_entity_base_field_info(EntityTypeInterface $entity_type) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityTypeInfo::class) - ->entityBaseFieldInfo($entity_type); -} - -/** - * Implements hook_entity_preload(). - */ -function workspaces_entity_preload(array $ids, $entity_type_id) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityPreload($ids, $entity_type_id); -} - -/** - * Implements hook_entity_presave(). - */ -function workspaces_entity_presave(EntityInterface $entity) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityPresave($entity); -} - -/** - * Implements hook_entity_insert(). - */ -function workspaces_entity_insert(EntityInterface $entity) { - if ($entity->getEntityTypeId() === 'workspace') { - \Drupal::service('workspaces.association')->workspaceInsert($entity); - \Drupal::service('workspaces.repository')->resetCache(); - } - - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityInsert($entity); -} - -/** - * Implements hook_entity_update(). - */ -function workspaces_entity_update(EntityInterface $entity) { - if ($entity->getEntityTypeId() === 'workspace') { - \Drupal::service('workspaces.repository')->resetCache(); - } - - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityUpdate($entity); -} - -/** - * Implements hook_entity_translation_insert(). - */ -function workspaces_entity_translation_insert(EntityInterface $translation): void { - \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityTranslationInsert($translation); -} - -/** - * Implements hook_entity_predelete(). - */ -function workspaces_entity_predelete(EntityInterface $entity) { - if ($entity->getEntityTypeId() === 'workspace') { - \Drupal::service('workspaces.repository')->resetCache(); - } - - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityOperations::class) - ->entityPredelete($entity); -} - -/** - * Implements hook_entity_delete(). - */ -function workspaces_entity_delete(EntityInterface $entity) { - if (\Drupal::service('workspaces.information')->isEntityTypeSupported($entity->getEntityType())) { - \Drupal::service('workspaces.association') - ->deleteAssociations(NULL, $entity->getEntityTypeId(), [$entity->id()]); - } -} - -/** - * Implements hook_entity_revision_delete(). - */ -function workspaces_entity_revision_delete(EntityInterface $entity) { - if (\Drupal::service('workspaces.information')->isEntityTypeSupported($entity->getEntityType())) { - \Drupal::service('workspaces.association') - ->deleteAssociations(NULL, $entity->getEntityTypeId(), [$entity->id()], [$entity->getRevisionId()]); - } -} - -/** - * Implements hook_entity_access(). - * - * @see \Drupal\workspaces\EntityAccess - */ -function workspaces_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityAccess::class) - ->entityOperationAccess($entity, $operation, $account); -} - -/** - * Implements hook_entity_create_access(). - * - * @see \Drupal\workspaces\EntityAccess - */ -function workspaces_entity_create_access(AccountInterface $account, array $context, $entity_bundle) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(EntityAccess::class) - ->entityCreateAccess($account, $context, $entity_bundle); -} - -/** - * Implements hook_ENTITY_TYPE_update() for the 'menu_link_content' entity type. - */ -function workspaces_menu_link_content_update(EntityInterface $entity) { - /** @var \Drupal\menu_link_content\MenuLinkContentInterface $entity */ - if ($entity->getLoadedRevisionId() != $entity->getRevisionId()) { - // We are not updating the menu tree definitions when a custom menu link - // entity is saved as a pending revision (because the parent can not be - // changed), so we need to clear the system menu cache manually. However, - // inserting or deleting a custom menu link updates the menu tree - // definitions, so we don't have to do anything in those cases. - $cache_tags = Cache::buildTags('config:system.menu', [$entity->getMenuName()], '.'); - \Drupal::service('cache_tags.invalidator')->invalidateTags($cache_tags); - } -} - -/** - * Implements hook_views_query_alter(). - */ -function workspaces_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { - return \Drupal::service('class_resolver') - ->getInstanceFromDefinition(ViewsQueryAlter::class) - ->alterQuery($view, $query); -} - -/** - * Implements hook_cron(). - */ -function workspaces_cron() { - \Drupal::service('workspaces.manager')->purgeDeletedWorkspacesBatch(); -} - -/** - * Implements hook_toolbar(). - */ -function workspaces_toolbar() { - $items['workspace'] = [ - '#cache' => [ - 'contexts' => [ - 'user.permissions', - ], - ], - ]; - $current_user = \Drupal::currentUser(); - if (!$current_user->hasPermission('administer workspaces') - && !$current_user->hasPermission('view own workspace') - && !$current_user->hasPermission('view any workspace')) { - return $items; - } - - /** @var \Drupal\workspaces\WorkspaceInterface $active_workspace */ - $active_workspace = \Drupal::service('workspaces.manager')->getActiveWorkspace(); - - $items['workspace'] += [ - '#type' => 'toolbar_item', - 'tab' => [ - '#lazy_builder' => ['workspaces.lazy_builders:renderToolbarTab', []], - '#create_placeholder' => TRUE, - '#lazy_builder_preview' => [ - '#type' => 'link', - '#title' => $active_workspace ? $active_workspace->label() : t('Live'), - '#url' => Url::fromRoute('entity.workspace.collection'), - '#attributes' => [ - 'class' => ['toolbar-tray-lazy-placeholder-link'], - ], - ], - ], - '#wrapper_attributes' => [ - 'class' => ['workspaces-toolbar-tab'], - ], - '#weight' => 500, - ]; - - // Add a special class to the wrapper if we don't have an active workspace so - // we can highlight it with a different color. - if (!$active_workspace) { - $items['workspace']['#wrapper_attributes']['class'][] = 'workspaces-toolbar-tab--is-default'; - } - - // \Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem adds an - // #attributes property to each toolbar item's tab child automatically. - // Lazy builders don't support an #attributes property so we need to - // add another render callback to remove the #attributes property. We start by - // adding the defaults, and then we append our own pre render callback. - $items['workspace'] += \Drupal::service('plugin.manager.element_info')->getInfo('toolbar_item'); - $items['workspace']['#pre_render'][] = 'workspaces.lazy_builders:removeTabAttributes'; - - return $items; -} diff --git a/core/modules/workspaces/workspaces.post_update.php b/core/modules/workspaces/workspaces.post_update.php index 1dbdf251e01e16b8aa2995d66182c155ae5204de..58017017e78379b43cc3af582c966d00b8ece83f 100644 --- a/core/modules/workspaces/workspaces.post_update.php +++ b/core/modules/workspaces/workspaces.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function workspaces_removed_post_updates() { +function workspaces_removed_post_updates(): array { return [ 'workspaces_post_update_access_clear_caches' => '9.0.0', 'workspaces_post_update_remove_default_workspace' => '9.0.0', diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 540ac830233c87d6013c50186b8b17610937ceb7..733c8d5084eaaaa96447d3c900ed569e8e648e31 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -66,14 +66,17 @@ <rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/> <rule ref="Drupal.Commenting.DocCommentStar"/> <rule ref="Drupal.Commenting.FileComment"/> + <rule ref="Drupal.Commenting.FunctionComment"> <exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/> <exclude name="Drupal.Commenting.FunctionComment.Missing"/> - <exclude name="Drupal.Commenting.FunctionComment.MissingParamType"/> <exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/> <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/> <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/> </rule> + <rule ref="Drupal.Commenting.FunctionComment.MissingParamType"> + <include-pattern>core/lib/Component/*</include-pattern> + </rule> <rule ref="Drupal.Commenting.GenderNeutralComment"/> <rule ref="Drupal.Commenting.HookComment"/> <rule ref="Drupal.Commenting.InlineComment"> @@ -144,8 +147,10 @@ <!-- Drupal Practice sniffs --> <rule ref="DrupalPractice.CodeAnalysis.VariableAnalysis"> - <!-- @todo exclude tests --> - <exclude-pattern>*/tests/*</exclude-pattern> + <exclude-pattern>*/Functional/*</exclude-pattern> + <exclude-pattern>*/FunctionalJavascript/*</exclude-pattern> + <exclude-pattern>*/core/tests/*</exclude-pattern> + <exclude-pattern>*/core/profiles/*/tests/*</exclude-pattern> <!-- Do not run this sniff on API files or transliteration data. --> <exclude-pattern>*.api.php</exclude-pattern> <exclude-pattern>core/lib/Drupal/Component/Transliteration/data/*.php</exclude-pattern> diff --git a/core/phpstan.neon.dist b/core/phpstan.neon.dist index 7356bcddb915b12ec87c93e8f5d105a376a5e52c..99f249eb2a5fd027130b9bfa118685fc9f7934b7 100644 --- a/core/phpstan.neon.dist +++ b/core/phpstan.neon.dist @@ -50,6 +50,9 @@ parameters: - "#Drupal calls should be avoided in classes, use dependency injection instead#" - "#^Plugin definitions cannot be altered.#" - "#^Class .* extends @internal class#" + - identifier: missingType.iterableValue rules: - Drupal\PHPStan\Rules\ComponentTestDoesNotExtendCoreTest + - PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule + - PHPStan\Rules\Methods\MissingMethodReturnTypehintRule diff --git a/core/profiles/demo_umami/demo_umami.install b/core/profiles/demo_umami/demo_umami.install index 5404f934a2de8b680aa28977c83e19cf5cedb5ba..1e305aec7239a49ebccd2e5f2b9e4cc3409e9c3b 100644 --- a/core/profiles/demo_umami/demo_umami.install +++ b/core/profiles/demo_umami/demo_umami.install @@ -32,7 +32,7 @@ function demo_umami_requirements($phase) { * * @see system_install() */ -function demo_umami_install() { +function demo_umami_install(): void { // We install some menu links, so we have to rebuild the router, to ensure the // menu links are valid. \Drupal::service('router.builder')->rebuildIfNeeded(); diff --git a/core/profiles/demo_umami/demo_umami.profile b/core/profiles/demo_umami/demo_umami.profile index e6b8b2b5f69c4706be14e453d237e2ffac35dd31..64b4cc3a40b6168e27ed7c7ea1995f4c59b6b864 100644 --- a/core/profiles/demo_umami/demo_umami.profile +++ b/core/profiles/demo_umami/demo_umami.profile @@ -35,7 +35,7 @@ function demo_umami_help($route_name, RouteMatchInterface $route_match) { * * Allows the profile to alter the site configuration form. */ -function demo_umami_form_install_configure_form_alter(&$form, FormStateInterface $form_state) { +function demo_umami_form_install_configure_form_alter(&$form, FormStateInterface $form_state): void { $form['site_information']['site_name']['#default_value'] = 'Umami Food Magazine'; $form['#submit'][] = 'demo_umami_form_install_configure_submit'; } diff --git a/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install b/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install index f3df9bfc6e1f7150572d1d73b623ef637a62733c..97eff3e068fa2aed576acd89bcdd00a6c0150ef9 100644 --- a/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install +++ b/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install @@ -7,21 +7,10 @@ use Drupal\demo_umami_content\InstallHelper; -/** - * Implements hook_module_preinstall(). - */ -function demo_umami_content_module_preinstall($module) { - if ($module === 'demo_umami_content' && !\Drupal::service('config.installer')->isSyncing()) { - // Run before importing config so blocks are created with the correct - // dependencies. - \Drupal::classResolver(InstallHelper::class)->importContent(); - } -} - /** * Implements hook_install(). */ -function demo_umami_content_install($is_syncing) { +function demo_umami_content_install($is_syncing): void { if (!$is_syncing) { $query = \Drupal::entityQuery('node')->accessCheck(TRUE); $nids = $query->execute(); @@ -74,7 +63,7 @@ function demo_umami_content_install($is_syncing) { /** * Implements hook_uninstall(). */ -function demo_umami_content_uninstall($is_syncing) { +function demo_umami_content_uninstall($is_syncing): void { if (!$is_syncing) { \Drupal::classResolver(InstallHelper::class)->deleteImportedContent(); } diff --git a/core/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php b/core/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..33b903ff276a7381a7e51ad7205866115c72f2f0 --- /dev/null +++ b/core/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\demo_umami_content\Hook; + +use Drupal\Core\Hook\Attribute\Hook; +use Drupal\demo_umami_content\InstallHelper; + +/** + * Hook implementations for demo_umami_content. + */ +class DemoUmamiContentHooks { + + /** + * Implements hook_module_preinstall(). + */ + #[Hook('module_preinstall')] + public function modulePreinstall($module) { + if ($module === 'demo_umami_content' && !\Drupal::service('config.installer')->isSyncing()) { + // Run before importing config so blocks are created with the correct + // dependencies. + \Drupal::classResolver(InstallHelper::class)->importContent(); + } + } + +} diff --git a/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php b/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php index 7fce5fcdacfb5c6f65b53f194a6e4bf44df2a1d2..7fe3e3952843504d95c3a79bc37cd5c950577568 100644 --- a/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php +++ b/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php @@ -94,7 +94,7 @@ class InstallHelper implements ContainerInjectionInterface { /** * The module's path. */ - // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName + // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing protected string $module_path; /** diff --git a/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php b/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php index c9671b0e487a8a4f730c1558f88236025ce208e0..980588d3d5379de2bb9eb0d93182b17818465a17 100644 --- a/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php +++ b/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php @@ -57,7 +57,7 @@ public function testDemoFeatures(): void { /** * Tests demo_umami profile warnings shown on Status Page. */ - protected function testWarningsOnStatusPage() { + protected function testWarningsOnStatusPage(): void { $account = $this->drupalCreateUser(['administer site configuration']); $this->drupalLogin($account); @@ -145,7 +145,7 @@ protected function assertDefaultConfig(StorageInterface $default_config_storage, /** * Tests that the users can log in with the admin password entered at install. */ - protected function testUser() { + protected function testUser(): void { $password = $this->rootUser->pass_raw; $ids = \Drupal::entityQuery('user') ->accessCheck(FALSE) @@ -192,7 +192,7 @@ protected function testEditNodesByAdmin(): void { /** * Tests that the Umami theme is available on the Appearance page. */ - protected function testAppearance() { + protected function testAppearance(): void { $account = $this->drupalCreateUser(['administer themes']); $this->drupalLogin($account); $assert_session = $this->assertSession(); @@ -204,7 +204,7 @@ protected function testAppearance() { /** * Tests that the toolbar warning only appears on the admin pages. */ - protected function testDemonstrationWarningMessage() { + protected function testDemonstrationWarningMessage(): void { $permissions = [ 'access content overview', 'access toolbar', @@ -278,7 +278,7 @@ protected function testDemonstrationWarningMessage() { * * @see drupalCreateUser() */ - protected function drupalLoginWithPassword(AccountInterface $account, $password) { + protected function drupalLoginWithPassword(AccountInterface $account, $password): void { if ($this->loggedInUser) { $this->drupalLogout(); } diff --git a/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php b/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php index f2878f2fde2bd9dbbaab45320cbf18405c9f9bfe..f01c57b6f93a0e2118cb0c38697e569aa530561e 100644 --- a/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php +++ b/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php @@ -36,7 +36,7 @@ public function testUmami(): void { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place custom local translations in the translations directory to avoid // getting translations from localize.drupal.org. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php index 03bd5b5a38b3007691e1e0c37c8d6f478260e674..87715c1c9a137eb612f5cca01787928c03f57637 100644 --- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php +++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php @@ -50,7 +50,7 @@ public function testFrontPageAuthenticatedWarmCache(): void { $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); $this->assertSame(4, $performance_data->getQueryCount()); - $this->assertSame(43, $performance_data->getCacheGetCount()); + $this->assertSame(42, $performance_data->getCacheGetCount()); $this->assertSame(0, $performance_data->getCacheSetCount()); $this->assertSame(0, $performance_data->getCacheDeleteCount()); $this->assertSame(0, $performance_data->getCacheTagChecksumCount()); diff --git a/core/profiles/demo_umami/themes/umami/css/components/regions/footer/footer.css b/core/profiles/demo_umami/themes/umami/css/components/regions/footer/footer.css index aad91b8bbcae49e072811cb662d89f8c8e0087f6..8669115513a89ffc801a5be9cac66105b3b4ddc6 100644 --- a/core/profiles/demo_umami/themes/umami/css/components/regions/footer/footer.css +++ b/core/profiles/demo_umami/themes/umami/css/components/regions/footer/footer.css @@ -6,7 +6,7 @@ * footer items, such as a menu, which are styled by their own CSS files. */ -.footer { +.layout-footer { padding: 2rem 4%; text-align: center; color: #fff; @@ -21,10 +21,10 @@ /* Large */ @media screen and (min-width: 60rem) { /* 960px */ - .footer { + .layout-footer { text-align: left; /* LTR */ } - [dir="rtl"] .footer { + [dir="rtl"] .layout-footer { text-align: right; } .region-footer { @@ -36,20 +36,20 @@ /* Extra large + side margins */ @media screen and (min-width: 80rem) { /* 1200px (large) + 80px (side margins) = 1280px */ - .footer { + .layout-footer { padding: 2rem 0; } } -:where(.footer) a { +:where(.layout-footer) a { color: #fff; background-color: inherit; font-weight: 400; } -:where(.footer) a:active, -:where(.footer) a:focus, -:where(.footer) a:hover { +:where(.layout-footer) a:active, +:where(.layout-footer) a:focus, +:where(.layout-footer) a:hover { outline-color: #fff; background-color: #000; } diff --git a/core/profiles/demo_umami/themes/umami/css/layout/layout-2-col.css b/core/profiles/demo_umami/themes/umami/css/layout/layout-2-col.css index 8cb233f0191bc29f7bed6ce77a433af295441d79..8084c8c3af2ed329d2e311e49432e88c49080826 100644 --- a/core/profiles/demo_umami/themes/umami/css/layout/layout-2-col.css +++ b/core/profiles/demo_umami/themes/umami/css/layout/layout-2-col.css @@ -3,14 +3,14 @@ * This file is used to create the layout when the theme has 2 columns. */ -.two-columns .main { +.two-columns .main-content-area { display: grid; gap: 14px; } /* Large */ @media screen and (min-width: 60rem) { /* 960px */ - .two-columns .main { + .two-columns .main-content-area { grid-template-columns: 72% 1fr; gap: 3%; } diff --git a/core/profiles/demo_umami/themes/umami/css/layout/layout.css b/core/profiles/demo_umami/themes/umami/css/layout/layout.css index 671f54fe3ff58ee1e39972df9d2dc3e8d21d4fcf..96846813f56a698b55a7ed81f62c6c1b402f1f7c 100644 --- a/core/profiles/demo_umami/themes/umami/css/layout/layout.css +++ b/core/profiles/demo_umami/themes/umami/css/layout/layout.css @@ -12,14 +12,14 @@ } /* Add responsive side gutters to the outer layout container 'main' at smaller sizes */ -.main { +.main-content-area { padding-inline: 4%; padding-block: 0 2.37rem; } /* Extra large + side margins */ @media screen and (min-width: 80rem) { /* 1200px (large) + 80px (side margins) = 1280px */ - .main { + .main-content-area { padding-inline: 0; } } diff --git a/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig b/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig index 916715704dabe860482b32a15f0acc9e5881fc6f..a3ac6c8074c480d23a3e0a2c2d480ea2686e9ab1 100644 --- a/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig +++ b/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig @@ -58,89 +58,90 @@ </header> {% endif %} - {% if page.highlighted %} - <div class="layout-highlighted"> - <div class="container"> - {{ page.highlighted }} + <main> + + {% if page.highlighted %} + <div class="layout-highlighted"> + <div class="container"> + {{ page.highlighted }} + </div> </div> - </div> - {% endif %} + {% endif %} - {% if page.tabs %} - <div class="layout-tabs"> - <div class="container"> - {{ page.tabs }} + {% if page.tabs %} + <div class="layout-tabs"> + <div class="container"> + {{ page.tabs }} + </div> </div> - </div> - {% endif %} + {% endif %} - {% if page.banner_top|render|trim is not empty %} - <div class="layout-banner-top"> - {{ page.banner_top }} - </div> - {% endif %} + {% if page.banner_top|render|trim is not empty %} + <div class="layout-banner-top"> + {{ page.banner_top }} + </div> + {% endif %} - {% if page.breadcrumbs|render|trim is not empty %} - <div class="layout-breadcrumbs"> - <div class="container"> - {{ page.breadcrumbs }} + {% if page.breadcrumbs|render|trim is not empty %} + <div class="layout-breadcrumbs"> + <div class="container"> + {{ page.breadcrumbs }} + </div> </div> - </div> - {% endif %} + {% endif %} - {% if not node %} - {% if page.page_title|render|trim is not empty %} - <div class="layout-page-title"> - {% if is_front %} - <div class="is-front container"> - {{ page.page_title }} - </div> - {% else %} - <div class="container"> - {{ page.page_title }} - </div> - {% endif %} - </div> + {% if not node %} + {% if page.page_title|render|trim is not empty %} + <div class="layout-page-title"> + {% if is_front %} + <div class="is-front container"> + {{ page.page_title }} + </div> + {% else %} + <div class="container"> + {{ page.page_title }} + </div> + {% endif %} + </div> + {% endif %} {% endif %} - {% endif %} - <main role="main" class="main container"> + <div class="main-content-area container"> + <div class="layout-content"> + <a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #} + {{ page.content }} + </div>{# /.layout-content #} - <div class="layout-content"> - <a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #} - {{ page.content }} - </div>{# /.layout-content #} + {% if page.sidebar|render|trim is not empty %} + <aside class="layout-sidebar" role="complementary"> + {{ page.sidebar }} + </aside> + {% endif %} + </div> - {% if page.sidebar|render|trim is not empty %} - <aside class="layout-sidebar" role="complementary"> - {{ page.sidebar }} - </aside> + {% if page.content_bottom|render|trim is not empty %} + <div class="layout-content-bottom"> + {{ page.content_bottom }} + </div> {% endif %} - </main> - {% if page.content_bottom|render|trim is not empty %} - <div class="layout-content-bottom"> - {{ page.content_bottom }} - </div> - {% endif %} - - {% if page.footer|render|trim is not empty %} - <div class="layout-footer"> - <footer class="footer" role="contentinfo"> + <footer class="footer" role="contentinfo"> + {% if page.footer|render|trim is not empty %} + <div class="layout-footer"> <div class="container"> {{ page.footer }} </div> - </footer> - </div> - {% endif %} + </div> + {% endif %} - {% if page.bottom|render|trim is not empty %} - <div class="layout-bottom"> - <div class="container"> - {{ page.bottom }} + {% if page.bottom|render|trim is not empty %} + <div class="layout-bottom"> + <div class="container"> + {{ page.bottom }} + </div> </div> - </div> - {% endif %} + {% endif %} + </footer> </div>{# /.layout-container #} diff --git a/core/profiles/demo_umami/themes/umami/umami.theme b/core/profiles/demo_umami/themes/umami/umami.theme index ac2bedd9406e7593fa82dd2836f79e8b0d60c219..5af5da3322086b3cfc733e7edb9cffd08ba74771 100644 --- a/core/profiles/demo_umami/themes/umami/umami.theme +++ b/core/profiles/demo_umami/themes/umami/umami.theme @@ -128,7 +128,7 @@ function umami_preprocess_menu_local_task(&$variables) { /** * Implements hook_form_FORM_ID_alter(). */ -function umami_form_search_block_form_alter(&$form, FormStateInterface $form_state) { +function umami_form_search_block_form_alter(&$form, FormStateInterface $form_state): void { $form['keys']['#attributes']['placeholder'] = t('Search by keyword, ingredient, dish'); } @@ -152,7 +152,7 @@ function umami_preprocess_links__media_library_menu(array &$variables) { * * @todo revisit in https://drupal.org/node/3110132 */ -function umami_form_alter(array &$form, FormStateInterface $form_state, $form_id) { +function umami_form_alter(array &$form, FormStateInterface $form_state, $form_id): void { $form_object = $form_state->getFormObject(); if ($form_object instanceof ViewsForm && str_starts_with($form_object->getBaseFormId(), 'views_form_media_library')) { diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 6fda4647f1780895e75d629ea9a46ed72199affc..635f2c2b7748a419784a734f75a9d8283e6b62bd 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -14,7 +14,7 @@ * * @see system_install() */ -function standard_install() { +function standard_install(): void { // Populate the default shortcut set. $shortcut = Shortcut::create([ 'shortcut_set' => 'default', diff --git a/core/profiles/standard/standard.profile b/core/profiles/standard/standard.profile index e3fb9305249d0468fcc6b9e89a8c4d1f8828559c..00bb9af445f4dd370a9f6a4e5bc91eb9dcd91988 100644 --- a/core/profiles/standard/standard.profile +++ b/core/profiles/standard/standard.profile @@ -13,7 +13,7 @@ * * Allows the profile to alter the site configuration form. */ -function standard_form_install_configure_form_alter(&$form, FormStateInterface $form_state) { +function standard_form_install_configure_form_alter(&$form, FormStateInterface $form_state): void { $form['#submit'][] = 'standard_form_install_configure_submit'; } diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php index 3ec3bbae758efb19a20458ae967bc05a328d9a68..0a100c52d7b47ebe7ecd5d49cbb799ab3dfd9c9a 100644 --- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php +++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php @@ -122,14 +122,16 @@ protected function testAnonymous(): void { 'DELETE FROM "semaphore" WHERE ("name" = "library_info:stark:Drupal\Core\Cache\CacheCollector") AND ("value" = "LOCK_ID")', 'INSERT INTO "semaphore" ("name", "value", "expire") VALUES ("path_alias_prefix_list:Drupal\Core\Cache\CacheCollector", "LOCK_ID", "EXPIRE")', 'DELETE FROM "semaphore" WHERE ("name" = "path_alias_prefix_list:Drupal\Core\Cache\CacheCollector") AND ("value" = "LOCK_ID")', + 'INSERT INTO "semaphore" ("name", "value", "expire") VALUES ("active-trail:route:view.frontpage.page_1:route_parameters:a:2:{s:10:"display_id";s:6:"page_1";s:7:"view_id";s:9:"frontpage";}:Drupal\Core\Cache\CacheCollector", "LOCK_ID", "EXPIRE")', + 'DELETE FROM "semaphore" WHERE ("name" = "active-trail:route:view.frontpage.page_1:route_parameters:a:2:{s:10:"display_id";s:6:"page_1";s:7:"view_id";s:9:"frontpage";}:Drupal\Core\Cache\CacheCollector") AND ("value" = "LOCK_ID")', ]; $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); - $this->assertSame(34, $performance_data->getQueryCount()); - $this->assertSame(124, $performance_data->getCacheGetCount()); + $this->assertSame(36, $performance_data->getQueryCount()); + $this->assertSame(123, $performance_data->getCacheGetCount()); $this->assertSame(45, $performance_data->getCacheSetCount()); $this->assertSame(0, $performance_data->getCacheDeleteCount()); - $this->assertSame(36, $performance_data->getCacheTagChecksumCount()); + $this->assertSame(37, $performance_data->getCacheTagChecksumCount()); $this->assertSame(43, $performance_data->getCacheTagIsValidCount()); $this->assertSame(0, $performance_data->getCacheTagInvalidationCount()); @@ -150,14 +152,16 @@ protected function testAnonymous(): void { 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.node.canonical") AND ("route_param_key" = "node=1") AND ("menu_name" = "account") ORDER BY "depth" ASC, "weight" ASC, "id" ASC', 'INSERT INTO "semaphore" ("name", "value", "expire") VALUES ("theme_registry:runtime:stark:Drupal\Core\Utility\ThemeRegistry", "LOCK_ID", "EXPIRE")', 'DELETE FROM "semaphore" WHERE ("name" = "theme_registry:runtime:stark:Drupal\Core\Utility\ThemeRegistry") AND ("value" = "LOCK_ID")', + 'INSERT INTO "semaphore" ("name", "value", "expire") VALUES ("active-trail:route:entity.node.canonical:route_parameters:a:1:{s:4:"node";s:1:"1";}:Drupal\Core\Cache\CacheCollector", "LOCK_ID", "EXPIRE")', + 'DELETE FROM "semaphore" WHERE ("name" = "active-trail:route:entity.node.canonical:route_parameters:a:1:{s:4:"node";s:1:"1";}:Drupal\Core\Cache\CacheCollector") AND ("value" = "LOCK_ID")', ]; $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); - $this->assertSame(8, $performance_data->getQueryCount()); - $this->assertSame(94, $performance_data->getCacheGetCount()); + $this->assertSame(10, $performance_data->getQueryCount()); + $this->assertSame(93, $performance_data->getCacheGetCount()); $this->assertSame(16, $performance_data->getCacheSetCount()); $this->assertSame(0, $performance_data->getCacheDeleteCount()); - $this->assertCountBetween(23, 24, $performance_data->getCacheTagChecksumCount()); + $this->assertCountBetween(24, 25, $performance_data->getCacheTagChecksumCount()); $this->assertCountBetween(39, 40, $performance_data->getCacheTagIsValidCount()); $this->assertSame(0, $performance_data->getCacheTagInvalidationCount()); @@ -183,14 +187,16 @@ protected function testAnonymous(): void { 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.user.canonical") AND ("route_param_key" = "user=2") AND ("menu_name" = "account") ORDER BY "depth" ASC, "weight" ASC, "id" ASC', 'SELECT "ud".* FROM "users_data" "ud" WHERE ("module" = "contact") AND ("uid" = "2") AND ("name" = "enabled")', 'SELECT "name", "data" FROM "config" WHERE "collection" = "" AND "name" IN ( "contact.settings" )', + 'INSERT INTO "semaphore" ("name", "value", "expire") VALUES ("active-trail:route:entity.user.canonical:route_parameters:a:1:{s:4:"user";s:1:"2";}:Drupal\Core\Cache\CacheCollector", "LOCK_ID", "EXPIRE")', + 'DELETE FROM "semaphore" WHERE ("name" = "active-trail:route:entity.user.canonical:route_parameters:a:1:{s:4:"user";s:1:"2";}:Drupal\Core\Cache\CacheCollector") AND ("value" = "LOCK_ID")', ]; $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); - $this->assertSame(12, $performance_data->getQueryCount()); + $this->assertSame(14, $performance_data->getQueryCount()); $this->assertSame(78, $performance_data->getCacheGetCount()); - $this->assertSame(16, $performance_data->getCacheSetCount()); + $this->assertSame(17, $performance_data->getCacheSetCount()); $this->assertSame(0, $performance_data->getCacheDeleteCount()); - $this->assertSame(22, $performance_data->getCacheTagChecksumCount()); + $this->assertSame(23, $performance_data->getCacheTagChecksumCount()); $this->assertSame(32, $performance_data->getCacheTagIsValidCount()); $this->assertSame(0, $performance_data->getCacheTagInvalidationCount()); } @@ -238,7 +244,7 @@ protected function testLogin(): void { $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); $this->assertSame(17, $performance_data->getQueryCount()); - $this->assertSame(86, $performance_data->getCacheGetCount()); + $this->assertSame(84, $performance_data->getCacheGetCount()); $this->assertSame(1, $performance_data->getCacheSetCount()); $this->assertSame(1, $performance_data->getCacheDeleteCount()); $this->assertSame(1, $performance_data->getCacheTagChecksumCount()); @@ -292,7 +298,7 @@ protected function testLoginBlock(): void { $recorded_queries = $performance_data->getQueries(); $this->assertSame($expected_queries, $recorded_queries); $this->assertSame(18, $performance_data->getQueryCount()); - $this->assertSame(107, $performance_data->getCacheGetCount()); + $this->assertSame(105, $performance_data->getCacheGetCount()); $this->assertSame(1, $performance_data->getCacheSetCount()); $this->assertSame(1, $performance_data->getCacheDeleteCount()); $this->assertSame(1, $performance_data->getCacheTagChecksumCount()); @@ -303,7 +309,7 @@ protected function testLoginBlock(): void { /** * Submit the user login form. */ - protected function submitLoginForm($account) { + protected function submitLoginForm($account): void { $this->submitForm([ 'name' => $account->getAccountName(), 'pass' => $account->passRaw, diff --git a/core/profiles/testing_site_config/testing_site_config.install b/core/profiles/testing_site_config/testing_site_config.install index 0f718d0b8f491b0607fa7d472e038efa6a5f2606..548ff02b40ddf24bd63d1a654afdd159f81931f6 100644 --- a/core/profiles/testing_site_config/testing_site_config.install +++ b/core/profiles/testing_site_config/testing_site_config.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function testing_site_config_install() { +function testing_site_config_install(): void { // Set the site email address to something that is not sendmail_from. \Drupal::configFactory()->getEditable('system.site') ->set('mail', 'profile-testing-site-config@example.com') diff --git a/core/recipes/article_comment/recipe.yml b/core/recipes/article_comment/recipe.yml index f4ac4e4be49a2a7d59638ea8a041ef97c2c00497..757072fa3b73f208c295f9208d9bbccf691cc3cf 100644 --- a/core/recipes/article_comment/recipe.yml +++ b/core/recipes/article_comment/recipe.yml @@ -5,6 +5,9 @@ recipes: - article_content_type - comment_base config: + # If the `comment` field already exists, it is guaranteed to be the right + # field type because the comment_base recipe treats the field storage strictly. + strict: false actions: core.entity_form_display.node.article.default: setComponent: diff --git a/core/recipes/article_content_type/recipe.yml b/core/recipes/article_content_type/recipe.yml index dfd4371c0c850f7b9dcf79543afd1b1c2fe1234a..fc7d77a88ea121946e70e063f3822f7c6853d208 100644 --- a/core/recipes/article_content_type/recipe.yml +++ b/core/recipes/article_content_type/recipe.yml @@ -6,6 +6,10 @@ install: - node - path config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.node.body + - field.storage.node.field_image import: node: # Only import config which is also imported by the Standard profile. diff --git a/core/recipes/article_tags/recipe.yml b/core/recipes/article_tags/recipe.yml index 59566afecb798e0496b8505f367b46503cbb77dc..68f2c01b843c7e3d5d0a768dac323c0a5f1b4c1f 100644 --- a/core/recipes/article_tags/recipe.yml +++ b/core/recipes/article_tags/recipe.yml @@ -7,6 +7,9 @@ recipes: install: - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.node.field_tags import: taxonomy: - views.view.taxonomy_term diff --git a/core/recipes/audio_media_type/recipe.yml b/core/recipes/audio_media_type/recipe.yml index bd86d21d819439266473758fd13744ac97c28f51..196a2c4501c2e5d2641a14f4720f76f9d6270cb8 100644 --- a/core/recipes/audio_media_type/recipe.yml +++ b/core/recipes/audio_media_type/recipe.yml @@ -7,6 +7,9 @@ install: - path - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.media.field_media_audio_file import: file: - views.view.files diff --git a/core/recipes/basic_block_type/recipe.yml b/core/recipes/basic_block_type/recipe.yml index d1d7fa8755e2d04789cccce89c8fd8c954c77610..6fc0500a2380fc8e33fdb7c9df5194d968b4c777 100644 --- a/core/recipes/basic_block_type/recipe.yml +++ b/core/recipes/basic_block_type/recipe.yml @@ -5,6 +5,9 @@ install: - block_content - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.block_content.body import: block_content: - field.storage.block_content.body diff --git a/core/recipes/basic_html_format_editor/recipe.yml b/core/recipes/basic_html_format_editor/recipe.yml index d1e5e6ec8ca6120c5e4f4e3020dd4d3bb57d7360..71ac24b1e0b9c27a18bba207665000e4206a3dd2 100644 --- a/core/recipes/basic_html_format_editor/recipe.yml +++ b/core/recipes/basic_html_format_editor/recipe.yml @@ -4,6 +4,8 @@ type: 'Text format editor' install: - ckeditor5 config: + # If the basic_html format and editor already exist, leave them as-is. + strict: false actions: user.role.authenticated: grantPermission: 'use text format basic_html' diff --git a/core/recipes/comment_base/recipe.yml b/core/recipes/comment_base/recipe.yml index 0cf967155a4193f763c7dd7fa55dad87bebded8b..0f09d5aadd346a92f80b8d9110865fae9993bb17 100644 --- a/core/recipes/comment_base/recipe.yml +++ b/core/recipes/comment_base/recipe.yml @@ -6,6 +6,10 @@ install: - node - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.comment.comment_body + - field.storage.node.comment import: comment: - core.entity_view_mode.comment.full diff --git a/core/recipes/content_editor_role/recipe.yml b/core/recipes/content_editor_role/recipe.yml index 8fabcf38f5f78dc74547eb808d94858054d17afe..abc2f132ae97073aa1c56bf5493330763ad166eb 100644 --- a/core/recipes/content_editor_role/recipe.yml +++ b/core/recipes/content_editor_role/recipe.yml @@ -1,6 +1,9 @@ name: 'Content editor role' description: 'Provides the Content editor role.' type: 'User role' +install: + # Node provides the `view own unpublished content` permission. + - node config: # If the content_editor role already exists, we don't really care what it looks like. strict: false diff --git a/core/recipes/content_search/recipe.yml b/core/recipes/content_search/recipe.yml index b9f60c59a7f19c1c04c9d2b979c23a058789cf7f..800c5777bef464028c9f11a4a39db79ddc3edd26 100644 --- a/core/recipes/content_search/recipe.yml +++ b/core/recipes/content_search/recipe.yml @@ -12,8 +12,6 @@ config: - search.page.node_search actions: user.role.anonymous: - grantPermissions: - - 'search content' + grantPermission: 'search content' user.role.authenticated: - grantPermissions: - - 'search content' + grantPermission: 'search content' diff --git a/core/recipes/core_recommended_admin_theme/recipe.yml b/core/recipes/core_recommended_admin_theme/recipe.yml index 046f5a27fc65e4f5bfaf6a144a05b4c48c08f331..61cd28e17c9c231e520cc9a47b98e8e01f2ccfed 100644 --- a/core/recipes/core_recommended_admin_theme/recipe.yml +++ b/core/recipes/core_recommended_admin_theme/recipe.yml @@ -5,6 +5,8 @@ install: - claro - block config: + # Leave existing blocks and menus as-is. + strict: false import: system: - system.menu.account diff --git a/core/recipes/core_recommended_front_end_theme/recipe.yml b/core/recipes/core_recommended_front_end_theme/recipe.yml index a7b2e26f40d68c62688059c3adf2962bf9f5f9c6..00faf6409ec5493024559da9cddc8a37ac07f988 100644 --- a/core/recipes/core_recommended_front_end_theme/recipe.yml +++ b/core/recipes/core_recommended_front_end_theme/recipe.yml @@ -5,6 +5,8 @@ install: - olivero - block config: + # Leave existing blocks and menus as-is. + strict: false import: system: - system.menu.account diff --git a/core/recipes/core_recommended_maintenance/recipe.yml b/core/recipes/core_recommended_maintenance/recipe.yml index ef6ad24ee645e9bb40c26e146924310968600cad..2833c9f69c591ace4853c793696fe6476edd8b0f 100644 --- a/core/recipes/core_recommended_maintenance/recipe.yml +++ b/core/recipes/core_recommended_maintenance/recipe.yml @@ -7,6 +7,8 @@ install: - dblog - views config: + # Leave existing config as-is. + strict: false import: automated_cron: - automated_cron.settings diff --git a/core/recipes/document_media_type/recipe.yml b/core/recipes/document_media_type/recipe.yml index 868610953e0957def8d27fb376b7f1ea5d2a4f38..44dd72715ba7ca5d9b2e321d03a43c36786e9998 100644 --- a/core/recipes/document_media_type/recipe.yml +++ b/core/recipes/document_media_type/recipe.yml @@ -6,6 +6,9 @@ install: - path - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.media.field_media_document import: file: - views.view.files diff --git a/core/recipes/editorial_workflow/recipe.yml b/core/recipes/editorial_workflow/recipe.yml index baa7f86de7f2470da5889bcc4df73fce8e194d8e..9ad3752643774270171e63c4bd46365ff34990a7 100644 --- a/core/recipes/editorial_workflow/recipe.yml +++ b/core/recipes/editorial_workflow/recipe.yml @@ -7,6 +7,9 @@ install: - node - views config: + # If the config we're shipping already exists, we don't really care what + # it looks like. + strict: false import: content_moderation: - views.view.moderated_content diff --git a/core/recipes/feedback_contact_form/recipe.yml b/core/recipes/feedback_contact_form/recipe.yml index 5940cf4a6b936427c9a18463351d94d192d33e8b..084f2712537cd211ee8ce40094f43a44bc092329 100644 --- a/core/recipes/feedback_contact_form/recipe.yml +++ b/core/recipes/feedback_contact_form/recipe.yml @@ -17,6 +17,8 @@ input: source: config config: ['system.site', 'mail'] config: + # Don't conflict with existing configuration. + strict: false import: contact: - contact.form.personal diff --git a/core/recipes/full_html_format_editor/recipe.yml b/core/recipes/full_html_format_editor/recipe.yml index 171c75ac7b8188bca9eae26f2311c4e0f1d76549..a8e669e196601b04f91643c4d279feca7e6b3ffe 100644 --- a/core/recipes/full_html_format_editor/recipe.yml +++ b/core/recipes/full_html_format_editor/recipe.yml @@ -3,3 +3,6 @@ description: 'Provides "Full HTML" text format along with WYSIWYG editor and rel type: 'Text format editor' install: - ckeditor5 +config: + # If the full_html format and editor already exist, leave them as-is. + strict: false diff --git a/core/recipes/image_media_type/recipe.yml b/core/recipes/image_media_type/recipe.yml index 9fe2163049457488c3cb853e13b0a384cb07b38d..d516854f836ee921f7904f76da8882c4f66ceb0b 100644 --- a/core/recipes/image_media_type/recipe.yml +++ b/core/recipes/image_media_type/recipe.yml @@ -6,6 +6,9 @@ install: - path - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.media.field_media_image import: file: - views.view.files diff --git a/core/recipes/local_video_media_type/recipe.yml b/core/recipes/local_video_media_type/recipe.yml index 8bb1c6f6f630d7fe729dd8d885cf53f7eac01b8c..270be6e563169066f76fa7250bc2d4ae2b93cab8 100644 --- a/core/recipes/local_video_media_type/recipe.yml +++ b/core/recipes/local_video_media_type/recipe.yml @@ -6,6 +6,9 @@ install: - path - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.media.field_media_video_file import: file: - views.view.files diff --git a/core/recipes/page_content_type/recipe.yml b/core/recipes/page_content_type/recipe.yml index e9193c024f2765e1d006aa74e166c5a58d2e2ec7..805e6cce316bf6b4d604b794a53e2faf499ef696 100644 --- a/core/recipes/page_content_type/recipe.yml +++ b/core/recipes/page_content_type/recipe.yml @@ -5,6 +5,9 @@ install: - node - path config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.node.body import: node: - core.entity_view_mode.node.full diff --git a/core/recipes/remote_video_media_type/recipe.yml b/core/recipes/remote_video_media_type/recipe.yml index fd6d9cd02b12df9f500dfe42d916a21de007c668..3ab591c7f95287d64676edfe553be210507ec6b3 100644 --- a/core/recipes/remote_video_media_type/recipe.yml +++ b/core/recipes/remote_video_media_type/recipe.yml @@ -6,6 +6,9 @@ install: - path - views config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.media.field_media_oembed_video import: media_library: - core.entity_view_mode.media.media_library diff --git a/core/recipes/restricted_html_format/recipe.yml b/core/recipes/restricted_html_format/recipe.yml index 8aec764918f93e9d44a5735a61778b5e1d8b6b5c..46dca71dbe842e98130175bba64f821899d46a9d 100644 --- a/core/recipes/restricted_html_format/recipe.yml +++ b/core/recipes/restricted_html_format/recipe.yml @@ -4,6 +4,8 @@ type: 'Text format' install: - filter config: + # If the restricted_html format already exists, leave it as-is. + strict: false import: filter: '*' actions: diff --git a/core/recipes/standard/recipe.yml b/core/recipes/standard/recipe.yml index 7df5437c0e1c7bab42d9a685fecd8ea2dd59ba0d..4a88f8a9b695fb87dc5d721f41680584adff97e5 100644 --- a/core/recipes/standard/recipe.yml +++ b/core/recipes/standard/recipe.yml @@ -36,6 +36,10 @@ install: - views_ui - shortcut config: + # This recipe is intended to set up a full site from scratch, fulfilling certain + # expectations. It's not really designed to be a building block. Therefore, treat + # all of the config strictly. + strict: true import: claro: - block.block.claro_help diff --git a/core/recipes/standard_responsive_images/recipe.yml b/core/recipes/standard_responsive_images/recipe.yml index 8175e8de0aca17ec14c53c7ab46b5ff222030c2c..d238fb84cd3fd59fcc09113995e1599ca35ee1d0 100644 --- a/core/recipes/standard_responsive_images/recipe.yml +++ b/core/recipes/standard_responsive_images/recipe.yml @@ -4,5 +4,7 @@ type: 'Responsive image' install: - responsive_image config: + # There's no need to conflict with existing responsive image styles. + strict: false import: image: '*' diff --git a/core/recipes/tags_taxonomy/recipe.yml b/core/recipes/tags_taxonomy/recipe.yml index 46436718a889804abfbf60bdc3783c9d89bd4999..7a38c9d67bd567055804e0efcc2e1ea9c3a91f05 100644 --- a/core/recipes/tags_taxonomy/recipe.yml +++ b/core/recipes/tags_taxonomy/recipe.yml @@ -3,9 +3,12 @@ description: 'Provides "Tags" taxonomy vocabulary and related configuration. Use type: 'Taxonomy' install: - taxonomy + # Added until the following issue is fixed. + # Taxonomy should provide a fallback way to display terms when Views is not enabled. + # https://www.drupal.org/project/drupal/issues/3479980 + - views config: + # If the `tags` vocabulary already exists, there's no need to conflict with it. + strict: false import: - taxonomy: - - core.entity_view_mode.taxonomy_term.full - - system.action.taxonomy_term_publish_action - - system.action.taxonomy_term_unpublish_action + taxonomy: '*' diff --git a/core/recipes/user_picture/recipe.yml b/core/recipes/user_picture/recipe.yml index 773e6b7711853fa402f6d644a8b50e40e6035beb..93f348ca21106d72adfa71266181ff412662f866 100644 --- a/core/recipes/user_picture/recipe.yml +++ b/core/recipes/user_picture/recipe.yml @@ -5,6 +5,9 @@ install: - image - user config: + strict: + # Treat field storages strictly, since they influence the database layout. + - field.storage.user.user_picture import: image: - image.style.thumbnail diff --git a/core/scripts/PackageManagerFixtureCreator.php b/core/scripts/PackageManagerFixtureCreator.php new file mode 100644 index 0000000000000000000000000000000000000000..b518424de797e60bde90998db8bd89e91b57206a --- /dev/null +++ b/core/scripts/PackageManagerFixtureCreator.php @@ -0,0 +1,113 @@ +#!/usr/bin/env php +<?php + +/** + * @file + * A script that updates the package_manager test 'fake_site' fixture. + */ + +declare(strict_types=1); + +use Composer\Json\JsonFile; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Process; + +if (PHP_SAPI !== 'cli') { + return; +} +// Bootstrap. +require __DIR__ . '/../../autoload.php'; + +PackageManagerFixtureCreator::createFixture(); +/** + * Creates fixture at 'core/modules/package_manager/tests/fixtures/fake_site'. + */ +final class PackageManagerFixtureCreator { + + private const FIXTURE_PATH = __DIR__ . '/../modules/package_manager/tests/fixtures/fake_site'; + + private const CORE_ROOT_PATH = __DIR__ . '/../..'; + + /** + * Creates the fixture. + */ + public static function createFixture(): void { + // Copy drupal scaffold file mapping from core/composer.json to + // fixtures' core/composer.json. + $core_composer_json = new JsonFile(static::CORE_ROOT_PATH . '/core/composer.json'); + $core_composer_data = $core_composer_json->read(); + $fixture_core_composer_file = new JsonFile(static::FIXTURE_PATH . "/../path_repos/drupal--core/composer.json"); + $fixture_core_composer_data = $fixture_core_composer_file->read(); + $fixture_core_composer_data['extra']['drupal-scaffold']['file-mapping'] = $core_composer_data['extra']['drupal-scaffold']['file-mapping']; + $fixture_core_composer_file->write($fixture_core_composer_data); + + $fixture_packages_json = new JsonFile(static::FIXTURE_PATH . '/packages.json'); + $fixture_packages_data = $fixture_packages_json->read(); + foreach ($fixture_packages_data['packages']['drupal/core'] as &$release) { + $release['extra']['drupal-scaffold']['file-mapping'] = $core_composer_data['extra']['drupal-scaffold']['file-mapping']; + } + $fixture_packages_json->write($fixture_packages_data); + + $fs = new Filesystem(); + $fs->remove(static::FIXTURE_PATH . "/composer.lock"); + // Remove all the vendor folders but leave our 2 test files. + // @see \Drupal\Tests\package_manager\Kernel\PathExcluder\VendorHardeningExcluderTest + self::removeAllExcept(static::FIXTURE_PATH . "/vendor", ['.htaccess', 'web.config']); + + self::runComposerCommand(['install']); + static::removeAllExcept(static::FIXTURE_PATH . '/vendor/composer', ['installed.json', 'installed.php']); + $fs->remove(static::FIXTURE_PATH . '/vendor/autoload.php'); + print "\nFixture updated.\nRunning phpcbf"; + + $process = new Process(['composer', 'phpcbf', static::FIXTURE_PATH], static::CORE_ROOT_PATH); + $process->run(); + print "\nFixture created 🎉."; + } + + /** + * Runs a Composer command at the fixture root. + * + * @param array $command + * The command to run as passed to + * \Symfony\Component\Process\Process::__construct. + * + * @return string + * The Composer command output. + */ + private static function runComposerCommand(array $command): string { + array_unshift($command, 'composer'); + $command[] = "--working-dir=" . static::FIXTURE_PATH; + $process = new Process($command, env: [ + 'COMPOSER_MIRROR_PATH_REPOS' => '1', + ]); + $process->run(); + if (!$process->isSuccessful()) { + throw new ProcessFailedException($process); + } + return $process->getOutput(); + } + + /** + * Removes all files in a directory except the ones specified. + * + * @param string $directory + * The directory path. + * @param string[] $files_to_keep + * The files to not delete. + */ + private static function removeAllExcept(string $directory, array $files_to_keep): void { + if (!is_dir($directory)) { + throw new \LogicException("Expected directory $directory"); + } + $paths_to_remove = glob("$directory/*"); + $fs = new Filesystem(); + foreach ($paths_to_remove as $path_to_remove) { + $base_name = basename($path_to_remove); + if (!in_array($base_name, $files_to_keep, TRUE)) { + $fs->remove($path_to_remove); + } + } + } + +} diff --git a/core/scripts/password-hash.sh b/core/scripts/password-hash.sh index 70d701d0fb02bec331d317f98ef8a017d2083647..fd799f0a6ec0c2161b6c49c8f031b58497fc5365 100755 --- a/core/scripts/password-hash.sh +++ b/core/scripts/password-hash.sh @@ -5,7 +5,7 @@ * @file * Drupal hash script - to generate a hash from a plaintext password * - * @param password1 [password2 [password3 ...]] + * @param string[] ...$password * Plain-text passwords in quotes (or with spaces backslash escaped). * * @todo Port to a console command. https://www.drupal.org/node/2289409 diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 053a09793c6d78ec3aff98d8c7e8a722b003cf51..71c4b1045e98d6d71e0389a032ec6f57bacd4b84 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -34,6 +34,7 @@ use PHPUnit\Runner\Version; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Process\Process; // cspell:ignore exitcode wwwrun @@ -754,9 +755,12 @@ function simpletest_script_execute_batch(TestRunResultsStorageInterface $test_ru $test_class = array_shift($test_classes); // Fork a child process. $command = simpletest_script_command($test_run, $test_class); - $process = proc_open($command, [], $pipes, NULL, NULL, ['bypass_shell' => TRUE]); - - if (!is_resource($process)) { + try { + $process = new Process($command); + $process->start(); + } + catch (\Exception $e) { + echo get_class($e) . ": " . $e->getMessage() . "\n"; echo "Unable to fork test process. Aborting.\n"; exit(SIMPLETEST_SCRIPT_EXIT_SUCCESS); } @@ -766,7 +770,6 @@ function simpletest_script_execute_batch(TestRunResultsStorageInterface $test_ru 'process' => $process, 'test_run' => $test_run, 'class' => $test_class, - 'pipes' => $pipes, ]; } @@ -775,15 +778,18 @@ function simpletest_script_execute_batch(TestRunResultsStorageInterface $test_ru // Check if some children finished. foreach ($children as $cid => $child) { - $status = proc_get_status($child['process']); - if (empty($status['running'])) { - // The child exited, unregister it. - proc_close($child['process']); - if ($status['exitcode'] === SIMPLETEST_SCRIPT_EXIT_FAILURE) { - $total_status = max($status['exitcode'], $total_status); + if ($child['process']->isTerminated()) { + // The child exited. + echo $child['process']->getOutput(); + $errorOutput = $child['process']->getErrorOutput(); + if ($errorOutput) { + echo 'ERROR: ' . $errorOutput; + } + if ($child['process']->getExitCode() === SIMPLETEST_SCRIPT_EXIT_FAILURE) { + $total_status = max($child['process']->getExitCode(), $total_status); } - elseif ($status['exitcode']) { - $message = 'FATAL ' . $child['class'] . ': test runner returned a non-zero error code (' . $status['exitcode'] . ').'; + elseif ($child['process']->getExitCode()) { + $message = 'FATAL ' . $child['class'] . ': test runner returned a non-zero error code (' . $child['process']->getExitCode() . ').'; echo $message . "\n"; // @todo Return SIMPLETEST_SCRIPT_EXIT_EXCEPTION instead, when // DrupalCI supports this. @@ -823,9 +829,11 @@ function simpletest_script_execute_batch(TestRunResultsStorageInterface $test_ru * Run a PHPUnit-based test. */ function simpletest_script_run_phpunit(TestRun $test_run, $class) { + global $args; + $runner = PhpUnitTestRunner::create(\Drupal::getContainer()); $start = microtime(TRUE); - $results = $runner->execute($test_run, $class, $status); + $results = $runner->execute($test_run, $class, $status, $args['color']); $time = microtime(TRUE) - $start; $runner->processPhpUnitResults($test_run, $results); @@ -866,29 +874,38 @@ function simpletest_script_run_one_test(TestRun $test_run, $test_class) { * @param string $test_class * The name of the test class to run. * - * @return string - * The assembled command string. + * @return list<string> + * The list of command-line elements. */ -function simpletest_script_command(TestRun $test_run, $test_class) { +function simpletest_script_command(TestRun $test_run, string $test_class): array { global $args, $php; - $command = escapeshellarg($php) . ' ' . escapeshellarg('./core/scripts/' . $args['script']); - $command .= ' --url ' . escapeshellarg($args['url']); + $command = []; + $command[] = $php; + $command[] = './core/scripts/' . $args['script']; + $command[] = '--url'; + $command[] = $args['url']; if (!empty($args['sqlite'])) { - $command .= ' --sqlite ' . escapeshellarg($args['sqlite']); + $command[] = '--sqlite'; + $command[] = $args['sqlite']; } if (!empty($args['dburl'])) { - $command .= ' --dburl ' . escapeshellarg($args['dburl']); + $command[] = '--dburl'; + $command[] = $args['dburl']; } - $command .= ' --php ' . escapeshellarg($php); - $command .= " --test-id {$test_run->id()}"; + $command[] = '--php'; + $command[] = $php; + $command[] = '--test-id'; + $command[] = $test_run->id(); foreach (['verbose', 'keep-results', 'color', 'die-on-fail', 'suppress-deprecations'] as $arg) { if ($args[$arg]) { - $command .= ' --' . $arg; + $command[] = '--' . $arg; } } // --execute-test and class name needs to come last. - $command .= ' --execute-test ' . escapeshellarg($test_class); + $command[] = '--execute-test'; + $command[] = $test_class; + return $command; } @@ -1130,7 +1147,7 @@ function get_test_class_method_count(string $class): int { * @return array * An associative array of bins and the test class names in each bin. */ - function place_tests_into_bins(array $tests, int $bin_count) { +function place_tests_into_bins(array $tests, int $bin_count) { // Create a bin corresponding to each parallel test job. $bins = array_fill(0, $bin_count, []); // Go through each test and add them to one bin at a time. @@ -1354,7 +1371,7 @@ function simpletest_script_format_result($result) { if ($args['non-html']) { $message = Html::decodeEntities($message); } - $lines = explode("\n", wordwrap($message), 76); + $lines = explode("\n", $message); foreach ($lines as $line) { echo " $line\n"; } diff --git a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php index 86e6f934f2456f34bfcfb7721d4d499c18ce4700..68a1d9a83bfaf77593ec54ff90e4d6fdf1de46f3 100644 --- a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php +++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -32,7 +32,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase { * * @see https://getcomposer.org/doc/04-schema.md#minimum-stability */ - protected const MINIMUM_STABILITY = 'stable'; + protected const MINIMUM_STABILITY = 'RC'; /** * The order of stability strings from least stable to most stable. @@ -314,7 +314,7 @@ public function testTemplateCreateProject($project, $package_dir, $docroot_dir): * @param string $version * The version under test. */ - protected function makeTestPackage($repository_path, $version) { + protected function makeTestPackage($repository_path, $version): void { $json = <<<JSON { "packages": { @@ -353,7 +353,7 @@ protected function makeTestPackage($repository_path, $version) { * @param string $repository_path * The path where to create the test package. */ - protected function makeVendorPackage($repository_path) { + protected function makeVendorPackage($repository_path): void { $root = $this->getDrupalRoot(); $process = $this->executeCommand("composer --working-dir=$root info --format=json"); $this->assertCommandSuccessful(); diff --git a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php index 388680bf0ad48e62bd7f4b8357788fbdb3ce48ba..b1fea7d324aa460cb6fe2c9dbd40ee30565198e8 100644 --- a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php +++ b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php @@ -466,7 +466,7 @@ protected function stopServer() { * @throws \RuntimeException * Thrown when there are no available ports within the range. */ - protected function findAvailablePort() { + protected function findAvailablePort(): int { $store = new FlockStore(DrupalFilesystem::getOsTemporaryDirectory()); $lock_factory = new LockFactory($store); @@ -498,7 +498,7 @@ protected function findAvailablePort() { /** * Checks whether a port is available. * - * @param $port + * @param int $port * A number between 1024 and 65536. * * @return bool @@ -524,7 +524,7 @@ protected function checkPortIsAvailable($port): bool { * * @return int */ - protected function getPortNumber() { + protected function getPortNumber(): int { if (empty($this->hostPort)) { $this->hostPort = $this->findAvailablePort(); } diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php index aa1218d6e41e21e8ed3d21c7b6760ac440f148a2..69b49916163e1c9ee74bb12fa099ae76ab9c839e 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php @@ -179,7 +179,7 @@ public function testJsStatusMessageAssertions(): void { * @param string $type * The expected type. */ - protected function waitForMessageVisible($message, $selector = '[data-drupal-messages]', $type = 'status') { + protected function waitForMessageVisible($message, $selector = '[data-drupal-messages]', $type = 'status'): void { $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', $selector . ' .messages--' . $type . ':contains("' . $message . '")')); } @@ -193,7 +193,7 @@ protected function waitForMessageVisible($message, $selector = '[data-drupal-mes * @param string $type * The expected type. */ - protected function waitForMessageRemoved($message, $selector = '[data-drupal-messages]', $type = 'status') { + protected function waitForMessageRemoved($message, $selector = '[data-drupal-messages]', $type = 'status'): void { $this->assertNotEmpty($this->assertSession()->waitForElementRemoved('css', $selector . ' .messages--' . $type . ':contains("' . $message . '")')); } diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php index 179886e8b900201e9862783fefe688ae0595e80d..8818cfa8933b2f49c3ccd6bebe214a0d0c94f9b5 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php @@ -78,7 +78,7 @@ public function testJavascriptStates(): void { /** * Tests states of elements triggered by a checkbox element. */ - protected function doCheckboxTriggerTests() { + protected function doCheckboxTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -187,6 +187,8 @@ protected function doCheckboxTriggerTests() { $this->assertFalse($radios_some_disabled_value2->hasAttribute('disabled')); // Check if the link is visible. $this->assertTrue($link->isVisible()); + // Check enter password is visible. + $this->assertSession()->pageTextContains('Enter password'); // Change state: check the checkbox. $trigger->check(); @@ -228,6 +230,8 @@ protected function doCheckboxTriggerTests() { $this->assertFalse($radios_some_disabled_value2->hasAttribute('disabled')); // The link shouldn't be visible. $this->assertFalse($link->isVisible()); + // Check enter password is not visible. + $this->assertSession()->pageTextNotContains('Enter password'); // Change state: uncheck the checkbox. $trigger->uncheck(); @@ -263,12 +267,14 @@ protected function doCheckboxTriggerTests() { $this->assertFalse($radios_some_disabled_value2->hasAttribute('disabled')); // Check if the link is turned back to visible state. $this->assertTrue($link->isVisible()); + // Check enter password is visible. + $this->assertSession()->pageTextContains('Enter password'); } /** * Tests states of elements triggered by a checkboxes element. */ - protected function doCheckboxesTriggerTests() { + protected function doCheckboxesTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -308,7 +314,7 @@ protected function doCheckboxesTriggerTests() { /** * Tests states of elements triggered by a textfield element. */ - protected function doTextfieldTriggerTests() { + protected function doTextfieldTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -353,7 +359,7 @@ protected function doTextfieldTriggerTests() { /** * Tests states of elements triggered by a radios element. */ - protected function doRadiosTriggerTests() { + protected function doRadiosTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -416,7 +422,7 @@ protected function doRadiosTriggerTests() { /** * Tests states of elements triggered by a select element. */ - protected function doSelectTriggerTests() { + protected function doSelectTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -457,7 +463,7 @@ protected function doSelectTriggerTests() { /** * Tests states of elements triggered by a multiple select element. */ - protected function doMultipleSelectTriggerTests() { + protected function doMultipleSelectTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); // Find trigger and target elements. @@ -514,7 +520,7 @@ protected function doMultipleSelectTriggerTests() { /** * Tests states of elements triggered by multiple elements. */ - protected function doMultipleTriggerTests() { + protected function doMultipleTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); @@ -538,7 +544,7 @@ protected function doMultipleTriggerTests() { /** * Tests states of radios element triggered by other radios element. */ - protected function doNestedTriggerTests() { + protected function doNestedTriggerTests(): void { $this->drupalGet('form-test/javascript-states-form'); $page = $this->getSession()->getPage(); diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php index ecf77d322b8b530a5488ba233dd9b2ec83f1caca..e59bcc7acd2e34dd8075a3c8c0fe8e18306cbe67 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php @@ -207,7 +207,7 @@ public function testEntityReferenceAutocompleteWidgetAttachedEntity(): void { * @param string $field_name * The field name. */ - protected function doAutocomplete($field_name) { + protected function doAutocomplete($field_name): void { $autocomplete_field = $this->getSession()->getPage()->findField($field_name . '[0][target_id]'); $autocomplete_field->setValue('Test'); $this->getSession()->getDriver()->keyDown($autocomplete_field->getXpath(), ' '); diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php index d3f77f05f8de8c5e0ca700b0f83a035316f09921..7e6001aa16f75ec59922c1c0efe5f8cff8a4ad04 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php @@ -528,7 +528,7 @@ public function assertEscaped($raw) { * quotes respectively therefore we can not escape them when testing for * escaped HTML. * - * @param $raw + * @param string $raw * The raw string to escape. * * @return string diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php index 7bdf7cd6415332e8f3caa2d71c2aa3a2845e6d9d..e45026d8960ae773599f05c38575effc7a4a2661 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php @@ -12,6 +12,9 @@ */ class JavascriptDeprecationTest extends WebDriverTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['js_deprecation_test']; /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php index 4fe9624a66da88a9f19c78ba58d16c4efdfdaba6..3fb355523406176b9fb53230c122020815e492c6 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php @@ -63,7 +63,7 @@ public function testJavascriptErrorsAsync(): void { * * @postCondition */ - public function clearErrorLog() { + public function clearErrorLog(): void { $this->getSession()->executeScript("sessionStorage.removeItem('js_testing_log_test.errors')"); } diff --git a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php index 0a3dd44e6abcb6adb4043623382d96c6bcedf65a..6d514865042344c4b8cae263d4bf7547a6458457 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php @@ -589,7 +589,7 @@ protected function findWeightsToggle($expected_text) { * @param int $repeat * (optional) How many times to press the arrow button. Defaults to 1. */ - protected function moveRowWithKeyboard(NodeElement $row, $arrow, $repeat = 1) { + protected function moveRowWithKeyboard(NodeElement $row, $arrow, $repeat = 1): void { $keys = [ 'left' => 37, 'right' => 39, @@ -627,7 +627,7 @@ protected function moveRowWithKeyboard(NodeElement $row, $arrow, $repeat = 1) { * @throws \Exception * Thrown when the class is not added successfully to the handle. */ - protected function markRowHandleForDragging(NodeElement $handle) { + protected function markRowHandleForDragging(NodeElement $handle): void { $class = self::DRAGGING_CSS_CLASS; $script = <<<JS document.evaluate("{$handle->getXpath()}", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null) @@ -653,7 +653,7 @@ protected function markRowHandleForDragging(NodeElement $handle) { * @throws \Exception * Thrown when the dragging operations are not completed on time. */ - protected function waitUntilDraggingCompleted(NodeElement $handle) { + protected function waitUntilDraggingCompleted(NodeElement $handle): void { $class_removed = $this->getSession()->getPage()->waitFor(1, function () use ($handle) { return !$handle->hasClass($this::DRAGGING_CSS_CLASS); }); diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php index ac65e81abe04ee434310d4d74b1c6f37e8ebc2a8..cf48655458bc68b6347e3aa941a348b68ffbee2f 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php @@ -62,7 +62,7 @@ public function testUserAgentValidation(): void { /** * {@inheritdoc} */ - protected function prepareRequest() { + protected function prepareRequest(): void { $session = $this->getSession(); if ($this->agent) { $session->setCookie('SIMPLETEST_USER_AGENT', $this->agent); diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php index c306529a02ed34d4e6962a76a6387438bdd19f61..cf4eab8d67ec0eb1adba8c717310b34a657a5f36 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php @@ -15,6 +15,9 @@ */ class PhpUnitBridgeTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['deprecation_test']; /** diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d6bdff7c090d2bb3ce9825cfdd1eedad861de2b7 --- /dev/null +++ b/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php @@ -0,0 +1,71 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\FunctionalTests\Entity; + +use Drupal\Component\Uuid\Uuid; +use Drupal\Tests\BrowserTestBase; +use Drupal\Tests\content_translation\Traits\ContentTranslationTestTrait; + +/** + * Tests that an entity with a UUID as ID can be managed. + * + * @group Entity + */ +class EntityUuidIdTest extends BrowserTestBase { + + use ContentTranslationTestTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = ['block', 'content_translation', 'entity_test']; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + $this->createLanguageFromLangcode('af'); + $this->enableContentTranslation('entity_test_uuid_id', 'entity_test_uuid_id'); + $this->drupalPlaceBlock('page_title_block'); + $this->drupalPlaceBlock('local_tasks_block'); + } + + /** + * Tests the user interface for the test entity. + */ + public function testUi(): void { + $this->drupalLogin($this->createUser([ + 'administer entity_test content', + 'create content translations', + 'translate entity_test_uuid_id', + 'view test entity', + ])); + + // Test adding an entity. + $this->drupalGet('/entity_test_uuid_id/add'); + $this->submitForm([ + 'Name' => 'Test entity with UUID ID', + ], 'Save'); + $this->assertSession()->elementTextEquals('css', 'h1', 'Edit Test entity with UUID ID'); + $this->assertSession()->addressMatches('#^/entity_test_uuid_id/manage/' . Uuid::VALID_PATTERN . '/edit$#'); + + // Test translating an entity. + $this->clickLink('Translate'); + $this->clickLink('Add'); + $this->submitForm([ + 'Name' => 'Afrikaans translation of test entity with UUID ID', + ], 'Save'); + $this->assertSession()->elementTextEquals('css', 'h1', 'Afrikaans translation of test entity with UUID ID [Afrikaans translation]'); + $this->assertSession()->addressMatches('#^/af/entity_test_uuid_id/manage/' . Uuid::VALID_PATTERN . '/edit$#'); + } + +} diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php index 07f7380a2340b61ace34acb3b9a61a79ba33245a..bae54ab1afcd90ad5c1a5b90d884953966530ac7 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php @@ -75,7 +75,6 @@ public function testCrossSiteRequest(): void { $this->rebuildContainer(); // Fire a request from an origin that isn't allowed. - /** @var \Symfony\Component\HttpFoundation\Response $response */ $this->drupalGet('/test-page', [], ['Origin' => 'http://non-valid.com']); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->responseHeaderDoesNotExist('Access-Control-Allow-Origin'); @@ -121,7 +120,6 @@ public function testCrossSiteRequest(): void { $this->rebuildContainer(); // Fire a request from an origin that isn't allowed. - /** @var \Symfony\Component\HttpFoundation\Response $response */ $this->drupalGet('/test-page', [], ['Origin' => 'http://non-valid.com']); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->responseHeaderEquals('Access-Control-Allow-Origin', 'http://example.com'); @@ -140,7 +138,6 @@ public function testCrossSiteRequest(): void { $this->rebuildContainer(); // Fire a request from an origin that isn't allowed. - /** @var \Symfony\Component\HttpFoundation\Response $response */ $this->drupalGet('/test-page', [], ['Origin' => 'http://non-valid.com']); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->responseHeaderEquals('Access-Control-Allow-Origin', NULL); @@ -164,6 +161,7 @@ public function testCrossSiteRequest(): void { /** @var \GuzzleHttp\ClientInterface $httpClient */ $httpClient = $this->getSession()->getDriver()->getClient()->getClient(); $url = Url::fromUri('base:/test-page'); + /** @var \Symfony\Component\HttpFoundation\Response $response */ $response = $httpClient->request('POST', $url->setAbsolute()->toString(), [ 'headers' => [ 'Origin' => $origin, diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php index ae9645dd0bd0b3337e2d6f7461af1335db266b5a..79b9209e848b0c8c882561f338f13c6cb662ba06 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php @@ -31,7 +31,7 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->info = [ 'type' => 'profile', @@ -80,7 +80,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Make settings file not writable. $filename = $this->siteDirectory . '/settings.php'; // Make the settings file read-only. @@ -100,14 +100,14 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is a distribution profile. } /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This step should not appear, since settings.php is fully configured // already. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php index fbbe1b2728ecfc78eb1ae48d7ba047a3ff482708..76868fb17f8ad7f556f2a3b62489516c233da751 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php @@ -25,7 +25,7 @@ class DistributionProfileTest extends InstallerTestBase { */ protected $defaultTheme = 'stark'; - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->info = [ 'type' => 'profile', @@ -49,7 +49,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Verify that the distribution name appears. $this->assertSession()->pageTextContains($this->info['distribution']['name']); // Verify that the distribution name is used in the site title. @@ -65,7 +65,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is a distribution profile. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php index 0e58711f4e38fb3e147fb71dea6c3d20238855b0..8de136ee79b088ba942846ea999019553674f6f8 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php @@ -35,7 +35,7 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->info = [ 'type' => 'profile', @@ -62,7 +62,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function visitInstaller() { + protected function visitInstaller(): void { // Pass a different language code than the one set in the distribution // profile. This distribution language should still be used. // The unrouted URL assembler does not exist at this point, so we build the @@ -73,7 +73,7 @@ protected function visitInstaller() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // This step is skipped, because the distribution profile uses a fixed // language. } @@ -81,14 +81,14 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is a distribution profile. } /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // The language should have been automatically detected, all following // screens should be translated already. $this->assertSession()->buttonExists('Save and continue de'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php index 3bb2b27995df83c2de76ff2556f50a12684f01ed..b955773ba06633599723f79922f5bb2b7fd3341c 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php @@ -35,7 +35,7 @@ class DistributionProfileTranslationTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // We set core_version_requirement to '*' for the test so that it does not // need to be updated between major versions. @@ -64,7 +64,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // This step is skipped, because the distribution profile uses a fixed // language. } @@ -72,14 +72,14 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is a distribution profile. } /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // The language should have been automatically detected, all following // screens should be translated already. $this->assertSession()->buttonExists('Save and continue de'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php index fd868ee97b5c8f1ce79614ac276b2f640f9c40c4..22165f456c4f2d8ebc9b0390562f1a68a38d4588 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php @@ -27,7 +27,7 @@ class DrupalFlushAllCachesInInstallerTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $info = [ 'type' => 'profile', diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php index aa80899b82698e4db7feadda087dd43219cf951a..696a5f7a9d07b32fafcded463075c9202482ecda 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php @@ -21,7 +21,7 @@ class InstallerBrokenDatabaseCredentialsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure database credentials in settings.php. $connection_info = Database::getConnectionInfo(); @@ -42,14 +42,14 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This form will never be reached. } /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This form will never be reached. } @@ -60,7 +60,7 @@ public function testRequirementsProblem(): void { $this->assertSession()->titleEquals('Requirements problem | Drupal'); $this->assertSession()->pageTextContains('Database settings'); $this->assertSession()->pageTextContains('Resolve all issues below to continue the installation. For help configuring your database server,'); - $this->assertSession()->pageTextContains('[Tip: Drupal was attempting to connect to the database server via a socket, but the socket file could not be found. A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost. To connect via TPC/IP use an IP address (127.0.0.1 for IPv4) instead of "localhost". This message normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name when trying to connect to the server.]'); + $this->assertSession()->pageTextContains('[Tip: Drupal was attempting to connect to the database server via a socket, but the socket file could not be found. A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost. To connect via TCP/IP use an IP address (127.0.0.1 for IPv4) instead of "localhost". This message normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name when trying to connect to the server.]'); } } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php index 6c706832f060581e5108871c8f84fed2e7a3401f..b766e8e6c8e28d5bc8f4dfd9f0931e0012e98407 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php @@ -21,7 +21,7 @@ class InstallerBrokenDatabasePortSettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure database credentials in settings.php. $connection_info = Database::getConnectionInfo(); @@ -42,14 +42,14 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This form will never be reached. } /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This form will never be reached. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php index b38dc25af6f7f08071ac2e36326ed5b9ec14a6d8..11803c1b83cfaf0e1a7208d51b623730998b70e1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php @@ -28,7 +28,7 @@ class InstallerConfigDirectorySetNoDirectoryErrorTest extends InstallerTestBase /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->configDirectory = $this->publicFilesDirectory . '/config_' . Crypt::randomBytesBase64(); $this->settings['settings']['config_sync_directory'] = (object) [ @@ -44,7 +44,7 @@ protected function prepareEnvironment() { /** * Installer step: Configure settings. */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This step should not appear as we had a failure prior to the settings // screen. } @@ -52,7 +52,7 @@ protected function setUpSettings() { /** * {@inheritdoc} */ - protected function setUpRequirementsProblem() { + protected function setUpRequirementsProblem(): void { // The parent method asserts that there are no requirements errors, but // this test expects a requirements error in the test method below. // Therefore, we override this method to suppress the parent's assertions. @@ -61,7 +61,7 @@ protected function setUpRequirementsProblem() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This step should not appear as we had a failure prior to the settings // screen. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php index b8149ee6529356e1a4a1c0b1146417eca6c43f77..fc01c2eb9a904b05b7e0ba1c7929c99697ef34ab 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php @@ -28,7 +28,7 @@ class InstallerConfigDirectorySetNoDirectoryTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->syncDirectory = $this->publicFilesDirectory . '/config_' . Crypt::randomBytesBase64() . '/sync'; $this->settings['settings']['config_sync_directory'] = (object) [ diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php index ab7258b4beb84743c21634522237c087d45f3253..f97483dd610d80adff5ebfb0957c3adb24b546c1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php @@ -21,7 +21,7 @@ class InstallerDatabaseErrorMessagesTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // We are creating a table here to force an error in the installer because // it will try and create the drupal_install_test table as this is part of // the standard database tests performed by the installer in @@ -43,7 +43,7 @@ protected function setUpSettings() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This step should not appear as we had a failure on the settings screen. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php index 1b2ee2cb2490916f56b05cc33935edcacb863057..2ccd47a0274d7e4a82c51299e1ec66c049f80236 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php @@ -19,7 +19,7 @@ class InstallerEmptySettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Create an empty settings.php file. $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory; diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php index 2c59319229335cb5cdaec89f48bb7631d87ab9a4..879039b291c73e1664f843994b363e15265e9394 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php @@ -21,7 +21,7 @@ class InstallerExistingBrokenDatabaseSettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure database credentials in settings.php. $connection_info = Database::getConnectionInfo(); @@ -50,14 +50,14 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This form will never be reached. } /** * {@inheritdoc} */ - protected function setUpRequirementsProblem() { + protected function setUpRequirementsProblem(): void { // The parent method asserts that there are no requirements errors, but // this test expects a requirements error in the test method below. // Therefore, we override this method to suppress the parent's assertions. @@ -66,7 +66,7 @@ protected function setUpRequirementsProblem() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This form will never be reached. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php index e391e0f66924ed57c30c61b0692caa163fc1e289..89f7b491547899bcecc33ad23a9c2b951b73252d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php @@ -26,7 +26,7 @@ class InstallerExistingConfigDirectoryTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); mkdir($this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/config_read_only', 0444); $this->expectedFilePerms = fileperms($this->siteDirectory . '/config_read_only'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php index 089fdd9368066317b8be96c69f434e667afd2e7d..a5553bd1fb444d9457e8e325ecc64a49ec92f2fd 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php @@ -19,7 +19,7 @@ class InstallerExistingConfigExistingSettingsTest extends InstallerExistingConfi * Partially configures a preexisting settings.php file before invoking the * interactive installer. */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure hash salt. // Any string is valid, so simply use the class name of this test. diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php index 2d5ac5c1c37d9694a674e83f75e8c66104466b36..22be7c48e392823ed1de6dca43891594f2c73b68 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php @@ -21,7 +21,7 @@ class InstallerExistingConfigNoConfigTest extends InstallerConfigDirectoryTestBa /** * Final installer step: Configure site. */ - protected function setUpSite() { + protected function setUpSite(): void { // There are errors therefore there is nothing to do here. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php index 4af5caa3d17fe541b29b533950ff6ae68883acb6..4022db2fcefa19ad3cec17caa4f20ebe110aa6cc 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php @@ -14,7 +14,7 @@ class InstallerExistingConfigNoSystemSiteTest extends InstallerConfigDirectoryTe /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // File API functions are not available yet. unlink($this->siteDirectory . '/profiles/' . $this->profile . '/config/sync/system.site.yml'); @@ -23,7 +23,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - public function setUpSite() { + public function setUpSite(): void { // There are errors. Therefore, there is nothing to do here. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php index d1a9bba36c35516245e3b69317131497fa25b913..4d1bf067425079c391de1f6b7d62d429da923be0 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php @@ -50,7 +50,7 @@ protected function getConfigLocation(): string { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Place custom local translations in the translations directory and fix up // configuration. diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php index e63254cd338ab616805fac29d32ec33571faccac..7f9a0ecf60d4644b36d0d6762a453be0c823d93d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php @@ -36,13 +36,13 @@ protected function getConfigLocation(): string { /** * Installer step: Configure settings. */ - protected function setUpSettings() { + protected function setUpSettings(): void { // Cause a profile mismatch by hacking the URL. $this->drupalGet(str_replace($this->profile, 'minimal', $this->getUrl())); parent::setUpSettings(); } - protected function setUpSite() { + protected function setUpSite(): void { // This step will not occur because there is an error. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php index ac3860b4f8f6e196ed18e1a3f0bc259b19975114..487fa70ac1d3b1ab5f8a37817d46e311e175017a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php @@ -16,7 +16,7 @@ class InstallerExistingConfigTest extends InstallerConfigDirectoryTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.fr.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Enregistrer et continuer\""); @@ -26,7 +26,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - public function setUpSettings() { + public function setUpSettings(): void { // The configuration is from a site installed in French. // So after selecting the profile the installer detects that the site must // be installed in French, thus we change the button translation. diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php index 7d896c1e1d2930398ce9f81f3750997260bd7cc1..8717249fb67eec85b8c1a9e42a62e6a803709a6d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php @@ -21,7 +21,7 @@ class InstallerExistingDatabaseSettingsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure database credentials in settings.php. $connection_info = Database::getConnectionInfo(); @@ -41,7 +41,7 @@ protected function prepareEnvironment() { * contains a valid database connection already (but e.g. no config * directories yet). */ - protected function setUpSettings() { + protected function setUpSettings(): void { // All database settings should be pre-configured, except password. $values = $this->parameters['forms']['install_settings_form']; $driver = $values['driver']; diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php index 03dc683e43c1a80331e365677c572d7236a22f69..3c07589573481cec511fcb701dea818733271c1e 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php @@ -26,7 +26,7 @@ class InstallerExistingSettingsNoProfileTest extends InstallerTestBase { * Configures a preexisting settings.php file without an install_profile * setting before invoking the interactive installer. */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure hash salt. @@ -57,7 +57,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This step should not appear, since settings.php is fully configured // already. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php index 8a44b6b70e6849a60842395f39cce9e12c2e24eb..3958b82396aa7798c7219b49afeadc2eb54e5541 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php @@ -26,7 +26,7 @@ class InstallerExistingSettingsTest extends InstallerTestBase { * Fully configures a preexisting settings.php file before invoking the * interactive installer. */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Pre-configure hash salt. // Any string is valid, so simply use the class name of this test. @@ -59,7 +59,7 @@ protected function prepareEnvironment() { /** * Visits the interactive installer. */ - protected function visitInstaller() { + protected function visitInstaller(): void { // Should redirect to the installer. $this->drupalGet($GLOBALS['base_url']); // Ensure no database tables have been created yet. @@ -70,7 +70,7 @@ protected function visitInstaller() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This step should not appear, since settings.php is fully configured // already. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php index 224e0d0a3535a8d8bfcfb22fbf79f47f5d6b9b3a..4e401add43a41571d058973051cae64382e91407 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php @@ -28,7 +28,7 @@ class InstallerLanguageDirectionTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.ar.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Save and continue Arabic\""); diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php index a1e1c1597dd55ec95eb63c179b7f77d097684aea..18c8c74fa94f0ddc3f1b595501d7e5157f181484 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php @@ -23,7 +23,7 @@ class InstallerLanguagePageTest extends InstallerTestBase { /** * Installer step: Select language. */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); touch($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php index 0eada97303bdcaa5af4126a621e3a5eca8744712..a86621f83a24a8ccffc3f1cbeca190717af47ebc 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php @@ -32,7 +32,7 @@ class InstallerNonDefaultDatabaseDriverTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { $driver = Database::getConnection()->driver(); if (!in_array($driver, ['mysql', 'pgsql'])) { $this->markTestSkipped("This test does not support the {$driver} database driver."); diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php index b5152b56e69446f9b484b892b682d0db76ab7f60..904130c3bdf8416f6ea890c5e79cebede6293209 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php @@ -33,7 +33,7 @@ class InstallerNonEnglishProfileWithoutLocaleModuleTest extends InstallerTestBas /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Create a self::PROFILE testing profile that depends on the 'language' diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php index 37622c5e282336f1ff9c527dbb1f5694cd365481..697bf2773ac0cadbe4278f3223460bfc44fdf57f 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php @@ -28,7 +28,7 @@ class InstallerPerformanceTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function prepareSettings() { + protected function prepareSettings(): void { parent::prepareSettings(); PerformanceTestRecorder::registerService($this->siteDirectory . '/services.yml', FALSE); } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php index f69a5ff0bb2d66e74e9c3abcbc69ee1c734be173..f2d498d8d4e9dd6c894c0597cc6b4594ba917ff4 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php @@ -24,14 +24,14 @@ class InstallerProfileRequirementsTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // This form will never be reached. } /** * {@inheritdoc} */ - protected function setUpRequirementsProblem() { + protected function setUpRequirementsProblem(): void { // The parent method asserts that there are no requirements errors, but // this test expects a requirements error in the test method below. // Therefore, we override this method to suppress the parent's assertions. @@ -40,7 +40,7 @@ protected function setUpRequirementsProblem() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // This form will never be reached. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php index 127ef7f919ef88a96e7a67e63c572b591f7f9b4e..e0c70d436fc48d6489f3869a459744e86601e5e6 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php @@ -28,7 +28,7 @@ class InstallerRouterTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $info = [ 'type' => 'profile', diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php index fe585c118f4dc34ef17962d54896c17575ef02fc..ef2d40633700724737fefc11f8f9a786de7e5807 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php @@ -19,7 +19,7 @@ class InstallerSkipPermissionHardeningTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $this->settings['settings']['skip_permissions_hardening'] = (object) ['value' => TRUE, 'required' => TRUE]; } @@ -27,7 +27,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { $site_directory = $this->container->getParameter('app.root') . '/' . $this->siteDirectory; $this->assertDirectoryIsWritable($site_directory); $this->assertFileIsWritable($site_directory . '/settings.php'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php index 2793e16c9ef4be36c484813478932cf457ef641c..d9aa51ae0e93f2aeb1423ad118d4ab7afa9d6fbf 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php @@ -54,7 +54,7 @@ public function testInstaller(): void { /** * Installer step: Select language. */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and // metatags as expected to the first page of the installer. $this->assertSession()->responseContains("css/components/button.css"); @@ -69,7 +69,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { $settings_services_file = DRUPAL_ROOT . '/sites/default/default.services.yml'; // Copy the testing-specific service overrides in place. copy($settings_services_file, $this->siteDirectory . '/services.yml'); @@ -86,7 +86,7 @@ protected function setUpProfile() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // Assert that the expected title is present. $this->assertEquals('Database configuration', $this->cssSelect('main h2')[0]->getText()); @@ -101,7 +101,7 @@ protected function setUpSettings() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // Assert that the expected title is present. $this->assertEquals('Configure site', $this->cssSelect('main h2')[0]->getText()); @@ -117,7 +117,7 @@ protected function setUpSite() { /** * {@inheritdoc} */ - protected function visitInstaller() { + protected function visitInstaller(): void { parent::visitInstaller(); // Assert the title is correct and has the title suffix. diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php index 77d4153f7d04982cfdf8084f5bde6180a9753218..23633165b5cddc909eb4be301da4d7d499d314d5 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php @@ -31,7 +31,7 @@ class InstallerTranslationExistingFileTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); $po_contents = <<<PO @@ -48,7 +48,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // Do nothing, because this test only tests the language installation // step's results. } @@ -56,7 +56,7 @@ protected function setUpProfile() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // Do nothing, because this test only tests the language installation // step's results. } @@ -64,7 +64,7 @@ protected function setUpSettings() { /** * {@inheritdoc} */ - protected function setUpRequirementsProblem() { + protected function setUpRequirementsProblem(): void { // Do nothing, because this test only tests the language installation // step's results. } @@ -72,7 +72,7 @@ protected function setUpRequirementsProblem() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // Do nothing, because this test only tests the language installation // step's results. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php index 79b6506979ad27538cb6fcdde8a895ae4f8500f8..052ae5e01f0f80089a9e04797ffe16b039ea559d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php @@ -26,7 +26,7 @@ class InstallerTranslationMultipleLanguageForeignTest extends InstallerTranslati /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { parent::setUpLanguage(); $this->translations['Save and continue'] = 'Save and continue de'; } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php index 9463ef7090ca9f12d422b02ca49e4e0c62efd741..8a47151e7d4958777a4f581320db37bdf774a114 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php @@ -30,7 +30,7 @@ class InstallerTranslationMultipleLanguageNonInteractiveTest extends BrowserTest /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); @@ -130,7 +130,7 @@ public function testTranslationsLoaded(): void { /** * Helper function to verify that the expected strings are translated. */ - protected function verifyImportedStringsTranslated() { + protected function verifyImportedStringsTranslated(): void { $test_samples = ['Save and continue', 'Anonymous', 'Language']; $langcodes = ['de', 'es']; diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php index 0f9f0676cef9fdc73a2a9bebcdaacd5e75ea8019..b7cf373a3325c7e4a058b2e1515e880f6c4061d5 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php @@ -26,7 +26,7 @@ class InstallerTranslationMultipleLanguageTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); @@ -167,7 +167,7 @@ public function testTranslationsLoaded(): void { /** * Helper function to verify that the expected strings are translated. */ - protected function verifyImportedStringsTranslated() { + protected function verifyImportedStringsTranslated(): void { $test_samples = ['Save and continue', 'Anonymous', 'Language']; $langcodes = ['de', 'es']; diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php index 748e7dccdb99cbbebf574f107161515eaa981c23..f8be98693f58a2558b131475c8a628b62a489987 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php @@ -16,7 +16,7 @@ class InstallerTranslationNonStandardFilenamesTest extends InstallerTranslationM /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { BrowserTestBase::prepareEnvironment(); // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); @@ -27,7 +27,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function prepareSettings() { + protected function prepareSettings(): void { parent::prepareSettings(); $settings['config']['locale.settings']['translation']['default_filename'] = (object) [ 'value' => '%project.%language.po', diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php index 03b42c2ffd316da816f95a229585f1942c80ab45..5cacdc594b9a54f46dc3b9f4a2622e06f24458b9 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php @@ -28,7 +28,7 @@ class InstallerTranslationQueryTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function visitInstaller() { + protected function visitInstaller(): void { // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); @@ -49,7 +49,7 @@ protected function visitInstaller() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // The language was preset by passing a query parameter in the URL, so no // explicit language selection is necessary. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php index 7cc32bd6e08156f7b6210c7a2b1ecd6ca6cfc0d2..c0313aab7e6e0ae8cd2fb2338449f0f2026839a8 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php @@ -29,7 +29,7 @@ class InstallerTranslationTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); @@ -48,7 +48,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpSettings() { + protected function setUpSettings(): void { // We are creating a table here to force an error in the installer because // it will try and create the drupal_install_test table as this is part of // the standard database tests performed by the installer in diff --git a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php index bcab6db5caf8413abc0375576fa3cd43fabb2654..60dc1ffdae07460e7a7ef1b3c4bfb15af6725310 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php @@ -28,7 +28,7 @@ class MultipleDistributionsProfileTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); // Create two distributions. foreach (['distribution_one', 'distribution_two'] as $name) { @@ -55,7 +55,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpLanguage() { + protected function setUpLanguage(): void { // Verify that the distribution name appears. $this->assertSession()->pageTextContains('distribution_one'); // Verify that the requested theme is used. @@ -69,7 +69,7 @@ protected function setUpLanguage() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is a distribution profile. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php index 7f2d7c35fa86148c8eec10392d3bdde22d556a55..35761c78069691c7ee3a294cfd796de562eb89af 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php @@ -30,7 +30,7 @@ class SingleVisibleProfileTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $profiles = ['standard', 'demo_umami']; foreach ($profiles as $profile) { @@ -50,7 +50,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpProfile() { + protected function setUpProfile(): void { // This step is skipped, because there is only one visible profile. } diff --git a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php index ac997d6ab1e5425bb67d65d744775dba36bb54b4..20714d76e9c54e3eaa2fe2662ee678f57e49d388 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php @@ -28,7 +28,7 @@ public function testInstaller(): void { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { // Test that the correct theme is being used. $this->assertSession()->responseNotContains('olivero'); $this->assertSession()->responseContains('css/theme/install-page.css'); diff --git a/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php index dd99caf01fd8ba45394ada723215744acb5bffa7..527a4326d262304ad4f77bcee400408d9aa47b61 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php @@ -34,7 +34,7 @@ class SuperUserAccessInstallTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected function prepareEnvironment() { + protected function prepareEnvironment(): void { parent::prepareEnvironment(); $info = [ 'type' => 'profile', @@ -56,7 +56,7 @@ protected function prepareEnvironment() { /** * {@inheritdoc} */ - protected function setUpSite() { + protected function setUpSite(): void { if ($this->providedData()['super_user_policy'] === FALSE && empty($this->providedData()['expected_roles'])) { $this->assertSession()->pageTextContains('Site account'); $this->assertSession()->pageTextNotContains('Site maintenance account'); diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php index 5957f9f951aafb983f38e8a13a80ef01644e19c4..b8c5dbde1eea4ab774ed7ce83b496ad27ba2e075 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php @@ -22,7 +22,7 @@ class UpdatePathTestBaseTest extends UpdatePathTestBase { /** * {@inheritdoc} */ - protected function setDatabaseDumpFiles() { + protected function setDatabaseDumpFiles(): void { $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; diff --git a/core/tests/Drupal/KernelTests/AssertContentTrait.php b/core/tests/Drupal/KernelTests/AssertContentTrait.php index 84884e674b2441f35e86e613c4e3e10aeb16f498..4a485812acf1a43d9164a3afb36c9c0fd1d349c0 100644 --- a/core/tests/Drupal/KernelTests/AssertContentTrait.php +++ b/core/tests/Drupal/KernelTests/AssertContentTrait.php @@ -351,8 +351,14 @@ protected function assertLinkByHref($href, $index = 0, $message = ''): bool { * * @return bool * TRUE if the assertion succeeded. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoLinkByHref($href, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $href]); $message = ($message ? $message : new FormattableMarkup('No link containing href %href found.', ['%href' => $href])); $this->assertEmpty($links, $message); @@ -373,8 +379,14 @@ protected function assertNoLinkByHref($href, $message = ''): bool { * * @return bool * TRUE if the assertion succeeded. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoLinkByHrefInMainRegion($href, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $links = $this->xpath('//main//a[contains(@href, :href)]', [':href' => $href]); $message = ($message ? $message : new FormattableMarkup('No link containing href %href found.', ['%href' => $href])); $this->assertEmpty($links, $message); @@ -459,6 +471,7 @@ protected function assertEscaped($raw, $message = ''): void { * a string. If left blank, a default message will be displayed. */ protected function assertNoEscaped($raw, $message = ''): void { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); if (!$message) { $message = 'Escaped "' . Html::escape((string) $raw) . '" not found'; } @@ -556,8 +569,14 @@ protected function assertTextHelper($text, $message = '', $group = NULL, $not_ex * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ - protected function assertUniqueText($text, $message = ''): bool { + protected function assertUniqueText($text, $message = '') { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); return $this->assertUniqueTextHelper($text, $message, NULL, TRUE); } @@ -579,8 +598,14 @@ protected function assertUniqueText($text, $message = ''): bool { * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoUniqueText($text, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); return $this->assertUniqueTextHelper($text, $message, NULL, FALSE); } @@ -605,8 +630,14 @@ protected function assertNoUniqueText($text, $message = ''): bool { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertUniqueTextHelper($text, $message = '', $group = NULL, $be_unique = FALSE): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); // Cast MarkupInterface objects to string. $text = (string) $text; if (!$message) { @@ -678,8 +709,14 @@ protected function assertNoPattern($pattern, $message = ''): bool { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertTextPattern($pattern, $message = NULL): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); if (!isset($message)) { $message = new FormattableMarkup('Pattern "@pattern" found', ['@pattern' => $pattern]); } @@ -730,6 +767,7 @@ protected function assertTitle($title, $message = '') { * a string. If left blank, a default message will be displayed. */ protected function assertNoTitle($title, $message = '') { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $actual = (string) current($this->xpath('//title')); if (!$message) { $message = new FormattableMarkup('Page title @actual is not equal to @unexpected.', [ @@ -893,8 +931,14 @@ protected function getSelectedItem(\SimpleXMLElement $element) { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoFieldByXPath($xpath, $value = NULL, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $fields = $this->xpath($xpath); // If value specified then check array for match. @@ -969,8 +1013,14 @@ protected function assertFieldByName($name, $value = NULL, $message = NULL): boo * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoFieldByName($name, $value = '', $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); return $this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value, $message ? $message : new FormattableMarkup('Did not find field by name @name', ['@name' => $name])); } @@ -993,8 +1043,14 @@ protected function assertNoFieldByName($name, $value = '', $message = ''): bool * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertFieldById($id, $value = '', $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); // Cast MarkupInterface objects to string. if (isset($value)) { $value = (string) $value; @@ -1022,8 +1078,14 @@ protected function assertFieldById($id, $value = '', $message = ''): bool { * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoFieldById($id, $value = '', $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); return $this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : new FormattableMarkup('Did not find field by id @id', ['@id' => $id])); } @@ -1041,8 +1103,14 @@ protected function assertNoFieldById($id, $value = '', $message = ''): bool { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertFieldChecked($id, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Checkbox field @id is checked.', ['@id' => $id]); $elements = $this->xpath('//input[@id=:id]', [':id' => $id]); $this->assertNotEmpty($elements, $message); @@ -1064,8 +1132,14 @@ protected function assertFieldChecked($id, $message = ''): bool { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoFieldChecked($id, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Checkbox field @id is not checked.', ['@id' => $id]); $elements = $this->xpath('//input[@id=:id]', [':id' => $id]); $this->assertNotEmpty($elements, $message); @@ -1088,6 +1162,7 @@ protected function assertNoFieldChecked($id, $message = ''): bool { * a string. If left blank, a default message will be displayed. */ protected function assertOption($id, $option, $message = '') { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $options = $this->xpath('//select[@id=:id]//option[@value=:option]', [':id' => $id, ':option' => $option]); $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @id exists.', ['@option' => $option, '@id' => $id])); } @@ -1101,8 +1176,14 @@ protected function assertOption($id, $option, $message = '') { * The text for the option tag to assert. * @param string $message * (optional) A message to display with the assertion. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertOptionByText($id, $text, $message = '') { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $options = $this->xpath('//select[@id=:id]//option[normalize-space(text())=:text]', [':id' => $id, ':text' => $text]); $this->assertTrue(isset($options[0]), $message ?: 'Option with text label ' . $text . ' for select field ' . $id . ' exits.'); } @@ -1122,6 +1203,7 @@ protected function assertOptionByText($id, $text, $message = '') { * a string. If left blank, a default message will be displayed. */ protected function assertOptionWithDrupalSelector($drupal_selector, $option, $message = '') { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $options = $this->xpath('//select[@data-drupal-selector=:data_drupal_selector]//option[@value=:option]', [':data_drupal_selector' => $drupal_selector, ':option' => $option]); $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @data_drupal_selector exists.', ['@option' => $option, '@data_drupal_selector' => $drupal_selector])); } @@ -1142,8 +1224,14 @@ protected function assertOptionWithDrupalSelector($drupal_selector, $option, $me * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoOption($id, $option, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Option @option for field @id does not exist.', ['@option' => $option, '@id' => $id]); $selects = $this->xpath('//select[@id=:id]', [':id' => $id]); $options = $this->xpath('//select[@id=:id]//option[@value=:option]', [':id' => $id, ':option' => $option]); @@ -1170,8 +1258,14 @@ protected function assertNoOption($id, $option, $message = ''): bool { * TRUE on pass. * * @todo $id is unusable. Replace with $name. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertOptionSelected($id, $option, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Option @option for field @id is selected.', ['@option' => $option, '@id' => $id]); $elements = $this->xpath('//select[@id=:id]//option[@value=:option]', [':id' => $id, ':option' => $option]); $this->assertNotEmpty($elements, $message); @@ -1197,8 +1291,14 @@ protected function assertOptionSelected($id, $option, $message = ''): bool { * TRUE on pass, FALSE on fail. * * @todo $id is unusable. Replace with $name. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertOptionSelectedWithDrupalSelector($drupal_selector, $option, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Option @option for field @data_drupal_selector is selected.', ['@option' => $option, '@data_drupal_selector' => $drupal_selector]); $elements = $this->xpath('//select[@data-drupal-selector=:data_drupal_selector]//option[@value=:option]', [':data_drupal_selector' => $drupal_selector, ':option' => $option]); $this->assertNotEmpty($elements, $message); @@ -1222,8 +1322,14 @@ protected function assertOptionSelectedWithDrupalSelector($drupal_selector, $opt * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoOptionSelected($id, $option, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $message = $message ? $message : new FormattableMarkup('Option @option for field @id is not selected.', ['@option' => $option, '@id' => $id]); $elements = $this->xpath('//select[@id=:id]//option[@value=:option]', [':id' => $id, ':option' => $option]); $this->assertNotEmpty($elements, $message); @@ -1264,8 +1370,14 @@ protected function assertField($field, $message = ''): bool { * * @return bool * TRUE on pass, FALSE on fail. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoField($field, $message = ''): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); return $this->assertNoFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field), NULL, $message); } @@ -1290,8 +1402,14 @@ protected function assertNoField($field, $message = ''): bool { * * @return bool * TRUE on pass. + * + * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no + * replacement. + * + * @see https://www.drupal.org/node/3476110 */ protected function assertNoDuplicateIds($message = '', $group = NULL, $ids_to_skip = []): bool { + @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3476110', E_USER_DEPRECATED); $status = TRUE; foreach ($this->xpath('//*[@id]') as $element) { $id = (string) $element['id']; diff --git a/core/tests/Drupal/KernelTests/Components/ComponentInvalidReplacementTest.php b/core/tests/Drupal/KernelTests/Components/ComponentInvalidReplacementTest.php index 4e2f7989b2a89acb64b4d2897ca445ef0c974c41..542c88cc60b70b7dc7dc60c1a66bbf128f2cf9a7 100644 --- a/core/tests/Drupal/KernelTests/Components/ComponentInvalidReplacementTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentInvalidReplacementTest.php @@ -5,7 +5,6 @@ namespace Drupal\KernelTests\Components; use Drupal\Core\Render\Component\Exception\IncompatibleComponentSchema; -use Drupal\Tests\Core\Theme\Component\ComponentKernelTestBase; /** * Tests invalid render options for components. diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentKernelTestBase.php b/core/tests/Drupal/KernelTests/Components/ComponentKernelTestBase.php similarity index 98% rename from core/tests/Drupal/Tests/Core/Theme/Component/ComponentKernelTestBase.php rename to core/tests/Drupal/KernelTests/Components/ComponentKernelTestBase.php index 0c71ae846b9d365547fee9cf62c847574b657f4b..090ba3610604c78ffb52f8ace900a22c69a6c30d 100644 --- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentKernelTestBase.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentKernelTestBase.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\Tests\Core\Theme\Component; +namespace Drupal\KernelTests\Components; use Drupal\Core\Render\BubbleableMetadata; use Drupal\Core\Render\RenderContext; diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentNegotiatorTest.php b/core/tests/Drupal/KernelTests/Components/ComponentNegotiatorTest.php similarity index 97% rename from core/tests/Drupal/Tests/Core/Theme/Component/ComponentNegotiatorTest.php rename to core/tests/Drupal/KernelTests/Components/ComponentNegotiatorTest.php index c2f40242ba959aa76cca6eda0330591cf0b3c3ce..eb38e858f0d2b37f1c8ace7df3ee6152d90cb1f1 100644 --- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentNegotiatorTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentNegotiatorTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\Tests\Core\Theme\Component; +namespace Drupal\KernelTests\Components; /** * Tests the component negotiator. diff --git a/core/tests/Drupal/KernelTests/Components/ComponentNodeVisitorTest.php b/core/tests/Drupal/KernelTests/Components/ComponentNodeVisitorTest.php index 9a325bd854c7b6d75316eb6b933371968206847c..6b72fa745ea5a354bb58e9c0fed4910c08e71420 100644 --- a/core/tests/Drupal/KernelTests/Components/ComponentNodeVisitorTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentNodeVisitorTest.php @@ -4,8 +4,6 @@ namespace Drupal\KernelTests\Components; -use Drupal\Tests\Core\Theme\Component\ComponentKernelTestBase; - /** * Tests the node visitor. * diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php b/core/tests/Drupal/KernelTests/Components/ComponentPluginManagerTest.php similarity index 96% rename from core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php rename to core/tests/Drupal/KernelTests/Components/ComponentPluginManagerTest.php index b36717f3a24165f6db246dca20aa80cb02089de0..1f110e36b4b5df6aa3e0b2f088680413ab7dd753 100644 --- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentPluginManagerTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\Tests\Core\Theme\Component; +namespace Drupal\KernelTests\Components; use Drupal\Core\Render\Component\Exception\ComponentNotFoundException; diff --git a/core/tests/Drupal/KernelTests/Components/ComponentRenderInvalidTest.php b/core/tests/Drupal/KernelTests/Components/ComponentRenderInvalidTest.php index 704c5ae1f6519a0212ae7d6fee2bc03d68859487..34ef43ec341a9c05378573def3cf619308989ab4 100644 --- a/core/tests/Drupal/KernelTests/Components/ComponentRenderInvalidTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentRenderInvalidTest.php @@ -5,7 +5,6 @@ namespace Drupal\KernelTests\Components; use Drupal\Core\Render\Component\Exception\InvalidComponentException; -use Drupal\Tests\Core\Theme\Component\ComponentKernelTestBase; /** * Tests invalid render options for components. diff --git a/core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php b/core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php index 929901e8b120ec4ac07f3026e8a80efa0ad943e1..771c9bad6c48f6d4ab628d311917a0262ef8ac1b 100644 --- a/core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php +++ b/core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php @@ -9,7 +9,6 @@ use Drupal\Core\Template\Attribute; use Drupal\Core\Theme\ComponentPluginManager; use Drupal\Core\Render\Component\Exception\InvalidComponentDataException; -use Drupal\Tests\Core\Theme\Component\ComponentKernelTestBase; /** * Tests the correct rendering of components. diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php index 853d3e3afe0e73cf7b15faf89081d96a8ab3556e..c628f661f3978f9eca03f854525c6a3c2aa98200 100644 --- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @@ -192,7 +192,7 @@ public static function moduleListDataProvider(): array { * @param string $type * The extension type to test. */ - protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $extension, string $type = 'module') { + protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $extension, string $type = 'module'): void { /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */ $config_manager = $this->container->get('config.manager'); diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php index 9967b1f552135741a8bec24dc54467c35bc018fa..8b17c5fd7d65af6dd1f6e7597533c85c24fa944a 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php @@ -135,7 +135,7 @@ public function testLibrariesOverrideMalformedAsset(): void { public function testLibrariesOverridesMultiple(): void { /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ $theme_installer = $this->container->get('theme_installer'); - $theme_installer->install(['test_basetheme']); + $theme_installer->install(['test_base_theme']); $theme_installer->install(['test_subtheme']); $theme_installer->install(['test_subsubtheme']); @@ -145,7 +145,7 @@ public function testLibrariesOverridesMultiple(): void { $libraries_override = $active_theme->getLibrariesOverride(); $expected_order = [ - 'core/modules/system/tests/themes/test_basetheme', + 'core/modules/system/tests/themes/test_base_theme', 'core/modules/system/tests/themes/test_subtheme', 'core/modules/system/tests/themes/test_subsubtheme', ]; @@ -183,7 +183,7 @@ public function testBaseThemeLibrariesOverrideInSubTheme(): void { // Assert that libraries-override specified in the base theme still applies // in the sub theme. $this->assertNoAssetInLibrary('core/misc/dialog/dialog.js', 'core', 'drupal.dialog', 'js'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_basetheme/js/loadjs.min.js', 'core', 'loadjs', 'js'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_base_theme/js/loadjs.min.js', 'core', 'loadjs', 'js'); } /** @@ -218,10 +218,10 @@ public function testLibrariesExtend(): void { // Activate a sub theme and confirm that it inherits the library assets // extended in the base theme as well as its own. - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_base_theme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'starterkit_theme', 'base', 'css'); $this->activateTheme('test_subtheme'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_base_theme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); $this->assertAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'starterkit_theme', 'base', 'css'); // Activate test theme that extends with a non-existent library. An @@ -274,7 +274,7 @@ public function testDeprecatedLibrary(): void { * @param string $theme_name * The name of the theme to be activated. */ - protected function activateTheme($theme_name) { + protected function activateTheme($theme_name): void { $this->container->get('theme_installer')->install([$theme_name]); /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */ diff --git a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php index 186121a181f456647f65266709ca4aafe9d8f6a0..b4fdc8fc853860d3a034b42e811dca0cca848402 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php @@ -177,7 +177,7 @@ public function testCoreLibraryCompleteness(): void { * An array of library definitions, keyed by extension, then by library, and * so on. */ - protected function verifyLibraryFilesExist($library_definitions) { + protected function verifyLibraryFilesExist($library_definitions): void { foreach ($library_definitions as $extension => $libraries) { foreach ($libraries as $library_name => $library) { if (in_array("$extension/$library_name", $this->librariesToSkip)) { diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php index ab4223b0193e2d0f0564b8238ac18abb0e68a537..df1d020dea4f2f5d0db2c3c7f65cd42b7eb50750 100644 --- a/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php @@ -51,7 +51,7 @@ public function testShutdownFunctionInShutdownFunction(): void { /** * Tests shutdown functions by registering another shutdown function. */ - public function shutdownOne() { + public function shutdownOne(): void { drupal_register_shutdown_function([$this, 'shutdownTwo']); $this->shutDownOneCalled = TRUE; } @@ -59,7 +59,7 @@ public function shutdownOne() { /** * Tests shutdown functions by being registered during shutdown. */ - public function shutdownTwo() { + public function shutdownTwo(): void { $this->shutDownTwoCalled = TRUE; } diff --git a/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php index a6e24cddbd134da824478b40806940e8e382be85..f957c63480cf9b89b28fdca8d3122b3d90461572 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php @@ -20,7 +20,7 @@ class CacheCollectorTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Change container to database cache backends. $container diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php index 369e18b45369177abfe79972c53bc968536a08db..30483c7391efea0964978d73ce1068e5202f7e38 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php @@ -25,7 +25,7 @@ class DatabaseBackendTagTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Change container to database cache backends. $container diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php index b0fa1e64de7c17ab8d3350edaaf94066f0b54dbe..04aa222706b995dcd085e7cddecba8fb1b3abc09 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php @@ -112,7 +112,7 @@ public function testGarbageCollection(): void { * @return int * The number of rows in the test cache bin database table. */ - protected function getNumRows() { + protected function getNumRows(): int { $table = 'cache_' . $this->testBin; $connection = $this->container->get('database'); $query = $connection->select($table); diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php index 0414b6e6fd1e943ef2aa573a88db106683438bc9..b74d470822dce143c2672c10faa29fe5a31e305e 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php @@ -50,7 +50,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('serializer', PhpSerialize::class); @@ -154,7 +154,7 @@ public function testEntitySaveRollback(): void { * * @param string[] $statements * A list of query statements. - * @param $table_name + * @param string $table_name * The name of the table to filter by. * * @return string[] diff --git a/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php b/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php index bacbc6d1d1f8592003cfbffd5c4fe336ea94a44e..9bff112862205cb01dd4b423c858346e8cceb861 100644 --- a/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php @@ -5,6 +5,7 @@ namespace Drupal\KernelTests\Core\Common; use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\system_test\Hook\SystemTestHooks; use Drupal\KernelTests\KernelTestBase; /** @@ -46,7 +47,7 @@ public function testDrupalFlushAllCachesModuleList(): void { sort($container_modules); $this->assertSame($module_list, $container_modules); $this->assertSame(1, $this->containerBuilds); - $this->assertTrue(function_exists('system_test_help')); + $this->assertTrue(method_exists(SystemTestHooks::class, 'help')); $core_extension->clear('module.system_test')->save(); $this->containerBuilds = 0; @@ -65,7 +66,7 @@ public function testDrupalFlushAllCachesModuleList(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $this->containerBuilds++; } diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php index bec3d636414325125c7217f833c7839330280916..53b4f1052da97ecab78b4af3627ee44df0151ee0 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php @@ -56,7 +56,7 @@ class ConfigImporterMissingContentTest extends KernelTestBase implements LoggerI /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('logger.ConfigImporterMissingContentTest', __CLASS__)->addTag('logger'); $container->set('logger.ConfigImporterMissingContentTest', $this); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php index c6deb011e52fdf4ce56e8cbe965259d5b5c48e0c..41ceb1fcfaef2d367588ff43e028ef1dce840384 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -696,25 +696,25 @@ public function testRequiredModuleValidation(): void { public function testInstallBaseAndSubThemes(): void { $sync = $this->container->get('config.storage.sync'); $extensions = $sync->read('core.extension'); - $extensions['theme']['test_basetheme'] = 0; + $extensions['theme']['test_base_theme'] = 0; $extensions['theme']['test_subtheme'] = 0; $extensions['theme']['test_subsubtheme'] = 0; $sync->write('core.extension', $extensions); $config_importer = $this->configImporter(); $config_importer->import(); - $this->assertTrue($this->container->get('theme_handler')->themeExists('test_basetheme')); + $this->assertTrue($this->container->get('theme_handler')->themeExists('test_base_theme')); $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subsubtheme')); $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subtheme')); // Test uninstalling them. $extensions = $sync->read('core.extension'); - unset($extensions['theme']['test_basetheme']); + unset($extensions['theme']['test_base_theme']); unset($extensions['theme']['test_subsubtheme']); unset($extensions['theme']['test_subtheme']); $sync->write('core.extension', $extensions); $config_importer = $this->configImporter(); $config_importer->import(); - $this->assertFalse($this->container->get('theme_handler')->themeExists('test_basetheme')); + $this->assertFalse($this->container->get('theme_handler')->themeExists('test_base_theme')); $this->assertFalse($this->container->get('theme_handler')->themeExists('test_subsubtheme')); $this->assertFalse($this->container->get('theme_handler')->themeExists('test_subtheme')); } @@ -909,7 +909,7 @@ public function testCustomStep(): void { public function testUninstallThemeIncrementsCount(): void { $theme_installer = $this->container->get('theme_installer'); // Install our theme. - $theme = 'test_basetheme'; + $theme = 'test_base_theme'; $theme_installer->install([$theme]); $this->assertTrue($this->container->get('theme_handler')->themeExists($theme)); @@ -1056,7 +1056,7 @@ public function testStorageComparerTargetStorage(): void { * @param \Drupal\Core\Config\ConfigImporter $importer * The config importer. */ - public static function customStep(array &$context, ConfigImporter $importer) { + public static function customStep(array &$context, ConfigImporter $importer): void { $context['is_syncing'] = \Drupal::isConfigSyncing(); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php index 66c977c441449c5ea931cf5cdeebb7fb47eadaec..16778130d18fd4a57e28ea73192ecb4cddd86916 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php @@ -276,7 +276,7 @@ public function testIdMisMatch(): void { * @param array $modules * The module names. */ - protected function installModules(array $modules) { + protected function installModules(array $modules): void { $this->container->get('module_installer')->install($modules); $this->container = \Drupal::getContainer(); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php index f3a06135d9d9828914e3931c9a0aadc0149afe96..8a5f81a25c83f25b3be0f39054319a184ca819bc 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php @@ -60,7 +60,7 @@ protected function read($name) { /** * {@inheritdoc} */ - protected function insert($name, $data) { + protected function insert($name, $data): void { $this->fileStorage->write($name, $data); $this->cache->set($name, $data); } @@ -68,7 +68,7 @@ protected function insert($name, $data) { /** * {@inheritdoc} */ - protected function update($name, $data) { + protected function update($name, $data): void { $this->fileStorage->write($name, $data); $this->cache->set($name, $data); } @@ -76,7 +76,7 @@ protected function update($name, $data) { /** * {@inheritdoc} */ - protected function delete($name) { + protected function delete($name): void { $this->cache->delete($name); unlink($this->fileStorage->getFilePath($name)); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php index 9124c85b7de4812964dff77849e89be66b132bc7..7521d5d713bbddae4835e7ce7696179d7c6f8c1e 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php @@ -30,15 +30,15 @@ protected function read($name) { return unserialize($data); } - protected function insert($name, $data) { + protected function insert($name, $data): void { Database::getConnection()->insert('config')->fields(['name' => $name, 'data' => $data])->execute(); } - protected function update($name, $data) { + protected function update($name, $data): void { Database::getConnection()->update('config')->fields(['data' => $data])->condition('name', $name)->execute(); } - protected function delete($name) { + protected function delete($name): void { Database::getConnection()->delete('config')->condition('name', $name)->execute(); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php index 8d63645761eaf725c3c89273f3c47ec852c45685..b1e40b5fb6b1b34b1f143822279c8b2683b881e9 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php @@ -43,15 +43,15 @@ protected function read($name) { return Yaml::decode($data); } - protected function insert($name, $data) { + protected function insert($name, $data): void { file_put_contents($this->storage->getFilePath($name), $data); } - protected function update($name, $data) { + protected function update($name, $data): void { file_put_contents($this->storage->getFilePath($name), $data); } - protected function delete($name) { + protected function delete($name): void { unlink($this->storage->getFilePath($name)); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php index 094f08b845458201236a54338305fcb895750a96..e5ac4dcc88b0733a48200ce3c060cec5edeb9e65 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php @@ -42,21 +42,21 @@ protected function read($name) { /** * {@inheritdoc} */ - protected function insert($name, $data) { + protected function insert($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function update($name, $data) { + protected function update($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function delete($name) { + protected function delete($name): void { $this->storage->delete($name); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php index 3848b8eacc73219c5e41af908a528b67e27e518e..6729edc076b2bfb692389f1ff391736e1e504208 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php @@ -31,21 +31,21 @@ protected function read($name) { /** * {@inheritdoc} */ - protected function insert($name, $data) { + protected function insert($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function update($name, $data) { + protected function update($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function delete($name) { + protected function delete($name): void { $this->storage->delete($name); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php index 0688e3e3df7efcc3d6860896c4aa963b8b056182..d5918cb60f50bef1d289973ceafa396d113f3915 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php @@ -32,21 +32,21 @@ protected function read($name) { /** * {@inheritdoc} */ - protected function insert($name, $data) { + protected function insert($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function update($name, $data) { + protected function update($name, $data): void { $this->storage->write($name, $data); } /** * {@inheritdoc} */ - protected function delete($name) { + protected function delete($name): void { $this->storage->delete($name); } diff --git a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php index 9ede9f1863945b006274332247e33aac34f2ebcc..fa13c96b2785098c7329647134ec5e8388f26931 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php @@ -18,6 +18,9 @@ abstract class DatabaseTestBase extends KernelTestBase { use DatabaseTestSchemaDataTrait; use DatabaseTestSchemaInstallTrait; + /** + * {@inheritdoc} + */ protected static $modules = ['database_test']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php index af2eb923547fdfcdd4b37962c30b1d02cd5b2274..e0e57ab3f2c68bd163be7f2c152c27061edbaf6f 100644 --- a/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php @@ -42,7 +42,7 @@ public function getFormId() { /** * {@inheritdoc} */ - public function datelistDateCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public function datelistDateCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['datelistDateCallbackExecuted'] = [ '#value' => TRUE, ]; @@ -52,7 +52,7 @@ public function datelistDateCallbackTrusted(array &$element, FormStateInterface /** * {@inheritdoc} */ - public function datelistDateCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public function datelistDateCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['datelistDateCallbackExecuted'] = [ '#value' => TRUE, ]; diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php index fc89c7eaf96a52544d06d7d45add8fab19657fd6..05f101f47cb904193627f0022d3518c7acd2dda5 100644 --- a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php @@ -42,7 +42,7 @@ public function getFormId() { /** * {@inheritdoc} */ - public function datetimeDateCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public function datetimeDateCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['datetimeDateCallbackExecuted'] = [ '#value' => TRUE, ]; @@ -52,7 +52,7 @@ public function datetimeDateCallbackTrusted(array &$element, FormStateInterface /** * {@inheritdoc} */ - public static function datetimeDateCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public static function datetimeDateCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['datetimeDateCallbackExecuted'] = [ '#value' => TRUE, ]; @@ -62,7 +62,7 @@ public static function datetimeDateCallback(array &$element, FormStateInterface /** * {@inheritdoc} */ - public function datetimeTimeCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public function datetimeTimeCallbackTrusted(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['timeCallbackExecuted'] = [ '#value' => TRUE, ]; @@ -72,7 +72,7 @@ public function datetimeTimeCallbackTrusted(array &$element, FormStateInterface /** * {@inheritdoc} */ - public static function datetimeTimeCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL) { + public static function datetimeTimeCallback(array &$element, FormStateInterface $form_state, ?DrupalDateTime $date = NULL): void { $element['timeCallbackExecuted'] = [ '#value' => TRUE, ]; diff --git a/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php b/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php index 37eb7c65baed29b3e601b75eb5e8e417870c7884..7601550d1d06c0feee1f0046df5594ad22cf6472 100644 --- a/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php +++ b/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php @@ -62,6 +62,10 @@ public function testCoreServiceAliases(): void { $aliases[$id] = substr($service, 1); } elseif (isset($service['class']) && class_exists($service['class'])) { + // Ignore services named by their own class. + if ($id === $service['class']) { + continue; + } // Ignore certain tagged services. if (isset($service['tags'])) { foreach ($service['tags'] as $tag) { @@ -100,6 +104,11 @@ public function testCoreServiceAliases(): void { continue; } + // Skip IDs that are interfaces already. + if (interface_exists($id)) { + continue; + } + // Expect standalone classes to be aliased. $implements = class_implements($class); if (!$implements) { diff --git a/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php b/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php index 07828a27492fcdce44bec34a27122477b4f66317..cb2b5944644b6f0b8b8c9ad1ec25d6dcfa52915f 100644 --- a/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php +++ b/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php @@ -14,6 +14,9 @@ */ class ServicesDefaultsTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['services_defaults_test']; /** diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php index b335c7997c9e374ec1c72eb69306730e24b6fd40..f5deb5e33e914b590c981f0443a0a79d7ae8a8c7 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php @@ -37,7 +37,7 @@ protected function tearDown(): void { /** * {@inheritdoc} */ - protected function bootKernel() { + protected function bootKernel(): void { // Do not boot the kernel, because we are testing aspects of this process. } diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php index 5439351aef4a481a9f199b2850af9119e54fd182..d51a7c1c4244f19c6e218c3283bfad68f5fb17a0 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php @@ -57,4 +57,34 @@ public function testDestructionUnused(): void { $this->assertNull(\Drupal::state()->get('service_provider_test.destructed')); } + /** + * @covers \Drupal\Core\DependencyInjection\Compiler\RegisterServicesForDestructionPass::process + */ + public function testDestructableServicesOrder(): void { + // Destructable services before the module is enabled. + $core_services = $this->container->getParameter('kernel.destructable_services'); + + $this->enableModules(['service_provider_test']); + $services = $this->container->getParameter('kernel.destructable_services'); + // Remove the core registered services for clarity. + $testable_services = array_values(array_diff($services, $core_services)); + + $this->assertSame([ + // Priority 100. + 'service_provider_test_class_5', + // Priority 50. + 'service_provider_test_class_1', + // The following two services are both with priority 0 and their order is + // determined by the order they were registered. + 'service_provider_test_class', + 'service_provider_test_class_3', + // Priority -10. + 'service_provider_test_class_2', + // Priority -50. + 'service_provider_test_class_6', + // Priority -100. + 'service_provider_test_class_4', + ], $testable_services); + } + } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php index c962a2a14e6c97b1bb42b425a67d40ef830d0b37..406de9bb3413faad68bffdf67446e7bfaa0f039f 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php @@ -21,6 +21,9 @@ class BundleConstraintValidatorTest extends KernelTestBase { */ protected $typedData; + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'field', 'text', 'user']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php index 05b942d8842d5a6b6b6c69aea32c7c4fee3bec76..3c98668c9c26f5818fa5ccec35f3b81aaa4619e7 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php @@ -52,8 +52,6 @@ class EntityCrudHookTest extends EntityKernelTestBase { 'comment', ]; - protected $ids = []; - /** * {@inheritdoc} */ @@ -74,7 +72,7 @@ protected function setUp(): void { * Module entity_crud_hook_test implements all core entity CRUD hooks and * stores a message for each in $GLOBALS['entity_crud_hook_test']. * - * @param array $messages + * @param string[] $messages * An array of plain-text messages in the order they should appear. * * @internal diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php index 0514af5a46c5b9be6d2563c41c8b3d3279a35214..247a1ee82e2696ca733c093140c8decad83cb618 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php @@ -288,7 +288,7 @@ public function testUntranslatableFields($sequence, $default_translation_affecte * @return int * The latest saved revision id. */ - protected function doTestEditSequence($sequence) { + protected function doTestEditSequence($sequence): int { $revision_id = NULL; foreach ($sequence as $index => $step) { $this->stepIndex = $index; @@ -544,7 +544,7 @@ public function testInternalProperties(): void { * @param \Drupal\Core\Entity\ContentEntityInterface $entity * An entity object. */ - protected function doTestInternalProperties(ContentEntityInterface $entity) { + protected function doTestInternalProperties(ContentEntityInterface $entity): void { $this->assertFalse($entity->isValidationRequired()); $entity->setValidationRequired(TRUE); $this->assertTrue($entity->isValidationRequired()); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index 1e8f41a8f6aec207226a136b64ad993aecfd1c8f..97cfacb815e3b95c22f3b35f25f9de9b9216ab37 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -997,7 +997,6 @@ public function testInitialValue(): void { $db_schema = $this->database->schema(); // Create two entities before adding the base field. - /** @var \Drupal\entity_test\Entity\EntityTestUpdate $entity */ $storage->create()->save(); $storage->create()->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php index 7514533966c8f42d14e0a0cc4a1c6feea9452ec8..7720b711c1f1ab5745fdce130de2fa0e30329559 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php @@ -6,6 +6,7 @@ use Drupal\comment\Entity\CommentType; use Drupal\Core\Entity\Entity\EntityViewDisplay; +use Drupal\Core\Entity\EntityDisplayRepositoryInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\KernelTests\KernelTestBase; @@ -170,4 +171,22 @@ public function testOnDependencyRemoval(): void { $this->assertSame($expected_dependencies, $entity_display->getDependencies()); } + /** + * Tests that changing the entity ID updates related properties. + */ + public function testChangeId(): void { + /** @var \Drupal\Core\Entity\Display\EntityDisplayInterface $display */ + $display = $this->container->get(EntityDisplayRepositoryInterface::class) + ->getViewDisplay('entity_test', 'entity_test'); + $this->assertSame('entity_test.entity_test.default', $display->id()); + $display->set('id', 'node.page.rss'); + $this->assertSame('node', $display->getTargetEntityTypeId()); + $this->assertSame('page', $display->getTargetBundle()); + $this->assertSame('rss', $display->getMode()); + + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage("'a.b' is not a valid entity display ID."); + $display->set('id', 'a.b'); + } + } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php index 20d72e14f3087afdb9d9501e9f6ca437b3846415..8de8f5281c85c5c0cfd4911ea3a69645f3f1aaf4 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php @@ -79,7 +79,7 @@ protected function setUp(): void { * * @return \Drupal\Core\Entity\EntityInterface */ - protected function createTestEntity($entity_type) { + protected function createTestEntity($entity_type): EntityInterface { $this->entityName = $this->randomMachineName(); $this->entityUser = $this->createUser(); $this->entityFieldText = $this->randomMachineName(); @@ -147,7 +147,7 @@ public function testReadWrite(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestReadWrite($entity_type) { + protected function doTestReadWrite($entity_type): void { $entity = $this->createTestEntity($entity_type); $langcode = 'en'; @@ -413,7 +413,7 @@ public function testSave(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestSave($entity_type) { + protected function doTestSave($entity_type): void { $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode'); $entity = $this->createTestEntity($entity_type); $entity->save(); @@ -450,7 +450,7 @@ public function testIntrospection(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestIntrospection($entity_type) { + protected function doTestIntrospection($entity_type): void { // Test getting metadata upfront. The entity types used for this test have // a default bundle that is the same as the entity type. $definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($entity_type, $entity_type); @@ -554,7 +554,7 @@ public function testIterator(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestIterator($entity_type) { + protected function doTestIterator($entity_type): void { $entity = $this->createTestEntity($entity_type); foreach ($entity as $name => $field) { @@ -593,7 +593,7 @@ public function testDataStructureInterfaces(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestDataStructureInterfaces($entity_type) { + protected function doTestDataStructureInterfaces($entity_type): void { $entity = $this->createTestEntity($entity_type); // Test using the whole tree of typed data by navigating through the tree of @@ -628,7 +628,7 @@ protected function doTestDataStructureInterfaces($entity_type) { /** * Gets all contained strings recursively. */ - public function getContainedStrings(TypedDataInterface $wrapper, $depth, array &$strings) { + public function getContainedStrings(TypedDataInterface $wrapper, $depth, array &$strings): void { if ($wrapper instanceof StringInterface) { $strings[] = $wrapper->getValue(); @@ -943,7 +943,7 @@ public function testEntityReferenceComputedField(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestComputedProperties($entity_type) { + protected function doTestComputedProperties($entity_type): void { $entity = $this->createTestEntity($entity_type); $entity->field_test_text->value = "The <strong>text</strong> text to filter."; $entity->field_test_text->format = filter_default_format(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php index ccd069f914d9750a8a4fc5db09fdb98114af051b..57762e942bbdb5b1cdf4129d81d896d44b5ec342 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php @@ -113,6 +113,7 @@ public function testTargetBundleMustExist(): void { */ public function testImmutableProperties(array $valid_values = []): void { parent::testImmutableProperties([ + 'id' => 'entity_test_with_bundle.two.default', 'targetEntityType' => 'entity_test_with_bundle', 'bundle' => 'two', ]); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php index ca6e8cea5fa33604391ba42be87ec91cd02ea3c3..3922e80da303fc1ff6b5e070b48620d2c967de8e 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php @@ -41,6 +41,9 @@ abstract class EntityLanguageTestBase extends EntityKernelTestBase { */ protected $untranslatableFieldName; + /** + * {@inheritdoc} + */ protected static $modules = ['language', 'entity_test']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php index 99118165d807cb016a85cb775f15a927a87431d7..5de40bc65063c1b45b1b457eb08f1d0ebee8209f 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php @@ -255,7 +255,7 @@ public function testGetCanonical(): void { * @param string $method_name * An entity repository method name. */ - protected function doTestLanguageFallback($method_name) { + protected function doTestLanguageFallback($method_name): void { $entity_type_id = 'entity_test_mulrev'; $en_contexts = $this->getLanguageContexts('en'); $it_contexts = $this->getLanguageContexts('it'); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php index 54ea3a80c343268e2b6cb77b04b45fd05b798da6..441472be1f1e067998a8a5fd9b6861b7a53d508a 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php @@ -90,7 +90,7 @@ public function testCustomFieldCreateDelete(): void { * @param bool $alter * Whether the original definition should be altered or not. */ - protected function updateEntityType($alter) { + protected function updateEntityType($alter): void { $this->state->set('entity_schema_update', $alter); $updated_entity_type = $this->getUpdatedEntityTypeDefinition($alter, $alter); $updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions($alter, $alter); @@ -294,7 +294,7 @@ public static function providerTestPrimaryKeyUpdate() { /** * {@inheritdoc} */ - protected function refreshServices() { + protected function refreshServices(): void { parent::refreshServices(); $this->database = $this->container->get('database'); } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php index 835f92b7b91b641322fd58e10b63ee9cf845a6a5..375064f0d0d8989424b84d0576361a507e336a2c 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php @@ -35,7 +35,7 @@ public function testEntityLanguageMethods(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestEntityLanguageMethods($entity_type) { + protected function doTestEntityLanguageMethods($entity_type): void { $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode'); $entity = $this->container->get('entity_type.manager') ->getStorage($entity_type) @@ -155,7 +155,7 @@ public function testMultilingualProperties(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestMultilingualProperties($entity_type) { + protected function doTestMultilingualProperties($entity_type): void { $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode'); $default_langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('default_langcode'); $name = $this->randomMachineName(); @@ -318,7 +318,7 @@ public function testEntityTranslationAPI(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestEntityTranslationAPI($entity_type) { + protected function doTestEntityTranslationAPI($entity_type): void { $default_langcode = $this->langcodes[0]; $langcode = $this->langcodes[1]; $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode'); @@ -586,7 +586,7 @@ public function testLanguageFallback(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestLanguageFallback($entity_type) { + protected function doTestLanguageFallback($entity_type): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); @@ -727,7 +727,7 @@ public function testLanguageChange(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function doTestLanguageChange($entity_type) { + protected function doTestLanguageChange($entity_type): void { $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode'); $controller = $this->entityTypeManager->getStorage($entity_type); $langcode = $this->langcodes[0]; diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php index fa088a8343f07f48b520ef67e6d747c32c940960..b13215255d276cd0d54163a4d30954546b43c790 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php @@ -20,6 +20,9 @@ class EntityTypeConstraintValidatorTest extends EntityKernelTestBase { */ protected $typedData; + /** + * {@inheritdoc} + */ protected static $modules = ['node', 'field', 'user']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php index f6c248edf46c5ca179ce4a9a7b676aa03c171c1d..7e0fdfbda57300d7f76e9fc91cc3b88b430cf43e 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php @@ -4,6 +4,7 @@ namespace Drupal\KernelTests\Core\Entity; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase; use Drupal\language\Entity\ConfigurableLanguage; @@ -73,7 +74,7 @@ protected function setUp(): void { * @return \Drupal\Core\Entity\EntityInterface * The created test entity. */ - protected function createTestEntity($entity_type) { + protected function createTestEntity($entity_type): EntityInterface { $this->entityName = $this->randomMachineName(); $this->entityUser = $this->createUser(); @@ -126,7 +127,7 @@ public function testValidation(): void { * @param string $entity_type * The entity type to run the tests with. */ - protected function checkValidation($entity_type) { + protected function checkValidation($entity_type): void { $entity = $this->createTestEntity($entity_type); $violations = $entity->validate(); $this->assertEquals(0, $violations->count(), 'Validation passes.'); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php index fba7909ba65d9027d83fa747202db79a84ccfac6..7a284b426efea471a288feb0237a2f2bf75d49e2 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php @@ -4,6 +4,7 @@ namespace Drupal\KernelTests\Core\Entity; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityViewBuilder; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Cache\Cache; @@ -348,7 +349,7 @@ public function testHookEntityTypeViewModeAlter(): void { * @return \Drupal\Core\Entity\EntityInterface * The created entity. */ - protected function createTestEntity($entity_type) { + protected function createTestEntity($entity_type): EntityInterface { $data = [ 'bundle' => $entity_type, 'name' => $this->randomMachineName(), diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewDisplayValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewDisplayValidationTest.php index 607458810ccf28fe497ab84c418ec111a17b82c3..7e034801a89aa61211caba546ab0d08806f06413 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewDisplayValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewDisplayValidationTest.php @@ -92,6 +92,7 @@ public function testTargetBundleMustExist(): void { */ public function testImmutableProperties(array $valid_values = []): void { parent::testImmutableProperties([ + 'id' => 'entity_test_with_bundle.two.full', 'targetEntityType' => 'entity_test_with_bundle', 'bundle' => 'two', ]); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php index e26b7b7c92daaa5c051445e44ac4ed39e5da22ed..77ffe920d8fd5f47113addad1ce974f73ccca5b5 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php @@ -9,6 +9,8 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; +// cspell:ignore basefield + /** * Tests Field SQL Storage . * diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php index 9a0a81c5894e38d0ab1668b4023a5ab0fa4d2208..090449136725d0080004be987391dbdf7282a997 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php @@ -17,6 +17,9 @@ */ class FieldWidgetConstraintValidatorTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'entity_test', 'field', diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php index 6799472cd3ef18bad71bd77244ef10467c76fc45..42ea0392141f31cf91f07fab23b9147b0913eb6f 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php @@ -132,7 +132,7 @@ protected function setUp(): void { * @param bool $translatable * Whether the entity type is translatable or not. */ - protected function insertData($revisionable, $translatable) { + protected function insertData($revisionable, $translatable): void { // Add three test entities in order to make the "data copy" step run at // least three times. /** @var \Drupal\Core\Entity\TranslatableRevisionableStorageInterface|\Drupal\Core\Entity\EntityStorageInterface $storage */ diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php index 467b225134ef012f68432c774d6ef019599d2ae1..d560fd3eee64766866b934098c18a9dbff6c5553 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php @@ -194,7 +194,7 @@ protected function assertItemsTableCount(int $count, EntityTypeInterface $defini * @param string $log_message * The log message of the new revision. */ - protected function createRevision(EntityInterface $entity, UserInterface $user, $timestamp, $log_message) { + protected function createRevision(EntityInterface $entity, UserInterface $user, $timestamp, $log_message): void { $entity->setNewRevision(TRUE); $entity->setRevisionCreationTime($timestamp); $entity->setRevisionUserId($user->id()); diff --git a/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php b/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php index 785a52c981be334140f3810aaa612efe7de9e84d..0d188a75887656bac100468aa1883b39e5e917fc 100644 --- a/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php +++ b/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php @@ -92,7 +92,7 @@ public function testExceptionLogging(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container ->register($this->testLogServiceName, BufferingLogger::class) diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php index 91c4b426ff85a2f8cc0b9d13941eea116bf63d72..404c2821e0ea04ebc96b9d80380d3672bcb710ba 100644 --- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php @@ -16,13 +16,19 @@ */ class ModuleHandlerDeprecatedHookTest extends KernelTestBase { - protected static $modules = ['deprecation_test']; + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'deprecation_test', + 'deprecation_hook_attribute_test', + ]; /** * @covers ::invokeDeprecated */ public function testInvokeDeprecated(): void { - $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these functions: deprecation_test_deprecated_hook(). Use something else.'); + $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these modules: deprecation_test, deprecation_hook_attribute_test. Use something else.'); /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ $module_handler = $this->container->get('module_handler'); $arg = 'an_arg'; @@ -36,12 +42,15 @@ public function testInvokeDeprecated(): void { * @covers ::invokeAllDeprecated */ public function testInvokeAllDeprecated(): void { - $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these functions: deprecation_test_deprecated_hook(). Use something else.'); + $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these modules: deprecation_test, deprecation_hook_attribute_test. Use something else.'); /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ $module_handler = $this->container->get('module_handler'); $arg = 'an_arg'; $this->assertEquals( - [$arg], + [ + $arg, + $arg, + ], $module_handler->invokeAllDeprecated('Use something else.', 'deprecated_hook', [$arg]) ); } @@ -50,7 +59,7 @@ public function testInvokeAllDeprecated(): void { * @covers ::alterDeprecated */ public function testAlterDeprecated(): void { - $this->expectDeprecation('The deprecated alter hook hook_deprecated_alter_alter() is implemented in these functions: deprecation_test_deprecated_alter_alter. Alter something else.'); + $this->expectDeprecation('The deprecated alter hook hook_deprecated_alter_alter() is implemented in these locations: deprecation_test_deprecated_alter_alter, Drupal\deprecation_hook_attribute_test\Hook\DeprecationHookAttributeTestHooks::deprecatedAlterAlterFirst. Alter something else.'); /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ $module_handler = $this->container->get('module_handler'); $data = []; diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php index f37e257d0eec174919d63f748ac8b99ca7751d27..290d94b229b62d3d83ad5bc457980d7502c30446 100644 --- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php @@ -65,21 +65,4 @@ public function testModuleImplementsAlter(): void { 'The file module_test.implementations.inc was included.'); } - /** - * Tests adding a non-existing function to hook_module_implements_alter(). - * - * @see \Drupal\Core\Extension\ModuleHandler::buildImplementationInfo() - * @see module_test_module_implements_alter() - */ - public function testModuleImplementsAlterNonExistingImplementation(): void { - - // Install the module_test module. - \Drupal::service('module_installer')->install(['module_test']); - - // Trigger hook discovery. - $this->expectException(\RuntimeException::class); - $this->expectExceptionMessage('An invalid implementation module_test_unimplemented_test_hook was added by hook_module_implements_alter()'); - \Drupal::moduleHandler()->hasImplementations('unimplemented_test_hook'); - } - } diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php index b95fad54b6e21862c04e6042fde9ef0883b8ed11..80c832f82b08aba03c604ab0fe69e2ce3ce92f96 100644 --- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php @@ -91,6 +91,21 @@ public function testKernelRebuildDuringHookInstall(): void { $this->assertTrue($module_installer->install(['module_test'])); } + /** + * Ensure that hooks reacting to install or uninstall are invoked. + */ + public function testInvokingRespondentHooks(): void { + $module_installer = $this->container->get('module_installer'); + $this->assertTrue($module_installer->install(['respond_install_uninstall_hook_test'])); + $this->assertTrue($module_installer->install(['cache_test'])); + $this->assertTrue(isset($GLOBALS['hook_module_preinstall'])); + $this->assertTrue(isset($GLOBALS['hook_modules_installed'])); + $module_installer->uninstall(['cache_test']); + $this->assertTrue(isset($GLOBALS['hook_module_preuninstall'])); + $this->assertTrue(isset($GLOBALS['hook_modules_uninstalled'])); + $this->assertTrue(isset($GLOBALS['hook_cache_flush'])); + } + /** * Tests install with a module with an invalid core version constraint. * diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php index 7c16f9a0bc3fd0d376211e75c466a63192a80a22..134e85aaa7e79ab89c5999144c77cb69441a34e0 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php @@ -36,7 +36,6 @@ protected function setUp(): void { $this->fieldName = $this->randomMachineName(); - /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'type' => 'field_test', diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php index 46bbff7da7c4fbf48d0d8047cc3f1d27c07c65ac..0fe8ea9d9bd8beed8876442deda3aacaac92fd8c 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php @@ -41,7 +41,6 @@ protected function setUp(): void { $this->installEntitySchema($entity_type_id); $this->fieldName = $this->randomMachineName(); - /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'type' => 'text', diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php index c3d6fc47392fd005666a207285e7c1c07d989c31..2eaada39c34b9d26077c7f20ff402c524667bcc7 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php @@ -168,7 +168,7 @@ public function testPreSaveExceptionNew(): void { $entity = EntityTest::create(); $entity->test_field = str_repeat('a', PasswordInterface::PASSWORD_MAX_LENGTH + 1); $this->expectException(EntityStorageException::class); - $this->expectExceptionMessage('The entity does not have a password'); + $this->expectExceptionMessage('Failed to hash the Test entity password.'); $entity->save(); } @@ -183,7 +183,7 @@ public function testPreSaveExceptionExisting(): void { $this->assertNotEquals('will_be_hashed', $entity->test_field->value); $this->expectException(EntityStorageException::class); - $this->expectExceptionMessage('The entity does not have a password'); + $this->expectExceptionMessage('Failed to hash the Test entity password.'); $entity->test_field = str_repeat('a', PasswordInterface::PASSWORD_MAX_LENGTH + 1); $entity->save(); } diff --git a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php index 8c6490d6e12bdb3fb476a8c9b8588308006fb8a0..38d8003ae23869df674a9942b17f943d9498e5d0 100644 --- a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php @@ -10,6 +10,7 @@ use Drupal\Core\File\Exception\FileException; use Drupal\Core\File\FileExists; use Drupal\Core\File\FileSystemInterface; +use Drupal\system\Hook\SystemHooks; /** * Tests operations dealing with directories. @@ -106,7 +107,8 @@ public function testFileCheckDirectoryHandling(): void { // Remove .htaccess file again to test that it is re-created by a cron run. @$file_system->unlink($default_scheme . '://.htaccess'); $this->assertFileDoesNotExist($default_scheme . '://.htaccess'); - system_cron(); + $systemCron = new SystemHooks(); + $systemCron->cron(); $this->assertFileExists($default_scheme . '://.htaccess'); // Verify contents of .htaccess file. diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php index 5308ea355f006f542a3d38b5907aa5f23405999a..d41860c72f92bf50a263c0965d4ebf0b9d932d79 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php @@ -79,11 +79,11 @@ protected function setUpFilesystem() { /** * Helper function to test the permissions of a file. * - * @param $filepath + * @param string $filepath * String file path. - * @param $expected_mode + * @param int $expected_mode * Octal integer like 0664 or 0777. - * @param $message + * @param string|null $message * Optional message. */ public function assertFilePermissions($filepath, $expected_mode, $message = NULL) { @@ -114,11 +114,11 @@ public function assertFilePermissions($filepath, $expected_mode, $message = NULL /** * Helper function to test the permissions of a directory. * - * @param $directory + * @param string $directory * String directory path. - * @param $expected_mode + * @param int $expected_mode * Octal integer like 0664 or 0777. - * @param $message + * @param string|null $message * Optional message. */ public function assertDirectoryPermissions($directory, $expected_mode, $message = NULL) { @@ -170,13 +170,13 @@ public function createDirectory($path = NULL) { /** * Create a file and return the URI of it. * - * @param $filepath + * @param string|null $filepath * Optional string specifying the file path. If none is provided then a * randomly named file will be created in the site's files directory. - * @param $contents + * @param string|null $contents * Optional contents to save into the file. If a NULL value is provided an * arbitrary string will be used. - * @param $scheme + * @param string|null $scheme * Optional string indicating the stream scheme to use. Drupal core includes * public, private, and temporary. The public wrapper is the default. * diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php index 8f8564e8ed078d29195a353adf2bb24e58e1b453..9136dfeede29abacba0127bacebdf5b55d451497 100644 --- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php @@ -4,6 +4,8 @@ namespace Drupal\KernelTests\Core\File; +// cspell:ignore garply tarz + /** * Tests filename mimetype detection. * @@ -30,13 +32,18 @@ public function testFileMimeTypeDetection(): void { 'test.jar.jpg' => 'image/jpeg', 'test.jpg.jar' => 'application/java-archive', 'test.pcf.Z' => 'application/x-font', - 'pcf.z' => 'application/octet-stream', + 'test.garply.waldo' => 'application/x-garply-waldo', + 'pcf.z' => 'application/x-compress', 'jar' => 'application/octet-stream', + 'garply.waldo' => 'application/octet-stream', 'some.junk' => 'application/octet-stream', 'foo.file_test_1' => 'made_up/file_test_1', 'foo.file_test_2' => 'made_up/file_test_2', 'foo.doc' => 'made_up/doc', 'test.ogg' => 'audio/ogg', + 'foobar.z' => 'application/x-compress', + 'foobar.tar' => 'application/x-tar', + 'foobar.tar.z' => 'application/x-tarz', ]; $guesser = $this->container->get('file.mime_type.guesser'); @@ -72,13 +79,18 @@ public function testFileMimeTypeDetection(): void { 'test.jar.jpg' => 'image/jpeg', 'test.jpg.jar' => 'application/java-archive', 'test.pcf.z' => NULL, + 'test.garply.waldo' => NULL, 'pcf.z' => NULL, 'jar' => NULL, + 'garply.waldo' => NULL, 'some.junk' => NULL, 'foo.file_test_1' => NULL, 'foo.file_test_2' => NULL, 'foo.doc' => NULL, 'test.ogg' => NULL, + 'foobar.z' => NULL, + 'foobar.tar' => NULL, + 'foobar.tar.z' => NULL, ]; $extension_guesser = $this->container->get('file.mime_type.guesser.extension'); $extension_guesser->setMapping($mapping); diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php index 063917d5b59080adbdde35910f5c6651aa76632a..cb577fe0a23cbfcabad319a9ed2363131b81822b 100644 --- a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php @@ -16,6 +16,9 @@ */ class UrlTransformRelativeTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['file_test']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php index b092803e22e1c8b54f3cb6caf14fa51f428e023c..2afbd5914aeb86be5fd036000d143529515e47ef 100644 --- a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php +++ b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php @@ -36,7 +36,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function customValidateForm(array &$form, FormStateInterface $form_state) { + public function customValidateForm(array &$form, FormStateInterface $form_state): void { $test_handlers = $form_state->get('test_handlers'); $test_handlers['validate'][] = __FUNCTION__; $form_state->set('test_handlers', $test_handlers); @@ -45,7 +45,7 @@ public function customValidateForm(array &$form, FormStateInterface $form_state) /** * {@inheritdoc} */ - public function validateForm(array &$form, FormStateInterface $form_state) { + public function validateForm(array &$form, FormStateInterface $form_state): void { $test_handlers = $form_state->get('test_handlers'); $test_handlers['validate'][] = __FUNCTION__; $form_state->set('test_handlers', $test_handlers); @@ -54,7 +54,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function customSubmitForm(array &$form, FormStateInterface $form_state) { + public function customSubmitForm(array &$form, FormStateInterface $form_state): void { $test_handlers = $form_state->get('test_handlers'); $test_handlers['submit'][] = __FUNCTION__; $form_state->set('test_handlers', $test_handlers); @@ -63,7 +63,7 @@ public function customSubmitForm(array &$form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { + public function submitForm(array &$form, FormStateInterface $form_state): void { $test_handlers = $form_state->get('test_handlers'); $test_handlers['submit'][] = __FUNCTION__; $form_state->set('test_handlers', $test_handlers); diff --git a/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php index dd145c87804b7f03d61010acacd42f07c9222e8e..20e188141a3b4968eb1b98dba6e2d8a4a09a83ba 100644 --- a/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php +++ b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php @@ -54,7 +54,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function validateForm(array &$form, FormStateInterface $form_state) { + public function validateForm(array &$form, FormStateInterface $form_state): void { // Verify that the only submit button was recognized as triggering_element. $this->assertEquals($form['actions']['submit']['#array_parents'], $form_state->getTriggeringElement()['#array_parents']); } diff --git a/core/tests/Drupal/KernelTests/Core/Hook/HookCollectorPassTest.php b/core/tests/Drupal/KernelTests/Core/Hook/HookCollectorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c7e21c270219e4029753b3316b499135d8a61bff --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Hook/HookCollectorPassTest.php @@ -0,0 +1,85 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\KernelTests\Core\Hook; + +use Drupal\Core\Hook\HookCollectorPass; +use Drupal\KernelTests\KernelTestBase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +/** + * @coversDefaultClass \Drupal\Core\Hook\HookCollectorPass + * @group Hook + */ +class HookCollectorPassTest extends KernelTestBase { + + /** + * VFS does not and can not support symlinks. + */ + protected function setUpFilesystem(): void {} + + /** + * Test that symlinks are properly followed. + */ + public function testSymlink(): void { + mkdir($this->siteDirectory); + + foreach (scandir("core/modules/user/tests/modules/user_hooks_test") as $item) { + $target = "$this->siteDirectory/$item"; + if (!file_exists($target)) { + symlink(realpath("core/modules/user/tests/modules/user_hooks_test/$item"), $target); + } + } + $container = new ContainerBuilder(); + $module_filenames = [ + 'user_hooks_test' => ['pathname' => "$this->siteDirectory/user_hooks_test.info.yml"], + ]; + $container->setParameter('container.modules', $module_filenames); + $container->setDefinition('module_handler', new Definition()); + (new HookCollectorPass())->process($container); + $implementations = [ + 'user_format_name_alter' => [ + 'Drupal\user_hooks_test\Hook\UserHooksTest' => [ + 'userFormatNameAlter' => 'user_hooks_test', + ], + ], + ]; + + $this->assertSame($implementations, $container->getParameter('hook_implementations_map')); + } + + /** + * Test that ordering works. + */ + public function testOrdering(): void { + $container = new ContainerBuilder(); + $module_filenames = [ + 'module_handler_test_all1' => ['pathname' => "core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.info.yml"], + 'module_handler_test_all2' => ['pathname' => "core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.info.yml"], + ]; + include_once 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/src/Hook/ModuleHandlerTestAll1Hooks.php'; + $container->setParameter('container.modules', $module_filenames); + $container->setDefinition('module_handler', new Definition()); + (new HookCollectorPass())->process($container); + $priorities = []; + foreach ($container->findTaggedServiceIds('kernel.event_listener') as $tags) { + foreach ($tags as $attributes) { + if (str_starts_with($attributes['event'], 'drupal_hook.order')) { + $priorities[$attributes['event']][$attributes['method']] = $attributes['priority']; + } + } + } + // For the order1 hook, module_handler_test_all2_order1() fires first + // despite all1 coming before all2 in the module list, because + // module_handler_test_all1_module_implements_alter() moved all1 to the + // end. The array key 'order' comes from + // ModuleHandlerTestAll1Hooks::order(). + $this->assertGreaterThan($priorities['drupal_hook.order1']['order'], $priorities['drupal_hook.order1']['module_handler_test_all2_order1']); + // For the hook order2 or any hook but order1, however, all1 fires first + // and all2 second. + $this->assertLessThan($priorities['drupal_hook.order2']['order'], $priorities['drupal_hook.order2']['module_handler_test_all2_order2']); + } + +} diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php index db21af44ddf240a8ab6f986aa72fb20777dc0552..d6de4c555c04ff00135fc7ab27d5528985fc496d 100644 --- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php +++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php @@ -30,7 +30,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.expirable.database'; diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php index c187deed612c78d6b99b32186178a4217e3a5598..213632d0ddebeb210ec59ccfdc8bafcf00e57694 100644 --- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php @@ -27,7 +27,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.database'; diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php index f6c58cca3af91c6a6cbc7a21fdd20fcede334b71..9a84be9a190191301b0c0e6fee2482a07e8de39d 100644 --- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php +++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\KeyValueStore\DatabaseStorageExpirable; use Drupal\KernelTests\KernelTestBase; +use Drupal\system\Hook\SystemHooks; /** * Tests garbage collection for the expirable key-value database storage. @@ -50,7 +51,8 @@ public function testGarbageCollection(): void { // Perform a new set operation and then trigger garbage collection. $store->setWithExpire('autumn', 'winter', rand(500, 1000000)); - system_cron(); + $systemCron = new SystemHooks(); + $systemCron->cron(); // Query the database and confirm that the stale records were deleted. $result = $connection->select('key_value_expire', 'kvp') diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php index e7679bfe2c314ccf8523bbad04ed63c1f29d6107..034ccbf88851eaa3b2e57d865a37251392b80cc9 100644 --- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php @@ -17,7 +17,7 @@ class MemoryStorageTest extends StorageTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $container->register('keyvalue.memory', 'Drupal\Core\KeyValueStore\KeyValueMemoryFactory'); diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php index 2c739858ac6543b79ab051d4bd91c16af92da893..baa01d730b200896261686e3ca0018ee0bb1bff7 100644 --- a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php @@ -55,14 +55,14 @@ public function testBasicMethods(): void { /** * Ensures that there are no menu links by default. */ - protected function doTestEmptyStorage() { + protected function doTestEmptyStorage(): void { $this->assertEquals(0, $this->treeStorage->countMenuLinks()); } /** * Ensures that table gets created on the fly. */ - protected function doTestTable() { + protected function doTestTable(): void { // Test that we can create a tree storage with an arbitrary table name and // that selecting from the storage creates the table. $tree_storage = new MenuTreeStorage($this->container->get('database'), $this->container->get('cache.menu'), $this->container->get('cache_tags.invalidator'), 'test_menu_tree'); @@ -377,7 +377,7 @@ public function testLoadByProperties(): void { /** * Adds a link with the given ID and supply defaults. */ - protected function addMenuLink($id, $parent = '', $route_name = 'test', $route_parameters = [], $menu_name = 'tools', $extra = []) { + protected function addMenuLink($id, $parent = '', $route_name = 'test', $route_parameters = [], $menu_name = 'tools', $extra = []): void { $link = [ 'id' => $id, 'menu_name' => $menu_name, @@ -399,7 +399,7 @@ protected function addMenuLink($id, $parent = '', $route_name = 'test', $route_p * @param string $new_parent * The ID of the new parent link. */ - protected function moveMenuLink($id, $new_parent) { + protected function moveMenuLink($id, $new_parent): void { $menu_link = $this->treeStorage->load($id); $menu_link['parent'] = $new_parent; $this->treeStorage->save($menu_link); diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php index 239e76243a9b6acf8828e5fcc39faf3c9bd21ba4..868be4066b870d4320610a8c58f537c7f191d951 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php @@ -57,7 +57,7 @@ public function testConditions(): void { /** * Tests with both contexts mapped to the same user. */ - protected function doTestIdenticalUser() { + protected function doTestIdenticalUser(): void { /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */ $condition = \Drupal::service('plugin.manager.condition') ->createInstance('condition_test_dual_user') @@ -74,7 +74,7 @@ protected function doTestIdenticalUser() { /** * Tests with each context mapped to different users. */ - protected function doTestDifferentUser() { + protected function doTestDifferentUser(): void { /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */ $condition = \Drupal::service('plugin.manager.condition') ->createInstance('condition_test_dual_user') diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php index 9cf82a7c3bbc677f1e0e4d3a102ca7c9933e5774..34b1c04e37e39d10d0a4ace96b1fac23aa615aa8 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php @@ -119,7 +119,7 @@ class TestContextAwarePlugin extends PluginBase implements ContextAwarePluginInt /** * {@inheritdoc} */ - public function setContext($name, ComponentContextInterface $context) { + public function setContext($name, ComponentContextInterface $context): void { $this->setContextTrait($name, $context); $this->setContextCalled = TRUE; } diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php index d47d0aedffebfeeaa55ef15505e6aae1a5b221cf..870c532ef2ed0269b0fc26a0f2b1151ceea3ff97 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php @@ -19,6 +19,9 @@ */ class ContextPluginTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = [ 'system', 'user', diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php index ebc45884f3766b0810cda5b030f9357a740b505f..21e5ead9079b77aa0873d327befdf555a75518c8 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php @@ -4,14 +4,13 @@ namespace Drupal\KernelTests\Core\Plugin; -use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Plugin\Context\EntityContextDefinition; use Drupal\KernelTests\KernelTestBase; use Drupal\plugin_test\Plugin\TestPluginManager; use Drupal\plugin_test\Plugin\MockBlockManager; use Drupal\plugin_test\Plugin\DefaultsTestPluginManager; -use Drupal\Core\Cache\MemoryBackend; use Drupal\Core\Extension\ModuleHandler; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Base class for Plugin API unit tests. @@ -46,7 +45,7 @@ protected function setUp(): void { // as derivatives and ReflectionFactory. $this->testPluginManager = new TestPluginManager(); $this->mockBlockManager = new MockBlockManager(); - $module_handler = new ModuleHandler($this->root, [], new MemoryBackend(\Drupal::service(TimeInterface::class))); + $module_handler = new ModuleHandler($this->root, [], $this->createMock(EventDispatcherInterface::class), []); $this->defaultsTestPluginManager = new DefaultsTestPluginManager($module_handler); // The expected plugin definitions within each manager. Several tests assert diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php index 5eef98fc4d6758b753a8f943bb6f7521846a1610..98c5d0bf23c8b301c6673f2943fb8f8024cc970f 100644 --- a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php @@ -67,7 +67,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { + public function submitForm(array &$form, FormStateInterface $form_state): void { $form_state->setRebuild(); } diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php index 9b91a911174a06c5926f348a01f3dbd361489f08..bf224ef7ae4352eab536fe477a69cc75e9094ae1 100644 --- a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php +++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php @@ -50,7 +50,7 @@ public function testMemoryQueue(): void { * @param \Drupal\Core\Queue\QueueInterface $queue2 * An instantiated queue object. */ - protected function runQueueTest($queue1, $queue2) { + protected function runQueueTest($queue1, $queue2): void { // Create four items. $data = []; for ($i = 0; $i < 4; $i++) { diff --git a/core/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php b/core/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9c3764d38695cf1f3464bdaad7580acb4195a5b7 --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php @@ -0,0 +1,128 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\KernelTests\Core\Recipe; + +use Drupal\Core\Config\Action\ConfigActionException; +use Drupal\Core\Entity\EntityDisplayRepositoryInterface; +use Drupal\Core\Extension\ModuleInstallerInterface; +use Drupal\KernelTests\KernelTestBase; +use Drupal\Tests\node\Traits\ContentTypeCreationTrait; +use Drupal\Tests\user\Traits\UserCreationTrait; +use Drupal\user\Entity\Role; + +/** + * @covers \Drupal\Core\Config\Action\Plugin\ConfigAction\EntityClone + * @group Recipe + */ +class EntityCloneConfigActionTest extends KernelTestBase { + + use ContentTypeCreationTrait; + use UserCreationTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = ['system', 'user']; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->installConfig('user'); + + $this->createRole(['access user profiles'], 'test'); + } + + /** + * Tests error if original entity does not exist. + */ + public function testErrorIfOriginalDoesNotExist(): void { + $this->expectException(ConfigActionException::class); + $this->expectExceptionMessage("Cannot clone 'user.role.nope' because it does not exist."); + $this->container->get('plugin.manager.config_action') + ->applyAction('cloneAs', 'user.role.nope', 'user.role.yep'); + } + + /** + * Tests successful clone. + */ + public function testSuccessfulClone(): void { + $this->container->get('plugin.manager.config_action') + ->applyAction('cloneAs', 'user.role.test', 'cloned'); + + $clone = Role::load('cloned'); + $this->assertInstanceOf(Role::class, $clone); + $this->assertTrue($clone->hasPermission('access user profiles')); + } + + /** + * Tests no error is thrown when an entity with the same ID already exists. + */ + public function testNoErrorWithExistingEntity(): void { + $this->createRole(['administer site configuration'], 'cloned'); + + $this->container->get('plugin.manager.config_action') + ->applyAction('cloneAs', 'user.role.test', 'cloned'); + + $clone = Role::load('cloned'); + $this->assertInstanceOf(Role::class, $clone); + $this->assertTrue($clone->hasPermission('administer site configuration')); + $this->assertFalse($clone->hasPermission('access user profiles')); + } + + /** + * Tests that the action can be configured to fail if the clone exists. + */ + public function testFailIfEntityExists(): void { + $this->container->get('plugin.manager.config_action') + ->applyAction('cloneAs', 'user.role.test', [ + 'id' => 'cloned', + 'fail_if_exists' => TRUE, + ]); + + $this->expectException(ConfigActionException::class); + $this->expectExceptionMessage('Entity user.role.cloned exists'); + $this->container->get('plugin.manager.config_action') + ->applyAction('cloneAs', 'user.role.test', [ + 'id' => 'cloned', + 'fail_if_exists' => TRUE, + ]); + } + + /** + * Tests cloning entity displays, which have specialized logic for that. + */ + public function testCloneEntityDisplay(): void { + $this->container->get(ModuleInstallerInterface::class)->install(['node']); + $this->createContentType(['type' => 'alpha']); + $this->createContentType(['type' => 'beta']); + + /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */ + $display_repository = $this->container->get(EntityDisplayRepositoryInterface::class); + // Create the default view displays for each node type. + $display_repository->getViewDisplay('node', 'alpha')->save(); + $display_repository->getViewDisplay('node', 'beta')->save(); + + // Ensure the `rss` displays don't exist yet. + $this->assertTrue($display_repository->getViewDisplay('node', 'alpha', 'rss')->isNew()); + $this->assertTrue($display_repository->getViewDisplay('node', 'beta', 'rss')->isNew()); + // Use the action to clone the default view displays to the `rss` view mode. + /** @var \Drupal\Core\Config\Action\ConfigActionManager $manager */ + $manager = $this->container->get('plugin.manager.config_action'); + $manager->applyAction('cloneAs', 'core.entity_view_display.node.alpha.default', 'node.alpha.rss'); + $manager->applyAction('entity_method:core.entity_view_display:createCopy', 'core.entity_view_display.node.beta.default', 'rss'); + $this->assertFalse($display_repository->getViewDisplay('node', 'alpha', 'rss')->isNew()); + $this->assertFalse($display_repository->getViewDisplay('node', 'beta', 'rss')->isNew()); + + // Ensure that this also works with wildcards. + $this->assertTrue($display_repository->getViewDisplay('node', 'alpha', 'search_result')->isNew()); + $this->assertTrue($display_repository->getViewDisplay('node', 'beta', 'search_result')->isNew()); + $manager->applyAction('entity_method:core.entity_view_display:createCopy', 'core.entity_view_display.node.*.default', 'search_result'); + $this->assertFalse($display_repository->getViewDisplay('node', 'alpha', 'search_result')->isNew()); + $this->assertFalse($display_repository->getViewDisplay('node', 'beta', 'search_result')->isNew()); + } + +} diff --git a/core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php b/core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php index 871b040527d798ab32e040a5d3a37b9e1e6c850d..04cc130035f7008b70d764414a3c2bd46ca3de0e 100644 --- a/core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php @@ -47,7 +47,7 @@ public function testModuleAndThemeInstall(): void { // Test the state after applying the recipe. $this->assertTrue($this->container->get('module_handler')->moduleExists('views'), 'The views module is installed'); $this->assertTrue($this->container->get('module_handler')->moduleExists('node'), 'The node module is installed'); - $this->assertTrue($this->container->get('theme_handler')->themeExists('test_basetheme'), 'The test_basetheme theme is installed'); + $this->assertTrue($this->container->get('theme_handler')->themeExists('test_base_theme'), 'The test_base_theme theme is installed'); $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subtheme'), 'The test_subtheme theme is installed'); $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subsubtheme'), 'The test_subsubtheme theme is installed'); $this->assertTrue($this->container->get('config.storage')->exists('node.settings'), 'The node.settings configuration has been created'); diff --git a/core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php b/core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php index 9db4abe5709ce80c4d80463ce66052d0fc1ea2fd..b63861276ff34092cfb8ddc522fa3a2a03d99144 100644 --- a/core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Recipe\RecipeFileException; use Drupal\Core\Recipe\RecipePreExistingConfigException; use Drupal\Core\Recipe\RecipeRunner; +use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; use Drupal\KernelTests\KernelTestBase; /** @@ -16,6 +17,8 @@ */ class RecipeTest extends KernelTestBase { + use RecipeTestTrait; + /** * {@inheritdoc} */ @@ -80,4 +83,19 @@ public function testExampleRecipe(): void { $this->assertSame($this->config('text.settings')->get('default_summary_length'), 700); } + public function testImplicitlyRequiredModule(): void { + $this->disableModules(['user']); + $recipe = $this->createRecipe([ + 'name' => 'Actions on config from required module', + 'config' => [ + 'actions' => [ + 'user.role.authenticated' => [ + 'grantPermission' => 'access administration pages', + ], + ], + ], + ]); + $this->assertIsObject($recipe); + } + } diff --git a/core/tests/Drupal/KernelTests/Core/Recipe/WildcardConfigActionsTest.php b/core/tests/Drupal/KernelTests/Core/Recipe/WildcardConfigActionsTest.php index 0b9600aa6af6b9f2eb813130052c34430f90b84b..8421eb1bce5853ba7da1c638454bdbfbac98492e 100644 --- a/core/tests/Drupal/KernelTests/Core/Recipe/WildcardConfigActionsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Recipe/WildcardConfigActionsTest.php @@ -4,19 +4,27 @@ namespace Drupal\KernelTests\Core\Recipe; +use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; +use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Core\Config\Action\ConfigActionException; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Recipe\InvalidConfigException; use Drupal\Core\Recipe\RecipeRunner; use Drupal\entity_test\Entity\EntityTestBundle; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; +use Drupal\image\Entity\ImageStyle; use Drupal\KernelTests\KernelTestBase; +use Drupal\language\Entity\ContentLanguageSettings; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * Tests config actions targeting multiple entities using wildcards. * + * @covers \Drupal\Core\Config\Action\Plugin\ConfigAction\CreateForEachBundle * @group Recipe */ class WildcardConfigActionsTest extends KernelTestBase { @@ -43,8 +51,8 @@ protected function setUp(): void { parent::setUp(); $this->installConfig('node'); - $this->createContentType(['type' => 'one']); - $this->createContentType(['type' => 'two']); + $this->createContentType(['type' => 'one', 'name' => 'Type A']); + $this->createContentType(['type' => 'two', 'name' => 'Type B']); EntityTestBundle::create(['id' => 'one'])->save(); EntityTestBundle::create(['id' => 'two'])->save(); @@ -132,4 +140,138 @@ public function testInvalidExpression(string $expression, string $expected_excep RecipeRunner::processRecipe($recipe); } + /** + * Tests that the createForEach action works as expected in normal conditions. + */ + public function testCreateForEach(): void { + $this->enableModules(['image', 'language']); + + /** @var \Drupal\Core\Config\Action\ConfigActionManager $manager */ + $manager = $this->container->get('plugin.manager.config_action'); + $manager->applyAction('createForEach', 'node.type.*', [ + 'language.content_settings.node.%bundle' => [ + 'target_entity_type_id' => 'node', + 'target_bundle' => '%bundle', + ], + ]); + $this->assertIsObject(ContentLanguageSettings::load('node.one')); + $this->assertIsObject(ContentLanguageSettings::load('node.two')); + } + + /** + * Tests that the createForEach action validates the config it creates. + */ + public function testCreateForEachValidatesCreatedEntities(): void { + $this->enableModules(['image']); + + // To prove that the validation runs, we need to disable strict schema + // checking in this test. We need to explicitly unsubscribe it from events + // because by this point in the test it has been fully wired up into the + // container and can't be changed. + $schema_checker = $this->container->get('testing.config_schema_checker'); + $this->container->get(EventDispatcherInterface::class) + ->removeSubscriber($schema_checker); + + try { + $this->container->get('plugin.manager.config_action') + ->applyAction('createForEach', 'node.type.*', [ + 'image.style.node__%bundle' => [], + ]); + $this->fail('Expected an exception to be thrown but it was not.'); + } + catch (InvalidConfigException $e) { + $this->assertSame('image.style.node__one', $e->data->getName()); + $this->assertCount(1, $e->violations); + $this->assertSame('label', $e->violations[0]->getPropertyPath()); + $this->assertSame(NotNull::IS_NULL_ERROR, $e->violations[0]->getCode()); + } + } + + /** + * Tests using the `%label` placeholder with the createForEach action. + */ + public function testCreateForEachWithLabel(): void { + $this->enableModules(['image']); + + // We should be able to use the `%label` placeholder. + $this->container->get('plugin.manager.config_action') + ->applyAction('createForEach', 'node.type.*', [ + 'image.style.node_%bundle_big' => [ + 'label' => 'Big image for %label content', + ], + ]); + $this->assertSame('Big image for Type A content', ImageStyle::load('node_one_big')?->label()); + $this->assertSame('Big image for Type B content', ImageStyle::load('node_two_big')?->label()); + } + + /** + * Tests that the createForEachIfNotExists action ignores existing config. + */ + public function testCreateForEachIfNotExists(): void { + $this->enableModules(['language']); + + ContentLanguageSettings::create([ + 'target_entity_type_id' => 'node', + 'target_bundle' => 'one', + ])->save(); + + $this->container->get('plugin.manager.config_action') + ->applyAction('createForEachIfNotExists', 'node.type.*', [ + 'language.content_settings.node.%bundle' => [ + 'target_entity_type_id' => 'node', + 'target_bundle' => '%bundle', + ], + ]); + $this->assertIsObject(ContentLanguageSettings::loadByEntityTypeBundle('node', 'two')); + } + + /** + * Tests that the createForEach action errs on conflict with existing config. + */ + public function testCreateForEachErrorsIfAlreadyExists(): void { + $this->enableModules(['language']); + + ContentLanguageSettings::create([ + 'target_entity_type_id' => 'node', + 'target_bundle' => 'one', + ])->save(); + + $this->expectExceptionMessage(ConfigActionException::class); + $this->expectExceptionMessage('Entity language.content_settings.node.one exists'); + $this->container->get('plugin.manager.config_action') + ->applyAction('createForEach', 'node.type.*', [ + 'language.content_settings.node.%bundle' => [ + 'target_entity_type_id' => 'node', + 'target_bundle' => '%bundle', + ], + ]); + } + + /** + * Tests that the createForEach action only works on bundle entities. + */ + public function testCreateForEachNotAvailableOnNonBundleEntities(): void { + $this->enableModules(['language']); + + // We should not be able to use this action on entities that aren't + // themselves bundles of another entity type. + $this->expectException(PluginNotFoundException::class); + $this->expectExceptionMessage('The "language_content_settings" entity does not support the "createForEach" config action.'); + $this->container->get('plugin.manager.config_action') + ->applyAction('createForEach', 'language.content_settings.node.*', []); + } + + /** + * Tests that the createForEach action requires bundle entity types to exist. + */ + public function testCreateForEachErrorsIfNoBundleEntityTypesExist(): void { + $this->disableModules(['node', 'entity_test']); + + $manager = $this->container->get('plugin.manager.config_action'); + $manager->clearCachedDefinitions(); + $this->expectException(InvalidPluginDefinitionException::class); + $this->expectExceptionMessage('The create_for_each_bundle:createForEach config action must be restricted to entity types that are bundles of another entity type.'); + $manager->applyAction('create_for_each_bundle:createForEach', 'node.type.*', []); + } + } diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php index 49a1863a1c50048712ea2b9418e875776140abaa..c49c1bf2fbefa8ccfe9d929b34d3918f62d64bdf 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php @@ -60,7 +60,7 @@ public function testUser1RolesContext(): void { * @param string[] $contexts * List of cache contexts to use. */ - protected function doTestUser1WithContexts($contexts) { + protected function doTestUser1WithContexts($contexts): void { // Test that user 1 does not share the cache with other users who have the // same roles, even when using a role-based cache context. $user1 = $this->createUser(); diff --git a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php index ad69cae4a43f4b2e00622ca0d65e8fa71d68e37d..adf4d58e9ae0a1e6e882a296e41dc2dbedf40258 100644 --- a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php @@ -25,7 +25,7 @@ class ServiceProviderTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Undo cache_factory override done in parent because it can hide caching // issues in container build time. diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php index d9c90d8aafa5ebf9e5f768058b7aadec6c143f9b..5a7690e138ed69c2b909a55232d0d42f931ac683 100644 --- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php +++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php @@ -54,7 +54,7 @@ public function testComparison(): void { /** * Reboots the kernel to set custom translations in Settings. */ - protected function rebootAndPrepareSettings() { + protected function rebootAndPrepareSettings(): void { // Reboot the container so that different services are injected and the new // settings are picked. $kernel = $this->container->get('kernel'); diff --git a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php index 5480197f406c36cef71a550e3152e395b04bc764..335cdc0339ec4a255ac2407ff202fccba7abbeeb 100644 --- a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php @@ -15,6 +15,9 @@ */ class PhpUnitBridgeTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['deprecation_test']; public function testDeprecatedClass(): void { diff --git a/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php b/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php index 888db8a0cd73ade44e5dbf8d911ec7c36f694c6c..14a6fcd5fe46b9cbf761c09103ccc49e5c46e2c3 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php @@ -42,7 +42,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $definition = new Definition(FilesystemLoader::class, [[sys_get_temp_dir()]]); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php index 2a7f8412d345729f554364e2f6dcd25da457d29b..ad98558e21992b831f9907b1f110279e4cd96ad0 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php @@ -29,7 +29,7 @@ public function testMaintenanceTheme(): void { $base_themes = $active_theme->getBaseThemeExtensions(); $base_theme_names = array_keys($base_themes); - $this->assertSame(['test_basetheme'], $base_theme_names); + $this->assertSame(['test_base_theme'], $base_theme_names); } } diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index a9b272711fbb816f59068dad9d4ccbc6b392566b..1cdca5c5dc09306205feab5914aa7e2584c27b73 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -69,7 +69,7 @@ public function testRaceCondition(): void { */ public function testMultipleSubThemes(): void { $theme_handler = \Drupal::service('theme_handler'); - \Drupal::service('theme_installer')->install(['test_basetheme', 'test_subtheme', 'test_subsubtheme']); + \Drupal::service('theme_installer')->install(['test_base_theme', 'test_subtheme', 'test_subsubtheme']); $module_list = $this->container->get('extension.list.module'); assert($module_list instanceof ModuleExtensionList); @@ -78,13 +78,13 @@ public function testMultipleSubThemes(): void { $registry_subsub_theme->setThemeManager(\Drupal::theme()); $registry_sub_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), \Drupal::service('cache.bootstrap'), $module_list, \Drupal::service('kernel'), 'test_subtheme',); $registry_sub_theme->setThemeManager(\Drupal::theme()); - $registry_base_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), \Drupal::service('cache.bootstrap'), $module_list, \Drupal::service('kernel'), 'test_basetheme'); + $registry_base_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), \Drupal::service('cache.bootstrap'), $module_list, \Drupal::service('kernel'), 'test_base_theme'); $registry_base_theme->setThemeManager(\Drupal::theme()); $preprocess_functions = $registry_subsub_theme->get()['theme_test_template_test']['preprocess functions']; $this->assertSame([ 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', + 'test_base_theme_preprocess_theme_test_template_test', 'test_subtheme_preprocess_theme_test_template_test', 'test_subsubtheme_preprocess_theme_test_template_test', ], $preprocess_functions); @@ -92,14 +92,14 @@ public function testMultipleSubThemes(): void { $preprocess_functions = $registry_sub_theme->get()['theme_test_template_test']['preprocess functions']; $this->assertSame([ 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', + 'test_base_theme_preprocess_theme_test_template_test', 'test_subtheme_preprocess_theme_test_template_test', ], $preprocess_functions); $preprocess_functions = $registry_base_theme->get()['theme_test_template_test']['preprocess functions']; $this->assertSame([ 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', + 'test_base_theme_preprocess_theme_test_template_test', ], $preprocess_functions); } diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php index 36602f4f1d25e9fbcab2b401340375bafaa63340..aa6f76ff69c15e7b220e7567bebaf3df7ee9b954 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php @@ -64,7 +64,7 @@ protected function setUp(): void { /** * Installs all core modules. */ - protected function installAllModules() { + protected function installAllModules(): void { // Enable all core modules. $all_modules = $this->container->get('extension.list.module')->getList(); $all_modules = array_filter($all_modules, function ($module) { diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php index e06b19b7ad5174b807fb52223f01ecd385f8e41e..3ef3ec815dd404f126c812538a70c608adfdc117 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php @@ -28,7 +28,7 @@ class ThemeInstallerTest extends KernelTestBase { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); // Some test methods involve ModuleHandler operations, which attempt to // rebuild and dump routes. @@ -64,7 +64,7 @@ public function testEmpty(): void { * Tests installing a theme. */ public function testInstall(): void { - $name = 'test_basetheme'; + $name = 'test_base_theme'; $themes = $this->themeHandler()->listInfo(); $this->assertFalse(isset($themes[$name])); @@ -77,7 +77,7 @@ public function testInstall(): void { $this->assertTrue(isset($themes[$name])); $this->assertEquals($name, $themes[$name]->getName()); - // Verify that test_basetheme.settings is active. + // Verify that test_base_theme.settings is active. $this->assertFalse(theme_get_setting('features.favicon', $name)); $this->assertEquals('only', theme_get_setting('base', $name)); $this->assertEquals('base', theme_get_setting('override', $name)); @@ -313,7 +313,7 @@ public function testUninstallAdmin(): void { */ public function testUninstallSubTheme(): void { $name = 'test_subtheme'; - $base_name = 'test_basetheme'; + $base_name = 'test_base_theme'; $this->themeInstaller()->install([$name]); $this->themeInstaller()->uninstall([$name]); @@ -327,7 +327,7 @@ public function testUninstallSubTheme(): void { * Tests uninstalling a base theme before its sub-theme. */ public function testUninstallBaseBeforeSubTheme(): void { - $name = 'test_basetheme'; + $name = 'test_base_theme'; $sub_name = 'test_subtheme'; $this->themeInstaller()->install([$sub_name]); @@ -370,7 +370,7 @@ public function testUninstallNonExisting(): void { * Tests uninstalling a theme. */ public function testUninstall(): void { - $name = 'test_basetheme'; + $name = 'test_base_theme'; $this->themeInstaller()->install([$name]); $this->assertNotEmpty($this->config("$name.settings")->get()); @@ -393,7 +393,7 @@ public function testUninstall(): void { * Tests uninstalling a theme that is not installed. */ public function testUninstallNotInstalled(): void { - $name = 'test_basetheme'; + $name = 'test_base_theme'; $themes = $this->themeHandler()->listInfo(); $this->assertEmpty(array_keys($themes)); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php index 1a844b19b952ba607042986ab8beadf47905cf80..569921b6167b92c53da5fdbb9dbfdf1b2255d7c7 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php @@ -45,7 +45,7 @@ protected function setUp(): void { * Tests that $theme.settings are imported and used as default theme settings. */ public function testDefaultConfig(): void { - $name = 'test_basetheme'; + $name = 'test_base_theme'; $path = $this->availableThemes[$name]->getPath(); $this->assertFileExists("$path/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/$name.settings.yml"); $this->container->get('theme_installer')->install([$name]); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php index 01e6fefd169481454bcc087e63ec265fa1b6bb01..c14d7ab62278bed26ae24fb721f5967f4014d357 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php @@ -183,7 +183,7 @@ public function testCacheFilename(): void { /** * {@inheritdoc} */ - public function register(ContainerBuilder $container) { + public function register(ContainerBuilder $container): void { parent::register($container); $definition = new Definition('Twig\Loader\FilesystemLoader', [[sys_get_temp_dir()]]); diff --git a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php index 395bf9055e834d25957e3712f4d62807601f4879..b10d81be751c5364a0cb4b43155db0bafc71e895 100644 --- a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php @@ -16,6 +16,9 @@ */ class LinkGenerationTest extends KernelTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['link_generation_test']; /** diff --git a/core/tests/Drupal/KernelTests/Core/Validation/UuidValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Validation/UuidValidatorTest.php index 4120bfd6e4a5c102d3363c9a19eb00038f1e0283..7c7d6aa0e39b41ebcbde2b5a81d81670c635c4e7 100644 --- a/core/tests/Drupal/KernelTests/Core/Validation/UuidValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Validation/UuidValidatorTest.php @@ -47,7 +47,7 @@ public function testUuid(): void { /** * @see \Drupal\Core\Validation\Plugin\Validation\Constraint\UriHostConstraint */ - public function testUriHost() { + public function testUriHost(): void { $typed_config_manager = \Drupal::service('config.typed'); /** @var \Drupal\Core\Config\Schema\TypedConfigInterface $typed_config */ $typed_config = $typed_config_manager->get('config_test.validation'); diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 7556b589e7841612b03ffe630952aff947e10eac..f9da8131eda9c740ccca6e3ebb5d99721696b663 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -385,10 +385,6 @@ protected function bootKernel() { $this->fail('Failed to run installer database tasks: ' . implode(', ', $errors)); } - if ($modules) { - $this->container->get('module_handler')->loadAll(); - } - // Setup the destination to the be frontpage by default. \Drupal::destination()->set('/'); diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php index 4b99b24b1aad29187149dc983a492526d257715f..4337f6e080b7b2e211d9716d0340ad7e88692ef6 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php +++ b/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php @@ -54,7 +54,7 @@ public function testNoShutdownFunction(): void { /** * Registers that this shutdown function has been called. */ - public function shutdownFunction() { + public function shutdownFunction(): void { self::$shutdownCalled[] = 'shutdownFunction'; drupal_register_shutdown_function([$this, 'shutdownFunction2']); } @@ -62,7 +62,7 @@ public function shutdownFunction() { /** * Registers that this shutdown function has been called. */ - public function shutdownFunction2() { + public function shutdownFunction2(): void { self::$shutdownCalled[] = 'shutdownFunction2'; } diff --git a/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php b/core/tests/Drupal/KernelTests/Scripts/TestSiteApplicationTest.php similarity index 94% rename from core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php rename to core/tests/Drupal/KernelTests/Scripts/TestSiteApplicationTest.php index 0c4b6f27d99c765169ffdb60dfd93f568e15ac3e..4c5bf956fe08df5bb0eefc65600e163c99ff339d 100644 --- a/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php +++ b/core/tests/Drupal/KernelTests/Scripts/TestSiteApplicationTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Drupal\Tests\Scripts; +namespace Drupal\KernelTests\Scripts; use Drupal\Component\FileSystem\FileSystem; use Drupal\Core\Database\Database; use Drupal\Core\Test\TestDatabase; -use Drupal\Tests\UnitTestCase; +use Drupal\KernelTests\KernelTestBase; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Request; use Symfony\Component\Process\PhpExecutableFinder; @@ -18,8 +18,9 @@ /** * Tests core/scripts/test-site.php. * - * This test uses the Drupal\Core\Database\Database class which has a static. - * Therefore run in a separate process to avoid side effects. + * This test uses the Drupal\Core\Database\Database class which has a static, + * and the CI database services. Therefore it is defined as KernelTest so that + * it can also run in a separate process to avoid side effects. * * @see \Drupal\TestSite\TestSiteApplication * @see \Drupal\TestSite\Commands\TestSiteInstallCommand @@ -27,10 +28,9 @@ * * @group Setup * @group #slow - * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ -class TestSiteApplicationTest extends UnitTestCase { +class TestSiteApplicationTest extends KernelTestBase { /** * The PHP executable path. @@ -81,7 +81,7 @@ public function testInstallWithNonSetupClass(): void { $process = Process::fromShellCommandline($command_line, $this->root, ['COLUMNS' => PHP_INT_MAX]); $process->run(); - $this->assertStringContainsString('The class Drupal\Tests\Scripts\TestSiteApplicationTest contained in', $process->getErrorOutput()); + $this->assertStringContainsString('The class Drupal\KernelTests\Scripts\TestSiteApplicationTest contained in', $process->getErrorOutput()); $this->assertStringContainsString('needs to implement \Drupal\TestSite\TestSetupInterface', $process->getErrorOutput()); } @@ -90,9 +90,6 @@ public function testInstallWithNonSetupClass(): void { */ public function testInstallScript(): void { $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest'; - if (!is_writable($simpletest_path)) { - $this->markTestSkipped("Requires the directory $simpletest_path to exist and be writable"); - } // Install a site using the JSON output. $command_line = $this->php . ' core/scripts/test-site.php install --json --setup-file core/tests/Drupal/TestSite/TestSiteInstallTestScript.php --db-url "' . getenv('SIMPLETEST_DB') . '"'; @@ -190,9 +187,6 @@ public function testInstallScript(): void { */ public function testInstallInDifferentLanguage(): void { $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest'; - if (!is_writable($simpletest_path)) { - $this->markTestSkipped("Requires the directory $simpletest_path to exist and be writable"); - } $command_line = $this->php . ' core/scripts/test-site.php install --json --langcode fr --setup-file core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php --db-url "' . getenv('SIMPLETEST_DB') . '"'; $process = Process::fromShellCommandline($command_line, $this->root); @@ -240,9 +234,6 @@ public function testTearDownDbPrefixValidation(): void { public function testUserLogin(): void { $this->markTestIncomplete('Fix this test in https://www.drupal.org/project/drupal/issues/2962157.'); $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest'; - if (!is_writable($simpletest_path)) { - $this->markTestSkipped("Requires the directory $simpletest_path to exist and be writable"); - } // Install a site using the JSON output. $command_line = $this->php . ' core/scripts/test-site.php install --json --setup-file core/tests/Drupal/TestSite/TestSiteInstallTestScript.php --db-url "' . getenv('SIMPLETEST_DB') . '"'; diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js index 9022592467ed29e739f60bd3051cfe16395242dd..67ec1e7b2d323d06321122a2ad883fe338afb2fa 100644 --- a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js +++ b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js @@ -33,7 +33,7 @@ exports.command = function drupalInstall( const langcodeOption = langcode ? `--langcode "${langcode}"` : ''; const dbOption = process.env.DRUPAL_TEST_DB_URL.length > 0 - ? `--db-url ${process.env.DRUPAL_TEST_DB_URL}` + ? `--db-url "${process.env.DRUPAL_TEST_DB_URL}"` : ''; const install = execSync( commandAsWebserver( diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalLogin.js b/core/tests/Drupal/Nightwatch/Commands/drupalLogin.js index a832c977d47ce6cc0d2e98f9431d02610323ca87..bee0c5a6fc8ccf9a21f13f41e9f44d5a6d09408b 100644 --- a/core/tests/Drupal/Nightwatch/Commands/drupalLogin.js +++ b/core/tests/Drupal/Nightwatch/Commands/drupalLogin.js @@ -19,6 +19,9 @@ exports.command = function drupalLogin({ name, password }) { .setValue('input[name="name"]', name) .setValue('input[name="pass"]', password) .submitForm('#user-login-form'); + // MongoDB needs a moment, because it is using a replica set and the + // members of the replica set need to synchronize. + this.pause(50); // Assert that a user is logged in. this.drupalUserIsLoggedIn((sessionExists) => { this.assert.equal( diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalLogout.js b/core/tests/Drupal/Nightwatch/Commands/drupalLogout.js index a58d68efc9aad8d132b65a46bf3c86a23eaeed4e..94d2b6e461585aabcc9b300559be5e74a34592e7 100644 --- a/core/tests/Drupal/Nightwatch/Commands/drupalLogout.js +++ b/core/tests/Drupal/Nightwatch/Commands/drupalLogout.js @@ -17,6 +17,10 @@ exports.command = function drupalLogout({ silent = false } = {}, callback) { '#user-logout-confirm', ); + // MongoDB needs a moment, because it is using a replica set and the + // members of the replica set need to synchronize. + this.pause(50); + this.drupalUserIsLoggedIn((sessionExists) => { if (silent) { if (sessionExists) { diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalUninstall.js b/core/tests/Drupal/Nightwatch/Commands/drupalUninstall.js index 0ad21d00b9fe7c1357d0b188b3e4837f3aa24696..c582d04faa86acd60060c2583753f3ffc9d5b280 100644 --- a/core/tests/Drupal/Nightwatch/Commands/drupalUninstall.js +++ b/core/tests/Drupal/Nightwatch/Commands/drupalUninstall.js @@ -17,7 +17,7 @@ exports.command = function drupalUninstall(callback) { if (!this.currentTest.results.errors && !this.currentTest.results.failed) { const dbOption = process.env.DRUPAL_TEST_DB_URL.length > 0 - ? `--db-url ${process.env.DRUPAL_TEST_DB_URL}` + ? `--db-url "${process.env.DRUPAL_TEST_DB_URL}"` : ''; try { if (!prefix || !prefix.length) { diff --git a/core/tests/Drupal/Nightwatch/nightwatch.conf.js b/core/tests/Drupal/Nightwatch/nightwatch.conf.js index a0d46e010f476777582534755c6885f7e8b0ea16..8e4d40b1dd782b7ad5676c4b8a30ad426084b548 100644 --- a/core/tests/Drupal/Nightwatch/nightwatch.conf.js +++ b/core/tests/Drupal/Nightwatch/nightwatch.conf.js @@ -15,6 +15,7 @@ const defaultIgnore = ['vendor/**']; globSync('**/tests/**/Nightwatch/**/*.js', { cwd: path.resolve(process.cwd(), `../${searchDirectory}`), + follow: true, ignore: process.env.DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES ? process.env.DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES.split(',').concat( defaultIgnore, diff --git a/core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php b/core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php index 4ab1b31f09621e5fb17d0524076a3959e5a8f6a9..88a49066957e66c9627a4842a8ec5825c03bf4ee 100644 --- a/core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php +++ b/core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php @@ -12,7 +12,7 @@ /** * Setup file used by TestSiteInstallTestScript. * - * @see \Drupal\Tests\Scripts\TestSiteApplicationTest + * @see \Drupal\KernelTests\Scripts\TestSiteApplicationTest */ class TestSiteClaroInstallTestScript implements TestSetupInterface { diff --git a/core/tests/Drupal/TestSite/TestSiteInstallTestScript.php b/core/tests/Drupal/TestSite/TestSiteInstallTestScript.php index 7fc5494e33e2820dd6e1a5732b633915c863365b..7ac073c6485e83112f4e217526b796e15219d665 100644 --- a/core/tests/Drupal/TestSite/TestSiteInstallTestScript.php +++ b/core/tests/Drupal/TestSite/TestSiteInstallTestScript.php @@ -7,7 +7,7 @@ /** * Setup file used by TestSiteApplicationTest. * - * @see \Drupal\Tests\Scripts\TestSiteApplicationTest + * @see \Drupal\KernelTests\Scripts\TestSiteApplicationTest */ class TestSiteInstallTestScript implements TestSetupInterface { diff --git a/core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php b/core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php index b5f2f04a5c4ad93022429984e4f9fcc674175d9c..e4b82ccc641bf4a33362643d00c361e818a735b7 100644 --- a/core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php +++ b/core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php @@ -9,7 +9,7 @@ /** * Setup file used by TestSiteApplicationTest. * - * @see \Drupal\Tests\Scripts\TestSiteApplicationTest + * @see \Drupal\KernelTests\Scripts\TestSiteApplicationTest */ class TestSiteMultilingualInstallTestScript implements TestSetupInterface, TestPreinstallInterface { diff --git a/core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php b/core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php index 87f73336cf0cb0375d238b7294feb9c247168af1..9b6c36d1bad5d34b904c7a98b1e6c822dea02867 100644 --- a/core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php +++ b/core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php @@ -12,7 +12,7 @@ /** * Setup file used by TestSiteInstallTestScript. * - * @see \Drupal\Tests\Scripts\TestSiteApplicationTest + * @see \Drupal\KernelTests\Scripts\TestSiteApplicationTest */ class TestSiteOliveroInstallTestScript implements TestSetupInterface { diff --git a/core/tests/Drupal/Tests/ApiRequestTrait.php b/core/tests/Drupal/Tests/ApiRequestTrait.php index e1b219a2c3ebdc21350bef565acd3b0fe26cb901..05da1145312fdeb4ef365475942f838eeb2bc8e1 100644 --- a/core/tests/Drupal/Tests/ApiRequestTrait.php +++ b/core/tests/Drupal/Tests/ApiRequestTrait.php @@ -7,6 +7,7 @@ use Behat\Mink\Driver\BrowserKitDriver; use Drupal\Core\Url; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\ResponseInterface; /** * Boilerplate for API Functional tests' HTTP requests. @@ -38,7 +39,7 @@ trait ApiRequestTrait { * * @see \GuzzleHttp\ClientInterface::request() */ - protected function makeApiRequest($method, Url $url, array $request_options) { + protected function makeApiRequest($method, Url $url, array $request_options): ResponseInterface { // HEAD requests do not have bodies. If one is specified, Guzzle will not // ignore it and the request will be treated as GET with an overridden // method string, and libcurl will expect to read a response body. diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php index e9fadc854cf1bb8369473f173041a1f027c97afc..a977a4144cd62ac8d482818e5a5b447b0ec752fd 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php +++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php @@ -28,7 +28,7 @@ */ class DocParserTest extends TestCase { - public function testNestedArraysWithNestedAnnotation() + public function testNestedArraysWithNestedAnnotation(): void { $parser = $this->createTestParser(); @@ -48,7 +48,7 @@ public function testNestedArraysWithNestedAnnotation() $this->assertInstanceOf(Name::class, $nestedArray['key']); } - public function testBasicAnnotations() + public function testBasicAnnotations(): void { $parser = $this->createTestParser(); @@ -114,7 +114,7 @@ public function testBasicAnnotations() $this->assertNull($annot->value); } - public function testDefaultValueAnnotations() + public function testDefaultValueAnnotations(): void { $parser = $this->createTestParser(); @@ -136,7 +136,7 @@ public function testDefaultValueAnnotations() $this->assertEquals('bar', $annot->foo); } - public function testNamespacedAnnotations() + public function testNamespacedAnnotations(): void { $parser = new DocParser; $parser->setIgnoreNotImportedAnnotations(true); @@ -163,7 +163,7 @@ public function testNamespacedAnnotations() /** * @group debug */ - public function testTypicalMethodDocBlock() + public function testTypicalMethodDocBlock(): void { $parser = $this->createTestParser(); @@ -193,7 +193,7 @@ public function testTypicalMethodDocBlock() } - public function testAnnotationWithoutConstructor() + public function testAnnotationWithoutConstructor(): void { $parser = $this->createTestParser(); @@ -318,7 +318,7 @@ public function testAnnotationWithoutConstructor() $this->assertInstanceOf(SomeAnnotationClassNameWithoutConstructorAndProperties::class, $result[0]); } - public function testAnnotationTarget() + public function testAnnotationTarget(): void { $parser = new DocParser; @@ -534,7 +534,7 @@ public static function getAnnotationVarTypeArrayProviderInvalid() /** * @dataProvider getAnnotationVarTypeProviderValid */ - public function testAnnotationWithVarType($attribute, $value) + public function testAnnotationWithVarType($attribute, $value): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::$invalidProperty.'; @@ -551,7 +551,7 @@ public function testAnnotationWithVarType($attribute, $value) /** * @dataProvider getAnnotationVarTypeProviderInvalid */ - public function testAnnotationWithVarTypeError($attribute,$type,$value,$given) + public function testAnnotationWithVarTypeError($attribute,$type,$value,$given): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -570,7 +570,7 @@ public function testAnnotationWithVarTypeError($attribute,$type,$value,$given) /** * @dataProvider getAnnotationVarTypeArrayProviderInvalid */ - public function testAnnotationWithVarTypeArrayError($attribute,$type,$value,$given) + public function testAnnotationWithVarTypeArrayError($attribute,$type,$value,$given): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -588,7 +588,7 @@ public function testAnnotationWithVarTypeArrayError($attribute,$type,$value,$giv /** * @dataProvider getAnnotationVarTypeProviderValid */ - public function testAnnotationWithAttributes($attribute, $value) + public function testAnnotationWithAttributes($attribute, $value): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::$invalidProperty.'; @@ -606,7 +606,7 @@ public function testAnnotationWithAttributes($attribute, $value) /** * @dataProvider getAnnotationVarTypeProviderInvalid */ - public function testAnnotationWithAttributesError($attribute,$type,$value,$given) + public function testAnnotationWithAttributesError($attribute,$type,$value,$given): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -625,7 +625,7 @@ public function testAnnotationWithAttributesError($attribute,$type,$value,$given /** * @dataProvider getAnnotationVarTypeArrayProviderInvalid */ - public function testAnnotationWithAttributesWithVarTypeArrayError($attribute,$type,$value,$given) + public function testAnnotationWithAttributesWithVarTypeArrayError($attribute,$type,$value,$given): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -640,7 +640,7 @@ public function testAnnotationWithAttributesWithVarTypeArrayError($attribute,$ty } } - public function testAnnotationWithRequiredAttributes() + public function testAnnotationWithRequiredAttributes(): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -674,7 +674,7 @@ public function testAnnotationWithRequiredAttributes() } - public function testAnnotationWithRequiredAttributesWithoutContructor() + public function testAnnotationWithRequiredAttributesWithoutContructor(): void { $parser = $this->createTestParser(); $context = 'property SomeClassName::invalidProperty.'; @@ -708,7 +708,7 @@ public function testAnnotationWithRequiredAttributesWithoutContructor() } - public function testAnnotationEnumeratorException() + public function testAnnotationEnumeratorException(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('Attribute "value" of @Drupal\Tests\Component\Annotation\Doctrine\Fixtures\AnnotationEnum declared on property SomeClassName::invalidProperty. accepts only [ONE, TWO, THREE], but got FOUR.'); @@ -722,7 +722,7 @@ public function testAnnotationEnumeratorException() $parser->parse($docblock, $context); } - public function testAnnotationEnumeratorLiteralException() + public function testAnnotationEnumeratorLiteralException(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('Attribute "value" of @Drupal\Tests\Component\Annotation\Doctrine\Fixtures\AnnotationEnumLiteral declared on property SomeClassName::invalidProperty. accepts only [AnnotationEnumLiteral::ONE, AnnotationEnumLiteral::TWO, AnnotationEnumLiteral::THREE], but got 4.'); @@ -736,7 +736,7 @@ public function testAnnotationEnumeratorLiteralException() $parser->parse($docblock, $context); } - public function testAnnotationEnumInvalidTypeDeclarationException() + public function testAnnotationEnumInvalidTypeDeclarationException(): void { $this->expectException('\InvalidArgumentException'); $this->expectExceptionMessage('@Enum supports only scalar values "array" given.'); @@ -748,7 +748,7 @@ public function testAnnotationEnumInvalidTypeDeclarationException() $parser->parse($docblock); } - public function testAnnotationEnumInvalidLiteralDeclarationException() + public function testAnnotationEnumInvalidLiteralDeclarationException(): void { $this->expectException('\InvalidArgumentException'); $this->expectExceptionMessage('Undefined enumerator value "3" for literal "AnnotationEnumLiteral::THREE".'); @@ -866,7 +866,7 @@ public static function getConstantsProvider() /** * @dataProvider getConstantsProvider */ - public function testSupportClassConstants($docblock, $expected) + public function testSupportClassConstants($docblock, $expected): void { $parser = $this->createTestParser(); $parser->setImports(array( @@ -880,7 +880,7 @@ public function testSupportClassConstants($docblock, $expected) $this->assertEquals($expected, $annotation->value); } - public function testWithoutConstructorWhenIsNotDefaultValue() + public function testWithoutConstructorWhenIsNotDefaultValue(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}.'); @@ -897,7 +897,7 @@ public function testWithoutConstructorWhenIsNotDefaultValue() $parser->parse($docblock); } - public function testWithoutConstructorWhenHasNoProperties() + public function testWithoutConstructorWhenHasNoProperties(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}.'); @@ -913,7 +913,7 @@ public function testWithoutConstructorWhenHasNoProperties() $parser->parse($docblock); } - public function testAnnotationTargetSyntaxError() + public function testAnnotationTargetSyntaxError(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('Expected namespace separator or identifier, got \')\' at position 24 in class @Drupal\Tests\Component\Annotation\Doctrine\Fixtures\AnnotationWithTargetSyntaxError.'); @@ -930,7 +930,7 @@ public function testAnnotationTargetSyntaxError() $parser->parse($docblock,$context); } - public function testAnnotationWithInvalidTargetDeclarationError() + public function testAnnotationWithInvalidTargetDeclarationError(): void { $this->expectException('\InvalidArgumentException'); $this->expectExceptionMessage('Invalid Target "Foo". Available targets: [ALL, CLASS, METHOD, PROPERTY, FUNCTION, ANNOTATION]'); @@ -947,7 +947,7 @@ public function testAnnotationWithInvalidTargetDeclarationError() $parser->parse($docblock,$context); } - public function testAnnotationWithTargetEmptyError() + public function testAnnotationWithTargetEmptyError(): void { $this->expectException('\InvalidArgumentException'); $this->expectExceptionMessage('@Target expects either a string value, or an array of strings, "NULL" given.'); @@ -967,7 +967,7 @@ public function testAnnotationWithTargetEmptyError() /** * @group DDC-575 */ - public function testRegressionDDC575() + public function testRegressionDDC575(): void { $parser = $this->createTestParser(); @@ -1000,7 +1000,7 @@ public function testRegressionDDC575() /** * @group DDC-77 */ - public function testAnnotationWithoutClassIsIgnoredWithoutWarning() + public function testAnnotationWithoutClassIsIgnoredWithoutWarning(): void { $parser = new DocParser(); $parser->setIgnoreNotImportedAnnotations(true); @@ -1012,7 +1012,7 @@ public function testAnnotationWithoutClassIsIgnoredWithoutWarning() /** * @group DCOM-168 */ - public function testNotAnAnnotationClassIsIgnoredWithoutWarning() + public function testNotAnAnnotationClassIsIgnoredWithoutWarning(): void { $parser = new DocParser(); $parser->setIgnoreNotImportedAnnotations(true); @@ -1022,7 +1022,7 @@ public function testNotAnAnnotationClassIsIgnoredWithoutWarning() $this->assertCount(0, $result); } - public function testAnnotationDontAcceptSingleQuotes() + public function testAnnotationDontAcceptSingleQuotes(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('Expected PlainValue, got \'\'\' at position 10.'); @@ -1034,7 +1034,7 @@ public function testAnnotationDontAcceptSingleQuotes() /** * @group DCOM-41 */ - public function testAnnotationDoesNotThrowExceptionWhenAtSignIsNotFollowedByIdentifier() + public function testAnnotationDoesNotThrowExceptionWhenAtSignIsNotFollowedByIdentifier(): void { $parser = new DocParser(); $result = $parser->parse("'@'"); @@ -1045,7 +1045,7 @@ public function testAnnotationDoesNotThrowExceptionWhenAtSignIsNotFollowedByIden /** * @group DCOM-41 */ - public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifierInNestedAnnotation() + public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifierInNestedAnnotation(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); @@ -1056,7 +1056,7 @@ public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifier /** * @group DCOM-56 */ - public function testAutoloadAnnotation() + public function testAutoloadAnnotation(): void { self::assertFalse( class_exists('Drupal\Tests\Component\Annotation\Doctrine\Fixture\Annotation\Autoload', false), @@ -1089,7 +1089,7 @@ public function createTestParser() /** * @group DDC-78 */ - public function testSyntaxErrorWithContextDescription() + public function testSyntaxErrorWithContextDescription(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('Expected PlainValue, got \'\'\' at position 10 in class \Drupal\Tests\Component\Annotation\Doctrine\Name'); @@ -1101,7 +1101,7 @@ public function testSyntaxErrorWithContextDescription() /** * @group DDC-183 */ - public function testSyntaxErrorWithUnknownCharacters() + public function testSyntaxErrorWithUnknownCharacters(): void { $docblock = <<<DOCBLOCK /** @@ -1128,7 +1128,7 @@ class A { /** * @group DCOM-14 */ - public function testIgnorePHPDocThrowTag() + public function testIgnorePHPDocThrowTag(): void { $docblock = <<<DOCBLOCK /** @@ -1151,7 +1151,7 @@ class A { /** * @group DCOM-38 */ - public function testCastInt() + public function testCastInt(): void { $parser = $this->createTestParser(); @@ -1163,7 +1163,7 @@ public function testCastInt() /** * @group DCOM-38 */ - public function testCastNegativeInt() + public function testCastNegativeInt(): void { $parser = $this->createTestParser(); @@ -1175,7 +1175,7 @@ public function testCastNegativeInt() /** * @group DCOM-38 */ - public function testCastFloat() + public function testCastFloat(): void { $parser = $this->createTestParser(); @@ -1187,7 +1187,7 @@ public function testCastFloat() /** * @group DCOM-38 */ - public function testCastNegativeFloat() + public function testCastNegativeFloat(): void { $parser = $this->createTestParser(); @@ -1200,7 +1200,7 @@ public function testCastNegativeFloat() $this->assertIsFloat($annot->value); } - public function testSetValuesException() + public function testSetValuesException(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('[Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name'); @@ -1214,7 +1214,7 @@ public function testSetValuesException() $this->createTestParser()->parse($docblock, 'some class'); } - public function testInvalidIdentifierInAnnotation() + public function testInvalidIdentifierInAnnotation(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_IDENTIFIER or Doctrine\Common\Annotations\DocLexer::T_TRUE or Doctrine\Common\Annotations\DocLexer::T_FALSE or Doctrine\Common\Annotations\DocLexer::T_NULL, got \'3.42\' at position 5.'); @@ -1223,7 +1223,7 @@ public function testInvalidIdentifierInAnnotation() $parser->parse('@Foo\3.42'); } - public function testTrailingCommaIsAllowed() + public function testTrailingCommaIsAllowed(): void { $parser = $this->createTestParser(); @@ -1235,7 +1235,7 @@ public function testTrailingCommaIsAllowed() $this->assertEquals(array('Foo', 'Bar'), $annots[0]->value); } - public function testDefaultAnnotationValueIsNotOverwritten() + public function testDefaultAnnotationValueIsNotOverwritten(): void { $parser = $this->createTestParser(); @@ -1244,7 +1244,7 @@ public function testDefaultAnnotationValueIsNotOverwritten() $this->assertEquals('bar', $annots[0]->foo); } - public function testArrayWithColon() + public function testArrayWithColon(): void { $parser = $this->createTestParser(); @@ -1253,7 +1253,7 @@ public function testArrayWithColon() $this->assertEquals(array('foo' => 'bar'), $annots[0]->value); } - public function testInvalidContantName() + public function testInvalidContantName(): void { $this->expectException('\Doctrine\Common\Annotations\AnnotationException'); $this->expectExceptionMessage('[Semantical Error] Couldn\'t find constant foo.'); @@ -1265,7 +1265,7 @@ public function testInvalidContantName() /** * Tests parsing empty arrays. */ - public function testEmptyArray() + public function testEmptyArray(): void { $parser = $this->createTestParser(); @@ -1274,7 +1274,7 @@ public function testEmptyArray() $this->assertEquals(array('foo' => array()), $annots[0]->value); } - public function testKeyHasNumber() + public function testKeyHasNumber(): void { $parser = $this->createTestParser(); $annots = $parser->parse('@SettingsAnnotation(foo="test", bar2="test")'); @@ -1286,7 +1286,7 @@ public function testKeyHasNumber() /** * @group 44 */ - public function testSupportsEscapedQuotedValues() + public function testSupportsEscapedQuotedValues(): void { $result = $this->createTestParser()->parse('@Drupal\Tests\Component\Annotation\Doctrine\Name(foo="""bar""")'); diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php index 85a99f3c353b6ee12467905c74629937385bead0..ab5d242262d9262bce5912452efa8dbe3d9e95cd 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php +++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php @@ -34,7 +34,7 @@ class StaticReflectionParserTest extends TestCase { * ["UsedAsQualified", "Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\ExtraAttributes\\ExampleParentAttribute", true] * ["Qualified", "Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\ExtraAttributes\\ExampleParentAttribute", true] */ - public function testAttribute(string $class, string $attribute_class, bool $expected) { + public function testAttribute(string $class, string $attribute_class, bool $expected): void { $finder = MockFileFinder::create(__DIR__ . '/Fixtures/Attribute/' . $class . '.php'); $parser = new StaticReflectionParser('\\Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\Attribute\\' . $class, $finder); $this->assertSame($expected, $parser->hasClassAttribute($attribute_class), "'$class' has attribute that is a '$attribute_class'"); diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php index aeba0b743ad77042a4b4cc61c418a91149286a2d..8751bb468f46d608a246b85bcef8f31239dad415 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php +++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php @@ -28,7 +28,7 @@ protected function setUp(): void include __DIR__ .'/DCOM58Entity.php'; } - public function testIssueGlobalNamespace() + public function testIssueGlobalNamespace(): void { $docblock = "@Entity"; $parser = new DocParser(); @@ -42,7 +42,7 @@ public function testIssueGlobalNamespace() $this->assertInstanceOf("Drupal\Tests\Component\Annotation\Doctrine\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); } - public function testIssueNamespaces() + public function testIssueNamespaces(): void { $docblock = "@Entity"; $parser = new DocParser(); @@ -54,7 +54,7 @@ public function testIssueNamespaces() $this->assertInstanceOf("Drupal\Tests\Component\Annotation\Doctrine\Ticket\Doctrine\ORM\Entity", $annots[0]); } - public function testIssueMultipleNamespaces() + public function testIssueMultipleNamespaces(): void { $docblock = "@Entity"; $parser = new DocParser(); @@ -67,7 +67,7 @@ public function testIssueMultipleNamespaces() $this->assertInstanceOf("Drupal\Tests\Component\Annotation\Doctrine\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); } - public function testIssueWithNamespacesOrImports() + public function testIssueWithNamespacesOrImports(): void { $docblock = "@Entity"; $parser = new DocParser(); @@ -79,7 +79,7 @@ public function testIssueWithNamespacesOrImports() } - public function testIssueSimpleAnnotationReader() + public function testIssueSimpleAnnotationReader(): void { $reader = new SimpleAnnotationReader(); $reader->addNamespace('Drupal\Tests\Component\Annotation\Doctrine\Ticket\Doctrine\ORM\Mapping'); diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index 446a59c207f4b8cc3bfa4155ee6b45b9792d9fbf..6d179de5c4b62439fcf39b1019c0696232f0e5df 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -1196,7 +1196,7 @@ public function __construct($some_other_service = NULL, $some_parameter = NULL) * @param \Symfony\Component\DependencyInjection\ContainerInterface $container * The container to inject via setter injection. */ - public function setContainer(ContainerInterface $container) { + public function setContainer(ContainerInterface $container): void { $this->container = $container; } @@ -1236,7 +1236,7 @@ public function getSomeParameter() { * @param string $some_other_parameter * The setter injected parameter. */ - public function setOtherConfigParameter($some_other_parameter) { + public function setOtherConfigParameter($some_other_parameter): void { $this->someOtherParameter = $some_other_parameter; } diff --git a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php index ab600c4a6f00d4428061cad4b7449cf711ea776d..81810093dd00d2a906d138b666e8c17c77e40727 100644 --- a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php +++ b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php @@ -84,7 +84,7 @@ public function testDepthFirstSearch(): void { /** * Normalizes a graph. * - * @param $graph + * @param array $graph * A graph array processed by \Drupal\Component\Graph\Graph::searchAndSort() * * @return array @@ -186,9 +186,9 @@ protected function assertWeights(array $graph, array $expected_orders): void { /** * Helper function to output vertices as comma-separated list. * - * @param $paths + * @param array $paths * An array containing a list of vertices. - * @param $keys + * @param bool $keys * (optional) Whether to output the keys of $paths instead of the values. */ protected function displayArray($paths, $keys = FALSE): string { diff --git a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php index d34511948954e4d5b777bf61d00c1fbc90271cb2..7962148796e07109789d8b903ee1aa8481153459 100644 --- a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php @@ -66,7 +66,7 @@ public function testCount(): void { * @param string $error_message * The error message. */ - public function errorHandler($error_number, $error_message) { + public function errorHandler($error_number, $error_message): void { $this->lastErrorNumber = $error_number; $this->lastErrorMessage = $error_message; } diff --git a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php index 23ddfea01197f67fb389df92cc5c10239c215480..21e8830fa89cdf69fc12304aa17ca3007da95390 100644 --- a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php +++ b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php @@ -19,9 +19,9 @@ class PlainTextOutputTest extends TestCase { /** * Tests ::renderFromHtml(). * - * @param $expected + * @param string $expected * The expected formatted value. - * @param $string + * @param string $string * A string to be formatted. * @param array $args * (optional) An associative array of replacements to make. Defaults to diff --git a/core/tests/Drupal/Tests/Component/Utility/FilterArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/FilterArrayTest.php new file mode 100644 index 0000000000000000000000000000000000000000..289b19bfe824ce9a9ab6f503ac03fdd13a452cd6 --- /dev/null +++ b/core/tests/Drupal/Tests/Component/Utility/FilterArrayTest.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\Component\Utility; + +use Drupal\Component\Utility\FilterArray; +use PHPUnit\Framework\TestCase; + +/** + * Test filter array functions. + * + * @group Utility + * + * @coversDefaultClass \Drupal\Component\Utility\FilterArray + */ +class FilterArrayTest extends TestCase { + + /** + * Tests removing empty strings. + * + * @dataProvider providerRemoveEmptyStrings + * @covers ::removeEmptyStrings + */ + public function testRemoveEmptyStrings(array $values, array $expected): void { + $this->assertEquals($expected, array_values(FilterArray::removeEmptyStrings($values))); + } + + /** + * Data provider for testRemoveEmptyStrings(). + * + * @see testRemoveEmptyStrings() + */ + public static function providerRemoveEmptyStrings(): \Generator { + yield 'strings' => [ + ['', ' ', '0', 'true', 'false'], + [' ', '0', 'true', 'false'], + ]; + yield 'integers' => [ + [-1, 0, 1], + [-1, 0, 1], + ]; + yield 'null, true, false' => [ + [NULL, TRUE, FALSE], + [TRUE], + ]; + + $stringable = new class implements \Stringable { + + public function __toString(): string { + return 'foo'; + } + + }; + + yield 'non-scalar' => [ + [new $stringable()], + [new $stringable()], + ]; + } + +} diff --git a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php index 7d179e3145b34cf8f81df71258a08fa7172f9364..e67eb9a4d1639f790ada49c1202dc6b5953c489c 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php @@ -157,4 +157,84 @@ public static function providerTestScaleDimensions() { return $tests; } + /** + * @covers ::getKeywordOffset + */ + public function testInvalidGetKeywordOffset(): void { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid anchor \'foo\' provided to getKeywordOffset()'); + Image::getKeywordOffset('foo', 0, 0); + } + + /** + * @covers ::getKeywordOffset + * + * @dataProvider providerTestGetKeywordOffset + */ + public function testGetKeywordOffset(array $input, int $expected): void { + $this->assertSame($expected, Image::getKeywordOffset($input['anchor'], $input['current'], $input['new'])); + } + + /** + * Provides data for testGetKeywordOffset(). + * + * @return \Generator + * Test scenarios. + * + * @see testGetKeywordOffset() + */ + public static function providerTestGetKeywordOffset(): \Generator { + yield "'left' => return 0" => [ + 'input' => [ + 'anchor' => 'left', + 'current' => 100, + 'new' => 20, + ], + 'expected' => 0, + ]; + yield "'top' => return 0" => [ + 'input' => [ + 'anchor' => 'top', + 'current' => 100, + 'new' => 20, + ], + 'expected' => 0, + ]; + + yield "'right' => return (current - new)" => [ + 'input' => [ + 'anchor' => 'right', + 'current' => 100, + 'new' => 20, + ], + 'expected' => 80, + ]; + yield "'bottom' => return (current - new)" => [ + 'input' => [ + 'anchor' => 'bottom', + 'current' => 100, + 'new' => 30, + ], + 'expected' => 70, + ]; + + yield "a) 'center' => return (current - new)/2" => [ + 'input' => [ + 'anchor' => 'center', + 'current' => 100, + 'new' => 20, + ], + 'expected' => 40, + ]; + yield "b) 'center' => return (current - new)/2" => [ + 'input' => [ + 'anchor' => 'center', + 'current' => 100, + 'new' => 91, + ], + 'expected' => 5, + ]; + + } + } diff --git a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php index 16756235cfeb7330bc3503cf5c5cd69b8d2524fa..f015973b2916bf651980c69c776c738d64b8c18f 100644 --- a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php @@ -95,17 +95,17 @@ public static function providerTestExport() { return [ // Array. [ - 'array()', + '[]', [], ], [ // non-associative. - "array(\n 1,\n 2,\n 3,\n 4,\n)", + "[\n 1,\n 2,\n 3,\n 4,\n]", [1, 2, 3, 4], ], [ // associative. - "array(\n 'a' => 1,\n)", + "[\n 'a' => 1,\n]", ['a' => 1], ], // Bool. @@ -132,12 +132,12 @@ public static function providerTestExport() { '\\', ], [ - // Double-quote " + // Double-quote ". "'\"'", "\"", ], [ - // Single-quote ' + // Single-quote '. '"\'"', "'", ], @@ -149,7 +149,7 @@ public static function providerTestExport() { // Object. [ // A stdClass object. - '(object) array()', + '(object) []', new \stdClass(), ], [ diff --git a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php index 20862c77e43e5122a337c7175c6e5e29a405300e..fe6222df3cefcac84a366582349622570ef930e6 100644 --- a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php @@ -519,7 +519,7 @@ public static function providerCheckException() { /** * Adds a default access check service to the container and the access manager. */ - protected function setupAccessChecker() { + protected function setupAccessChecker(): void { $this->container->register('test_access_default', DefaultAccessCheck::class); $this->checkProvider->addCheckService('test_access_default', 'access', ['_access']); } diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php index 9282dc94d487dc0f0d0412c73f80b74d9c52f8c9..23b35e7589ac70f4fcb0dd19b8a93740fd1a43d1 100644 --- a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php @@ -65,7 +65,7 @@ protected function setUp(): void { /** * Set up default expectations on the mocks. */ - protected function setupDefaultExpectations() { + protected function setupDefaultExpectations(): void { $key = Crypt::randomBytesBase64(); $this->privateKey->expects($this->any()) ->method('get') diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index 13ba2d41ad3e96d99cd616a6109d5a19df431d97..830772284ebb19087be1792fa197b54019f8c99e 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -68,14 +68,14 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * The mocked stream wrapper manager. * - * @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface||\PHPUnit\Framework\MockObject\MockObject + * @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $streamWrapperManager; /** * The mocked libraries directory file finder. * - * @var \Drupal\Core\Asset\LibrariesDirectoryFileFinder||\PHPUnit\Framework\MockObject\MockObject + * @var \Drupal\Core\Asset\LibrariesDirectoryFileFinder|\PHPUnit\Framework\MockObject\MockObject */ protected $librariesDirectoryFileFinder; @@ -875,7 +875,7 @@ protected function fileValidUri($source) { return $this->validUris[$source] ?? FALSE; } - public function setFileValidUri($source, $valid) { + public function setFileValidUri($source, $valid): void { $this->validUris[$source] = $valid; } diff --git a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php index 62c4820296cbdad7c4e4186c31c87da9e4ced155..6f47852e4eec799c8de94eeae3a84195b3637ebb 100644 --- a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php +++ b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php @@ -16,7 +16,6 @@ * @group Batch */ class PercentagesTest extends UnitTestCase { - protected $testCases = []; /** * @dataProvider providerTestPercentages diff --git a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php index de4625ccf65bc15bcccaf5fe80fa68f82dffe577..279f92729a2d4980fc88b8e762b411f85ad384f7 100644 --- a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php @@ -635,7 +635,7 @@ protected function getSortedCacheId($cache_id_parts): string { * @param \Drupal\Core\Cache\CacheableMetadata $initial_cacheability * The initial cacheability that should be used. */ - protected function setVariationCacheItem($data, CacheableMetadata $cacheability, CacheableMetadata $initial_cacheability) { + protected function setVariationCacheItem($data, CacheableMetadata $cacheability, CacheableMetadata $initial_cacheability): void { $this->variationCache->set($this->cacheKeys, $data, $cacheability, $initial_cacheability); } @@ -649,7 +649,7 @@ protected function setVariationCacheItem($data, CacheableMetadata $cacheability, * @param \Drupal\Core\Cache\CacheableMetadata $initial_cacheability * The initial cacheability that should be used. */ - protected function assertVariationCacheItem($data, CacheableMetadata $cacheability, CacheableMetadata $initial_cacheability) { + protected function assertVariationCacheItem($data, CacheableMetadata $cacheability, CacheableMetadata $initial_cacheability): void { $cache_item = $this->variationCache->get($this->cacheKeys, $initial_cacheability); $this->assertNotFalse($cache_item, 'Variable data was stored and retrieved successfully.'); $this->assertEquals($data, $cache_item->data, 'Variable cache item contains the right data.'); @@ -662,7 +662,7 @@ protected function assertVariationCacheItem($data, CacheableMetadata $cacheabili * @param \Drupal\Core\Cache\CacheableMetadata $initial_cacheability * The initial cacheability that should be used. */ - protected function assertVariationCacheMiss(CacheableMetadata $initial_cacheability) { + protected function assertVariationCacheMiss(CacheableMetadata $initial_cacheability): void { $this->assertFalse($this->variationCache->get($this->cacheKeys, $initial_cacheability), 'Nothing could be retrieved for the active cache contexts.'); } @@ -677,7 +677,7 @@ protected function assertVariationCacheMiss(CacheableMetadata $initial_cacheabil * (optional) The cacheability that should have been used. Does not apply * when checking for cache redirects. */ - protected function assertCacheBackendItem(string $cid, $data, ?CacheableMetadata $cacheability = NULL) { + protected function assertCacheBackendItem(string $cid, $data, ?CacheableMetadata $cacheability = NULL): void { $cache_backend_item = $this->memoryBackend->get($cid); $this->assertNotFalse($cache_backend_item, 'The data was stored and retrieved successfully.'); $this->assertEquals($data, $cache_backend_item->data, 'Cache item contains the right data.'); diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php index 07a3740f36a7b419e846bd0a9a98cac07003a50e..1cfe3e0ea17c1ff50b97ddbf63c55774e1fbf518 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php @@ -155,6 +155,7 @@ public function testQuickStartInstallAndServerCommands(): void { 'core/scripts/drupal', 'install', 'testing', + "--password='secret'", "--site-name='Test site {$this->testDb->getDatabasePrefix()}'", ]; $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); @@ -162,6 +163,7 @@ public function testQuickStartInstallAndServerCommands(): void { $result = $install_process->run(); // The progress bar uses STDERR to write messages. $this->assertStringContainsString('Congratulations, you installed Drupal!', $install_process->getErrorOutput()); + $this->assertStringContainsString("Password: 'secret'", $install_process->getOutput()); $this->assertSame(0, $result); // Run the PHP built-in webserver. diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php index 03c2aa85c9ffa13656261766b0b877cd57ada9ec..ea6f6a737834a89db6407729b93822d566d09064 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php @@ -733,7 +733,7 @@ class TestConfigEntityWithPluginCollections extends ConfigEntityBaseWithPluginCo protected array $the_plugin_collection_config = []; - public function setPluginManager(PluginManagerInterface $plugin_manager) { + public function setPluginManager(PluginManagerInterface $plugin_manager): void { $this->pluginManager = $plugin_manager; } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php index a45e3d10bd2a3eb8c2f82ed3f7c645197113861b..35ffd1ecc5ceaf7a6d5a83db138f4d3b32cddd89 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\Core\Config\Entity; use Drupal\Core\Entity\EntityDisplayBase; +use Drupal\Core\Entity\EntityType; use Drupal\Tests\UnitTestCase; use PHPUnit\Framework\MockObject\MockObject; @@ -25,6 +26,7 @@ class EntityDisplayBaseTest extends UnitTestCase { */ protected function setUp(): void { parent::setUp(); + $this->entityDisplay = $this->getMockBuilder(EntityDisplayBaseMockableClass::class) ->disableOriginalConstructor() ->onlyMethods([]) @@ -91,4 +93,13 @@ public function getRenderer($field_name) { return NULL; } + public function getEntityType() { + return new EntityType([ + 'id' => 'entity_view_display', + 'entity_keys' => [ + 'id' => 'id', + ], + ]); + } + } diff --git a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php index 7d5dc0eed6bfc8be4e31dc1bcc2afcede44cf8a1..13342b0112c58b8613b3ce7a74f18fb3f842f400 100644 --- a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php @@ -183,7 +183,7 @@ public function testEncodeDecode(): void { * @param array $config * The config keys, keyed by the collection. */ - protected function setRandomFixtureConfig($config) { + protected function setRandomFixtureConfig($config): void { // Erase previous fixture. foreach (array_merge([StorageInterface::DEFAULT_COLLECTION], $this->memory->getAllCollectionNames()) as $collection) { $this->memory->createCollection($collection)->deleteAll(); diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php index a9f0a881ce120f9e32ac4fc40101fcdf69d13651..899f3ba0bc0a674b4340bc5732ce5b584beac009 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php @@ -294,7 +294,7 @@ public function testDifferentCollections(): void { * @param string $prefix * The prefix for random names to make sure they are unique. */ - protected function generateRandomData(StorageInterface $storage, string $prefix = '') { + protected function generateRandomData(StorageInterface $storage, string $prefix = ''): void { $generator = $this->getRandomGenerator(); for ($i = 0; $i < rand(2, 10); $i++) { $storage->write($prefix . $this->randomMachineName(), (array) $generator->object()); diff --git a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php index ef2e486a54d77206e7eff8cd2407147c72337cc7..8a64287ea0fde2730a8ef532f47fa63fdb119b12 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php @@ -101,7 +101,7 @@ protected static function toArray(MemoryStorage $storage) { * @param bool $collections * Add random collections or not. */ - protected function generateRandomData(StorageInterface $storage, $collections = TRUE) { + protected function generateRandomData(StorageInterface $storage, $collections = TRUE): void { $generator = $this->getRandomGenerator(); for ($i = 0; $i < rand(2, 10); $i++) { $storage->write($this->randomMachineName(), (array) $generator->object()); @@ -179,7 +179,7 @@ class TestStorage extends MemoryStorage { * This method allows us to create invalid configurations. The method * ::write() only allows values of the type array. */ - public function setValue($name, $value) { + public function setValue($name, $value): void { $this->config[$this->collection][$name] = $value; } diff --git a/core/tests/Drupal/Tests/Core/CronTest.php b/core/tests/Drupal/Tests/Core/CronTest.php index 6326f4c38d6c6284936382b55ec5f24d871e8d6d..40ae8fb1743e57c98aaac43441ec16e114663c95 100644 --- a/core/tests/Drupal/Tests/Core/CronTest.php +++ b/core/tests/Drupal/Tests/Core/CronTest.php @@ -167,7 +167,7 @@ protected function setUp(): void { /** * Resets the testing state. */ - protected function resetTestingState() { + protected function resetTestingState(): void { $this->queue->deleteQueue(); $this->state->set('cron_test.message_logged', FALSE); $this->state->set('cron_test.requeue_count', NULL); diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php index c89943346579c1e9e6733b863451164dc02b5524..0d8727710d3646cf15c10e1845acb3053ead4a9b 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php @@ -100,7 +100,7 @@ public function testProcess(): void { * This is necessary because the container clone does not clone the parameter * bag so the setParameter() call effects the parent container as well. * - * @param $service + * @param \Symfony\Component\DependencyInjection\Definition $service * The service definition. * * @return \Symfony\Component\DependencyInjection\ContainerBuilder @@ -120,7 +120,7 @@ protected function getSqliteContainer($service) { * This is necessary because the container clone does not clone the parameter * bag so the setParameter() call effects the parent container as well. * - * @param $service + * @param \Symfony\Component\DependencyInjection\Definition $service * The service definition. * * @return \Symfony\Component\DependencyInjection\ContainerBuilder @@ -138,7 +138,7 @@ protected function getMysqlContainer($service) { * This is necessary because the container clone does not clone the parameter * bag so the setParameter() call effects the parent container as well. * - * @param $service + * @param \Symfony\Component\DependencyInjection\Definition $service * The service definition. * * @return \Symfony\Component\DependencyInjection\ContainerBuilder diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php index b4ed2ca57c3a42375ff822b771fc0677e4998466..717026fe3f46b7df8427b4ca520cd84453f42d89 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php @@ -200,6 +200,38 @@ public static function providerTestExceptions() { YAML, 'The service file "vfs://drupal/modules/example/example.yml" is not valid: it contains invalid root key(s) "do not". Services have to be added under "services" and Parameters under "parameters".', ], + 'decorates must be without @' => [<<<YAML + services: + example_service_1: + class: \Drupal\Core\ExampleClass + example_decoration: + class: \Drupal\Core\ExampleClass + decorates: "@example_service_1" + YAML, + 'The value of the "decorates" option for the "example_decoration" service must be the id of the service without the "@" prefix (replace "@example_service_1" with "example_service_1").', + ], + 'decorates_on_invalid may not be "null" with quotes' => [<<<YAML + services: + example_service_1: + class: \Drupal\Core\ExampleClass + example_decoration: + class: \Drupal\Core\ExampleClass + decorates: example_service_1 + decoration_on_invalid: "null" + YAML, + 'Invalid value "null" for attribute "decoration_on_invalid" on service "example_decoration". Did you mean null (without quotes) in "vfs://drupal/modules/example/example.yml"?', + ], + 'decoration_on_invalid must be valid' => [<<<YAML + services: + example_service_1: + class: \Drupal\Core\ExampleClass + example_decoration: + class: \Drupal\Core\ExampleClass + decorates: example_service_1 + decoration_on_invalid: foo + YAML, + 'Invalid value "foo" for attribute "decoration_on_invalid" on service "example_decoration". Did you mean "exception", "ignore" or null in "vfs://drupal/modules/example/example.yml"?', + ], ]; } diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php index e01add0147746f34ae011fa5eb0e1025632f6200..7018c36463a1d30cf71cf3ed6710c36ad677ac85 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -162,14 +162,14 @@ class FakeAutoloader { * @param bool $prepend * Whether to prepend the autoloader or not */ - public function register($prepend = FALSE) { + public function register($prepend = FALSE): void { spl_autoload_register([$this, 'loadClass'], TRUE, $prepend); } /** * Deregisters this instance as an autoloader. */ - public function unregister() { + public function unregister(): void { spl_autoload_unregister([$this, 'loadClass']); } diff --git a/core/tests/Drupal/Tests/Core/DrupalTest.php b/core/tests/Drupal/Tests/Core/DrupalTest.php index a009151df0b16eae54b8215f90a11588b18ac768..a7394a51d5c5e7b63d3a8258b75cfead39500013 100644 --- a/core/tests/Drupal/Tests/Core/DrupalTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalTest.php @@ -466,7 +466,7 @@ public function testPhpConstants(): void { * @param mixed $return * The value to return from the mocked container get() method. */ - protected function setMockContainerService($service_name, $return = NULL) { + protected function setMockContainerService($service_name, $return = NULL): void { $expects = $this->container->expects($this->once()) ->method('get') ->with($service_name) diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php index 8a56ad19a8a1e4037cd98897308c9ae853f93b65..e573bf54d350fbf0a787150df1659cb76dcccab2 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @@ -190,7 +190,7 @@ protected function setUp(): void { * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions * (optional) An array of entity type definitions. */ - protected function setUpEntityTypeDefinitions($definitions = []) { + protected function setUpEntityTypeDefinitions($definitions = []): void { foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php index 1c34d09d194a36bae690d13d4ec99f6089e38ffe..f39f861070c90a7c80d809e57a677e290e32fec2 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php @@ -439,7 +439,7 @@ public function testSetRouteOptionsWithEntityAddFormRoute(): void { /** * Creates the entity type manager mock returning entity type objects. */ - protected function setupEntityTypes() { + protected function setupEntityTypes(): void { $definition = $this->createMock('Drupal\Core\Entity\EntityTypeInterface'); $definition->expects($this->any()) ->method('getClass') diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php index 55742942e03ca524ed365f9091fc7b42f38184af..2a3f2c8eb786f83ce7f0baa953effbf681896e2e 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php @@ -112,7 +112,7 @@ protected function setUp(): void { * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions * (optional) An array of entity type definitions. */ - protected function setUpEntityTypeDefinitions($definitions = []) { + protected function setUpEntityTypeDefinitions($definitions = []): void { foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php index 3cd018285c0e1cf892b085c0a0c2457a7a8a61a9..ab84e16880dc934fdab71556af3079671e0ab6fb 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php @@ -95,7 +95,7 @@ protected function setUp(): void { * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions * (optional) An array of entity type definitions. */ - protected function setUpEntityTypeDefinitions($definitions = []) { + protected function setUpEntityTypeDefinitions($definitions = []): void { $class = get_class($this->createMock(EntityInterface::class)); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called @@ -486,7 +486,7 @@ class TestEntityTypeManager extends EntityTypeManager { * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface $discovery * The discovery object. */ - public function setDiscovery(DiscoveryInterface $discovery) { + public function setDiscovery(DiscoveryInterface $discovery): void { $this->discovery = $discovery; } diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php index a5d46ebb761d815de2870ec122cba2b1c6750e82..9d410bd17dad0c2d4325124367a00ea5ab62a44f 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php @@ -61,7 +61,7 @@ protected function setUp(): void { * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions * (optional) An array of entity type definitions. */ - protected function setUpEntityTypeDefinitions($definitions = []) { + protected function setUpEntityTypeDefinitions($definitions = []): void { foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php index 858efd23227592ddb912ba3837e5423ec880ff04..c1c1f58894e0264b8a09bc63d7034da79da447d9 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php @@ -7,7 +7,6 @@ use Drupal\Core\Access\AccessResult; use Drupal\Core\Cache\Cache; use Drupal\Core\DependencyInjection\ContainerBuilder; -use Drupal\Core\Entity\EntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeRepositoryInterface; @@ -127,7 +126,7 @@ protected function setUp(): void { $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator->reveal()); \Drupal::setContainer($container); - $this->entity = new EntityBaseTest($this->values, $this->entityTypeId); + $this->entity = new StubEntityBase($this->values, $this->entityTypeId); } /** @@ -231,7 +230,7 @@ public function testLanguage(): void { /** * Setup for the tests of the ::load() method. */ - public function setupTestLoad() { + public function setupTestLoad(): void { // Base our mocked entity on a real entity class so we can test if calling // EntityBase::load() on the base class will bubble up to an actual entity. $this->entityTypeId = 'entity_test_mul'; @@ -605,11 +604,3 @@ public function testCacheMaxAge(): void { } } - -class EntityBaseTest extends EntityBase { - public $id; - public $langcode; - public $uuid; - public $label; - -} diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php index 378efcbb5937038fcfdcbc1d7491514190538190..40ffea78bd74ced904a4f3e2cc99128a669adeaf 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php @@ -5,16 +5,15 @@ namespace Drupal\Tests\Core\Entity; use Drupal\Core\DependencyInjection\ContainerBuilder; -use Drupal\Core\Entity\EntityBase; use Drupal\Core\Entity\EntityMalformedException; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\Exception\UndefinedLinkTemplateException; -use Drupal\Core\Entity\RevisionableInterface; use Drupal\Core\GeneratedUrl; use Drupal\Core\Routing\UrlGeneratorInterface; use Drupal\Core\Url; use Drupal\Tests\UnitTestCase; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; /** @@ -96,7 +95,7 @@ class EntityUrlTest extends UnitTestCase { * @covers ::toUrl */ public function testToUrlNoId(): void { - $entity = $this->getEntity(UrlTestEntity::class, []); + $entity = $this->getEntity(StubEntityBase::class, []); $this->expectException(EntityMalformedException::class); $this->expectExceptionMessage('The "' . static::ENTITY_TYPE_ID . '" entity cannot have a URI as it does not have an ID'); @@ -113,7 +112,7 @@ public function testToUrlNoId(): void { */ public function testToUrlDefaultException(): void { $values = ['id' => static::ENTITY_ID]; - $entity = $this->getEntity(UrlTestEntity::class, $values); + $entity = $this->getEntity(StubEntityBase::class, $values); $this->entityType->getUriCallback()->willReturn(NULL); $this->expectException(UndefinedLinkTemplateException::class); @@ -131,7 +130,7 @@ public function testToUrlDefaultException(): void { */ public function testToUrlDefaultFallback(): void { $values = ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]; - $entity = $this->getEntity(UrlTestEntity::class, $values); + $entity = $this->getEntity(StubEntityBase::class, $values); $this->registerLinkTemplate('edit-form'); /** @var \Drupal\Core\Url $url */ $url = $entity->toUrl(); @@ -168,7 +167,7 @@ public function testToUrlDefaultFallback(): void { */ public function testToUrlLinkTemplates($link_template, $expected_route_name): void { $values = ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]; - $entity = $this->getEntity(UrlTestEntity::class, $values); + $entity = $this->getEntity(StubEntityBase::class, $values); $this->registerLinkTemplate($link_template); /** @var \Drupal\Core\Url $url */ @@ -216,7 +215,8 @@ public static function providerTestToUrlLinkTemplates() { */ public function testToUrlLinkTemplateRevision(bool $is_default_revision, string $link_template, string $expected_route_name, array $expected_route_parameters): void { $values = ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]; - $entity = $this->getEntity(RevisionableEntity::class, $values); + $entity = $this->getEntity(StubRevisionableEntity::class, $values, ['getRevisionId', 'isDefaultRevision']); + assert($entity instanceof StubRevisionableEntity); $entity->method('getRevisionId')->willReturn(static::REVISION_ID); $entity->method('isDefaultRevision')->willReturn($is_default_revision); $this->registerLinkTemplate($link_template); @@ -265,7 +265,7 @@ public static function providerTestToUrlLinkTemplateRevision(): array { * @covers ::urlRouteParameters */ public function testToUrlLinkTemplateNoId($link_template, $expected_route_name): void { - $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]); + $entity = $this->getEntity(StubEntityBase::class, ['id' => static::ENTITY_ID]); $this->registerLinkTemplate($link_template); /** @var \Drupal\Core\Url $url */ @@ -310,7 +310,7 @@ public static function providerTestToUrlLinkTemplateNoId() { */ public function testToUrlLinkTemplateAddForm(bool $has_bundle_key, ?string $bundle_entity_type, string|false $bundle_key, array $expected_route_parameters): void { $values = ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]; - $entity = $this->getEntity(UrlTestEntity::class, $values); + $entity = $this->getEntity(StubEntityBase::class, $values); $this->entityType->hasKey('bundle')->willReturn($has_bundle_key); $this->entityType->getBundleEntityType()->willReturn($bundle_entity_type); $this->entityType->getKey('bundle')->willReturn($bundle_key); @@ -355,7 +355,7 @@ public static function providerTestToUrlLinkTemplateAddForm(): array { * @covers ::linkTemplates */ public function testToUrlUriCallbackUndefined(array $bundle_info, $uri_callback): void { - $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]); + $entity = $this->getEntity(StubEntityBase::class, ['id' => static::ENTITY_ID]); $this->registerBundleInfo($bundle_info); $this->entityType->getUriCallback()->willReturn($uri_callback); @@ -396,7 +396,7 @@ public static function providerTestToUrlUriCallbackUndefined() { * @dataProvider providerTestToUrlUriCallback */ public function testToUrlUriCallback(array $bundle_info, ?\Closure $uri_callback): void { - $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]); + $entity = $this->getEntity(StubEntityBase::class, ['id' => static::ENTITY_ID, 'langcode' => $this->langcode]); $this->registerBundleInfo($bundle_info); $this->entityType->getUriCallback()->willReturn($uri_callback); @@ -433,7 +433,7 @@ public static function providerTestToUrlUriCallback(): array { * @covers ::uriRelationships */ public function testUriRelationships(): void { - $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]); + $entity = $this->getEntity(StubEntityBase::class, ['id' => static::ENTITY_ID]); $container_builder = new ContainerBuilder(); $url_generator = $this->createMock(UrlGeneratorInterface::class); @@ -462,18 +462,18 @@ public function testUriRelationships(): void { /** * Returns a mock entity for testing. * - * @param string $class - * The class name to mock. Should be \Drupal\Tests\Core\Entity\UrlTestEntity + * @param class-string<\Drupal\Tests\Core\Entity\StubEntityBase> $class + * The class name to mock. Should be \Drupal\Tests\Core\Entity\StubEntityBase * or a subclass. - * @param array $values + * @param array<string,int|string> $values * An array of entity values to construct the mock entity with. - * @param array $methods - * (optional) An array of additional methods to mock on the entity object. + * @param list<string> $methods + * (optional) A list of additional methods to mock on the entity object. * The getEntityType() and entityTypeBundleInfo() methods are always mocked. * - * @return \Drupal\Tests\Core\Entity\UrlTestEntity|\PHPUnit\Framework\MockObject\MockObject + * @return \Drupal\Tests\Core\Entity\StubEntityBase&\PHPUnit\Framework\MockObject\MockObject */ - protected function getEntity($class, array $values, array $methods = []) { + protected function getEntity(string $class, array $values, array $methods = []): StubEntityBase&MockObject { $methods = array_merge($methods, ['getEntityType', 'entityTypeBundleInfo']); // Prophecy does not allow prophesizing abstract classes while actually @@ -482,7 +482,7 @@ protected function getEntity($class, array $values, array $methods = []) { $entity = $this->getMockBuilder($class) ->setConstructorArgs([$values, static::ENTITY_TYPE_ID]) ->onlyMethods($methods) - ->getMockForAbstractClass(); + ->getMock(); $this->entityType = $this->prophesize(EntityTypeInterface::class); $this->entityType->getLinkTemplates()->willReturn([]); @@ -502,7 +502,7 @@ protected function getEntity($class, array $values, array $methods = []) { * The expected route name of the generated URL. * @param array $expected_route_parameters * The expected route parameters of the generated URL. - * @param \Drupal\Tests\Core\Entity\UrlTestEntity|\PHPUnit\Framework\MockObject\MockObject $entity + * @param \Drupal\Tests\Core\Entity\StubEntityBase|\PHPUnit\Framework\MockObject\MockObject $entity * The entity that is expected to be set as a URL option. * @param bool $has_language * Whether or not the URL is expected to have a language option. @@ -530,7 +530,7 @@ protected function assertUrl(string $expected_route_name, array $expected_route_ * @param string $link_template * The link template to register. */ - protected function registerLinkTemplate($link_template) { + protected function registerLinkTemplate($link_template): void { $link_templates = [ // The path is actually never used because we never invoke the URL // generator but perform assertions on the URL object directly. @@ -545,20 +545,10 @@ protected function registerLinkTemplate($link_template) { * @param array $bundle_info * The bundle information to register. */ - protected function registerBundleInfo($bundle_info) { + protected function registerBundleInfo($bundle_info): void { $this->entityTypeBundleInfo ->getBundleInfo(static::ENTITY_TYPE_ID) ->willReturn([static::ENTITY_TYPE_ID => $bundle_info]); } } - -class UrlTestEntity extends EntityBase { - public $id; - public $langcode; - public $uuid; - public $label; - -} - -abstract class RevisionableEntity extends UrlTestEntity implements RevisionableInterface {} diff --git a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php index d7c944852d20e3764253ed4506c8c99352383f60..20bfeff8b3c386882ac4eb79a915ced81a84de76 100644 --- a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php @@ -14,9 +14,10 @@ use Drupal\Core\Entity\EntityMalformedException; use Drupal\Core\Entity\EntityStorageException; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage; use Drupal\Core\Language\Language; use Drupal\Tests\UnitTestCase; -use Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage; +use PHPUnit\Framework\MockObject\MockObject; /** * @coversDefaultClass \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage @@ -101,7 +102,7 @@ protected function setUp(): void { * @param string $uuid_key * (optional) The entity key used for the UUID. Defaults to 'uuid'. */ - protected function setUpKeyValueEntityStorage($uuid_key = 'uuid') { + protected function setUpKeyValueEntityStorage($uuid_key = 'uuid'): void { $this->entityType->expects($this->atLeastOnce()) ->method('getKey') ->willReturnMap([ @@ -604,17 +605,17 @@ public function testDeleteNothing(): void { * Creates an entity with specific methods mocked. * * @param string $class - * (optional) The concrete entity class to mock. Defaults to - * 'Drupal\Core\Entity\EntityBase'. + * (optional) The concrete entity class to mock. Defaults to a stub of + * \Drupal\Core\Entity\EntityBase defined for test purposes. * @param array $arguments * (optional) Arguments to pass to the constructor. An empty set of values * and an entity type ID will be provided. * @param array $methods * (optional) The methods to mock. * - * @return \Drupal\Core\Entity\EntityInterface|\PHPUnit\Framework\MockObject\MockObject + * @return \Drupal\Core\Entity\EntityInterface&\PHPUnit\Framework\MockObject\MockObject */ - public function getMockEntity($class = EntityBaseTest::class, array $arguments = [], $methods = []) { + protected function getMockEntity(string $class = EntityBaseTest::class, array $arguments = [], array $methods = []): EntityInterface&MockObject { // Ensure the entity is passed at least an array of values and an entity // type ID if (!isset($arguments[0])) { @@ -623,7 +624,10 @@ public function getMockEntity($class = EntityBaseTest::class, array $arguments = if (!isset($arguments[1])) { $arguments[1] = 'test_entity_type'; } - return $this->getMockForAbstractClass($class, $arguments, '', TRUE, TRUE, TRUE, $methods); + return $this->getMockBuilder($class) + ->setConstructorArgs($arguments) + ->onlyMethods($methods) + ->getMock(); } } diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index e37afd82ab23af3e5556e9c27c1094de710db95b..56af7a64cd16cf08b39ac093ed2fad11c812400d 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -1337,7 +1337,7 @@ public function testRequiresEntityStorageSchemaChanges(bool $requires_change, bo * (optional) An associative array describing the expected entity schema to * be created. Defaults to expecting nothing. */ - protected function setUpStorageSchema(array $expected = []) { + protected function setUpStorageSchema(array $expected = []): void { $this->entityTypeManager ->getDefinition($this->entityType->id()) ->willReturn($this->entityType); @@ -1419,7 +1419,7 @@ protected function setUpStorageSchema(array $expected = []) { * The schema array of the field definition, as returned from * FieldStorageDefinitionInterface::getSchema(). */ - public function setUpStorageDefinition($field_name, array $schema) { + public function setUpStorageDefinition($field_name, array $schema): void { $this->storageDefinitions[$field_name] = $this->createMock('Drupal\Tests\Core\Field\TestBaseFieldDefinitionInterface'); $this->storageDefinitions[$field_name]->expects($this->any()) ->method('isBaseField') diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 3b36cdb3a345199c341afbcf0cba503b440b85a2..fe60e94d80c2382dd3792c342d9f1673fd2d8e01 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -1156,7 +1156,7 @@ protected function mockFieldDefinitions(array $field_names, $methods = []): arra /** * Sets up the content entity database storage. */ - protected function setUpEntityStorage() { + protected function setUpEntityStorage(): void { $this->connection = $this->getMockBuilder('Drupal\Core\Database\Connection') ->disableOriginalConstructor() ->getMock(); @@ -1448,7 +1448,7 @@ public function testCleanIds(): void { /** * Sets up the module handler with no implementations. */ - protected function setUpModuleHandlerNoImplementations() { + protected function setUpModuleHandlerNoImplementations(): void { $this->moduleHandler->expects($this->any()) ->method('invokeAllWith') ->willReturnMap([ diff --git a/core/tests/Drupal/Tests/Core/Entity/StubEntityBase.php b/core/tests/Drupal/Tests/Core/Entity/StubEntityBase.php new file mode 100644 index 0000000000000000000000000000000000000000..4b7e547920f553c1523a14e198401bc63b605f0d --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Entity/StubEntityBase.php @@ -0,0 +1,19 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\Core\Entity; + +use Drupal\Core\Entity\EntityBase; + +/** + * A stub base entity for testing purposes. + */ +class StubEntityBase extends EntityBase { + + public $id; + public $langcode; + public $uuid; + public $label; + +} diff --git a/core/tests/Drupal/Tests/Core/Entity/StubRevisionableEntity.php b/core/tests/Drupal/Tests/Core/Entity/StubRevisionableEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..6a054c613fe9991e114f117ed85f23506d5a8dea --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Entity/StubRevisionableEntity.php @@ -0,0 +1,76 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\Core\Entity; + +use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\RevisionableInterface; + +/** + * A stub revisionable entity for testing purposes. + */ +class StubRevisionableEntity extends StubEntityBase implements RevisionableInterface { + + /** + * {@inheritdoc} + */ + public function isNewRevision(): bool { + return FALSE; + } + + /** + * {@inheritdoc} + */ + public function setNewRevision($value = TRUE): void { + } + + /** + * {@inheritdoc} + */ + public function getRevisionId(): int|string|NULL { + return NULL; + } + + /** + * {@inheritdoc} + */ + public function getLoadedRevisionId(): ?int { + return NULL; + } + + /** + * {@inheritdoc} + */ + public function updateLoadedRevisionId(): static { + return $this; + } + + /** + * {@inheritdoc} + */ + public function isDefaultRevision($new_value = NULL): bool { + return FALSE; + } + + /** + * {@inheritdoc} + */ + public function wasDefaultRevision(): bool { + return FALSE; + } + + /** + * {@inheritdoc} + */ + public function isLatestRevision(): bool { + return FALSE; + } + + /** + * {@inheritdoc} + */ + public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record): void { + } + +} diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php index 92049c1109838fef9af200e0907ab46715da25fd..117739b7cc5cd0c1dbf15c3ade85339181fab5ec 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php @@ -166,7 +166,7 @@ public static function providerTestDestinationRedirectToExternalUrl() { 'absolute external url' => [new Request(['destination' => 'http://example.com']), 'http://example.com'], 'absolute external url with folder' => [new Request(['destination' => 'http://example.com/foobar']), 'http://example.com/foobar'], 'absolute external url with folder2' => [new Request(['destination' => 'http://example.ca/drupal']), 'http://example.ca/drupal'], - 'path without drupal basepath' => [new Request(['destination' => '/test']), 'http://example.com/test'], + 'path without drupal base path' => [new Request(['destination' => '/test']), 'http://example.com/test'], 'path with URL' => [new Request(['destination' => '/example.com']), 'http://example.com/example.com'], 'path with URL and two slashes' => [new Request(['destination' => '//example.com']), 'http://example.com//example.com'], ]; @@ -196,7 +196,7 @@ public static function providerTestDestinationRedirectWithInvalidUrl() { $data[] = [new Request(['destination' => '//example:com/test'])]; $data['absolute external url'] = [new Request(['destination' => 'http://example.com'])]; $data['absolute external url with folder'] = [new Request(['destination' => 'http://example.ca/drupal'])]; - $data['path without drupal basepath'] = [new Request(['destination' => '/test'])]; + $data['path without drupal base path'] = [new Request(['destination' => '/test'])]; $data['path with URL'] = [new Request(['destination' => '/example.com'])]; $data['path with URL and two slashes'] = [new Request(['destination' => '//example.com'])]; diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php index eeedcf4f92be9d6ae391e219a0f737ba55dc6277..7526cd575fdee15a0e8a3e12d652fa06fd2a6439 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php @@ -194,7 +194,7 @@ protected function populateFilesystemStructure(array &$filesystem_structure): ar * @param string $content * The contents of the file. */ - protected function addFileToFilesystemStructure(array &$filesystem_structure, array $pieces, $content) { + protected function addFileToFilesystemStructure(array &$filesystem_structure, array $pieces, $content): void { $piece = array_shift($pieces); if ($pieces !== []) { $filesystem_structure += [$piece => []]; diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php index d0142c9035fddcf1fa716b1a9a8d509a2dd601c0..36e1c4b080cdcd44682426d68a615937b36ae1cd 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php @@ -337,11 +337,11 @@ class TestExtension extends ExtensionList { * @param \Drupal\Core\Extension\ExtensionDiscovery $extension_discovery * The extension discovery class. */ - public function setExtensionDiscovery(ExtensionDiscovery $extension_discovery) { + public function setExtensionDiscovery(ExtensionDiscovery $extension_discovery): void { $this->extensionDiscovery = $extension_discovery; } - public function setInstalledExtensions(array $extension_names) { + public function setInstalledExtensions(array $extension_names): void { $this->installedExtensions = $extension_names; } diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php index a1476deafb909e19d91b199afd012a78ad412de9..0644f1db5d213484357fc816ba9c27ffc8f0ea85 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php @@ -4,11 +4,14 @@ namespace Drupal\Tests\Core\Extension; -use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\Extension; use Drupal\Core\Extension\ModuleHandler; use Drupal\Core\Extension\Exception\UnknownExtensionException; +use Drupal\Core\Extension\ProceduralCall; use Drupal\Tests\UnitTestCase; +use Drupal\Tests\Core\GroupIncludesTestTrait; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @@ -18,12 +21,12 @@ */ class ModuleHandlerTest extends UnitTestCase { + use GroupIncludesTestTrait; + /** - * The mocked cache backend. - * - * @var \Drupal\Core\Cache\CacheBackendInterface|\PHPUnit\Framework\MockObject\MockObject + * @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\EventDispatcher\EventDispatcherInterface */ - protected $cacheBackend; + protected $eventDispatcher; /** * {@inheritdoc} @@ -32,8 +35,7 @@ class ModuleHandlerTest extends UnitTestCase { */ protected function setUp(): void { parent::setUp(); - // We can mock the cache handler here, but not the module handler. - $this->cacheBackend = $this->createMock(CacheBackendInterface::class); + $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); } /** @@ -49,14 +51,9 @@ protected function setUp(): void { * @return \Drupal\Core\Extension\ModuleHandler * The module handler to test. */ - protected function getModuleHandler() { - $module_handler = new ModuleHandler($this->root, [ - 'module_handler_test' => [ - 'type' => 'module', - 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', - 'filename' => 'module_handler_test.module', - ], - ], $this->cacheBackend); + protected function getModuleHandler($implementations = []) { + $module_handler = new ModuleHandler($this->root, [], $this->eventDispatcher, $implementations); + $module_handler->addModule('module_handler_test', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test'); return $module_handler; } @@ -67,12 +64,10 @@ protected function getModuleHandler() { */ public function testLoadModule(): void { $module_handler = $this->getModuleHandler(); - $this->assertFalse(function_exists('module_handler_test_hook')); $this->assertTrue($module_handler->load('module_handler_test')); $this->assertTrue(function_exists('module_handler_test_hook')); $module_handler->addModule('module_handler_test_added', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added'); - $this->assertFalse(function_exists('module_handler_test_added_hook'), 'Function does not exist before being loaded.'); $this->assertTrue($module_handler->load('module_handler_test_added')); $this->assertTrue(function_exists('module_handler_test_added_helper'), 'Function exists after being loaded.'); $this->assertTrue($module_handler->load('module_handler_test_added')); @@ -89,8 +84,6 @@ public function testLoadAllModules(): void { $module_handler = $this->getModuleHandler(); $module_handler->addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1'); $module_handler->addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2'); - $this->assertFalse(function_exists('module_handler_test_all1_hook'), 'Function does not exist before being loaded.'); - $this->assertFalse(function_exists('module_handler_test_all2_hook'), 'Function does not exist before being loaded.'); $module_handler->loadAll(); $this->assertTrue(function_exists('module_handler_test_all1_hook'), 'Function exists after being loaded.'); $this->assertTrue(function_exists('module_handler_test_all2_hook'), 'Function exists after being loaded.'); @@ -111,7 +104,7 @@ public function testModuleReloading(): void { 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', ], - ], $this->cacheBackend, + ], $this->eventDispatcher, [], ]) ->onlyMethods(['load']) ->getMock(); @@ -181,7 +174,7 @@ public function testSetModuleList(): void { $fixture_module_handler = $this->getModuleHandler(); $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend, + $this->root, [], $this->eventDispatcher, [], ]) ->onlyMethods(['resetImplementations']) ->getMock(); @@ -209,7 +202,7 @@ public function testAddModule(): void { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend, + $this->root, [], $this->eventDispatcher, [], ]) ->onlyMethods(['resetImplementations']) ->getMock(); @@ -231,7 +224,7 @@ public function testAddProfile(): void { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend, + $this->root, [], $this->eventDispatcher, [], ]) ->onlyMethods(['resetImplementations']) ->getMock(); @@ -269,7 +262,7 @@ public function testLoadAllIncludes(): void { 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', ], - ], $this->cacheBackend, + ], $this->eventDispatcher, [], ]) ->onlyMethods(['loadInclude']) ->getMock(); @@ -304,6 +297,7 @@ public function testLoadInclude(): void { */ public function testInvokeModuleEnabled(): void { $module_handler = $this->getModuleHandler(); + $module_handler->loadAll(); $this->assertTrue($module_handler->invoke('module_handler_test', 'hook', [TRUE]), 'Installed module runs hook.'); $this->assertFalse($module_handler->invoke('module_handler_test', 'hook', [FALSE]), 'Installed module runs hook.'); $this->assertNull($module_handler->invoke('module_handler_test_fake', 'hook', [FALSE]), 'Installed module runs hook.'); @@ -316,7 +310,9 @@ public function testInvokeModuleEnabled(): void { * @covers ::loadAllIncludes */ public function testImplementsHookModuleEnabled(): void { - $module_handler = $this->getModuleHandler(); + $implementations['hook'][ProceduralCall::class]['module_handler_test_hook'] = 'module_handler_test'; + $module_handler = $this->getModuleHandler($implementations); + $this->assertTrue($module_handler->hasImplementations('hook', 'module_handler_test'), 'Installed module implementation found.'); $module_handler->addModule('module_handler_test_added', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added'); @@ -326,114 +322,6 @@ public function testImplementsHookModuleEnabled(): void { $this->assertFalse($module_handler->hasImplementations('hook', 'module_handler_test_no_hook'), 'Missing implementation not found.'); } - /** - * Tests hasImplementations. - * - * @covers ::hasImplementations - */ - public function testHasImplementations(): void { - $module_handler = $this->getMockBuilder(ModuleHandler::class) - ->setConstructorArgs([$this->root, [], $this->cacheBackend]) - ->onlyMethods(['buildImplementationInfo']) - ->getMock(); - $module_handler->expects($this->exactly(2)) - ->method('buildImplementationInfo') - ->with('hook') - ->willReturnOnConsecutiveCalls( - [], - ['my_module' => FALSE], - ); - - // ModuleHandler::buildImplementationInfo mock returns no implementations. - $this->assertFalse($module_handler->hasImplementations('hook')); - - // Reset static caches. - $module_handler->resetImplementations(); - - // ModuleHandler::buildImplementationInfo mock returns an implementation. - $this->assertTrue($module_handler->hasImplementations('hook')); - } - - /** - * Tests getImplementations. - * - * @covers ::invokeAllWith - */ - public function testCachedGetImplementations(): void { - $this->cacheBackend->expects($this->exactly(1)) - ->method('get') - ->willReturn((object) ['data' => ['hook' => ['module_handler_test' => 'test']]]); - - // Ensure buildImplementationInfo doesn't get called and that we work off cached results. - $module_handler = $this->getMockBuilder(ModuleHandler::class) - ->setConstructorArgs([ - $this->root, [ - 'module_handler_test' => [ - 'type' => 'module', - 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', - 'filename' => 'module_handler_test.module', - ], - ], $this->cacheBackend, - ]) - ->onlyMethods(['buildImplementationInfo', 'loadInclude']) - ->getMock(); - $module_handler->load('module_handler_test'); - - $module_handler->expects($this->never())->method('buildImplementationInfo'); - $module_handler->expects($this->once())->method('loadInclude'); - $implementors = []; - $module_handler->invokeAllWith( - 'hook', - function (callable $hook, string $module) use (&$implementors) { - $implementors[] = $module; - } - ); - $this->assertEquals(['module_handler_test'], $implementors); - } - - /** - * Tests getImplementations. - * - * @covers ::invokeAllWith - */ - public function testCachedGetImplementationsMissingMethod(): void { - $this->cacheBackend->expects($this->exactly(1)) - ->method('get') - ->willReturn((object) [ - 'data' => [ - 'hook' => [ - 'module_handler_test' => [], - 'module_handler_test_missing' => [], - ], - ], - ]); - - // Ensure buildImplementationInfo doesn't get called and that we work off cached results. - $module_handler = $this->getMockBuilder(ModuleHandler::class) - ->setConstructorArgs([ - $this->root, [ - 'module_handler_test' => [ - 'type' => 'module', - 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', - 'filename' => 'module_handler_test.module', - ], - ], $this->cacheBackend, - ]) - ->onlyMethods(['buildImplementationInfo']) - ->getMock(); - $module_handler->load('module_handler_test'); - - $module_handler->expects($this->never())->method('buildImplementationInfo'); - $implementors = []; - $module_handler->invokeAllWith( - 'hook', - function (callable $hook, string $module) use (&$implementors) { - $implementors[] = $module; - } - ); - $this->assertEquals(['module_handler_test'], $implementors); - } - /** * Tests invoke all. * @@ -447,84 +335,41 @@ public function testInvokeAll(): void { } /** - * Tests that write cache calls through to cache library correctly. + * Tests hasImplementations. * - * @covers ::writeCache + * @covers ::getHookListeners + * @covers ::hasImplementations */ - public function testWriteCache(): void { - $module_handler = $this->getModuleHandler(); - $this->cacheBackend - ->expects($this->exactly(2)) - ->method('get') - ->willReturn(NULL); - $this->cacheBackend - ->expects($this->exactly(2)) - ->method('set') - ->with($this->logicalOr('module_implements', 'hook_info')); - $module_handler->invokeAllWith('hook', function (callable $hook, string $module) {}); - $module_handler->writeCache(); - } + public function testHasImplementations(): void { + $c = new class { - /** - * Tests hook_hook_info() fetching through getHookInfo(). - * - * @covers ::getHookInfo - * @covers ::buildHookInfo - */ - public function testGetHookInfo(): void { - $module_handler = $this->getModuleHandler(); - // Set up some synthetic results. - $this->cacheBackend - ->expects($this->exactly(2)) - ->method('get') - ->willReturn( - NULL, - (object) ['data' => ['hook_foo' => ['group' => 'hook']]] - ); - - // Results from building from mocked environment. - $this->assertEquals([ - 'hook' => ['group' => 'hook'], - ], $module_handler->getHookInfo()); - - // Reset local cache so we get our synthetic result from the cache handler. - $module_handler->resetImplementations(); - $this->assertEquals([ - 'hook_foo' => ['group' => 'hook'], - ], $module_handler->getHookInfo()); - } + function some_method(): void { - /** - * Tests internal implementation cache reset. - * - * @covers ::resetImplementations - */ - public function testResetImplementations(): void { - $module_handler = $this->getModuleHandler(); - // Prime caches - $module_handler->invokeAllWith('hook', function (callable $hook, string $module) {}); - $module_handler->getHookInfo(); + } + + }; + $implementations['some_hook'][get_class($c)]['some_method'] = 'some_module'; + $module_handler = $this->getModuleHandler($implementations); + $module_handler->setModuleList(['some_module' => TRUE]); + $r = new \ReflectionObject($module_handler); - // Reset all caches internal and external. - $this->cacheBackend + // Set up some synthetic results. + $this->eventDispatcher ->expects($this->once()) - ->method('delete') - ->with('hook_info'); - $this->cacheBackend - ->expects($this->exactly(2)) - ->method('set') - // Reset sets module_implements to array() and getHookInfo later - // populates hook_info. - ->with($this->logicalOr('module_implements', 'hook_info')); - $module_handler->resetImplementations(); - - // Request implementation and ensure hook_info and module_implements skip - // local caches. - $this->cacheBackend - ->expects($this->exactly(2)) - ->method('get') - ->with($this->logicalOr('module_implements', 'hook_info')); - $module_handler->invokeAllWith('hook', function (callable $hook, string $module) {}); + ->method('getListeners') + ->with('drupal_hook.some_hook') + ->willReturn([ + [$c, 'some_method'], + ]); + $this->assertNotEmpty($module_handler->hasImplementations('some_hook')); + + $listeners = $r->getProperty('invokeMap')->getValue($module_handler)['some_hook']['some_module']; + // Anonymous class doesn't work with assertSame() so assert it piecemeal. + $this->assertSame(count($listeners), 1); + foreach ($listeners as $listener) { + $this->assertSame(get_class($c), get_class($listener[0])); + $this->assertSame('some_method', $listener[1]); + } } /** @@ -537,4 +382,15 @@ public function testGetModuleDirectories(): void { $this->assertEquals(['node' => $this->root . '/core/modules/node'], $module_handler->getModuleDirectories()); } + /** + * @covers ::getHookListeners + */ + public function testGroupIncludes(): void { + self::setupGroupIncludes(); + $moduleHandler = new ModuleHandler('', [], new EventDispatcher(), [], self::GROUP_INCLUDES); + $this->assertFalse(function_exists('_test_module_helper')); + $moduleHandler->invokeAll('token_info'); + $this->assertTrue(function_exists('_test_module_helper')); + } + } diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php index 37cfa0f62c1cbe7ce922963e48e9a1b3b973e1af..95aa36036fde6bd57887fcb6c7d5cc5cfdd86b45 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php @@ -33,7 +33,7 @@ public function testRebuildThemeDataWithThemeParents(): void { ->scan('theme') ->willReturn([ 'test_subtheme' => new Extension($this->root, 'theme', 'core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml', 'test_subtheme.info.yml'), - 'test_basetheme' => new Extension($this->root, 'theme', 'core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml', 'test_basetheme.info.yml'), + 'test_base_theme' => new Extension($this->root, 'theme', 'core/modules/system/tests/themes/test_base_theme/test_base_theme.info.yml', 'test_base_theme.info.yml'), ]); $extension_discovery ->scan('theme_engine') @@ -45,7 +45,7 @@ public function testRebuildThemeDataWithThemeParents(): void { $argument_condition = function ($path) { return in_array($path, [ 'core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml', - 'core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml', + 'core/modules/system/tests/themes/test_base_theme/test_base_theme.info.yml', 'core/themes/engines/twig/twig.info.yml', ], TRUE); }; @@ -88,21 +88,21 @@ public function testRebuildThemeDataWithThemeParents(): void { $theme_data = $theme_list->reset()->getList(); $this->assertCount(2, $theme_data); - $info_basetheme = $theme_data['test_basetheme']; + $info_base_theme = $theme_data['test_base_theme']; $info_subtheme = $theme_data['test_subtheme']; // Ensure some basic properties. - $this->assertInstanceOf('Drupal\Core\Extension\Extension', $info_basetheme); - $this->assertEquals('test_basetheme', $info_basetheme->getName()); + $this->assertInstanceOf('Drupal\Core\Extension\Extension', $info_base_theme); + $this->assertEquals('test_base_theme', $info_base_theme->getName()); $this->assertInstanceOf('Drupal\Core\Extension\Extension', $info_subtheme); $this->assertEquals('test_subtheme', $info_subtheme->getName()); // Test the parent/child-theme properties. - $info_subtheme->info['base theme'] = 'test_basetheme'; - $info_basetheme->sub_themes = ['test_subtheme']; + $info_subtheme->info['base theme'] = 'test_base_theme'; + $info_base_theme->sub_themes = ['test_subtheme']; - $this->assertEquals('core/themes/engines/twig/twig.engine', $info_basetheme->owner); - $this->assertEquals('twig', $info_basetheme->prefix); + $this->assertEquals('core/themes/engines/twig/twig.engine', $info_base_theme->owner); + $this->assertEquals('twig', $info_base_theme->prefix); $this->assertEquals('core/themes/engines/twig/twig.engine', $info_subtheme->owner); $this->assertEquals('twig', $info_subtheme->prefix); } @@ -259,7 +259,7 @@ trait SettableDiscoveryExtensionListTrait { * @param \Drupal\Core\Extension\ExtensionDiscovery $discovery * The extension discovery. */ - public function setExtensionDiscovery(ExtensionDiscovery $discovery) { + public function setExtensionDiscovery(ExtensionDiscovery $discovery): void { $this->extensionDiscovery = $discovery; } diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php index 7003c9746408139cadf1686ce64ddc53e9a939dc..2196741063cc4616aa57b10e2560a54985d39ef2 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php @@ -132,14 +132,14 @@ class StubThemeHandler extends ThemeHandler { /** * {@inheritdoc} */ - protected function clearCssCache() { + protected function clearCssCache(): void { $this->clearedCssCache = TRUE; } /** * {@inheritdoc} */ - protected function themeRegistryRebuild() { + protected function themeRegistryRebuild(): void { $this->registryRebuild = TRUE; } diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module index 6ef8b2e6ae097631bb17f5b50b6cf0577cbac35e..0a5458d6c21022b477928ff5f41dfcb21536f741 100644 --- a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module +++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module @@ -13,3 +13,15 @@ function module_handler_test_all1_hook($arg) { return [$arg]; } + +/** + * Implements hook_module_implements_alter(). + */ +function module_handler_test_all1_module_implements_alter(&$implementations, $hook): void { + if ($hook === 'order1') { + // Run module_handler_test_all1 hooks after all other implementations. + $group = $implementations['module_handler_test_all1']; + unset($implementations['module_handler_test_all1']); + $implementations['module_handler_test_all1'] = $group; + } +} diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/src/Hook/ModuleHandlerTestAll1Hooks.php b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/src/Hook/ModuleHandlerTestAll1Hooks.php new file mode 100644 index 0000000000000000000000000000000000000000..f7bcddc7c7c5624f76a62ddf66861bc2ddb49075 --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/src/Hook/ModuleHandlerTestAll1Hooks.php @@ -0,0 +1,19 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\module_handler_test_all1\Hook; + +use Drupal\Core\Hook\Attribute\Hook; + +/** + * Hook implementations for module_handler_test_all1. + */ +class ModuleHandlerTestAll1Hooks { + + #[Hook('order1')] + #[Hook('order2')] + public static function order(): void { + } + +} diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module index e0be768f8bcee2d6b4bdf2e28fdea504a2a37c13..773ad83a84d6add5957c6a6d51f18b8701e58feb 100644 --- a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module +++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module @@ -13,3 +13,15 @@ function module_handler_test_all2_hook($arg) { return $arg; } + +/** + * Hook implementation, without hook implements doxygen to avoid conversion. + */ +function module_handler_test_all2_order1(): void { +} + +/** + * Hook implementation, without hook implements doxygen to avoid conversion. + */ +function module_handler_test_all2_order2(): void { +} diff --git a/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php b/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php index 7486fb1c3b8e4796a984a75ae615646d14757e0a..8b54cdc470fb215d07ab1f645765d6c7af35b5cb 100644 --- a/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php +++ b/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php @@ -78,7 +78,7 @@ protected function setUp(): void { * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions * (optional) An array of entity type definitions. */ - protected function setUpEntityTypeManager($definitions = []) { + protected function setUpEntityTypeManager($definitions = []): void { foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php index a2588857886d2622e2371959bea7fa36515060c9..5c7ad53788dd3b97b85e8dd7708789a028d76f9a 100644 --- a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php +++ b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php @@ -286,14 +286,14 @@ public function testSingleTarget(): void { $config->set('something', FALSE)->shouldBeCalledTimes(1); $config_target->setValue($config->reveal(), 'No', $this->prophesize(FormStateInterface::class)->reveal()); - // Test `ConfigTargetValue::NoMapping`: nothing should happen to the Config. + // Test `ToConfig::NoOp`: nothing should happen to the Config. $config = $this->prophesize(Config::class); $config->getName()->willReturn('foo.settings'); $config->set('something', Argument::any())->shouldBeCalledTimes(0); $config->clear('something', Argument::any())->shouldBeCalledTimes(0); $config_target->setValue($config->reveal(), '<test:noop>', $this->prophesize(FormStateInterface::class)->reveal()); - // Test `ConfigTargetValue::DeleteKey`: Config::clear() should be called. + // Test `ToConfig::DeleteKey`: Config::clear() should be called. $config = $this->prophesize(Config::class); $config->getName()->willReturn('foo.settings'); $config->clear('something')->shouldBeCalledTimes(1); diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php index 3137681d18e664161ae4f12f88b906e1922b61a2..7299a0a6cac706b052e6670fc1ec7e2b779a9294 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -7,6 +7,7 @@ use Drupal\Component\Utility\Html; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Access\AccessResult; +use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\Context\CacheContextsManager; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Form\EnforcedResponseException; @@ -909,7 +910,7 @@ public static function providerTestInvalidToken() { * * @dataProvider providerTestFormTokenCacheability */ - public function testFormTokenCacheability($token, $is_authenticated, $expected_form_cacheability, $expected_token_cacheability, $method): void { + public function testFormTokenCacheability($token, $is_authenticated, $method, $opted_in_for_cache): void { $user = $this->prophesize(AccountProxyInterface::class); $user->isAuthenticated() ->willReturn($is_authenticated); @@ -924,6 +925,10 @@ public function testFormTokenCacheability($token, $is_authenticated, $expected_f $form['#token'] = $token; } + if ($opted_in_for_cache) { + $form['#cache']['max-age'] = Cache::PERMANENT; + } + $form_arg = $this->createMock('Drupal\Core\Form\FormInterface'); $form_arg->expects($this->once()) ->method('getFormId') @@ -934,19 +939,45 @@ public function testFormTokenCacheability($token, $is_authenticated, $expected_f $form_state = new FormState(); $built_form = $this->formBuilder->buildForm($form_arg, $form_state); - if (!isset($expected_form_cacheability) || ($method == 'get' && !is_string($token))) { + + // FormBuilder does not set a form token when: + // - #token is set to FALSE. + // - #method is set to 'GET' and #token is not a string. This means the GET + // form did not get a form token by default, and the form did not + // explicitly opt in. + if ($token === FALSE || ($method == 'get' && !is_string($token))) { $this->assertEquals($built_form['#cache'], ['tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form']]); - } - else { - $this->assertTrue(isset($built_form['#cache'])); - $this->assertEquals($expected_form_cacheability, $built_form['#cache']); - } - if (!isset($expected_token_cacheability)) { $this->assertFalse(isset($built_form['form_token'])); } + // Otherwise, a form token is set, but only if the user is logged in. It is + // impossible (and unnecessary) to set a form token if the user is not + // logged in, because there is no session, and hence no CSRF token. else { - $this->assertTrue(isset($built_form['form_token'])); - $this->assertEquals($expected_token_cacheability, $built_form['form_token']['#cache']); + // For forms that are eligible for form tokens, a cache context must be + // set that indicates the form token only exists for logged in users. + $this->assertTrue(isset($built_form['#cache'])); + $expected_cacheability_metadata = [ + 'tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form'], + 'contexts' => ['user.roles:authenticated'], + ]; + if ($opted_in_for_cache) { + $expected_cacheability_metadata['max-age'] = Cache::PERMANENT; + } + $this->assertEquals($expected_cacheability_metadata, $built_form['#cache']); + // Finally, verify that a form token is generated when appropriate, with + // the expected cacheability metadata (or lack thereof). + if (!$is_authenticated) { + $this->assertFalse(isset($built_form['form_token'])); + } + else { + $this->assertTrue(isset($built_form['form_token'])); + if ($opted_in_for_cache) { + $this->assertFalse(isset($built_form['form_token']['#cache'])); + } + else { + $this->assertEquals(['max-age' => 0], $built_form['form_token']['#cache']); + } + } } } @@ -957,12 +988,13 @@ public function testFormTokenCacheability($token, $is_authenticated, $expected_f */ public static function providerTestFormTokenCacheability() { return [ - 'token:none,authenticated:true' => [NULL, TRUE, ['contexts' => ['user.roles:authenticated'], 'tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form']], ['max-age' => 0], 'post'], - 'token:none,authenticated:false' => [NULL, FALSE, ['contexts' => ['user.roles:authenticated'], 'tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form']], NULL, 'post'], - 'token:false,authenticated:false' => [FALSE, FALSE, NULL, NULL, 'post'], - 'token:false,authenticated:true' => [FALSE, TRUE, NULL, NULL, 'post'], - 'token:none,authenticated:false,method:get' => [NULL, FALSE, ['contexts' => ['user.roles:authenticated'], 'tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form']], NULL, 'get'], - 'token:test_form_id,authenticated:false,method:get' => ['test_form_id', TRUE, ['contexts' => ['user.roles:authenticated'], 'tags' => ['CACHE_MISS_IF_UNCACHEABLE_HTTP_METHOD:form']], ['max-age' => 0], 'get'], + 'token:none,authenticated:true' => [NULL, TRUE, 'post', FALSE], + 'token:none,authenticated:true,opted_in_for_cache' => [NULL, TRUE, 'post', TRUE], + 'token:none,authenticated:false' => [NULL, FALSE, 'post', FALSE], + 'token:false,authenticated:false' => [FALSE, FALSE, 'post', FALSE], + 'token:false,authenticated:true' => [FALSE, TRUE, 'post', FALSE], + 'token:none,authenticated:false,method:get' => [NULL, FALSE, 'get', FALSE], + 'token:test_form_id,authenticated:false,method:get' => ['test_form_id', TRUE, 'get', FALSE], ]; } @@ -999,7 +1031,7 @@ class TestFormWithPredefinedForm extends TestForm { */ protected $form; - public function setForm($form) { + public function setForm($form): void { $this->form = $form; } diff --git a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php index 2da73b861e105de8adc4f0ce1d2f7681b1457c95..7c1e6beca2ea505d515e52354e843600ed7dfce2 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php @@ -120,6 +120,8 @@ public static function providerElements() { ':input[name="foo"]' => ['value' => 'bar'], ], ], + '#markup' => '', + '#input' => TRUE, ], '#wrapper_attributes', ], diff --git a/core/tests/Drupal/Tests/Core/GroupIncludesTestTrait.php b/core/tests/Drupal/Tests/Core/GroupIncludesTestTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..807ae036e695a2fd411ff8f2b186170309791a05 --- /dev/null +++ b/core/tests/Drupal/Tests/Core/GroupIncludesTestTrait.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\Core; + +use org\bovigo\vfs\vfsStream; + +/** + * @coversDefaultClass \Drupal\Core\Hook\HookCollectorPass + * @group Hook + */ +trait GroupIncludesTestTrait { + + const GROUP_INCLUDES = ['token_info' => ['vfs://drupal_root/test_module.tokens.inc']]; + + /** + * @return array[] + */ + public static function setupGroupIncludes(): array { + vfsStream::setup('drupal_root'); + file_put_contents('vfs://drupal_root/test_module_info.yml', ''); + $module_filenames = [ + 'test_module' => ['pathname' => 'vfs://drupal_root/test_module_info.yml'], + ]; + file_put_contents('vfs://drupal_root/test_module.module', <<<'EOD' +<?php + +function test_module_hook_info() { + $hooks['token_info'] = [ + 'group' => 'tokens', + ]; + return $hooks; +} + +EOD + ); + file_put_contents('vfs://drupal_root/test_module.tokens.inc', <<<'EOD' +<?php + +function _test_module_helper() {} + +EOD + ); + return $module_filenames; + } + +} diff --git a/core/tests/Drupal/Tests/Core/Hook/HookCollectorPassTest.php b/core/tests/Drupal/Tests/Core/Hook/HookCollectorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c4559d290f39dc48d9a523234606978f73655490 --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Hook/HookCollectorPassTest.php @@ -0,0 +1,116 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\Core\Hook; + +use Drupal\Component\Utility\NestedArray; +use Drupal\Core\Extension\ProceduralCall; +use Drupal\Core\Hook\Attribute\Hook; +use Drupal\Core\Hook\HookCollectorPass; +use Drupal\Tests\UnitTestCase; +use Drupal\Tests\Core\GroupIncludesTestTrait; +use org\bovigo\vfs\vfsStream; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +/** + * @coversDefaultClass \Drupal\Core\Hook\HookCollectorPass + * @group Hook + */ +class HookCollectorPassTest extends UnitTestCase { + + use GroupIncludesTestTrait; + + /** + * @covers ::collectAllHookImplementations + * @covers ::filterIterator + */ + public function testCollectAllHookImplementations(): void { + vfsStream::setup('drupal_root'); + $files = [ + 'modules/test_module/test_module_info.yml', + // This creates a submodule which is not installed. + 'modules/test_module/test_sub_module/test_sub_module.info.yml', + ]; + $file_data = []; + foreach ($files as &$filename) { + NestedArray::setValue($file_data, explode('/', $filename), ''); + } + vfsStream::create($file_data); + $module_filenames = [ + 'test_module' => ['pathname' => 'vfs://drupal_root/modules/test_module/test_module_info.yml'], + ]; + // This directory, however, should be included. + mkdir('vfs://drupal_root/modules/test_module/includes'); + file_put_contents('vfs://drupal_root/modules/test_module/includes/test_module.inc', <<<__EOF__ +<?php + +function test_module_test_hook(); + +__EOF__ + ); + // This is the not installed submodule. + file_put_contents('vfs://drupal_root/modules/test_module/test_sub_module/test_sub_module.module', <<<__EOF__ +<?php + +function test_module_should_be_skipped(); + +__EOF__ + ); + $implementations['test_hook'][ProceduralCall::class]['test_module_test_hook'] = 'test_module'; + $includes = [ + 'test_module_test_hook' => 'vfs://drupal_root/modules/test_module/includes/test_module.inc', + ]; + + $container = new ContainerBuilder(); + $container->setParameter('container.modules', $module_filenames); + $container->setDefinition('module_handler', new Definition()); + (new HookCollectorPass())->process($container); + $this->assertSame($implementations, $container->getParameter('hook_implementations_map')); + $this->assertSame($includes, $container->getDefinition(ProceduralCall::class)->getArguments()[0]); + } + + /** + * @covers ::process + * @covers ::collectModuleHookImplementations + */ + public function testGroupIncludes(): void { + $module_filenames = self::setupGroupIncludes(); + $container = new ContainerBuilder(); + $container->setParameter('container.modules', $module_filenames); + $container->setDefinition('module_handler', new Definition()); + (new HookCollectorPass())->process($container); + $argument = $container->getDefinition('module_handler')->getArgument('$groupIncludes'); + $this->assertSame(self::GROUP_INCLUDES, $argument); + } + + /** + * @covers ::getHookAttributesInClass + */ + public function testGetHookAttributesInClass(): void { + /** @phpstan-ignore-next-line */ + $getHookAttributesInClass = fn ($class) => $this->getHookAttributesInClass($class); + $p = new HookCollectorPass(); + $getHookAttributesInClass = $getHookAttributesInClass->bindTo($p, $p); + $x = new class { + + #[Hook('install')] + function foo(): void {} + + }; + $this->expectException(\LogicException::class); + $hooks = $getHookAttributesInClass(get_class($x)); + $x = new class { + + #[Hook('foo')] + function foo(): void {} + + }; + $hooks = $getHookAttributesInClass(get_class($x)); + $hook = reset($hooks); + $this->assertInstanceOf(Hook::class, $hook); + $this->assertSame('foo', $hook->hook); + } + +} diff --git a/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php index 3388c7a3010ba5e48a303e722d1aee83d07bf67e..2aa049926dcaed8e7fee68b2f93fb6c29f2643a7 100644 --- a/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php @@ -382,7 +382,7 @@ public function testGetLayoutOptions(): void { /** * Sets up the filesystem with YAML files and annotated plugins. */ - protected function setUpFilesystem() { + protected function setUpFilesystem(): void { $module_a_provided_layout = <<<'EOS' module_a_provided_layout: label: 1 column layout diff --git a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php index 4184a022d69692bb0e65fb9a5e9a10882a90ff45..e1e15cf4be22eb58c4145b5144793b94a68338c6 100644 --- a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php @@ -111,7 +111,7 @@ protected function setUp(): void { /** * Sets up the mail manager for testing. */ - protected function setUpMailManager($interface = []) { + protected function setUpMailManager($interface = []): void { // Use the provided config for system.mail.interface settings. $this->configFactory = $this->getConfigFactoryStub([ 'system.mail' => [ @@ -206,7 +206,7 @@ class TestMailManager extends MailManager { * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface $discovery * The discovery object. */ - public function setDiscovery(DiscoveryInterface $discovery) { + public function setDiscovery(DiscoveryInterface $discovery): void { $this->discovery = $discovery; } diff --git a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php index 00663971b364d77d2fd348da10d1f83a671cbb82..cc81534dbe153e50e3bf71e504a19ab4e25af740 100644 --- a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php @@ -61,7 +61,7 @@ protected function setUp(): void { $this->stringTranslation = $this->createMock('Drupal\Core\StringTranslation\TranslationInterface'); } - protected function setupContextualLinkDefault() { + protected function setupContextualLinkDefault(): void { $this->contextualLinkDefault = new ContextualLinkDefault($this->config, $this->pluginId, $this->pluginDefinition); } diff --git a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php index 761eb3b1503c8c7fa9878041c5f3a90981829768..10090a0cee66f681121a4d5538c6abd10cccd1ec 100644 --- a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php @@ -118,7 +118,7 @@ protected function setUp(): void { * * With link 6 being the only external link. */ - protected function mockTree() { + protected function mockTree(): void { $this->links = [ 1 => MenuLinkMock::create(['id' => 'test.example1', 'route_name' => 'example1', 'title' => 'foo', 'parent' => '']), 2 => MenuLinkMock::create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => 'test.example1', 'route_parameters' => ['foo' => 'bar']]), diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php index 85d1c6989da047ea1228c861554920ab2f5c42a7..97704b2d0a7204a9d1285e45396fbcef4ee77697 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php @@ -72,7 +72,7 @@ protected function setUp(): void { /** * Setups the local action default. */ - protected function setupLocalActionDefault() { + protected function setupLocalActionDefault(): void { $this->localActionDefault = new LocalActionDefault($this->config, $this->pluginId, $this->pluginDefinition, $this->routeProvider); } diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php index 8548e3cee16d2f9a76e5b4e61eefcbb668965ea4..69d4c22ba368197318b3e7ba794947b1ba124476 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php @@ -74,7 +74,7 @@ protected function setUp(): void { /** * Setups the local task default. */ - protected function setupLocalTaskDefault() { + protected function setupLocalTaskDefault(): void { $this->localTaskBase = new TestLocalTaskDefault($this->config, $this->pluginId, $this->pluginDefinition); $this->localTaskBase ->setRouteProvider($this->routeProvider); diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php index 62175ac657ce6ac0d2f99ecb572e5e937976bb5b..fd2ddc5acf4d46e3b1823477ae325811ad2218ae 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php @@ -117,9 +117,9 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params) /** * Tests integration for local tasks. * - * @param $route_name + * @param string $route_name * Route name to base task building on. - * @param $expected_tasks + * @param array $expected_tasks * A list of tasks groups by level expected at the given route * @param array $route_params * (optional) A list of route parameters used to resolve tasks. diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php index 8b19d2f0b28e79a7598352cdc1678285a9b60662..4b9504eb3b355e0f08c39c683effbcf0484fe3b5 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php @@ -240,7 +240,7 @@ public function testGetTitle(): void { /** * Setups the local task manager for the test. */ - protected function setupLocalTaskManager() { + protected function setupLocalTaskManager(): void { $request_stack = new RequestStack(); $request_stack->push($this->request); $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'); @@ -324,7 +324,7 @@ protected function getLocalTaskFixtures(): array { * @param \PHPUnit\Framework\MockObject\MockObject $mock_plugin * The mock plugin. */ - protected function setupFactory($mock_plugin) { + protected function setupFactory($mock_plugin): void { $map = []; foreach ($this->getLocalTaskFixtures() as $info) { $map[] = [$info['id'], [], $mock_plugin]; @@ -433,7 +433,7 @@ public function testGetTasksBuildWithCacheabilityMetadata(): void { $this->assertEqualsCanonicalizing(['context.example1', 'context.example2', 'route', 'user.permissions'], $cacheability->getCacheContexts()); } - protected function setupFactoryAndLocalTaskPlugins(array $definitions, $active_plugin_id) { + protected function setupFactoryAndLocalTaskPlugins(array $definitions, $active_plugin_id): void { $map = []; $access_manager_map = []; @@ -466,7 +466,7 @@ protected function setupFactoryAndLocalTaskPlugins(array $definitions, $active_p ->willReturnMap($map); } - protected function setupNullCacheabilityMetadataValidation() { + protected function setupNullCacheabilityMetadataValidation(): void { $container = \Drupal::hasContainer() ? \Drupal::getContainer() : new ContainerBuilder(); $cache_context_manager = $this->prophesize(CacheContextsManager::class); diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php index e0043a8467d94c14e50d1b1dc0ccbd9a57bf41dc..80c66b5dea2176abaa7fb6b48ab75a816b0fa146 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php @@ -65,7 +65,7 @@ protected function setUp(): void { * @param object[] $service_map * An associative array of service instances keyed by service name. */ - protected function setUpMocks($service_map = []) { + protected function setUpMocks($service_map = []): void { $entity = $this->createMock(ContentEntityInterface::class); $entity->expects($this->any()) ->method('getEntityTypeId') diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php index a7de9884d9c57999d0adbf4528f9540e81d741ef..0e09ee0cce5f539663d3687d36799960485b34d2 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php @@ -154,7 +154,7 @@ public function getDefinitions() { /** * {@inheritdoc} */ - public function processDefinition(&$definition, $plugin_id) { + public function processDefinition(&$definition, $plugin_id): void { parent::processDefinition($definition, $plugin_id); $this->processDefinitionCategory($definition); } diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php index fef689c098c29920bb86b9cc55aec32bc13d0e23..88c2a42eea6c4093a65ee16d683455ded32fd3da 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php @@ -136,7 +136,7 @@ public function testSetContextValueCacheableDependency(): void { * @param mixed $default_value * The default value to assign to the mock context definition. */ - protected function setUpDefaultValue($default_value = NULL) { + protected function setUpDefaultValue($default_value = NULL): void { $mock_data_definition = $this->createMock('Drupal\Core\TypedData\DataDefinitionInterface'); $this->contextDefinition = $this->createMock('Drupal\Core\Plugin\Context\ContextDefinitionInterface'); diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php index c428a9c78dbaacbfd1b9e1bb0e66e42708c57acc..78d3a8230046228964950a06115008cc223d28b3 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php @@ -18,7 +18,7 @@ class DefaultSingleLazyPluginCollectionTest extends LazyPluginCollectionTestBase /** * {@inheritdoc} */ - protected function setupPluginCollection(?InvocationOrder $create_count = NULL) { + protected function setupPluginCollection(?InvocationOrder $create_count = NULL): void { $definitions = $this->getPluginDefinitions(); $this->pluginInstances['apple'] = new ConfigurablePlugin(['id' => 'apple', 'key' => 'value'], 'apple', $definitions['apple']); $this->pluginInstances['banana'] = new ConfigurablePlugin(['id' => 'banana', 'key' => 'other_value'], 'banana', $definitions['banana']); @@ -111,7 +111,7 @@ public function getConfiguration() { return $this->configuration; } - public function setConfiguration(array $configuration) { + public function setConfiguration(array $configuration): void { $this->configuration = $configuration; } diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php index ac07454f5762a52f8787810c3969fedb29b01b59..8008a80c9466431ebc358aa29fe961b1038525b8 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php @@ -181,11 +181,11 @@ class TestPluginDependency { protected $themeHandler; - public function setModuleHandler(ModuleHandlerInterface $module_handler) { + public function setModuleHandler(ModuleHandlerInterface $module_handler): void { $this->moduleHandler = $module_handler; } - public function setThemeHandler(ThemeHandlerInterface $theme_handler) { + public function setThemeHandler(ThemeHandlerInterface $theme_handler): void { $this->themeHandler = $theme_handler; } diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php index 6a2a73fb241a117ac2efb93fef6287205555c677..cd720518007269f0a7bd44a4564774e962c30560 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -550,7 +550,7 @@ protected function generatePlaceholderElement(): array { * * @internal */ - protected function assertPlaceholderRenderCache($cache_keys, array $expected_data) { + protected function assertPlaceholderRenderCache($cache_keys, array $expected_data): void { if ($cache_keys !== FALSE) { $cached = $this->memoryCache->get($cache_keys, CacheableMetadata::createFromRenderArray($expected_data)); $cached_element = $cached->data; diff --git a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php index 1b7aaa748810cf57ae6fce29b64112b74acdd037..09b42d393cab4e9d25a1f151d80d6480ae4da317 100644 --- a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php @@ -42,7 +42,7 @@ class AccessAwareRouterTest extends UnitTestCase { protected $accessManager; /** - * @var \Drupal\Core\Session\AccountInterface||\PHPUnit\Framework\MockObject\MockObject + * @var \Drupal\Core\Session\AccountInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $currentUser; @@ -64,7 +64,7 @@ protected function setUp(): void { /** * Sets up a chain router with matchRequest. */ - protected function setupRouter() { + protected function setupRouter(): void { $this->router = $this->getMockBuilder('Drupal\Core\Routing\Router') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php index 199262f3f3fcff1d154bca2a739d1d327f312151..60a7e0c95737b033e458c5cb1fc2095cc716a453 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php @@ -48,7 +48,7 @@ protected function setUp(): void { $this->redirectDestination = new RedirectDestination($this->requestStack, $this->urlGenerator); } - protected function setupUrlGenerator() { + protected function setupUrlGenerator(): void { $this->urlGenerator->expects($this->any()) ->method('generateFromRoute') ->willReturnCallback(function ($route, $parameters, $options) { diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php index 325a0319b48f1cc85a90f2141f97fd7a476002f9..d70ad9153d2fea7b2777923aab85f107085c0ffc 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php @@ -339,7 +339,7 @@ class TestRouteBuilder extends RouteBuilder { * @param \Drupal\Core\Discovery\YamlDiscovery $yaml_discovery * The YAML discovery to set. */ - public function setYamlDiscovery(YamlDiscovery $yaml_discovery) { + public function setYamlDiscovery(YamlDiscovery $yaml_discovery): void { $this->yamlDiscovery = $yaml_discovery; } diff --git a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php index a82325167dc27f34c10cf05eb4c0b7e693d6cee7..0ac65036e28c95ad6df9fa497b83ae04a5afd90c 100644 --- a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php +++ b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php @@ -356,7 +356,7 @@ public static function providerTestSanitizedDestinations() { * @param string $errstr * The error message. */ - public function errorHandler($errno, $errstr) { + public function errorHandler($errno, $errstr): void { $this->errors[] = compact('errno', 'errstr'); } diff --git a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php index dfb5922a9f85d600bca10aa456fdbf10caf09f9e..a68788cc47738401090fe3211e93d4fbcf5221e8 100644 --- a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php +++ b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php @@ -263,37 +263,15 @@ public static function providerTestEnforcedSessionName() { * Tests constructor's default settings. * * @covers ::__construct - * - * @dataProvider providerTestConstructorDefaultSettings */ - public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character, string $expected_name_suffix): void { - $config = $this->createSessionConfiguration($options); + public function testConstructorDefaultSettings(): void { + $config = $this->createSessionConfiguration([]); $options = $config->getOptions(Request::createFromGlobals()); - if (\PHP_VERSION_ID >= 80400) { - $this->assertArrayNotHasKey('sid_length', $options); - $this->assertArrayNotHasKey('sid_bits_per_character', $options); - } - else { - $this->assertSame($expected_sid_length, $options['sid_length']); - $this->assertSame($expected_sid_bits_per_character, $options['sid_bits_per_character']); - } - $this->assertSame($expected_name_suffix, $options['name_suffix']); - } + $this->assertSame('', $options['name_suffix']); - /** - * Data provider for the constructor test. - * - * @return array - * Test data - */ - public static function providerTestConstructorDefaultSettings() { - return [ - [[], 48, 6, ''], - [['sid_length' => 100], 100, 6, ''], - [['sid_bits_per_character' => 5], 48, 5, ''], - [['name_suffix' => 'some-suffix'], 48, 6, 'some-suffix'], - [['sid_length' => 100, 'sid_bits_per_character' => 5, 'name_suffix' => 'some-suffix'], 100, 5, 'some-suffix'], - ]; + $config = $this->createSessionConfiguration(['name_suffix' => 'some-suffix']); + $options = $config->getOptions(Request::createFromGlobals()); + $this->assertSame('some-suffix', $options['name_suffix']); } } diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php index 84af0968d8eb512a61680930c5b85c30a2181d86..913efa25b5564ea57b6483f32003954df9ad384e 100644 --- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php +++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php @@ -103,7 +103,7 @@ public static function reverseProxyEnabledProvider() { * The expected bit value returned by * \Symfony\Component\HttpFoundation\Request::getTrustedHeaderSet() */ - protected function trustedHeadersAreSet(Settings $settings, $expected_trusted_header_set) { + protected function trustedHeadersAreSet(Settings $settings, $expected_trusted_header_set): void { $middleware = new ReverseProxyMiddleware($this->mockHttpKernel, $settings); $request = new Request(); diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php index f3aca4a2466a17beea468930f29b150d64e071b8..ad8ecc0f70b1458b6ea94b8b421b9827c95caf62 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php @@ -43,7 +43,7 @@ class TranslatableMarkupTest extends UnitTestCase { * @param string $error_message * The error message. */ - public function errorHandler($error_number, $error_message) { + public function errorHandler($error_number, $error_message): void { $this->lastErrorNumber = $error_number; $this->lastErrorMessage = $error_message; } diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php index 46ac4daf36dfea5e86614f1cd6561f0ce8a69d07..8cf07c7cffd9ab4af94b34cea917c54d037a7ae8 100644 --- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php +++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php @@ -452,7 +452,7 @@ protected function assertNoID(string $id, string $html): void { * @return int * The number of results that are found. */ - protected function getXPathResultCount($query, $html) { + protected function getXPathResultCount($query, $html): int { $document = Html::load($html); $xpath = new \DOMXPath($document); diff --git a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php index e872be584946ea9f583c3d105cda4905552a9817..83ade18b818aea0273eb27b8e934c613fb4f91ca 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php @@ -231,7 +231,7 @@ public function testTestInfoParserMissingSummary(): void { $this->assertEmpty($info['description']); } - protected function setupVfsWithTestClasses() { + protected function setupVfsWithTestClasses(): void { vfsStream::setup('drupal'); $test_file = <<<EOF @@ -456,7 +456,7 @@ public static function providerTestGetPhpunitTestSuite() { $data['module-functional javascript test'] = ['\Drupal\Tests\toolbar\FunctionalJavascript\ToolbarIntegrationTest', 'FunctionalJavascript']; $data['core-unittest'] = ['\Drupal\Tests\ComposerIntegrationTest', 'Unit']; $data['core-unittest2'] = ['Drupal\Tests\Core\DrupalTest', 'Unit']; - $data['core-unittest3'] = ['Drupal\Tests\Scripts\TestSiteApplicationTest', 'Unit']; + $data['core-script-test'] = ['Drupal\KernelTests\Scripts\TestSiteApplicationTest', 'Kernel']; $data['core-kernel test'] = ['\Drupal\KernelTests\KernelTestBaseTest', 'Kernel']; $data['core-functional test'] = ['\Drupal\FunctionalTests\ExampleTest', 'Functional']; $data['core-functional javascript test'] = ['\Drupal\FunctionalJavascriptTests\ExampleTest', 'FunctionalJavascript']; diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentValidatorTest.php b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentValidatorTest.php index 7c76a1830558981e7fb37b261ab313a93ff46396..d24d2df7989ccf8fd430dcaf1e8d2e1780e49ee8 100644 --- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentValidatorTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentValidatorTest.php @@ -65,24 +65,43 @@ public function testValidateDefinitionInvalid(array $definition): void { /** * Data provider with invalid component definitions. * - * @return array - * The data. + * @return \Generator + * Returns the generator with the invalid definitions. */ - public static function dataProviderValidateDefinitionInvalid(): array { + public static function dataProviderValidateDefinitionInvalid(): \Generator { $valid_cta = static::loadComponentDefinitionFromFs('my-cta'); + $cta_with_missing_required = $valid_cta; unset($cta_with_missing_required['path']); + yield 'missing required' => [$cta_with_missing_required]; + $cta_with_invalid_class = $valid_cta; $cta_with_invalid_class['props']['properties']['attributes']['type'] = 'Drupal\Foo\Invalid'; + yield 'invalid class' => [$cta_with_invalid_class]; + $cta_with_invalid_enum = array_merge( $valid_cta, ['extension_type' => 'invalid'], ); - return [ - [$cta_with_missing_required], - [$cta_with_invalid_class], - [$cta_with_invalid_enum], - ]; + yield 'invalid enum' => [$cta_with_invalid_enum]; + + // A list of property types that are not strings, but can be provided via + // YAML. + $non_string_types = [NULL, 123, 123.45, TRUE]; + foreach ($non_string_types as $non_string_type) { + $cta_with_non_string_prop_type = $valid_cta; + $cta_with_non_string_prop_type['props']['properties']['text']['type'] = $non_string_type; + yield "non string type ($non_string_type)" => [$cta_with_non_string_prop_type]; + + // Same, but as a part of the list of allowed types. + $cta_with_non_string_prop_type['props']['properties']['text']['type'] = ['string', $non_string_type]; + yield "non string type ($non_string_type) in a list of types" => [$cta_with_non_string_prop_type]; + } + + // The array is a valid value for the 'type' parameter, but it is not + // allowed as the allowed type. + $cta_with_non_string_prop_type['props']['properties']['text']['type'] = ['string', []]; + yield 'non string type (Array)' => [$cta_with_non_string_prop_type]; } /** diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php index a7f14c67bb5e3810539313af71f6de85a147a5e4..f237c09d1caa0a8562760fe02b35b57a61e4d873 100644 --- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php @@ -9,6 +9,7 @@ use Drupal\Core\Theme\Registry; use Drupal\Tests\UnitTestCase; use Symfony\Component\HttpKernel\HttpKernelInterface; +use Drupal\theme_test\Hook\ThemeTestHooks; /** * @coversDefaultClass \Drupal\Core\Theme\Registry @@ -155,6 +156,11 @@ public function testGetRegistryForModule(): void { // Include the module and theme files so that hook_theme can be called. include_once $this->root . '/core/modules/system/tests/modules/theme_test/theme_test.module'; include_once $this->root . '/core/tests/fixtures/test_stable/test_stable.theme'; + $themeTestTheme = new ThemeTestHooks(); + $this->moduleHandler->expects($this->atLeastOnce()) + ->method('invoke') + ->with('theme_test', 'theme') + ->willReturn($themeTestTheme->theme(NULL, NULL, NULL, NULL)); $this->moduleHandler->expects($this->atLeastOnce()) ->method('invokeAllWith') ->with('theme') diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php index 9c8f72087e165278f2fe811f60ab8e80a70b4d25..72948a0a5b91fb9a77123a03d934481c70ed9221 100644 --- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php @@ -39,7 +39,7 @@ protected function setUp(): void { /** * Sets up some extensions with some update functions. */ - protected function setupBasicExtensions() { + protected function setupBasicExtensions(): void { $info_a = <<<'EOS' type: module name: Module A @@ -91,7 +91,7 @@ function module_b_post_update_a() { /** * Implements hook_removed_post_updates(). */ -function module_b_removed_post_updates() { +function module_b_removed_post_updates(): array { return [ 'module_b_post_update_b' => '8.9.0', 'module_b_post_update_c' => '8.9.0', @@ -118,7 +118,7 @@ function module_c_post_update_b() { /** * Implements hook_removed_post_updates(). */ -function module_c_removed_post_updates() { +function module_c_removed_post_updates(): array { return [ 'module_c_post_update_b' => '8.9.0', 'module_c_post_update_c' => '8.9.0', @@ -145,7 +145,7 @@ function theme_d_post_update_c() { /** * Implements hook_removed_post_updates(). */ -function theme_d_removed_post_updates() { +function theme_d_removed_post_updates(): array { return [ 'theme_d_post_update_a' => '8.9.0', ]; diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php index 1693234623d5f1de919ecdff39469e4b50736b8b..840b570db8a18a3b743eaa3a6f4d50a97195df41 100644 --- a/core/tests/Drupal/Tests/Core/UrlTest.php +++ b/core/tests/Drupal/Tests/Core/UrlTest.php @@ -829,7 +829,7 @@ class TestUrl extends Url { * @param \Drupal\Core\Access\AccessManagerInterface $access_manager * The access manager. */ - public function setAccessManager(AccessManagerInterface $access_manager) { + public function setAccessManager(AccessManagerInterface $access_manager): void { $this->accessManager = $access_manager; } diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php index df3ede5da3b191a6fa2734b9b25345b14655a0bb..68e5633bf148827654b1cfa51257135a82e5efff 100644 --- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php @@ -334,7 +334,7 @@ public function testScan(): void { /** * Sets up the token library to return site tokens. */ - protected function setupSiteTokens() { + protected function setupSiteTokens(): void { // The site name is plain text, but the slogan is markup. $tokens = [ '[site:name]' => 'Your <best> buys', diff --git a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php index 06c212486ce602dd4289b37ea833fc5deccfce55..b8ba4752fb4d90044399a6d135b9aa58ec13233f 100644 --- a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php @@ -200,7 +200,7 @@ public function testAssembleWithStartingSlashEnabledProcessing(): void { * @param bool $subdir * TRUE to use a subdir. */ - protected function setupRequestStack($subdir) { + protected function setupRequestStack($subdir): void { $server = []; if ($subdir) { // Setup a fake request which looks like a Drupal installed under the diff --git a/core/tests/Drupal/Tests/PerformanceTestTrait.php b/core/tests/Drupal/Tests/PerformanceTestTrait.php index 958a316f40cb309e0e0d3b89f9d7d7e68c304232..b722ebde8d76e0a94cefbf8c3fe79550bb7b1420 100644 --- a/core/tests/Drupal/Tests/PerformanceTestTrait.php +++ b/core/tests/Drupal/Tests/PerformanceTestTrait.php @@ -375,7 +375,7 @@ private function collectNetworkData(array $messages, PerformanceData $performanc // 'encodedDataLength' for network requests, however in the case that the // file has already been requested by the browser, this will be the length // of a HEAD response for 304 not modified or similar. Additionally, core's - // aggregation adds the basepath to CSS aggregates, resulting in slightly + // aggregation adds the base path to CSS aggregates, resulting in slightly // different file sizes depending on whether tests run in a subdirectory or // not. foreach ($stylesheet_urls as $url) { @@ -386,7 +386,7 @@ private function collectNetworkData(array $messages, PerformanceData $performanc } else { $filename = str_replace($GLOBALS['base_path'], '', parse_url($url, PHP_URL_PATH)); - // Strip the basepath from the contents of the file so that tests + // Strip the base path from the contents of the file so that tests // running in a subdirectory get the same results. $stylesheet_bytes += strlen(str_replace($GLOBALS['base_path'], '/', file_get_contents($filename))); } diff --git a/core/tests/Drupal/Tests/PhpCs/SortTest.php b/core/tests/Drupal/Tests/PhpCs/SortTest.php index ec8b04eb5af8bf60fe73d65e436d57294458c410..f9b0abf808353480de6d44ddc1b26ce961cdfa51 100644 --- a/core/tests/Drupal/Tests/PhpCs/SortTest.php +++ b/core/tests/Drupal/Tests/PhpCs/SortTest.php @@ -81,7 +81,7 @@ public function testSorted(): void { * @param null|string $column * The column of the value or NULL. */ - private function assertSorted(array $input, ?string $column = NULL) { + private function assertSorted(array $input, ?string $column = NULL): void { $input_sorted = $input; if ($column === NULL) { diff --git a/core/tests/Drupal/Tests/TestFileCreationTrait.php b/core/tests/Drupal/Tests/TestFileCreationTrait.php index eaf25d07736f8a195027704feaed11217ce3f1ee..43357296dedeadaaf5879032d7698ed1988843d5 100644 --- a/core/tests/Drupal/Tests/TestFileCreationTrait.php +++ b/core/tests/Drupal/Tests/TestFileCreationTrait.php @@ -43,10 +43,10 @@ trait TestFileCreationTrait { * is prefixed with one of the above types, it will get returned as well, even * on subsequent calls. * - * @param $type + * @param string $type * File type, possible values: 'binary', 'html', 'image', 'javascript', * 'php', 'sql', 'text'. - * @param $size + * @param int|null $size * (optional) File size in bytes to match. Defaults to NULL, which will not * filter the returned list by size. * @@ -113,7 +113,7 @@ protected function getTestFiles($type, $size = NULL) { * * @return int */ - protected function compareFiles($file1, $file2) { + protected function compareFiles($file1, $file2): int { $compare_size = filesize($file1->uri) - filesize($file2->uri); if ($compare_size) { // Sort by file size. diff --git a/core/tests/Drupal/Tests/UpdatePathTestTrait.php b/core/tests/Drupal/Tests/UpdatePathTestTrait.php index ccd930eaa8fbbc3fddf3e6c7dcc1c6b1be091980..b90023ec88205922b1f3a59a8e2c3179ef61f377 100644 --- a/core/tests/Drupal/Tests/UpdatePathTestTrait.php +++ b/core/tests/Drupal/Tests/UpdatePathTestTrait.php @@ -23,6 +23,13 @@ trait UpdatePathTestTrait { */ protected $checkFailedUpdates = TRUE; + /** + * Fail the test if there are entity field definition updates needed. + * + * @var bool + */ + protected $checkEntityFieldDefinitionUpdates = TRUE; + /** * Helper function to run pending database updates. * @@ -145,17 +152,19 @@ protected function runUpdates($update_url = NULL) { } // Ensure that the update hooks updated all entity schema. - $needs_updates = \Drupal::entityDefinitionUpdateManager()->needsUpdates(); - if ($needs_updates) { - foreach (\Drupal::entityDefinitionUpdateManager()->getChangeSummary() as $entity_type_id => $summary) { - $entity_type_label = \Drupal::entityTypeManager()->getDefinition($entity_type_id)->getLabel(); - foreach ($summary as $message) { - $this->fail("$entity_type_label: $message"); + if ($this->checkEntityFieldDefinitionUpdates) { + $needs_updates = \Drupal::entityDefinitionUpdateManager()->needsUpdates(); + if ($needs_updates) { + foreach (\Drupal::entityDefinitionUpdateManager()->getChangeSummary() as $entity_type_id => $summary) { + $entity_type_label = \Drupal::entityTypeManager()->getDefinition($entity_type_id)->getLabel(); + foreach ($summary as $message) { + $this->fail("$entity_type_label: $message"); + } } + // The above calls to `fail()` should prevent this from ever being + // called, but it is here in case something goes really wrong. + $this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.'); } - // The above calls to `fail()` should prevent this from ever being - // called, but it is here in case something goes really wrong. - $this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.'); } } } diff --git a/core/tests/PHPStan/composer.json b/core/tests/PHPStan/composer.json index 33031d9ee79aeff45e9b1e32aabbafc144c93826..c9cdaafd75e3688eb4f9de6b77090b54bf666eb5 100644 --- a/core/tests/PHPStan/composer.json +++ b/core/tests/PHPStan/composer.json @@ -3,7 +3,7 @@ "description": "Tests Drupal core's PHPStan rules", "require-dev": { "phpunit/phpunit": "^10", - "phpstan/phpstan": "1.11.10" + "phpstan/phpstan": "1.12.10" }, "license": "GPL-2.0-or-later", "autoload": { diff --git a/core/themes/claro/claro.libraries.yml b/core/themes/claro/claro.libraries.yml index 01f2979be900c31d60db2f651aade34ba2b345bf..64b56ebaa4483e625dfffb5411466cc84dab5944 100644 --- a/core/themes/claro/claro.libraries.yml +++ b/core/themes/claro/claro.libraries.yml @@ -23,6 +23,7 @@ global-styling: css/components/accordion.css: {} css/components/action-link.css: {} css/components/content-header.css: {} + css/components/ckeditor5.css: {} css/components/container-inline.css: {} css/components/container-inline.module.css: {} css/components/breadcrumb.css: {} diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index 79481b37246d700a22515f72e5e8862b3a600b81..8b411f38656ce7f79190c07efb9605ee2cda9cb4 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -412,7 +412,7 @@ function claro_preprocess_details(&$variables) { /** * Implements hook_form_alter(). */ -function claro_form_alter(array &$form, FormStateInterface $form_state, $form_id) { +function claro_form_alter(array &$form, FormStateInterface $form_state, $form_id): void { $build_info = $form_state->getBuildInfo(); $form_object = $form_state->getFormObject(); @@ -669,7 +669,7 @@ function _claro_convert_link_to_action_link(array $link, $icon_name = NULL, $siz * * Changes vertical tabs to container. */ -function claro_form_node_form_alter(&$form, FormStateInterface $form_state) { +function claro_form_node_form_alter(&$form, FormStateInterface $form_state): void { $form['#theme'] = ['node_edit_form']; $form['#attached']['library'][] = 'claro/form-two-columns'; @@ -689,7 +689,7 @@ function claro_form_node_form_alter(&$form, FormStateInterface $form_state) { * Alters the menu_link_content_form by organizing form elements into different * 'details' sections. */ -function claro_form_menu_link_content_form_alter(&$form, FormStateInterface $form_state) { +function claro_form_menu_link_content_form_alter(&$form, FormStateInterface $form_state): void { $form['#theme'] = ['menu_link_form']; $form['#attached']['library'][] = 'claro/form-two-columns'; $form['advanced'] = [ @@ -739,14 +739,14 @@ function claro_form_menu_link_content_form_alter(&$form, FormStateInterface $for * Alters the menu_link_edit form by organizing form elements into different * 'details' sections. */ -function claro_form_menu_link_edit_alter(&$form, FormStateInterface $form_state) { +function claro_form_menu_link_edit_alter(&$form, FormStateInterface $form_state): void { claro_form_menu_link_content_form_alter($form, $form_state); } /** * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\media\MediaForm. */ -function claro_form_media_form_alter(&$form, FormStateInterface $form_state) { +function claro_form_media_form_alter(&$form, FormStateInterface $form_state): void { // Only attach CSS from core if this form comes from Media core, and not from // the contrib Media Entity 1.x branch. if (\Drupal::moduleHandler()->moduleExists('media') && $form_state->getFormObject() instanceof MediaForm) { @@ -898,7 +898,7 @@ function claro_preprocess_views_exposed_form(&$variables) { /** * Implements hook_form_FORM_ID_alter() for views_exposed_form. */ -function claro_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) { +function claro_form_views_exposed_form_alter(&$form, FormStateInterface $form_state): void { $view = $form_state->getStorage()['view']; $view_title = $view->getTitle(); @@ -910,7 +910,7 @@ function claro_form_views_exposed_form_alter(&$form, FormStateInterface $form_st /** * Implements hook_form_FORM_ID_alter() for the system_modules form. */ -function claro_form_system_modules_alter(&$form, FormStateInterface $form_state) { +function claro_form_system_modules_alter(&$form, FormStateInterface $form_state): void { if (isset($form['filters'])) { $form['filters']['#attributes']['class'][] = 'modules-table-filter'; if (isset($form['filters']['text'])) { @@ -1489,7 +1489,7 @@ function claro_preprocess_views_view_fields__media_library(array &$variables) { /** * Implements hook_form_BASE_FORM_ID_alter(). */ -function claro_form_media_library_add_form_alter(array &$form, FormStateInterface $form_state) { +function claro_form_media_library_add_form_alter(array &$form, FormStateInterface $form_state): void { $form['#attributes']['class'][] = 'media-library-add-form'; $form['#attached']['library'][] = 'claro/media_library.theme'; @@ -1510,7 +1510,7 @@ function claro_form_media_library_add_form_alter(array &$form, FormStateInterfac /** * Implements hook_form_FORM_ID_alter(). */ -function claro_form_media_library_add_form_upload_alter(array &$form, FormStateInterface $form_state) { +function claro_form_media_library_add_form_upload_alter(array &$form, FormStateInterface $form_state): void { $form['#attributes']['class'][] = 'media-library-add-form--upload'; if (isset($form['container']['upload'])) { // Set this flag so we can prevent the details element from being added @@ -1525,7 +1525,7 @@ function claro_form_media_library_add_form_upload_alter(array &$form, FormStateI /** * Implements hook_form_FORM_ID_alter(). */ -function claro_form_media_library_add_form_oembed_alter(array &$form, FormStateInterface $form_state) { +function claro_form_media_library_add_form_oembed_alter(array &$form, FormStateInterface $form_state): void { $form['#attributes']['class'][] = 'media-library-add-form--oembed'; // If no media items have been added yet, add a couple of styling classes @@ -1675,7 +1675,7 @@ function claro_preprocess_links__media_library_menu(array &$variables) { /** * Implements hook_form_FORM_ID_alter() for the Views UI rearrange filter form. */ -function claro_preprocess_views_ui_rearrange_filter_form(array &$variables) { +function claro_preprocess_views_ui_rearrange_filter_form(array &$variables): void { foreach ($variables['table']['#rows'] as &$row) { // Remove the container-inline class from the operator table cell. if (isset($row['data'][0]['class'])) { @@ -1687,7 +1687,7 @@ function claro_preprocess_views_ui_rearrange_filter_form(array &$variables) { /** * Implements hook_form_FORM_ID_alter() for the Views UI config form. */ -function claro_form_views_ui_config_item_form_alter(array &$form, FormStateInterface $form_state) { +function claro_form_views_ui_config_item_form_alter(array &$form, FormStateInterface $form_state): void { $type = $form_state->get('type'); if ($type === 'filter') { @@ -1757,7 +1757,7 @@ function claro_form_views_ui_config_item_form_alter(array &$form, FormStateInter /** * Implements hook_form_FORM_ID_alter() for Views UI add handler form. */ -function claro_form_views_ui_add_handler_form_alter(array &$form, FormStateInterface $form_state) { +function claro_form_views_ui_add_handler_form_alter(array &$form, FormStateInterface $form_state): void { // Remove container-inline class to allow more control over styling. if (isset($form['selected']['#attributes']['class'])) { $form['selected']['#attributes']['class'] = array_diff($form['selected']['#attributes']['class'], ['container-inline']); @@ -1844,7 +1844,7 @@ function claro_system_module_invoked_theme_registry_alter(array &$theme_registry /** * Implements hook_form_FORM_ID_alter() for the user_admin_permissions form. */ -function claro_form_user_admin_permissions_alter(&$form, FormStateInterface $form_state) { +function claro_form_user_admin_permissions_alter(&$form, FormStateInterface $form_state): void { if (isset($form['filters'])) { $form['filters']['#attributes']['class'][] = 'permissions-table-filter'; if (isset($form['filters']['text'])) { @@ -1857,7 +1857,7 @@ function claro_form_user_admin_permissions_alter(&$form, FormStateInterface $for /** * Implements hook_form_FORM_ID_alter(). */ -function claro_form_node_preview_form_select_alter(array &$form, FormStateInterface $form_state) { +function claro_form_node_preview_form_select_alter(array &$form, FormStateInterface $form_state): void { if (isset($form['backlink'])) { $form['backlink']['#options']['attributes']['class'][] = 'action-link'; $form['backlink']['#options']['attributes']['class'][] = 'action-link--icon-chevron-left'; diff --git a/core/themes/claro/css/components/ckeditor5.css b/core/themes/claro/css/components/ckeditor5.css new file mode 100644 index 0000000000000000000000000000000000000000..709a99ad2960ae7cb7a855af9f6770b43621ed7a --- /dev/null +++ b/core/themes/claro/css/components/ckeditor5.css @@ -0,0 +1,9 @@ +/* + * DO NOT EDIT THIS FILE. + * See the following change record for more information, + * https://www.drupal.org/node/3084859 + * @preserve + */ +.ck { + --ck-color-base-border: var(--input-border-color); +} diff --git a/core/themes/claro/css/components/ckeditor5.pcss.css b/core/themes/claro/css/components/ckeditor5.pcss.css new file mode 100644 index 0000000000000000000000000000000000000000..d3e8a0869ae83f107d92d6780b48ee7600628417 --- /dev/null +++ b/core/themes/claro/css/components/ckeditor5.pcss.css @@ -0,0 +1,3 @@ +.ck { + --ck-color-base-border: var(--input-border-color); +} diff --git a/core/themes/claro/css/components/form.css b/core/themes/claro/css/components/form.css index 27da255678c6a4a6c1148f01ffb37980ff06e9fc..0e4b0368548f656a63bfbbb59e10e598ba02d462 100644 --- a/core/themes/claro/css/components/form.css +++ b/core/themes/claro/css/components/form.css @@ -161,6 +161,10 @@ tr .form-item, align-self: center; } +.form-actions > .form-wrapper { + margin-inline: 0 var(--space-s); +} + /** * Password module. * diff --git a/core/themes/claro/css/components/form.pcss.css b/core/themes/claro/css/components/form.pcss.css index 91b141b1301e9f07502140039fe6ce96419346eb..2aad69014296b8cce5eb0be73e1401385510a7c5 100644 --- a/core/themes/claro/css/components/form.pcss.css +++ b/core/themes/claro/css/components/form.pcss.css @@ -140,6 +140,10 @@ tr .form-item, } } +.form-actions > .form-wrapper { + margin-inline: 0 var(--space-s); +} + /** * Password module. * diff --git a/core/themes/claro/css/components/system-status-counter.css b/core/themes/claro/css/components/system-status-counter.css index 73dca735cb304b828b58fe8c926e5b451af6e4c1..277ae6340835d986affc06513bdde329e32d0c0e 100644 --- a/core/themes/claro/css/components/system-status-counter.css +++ b/core/themes/claro/css/components/system-status-counter.css @@ -47,9 +47,8 @@ mask-size: 2.5rem; } } -[dir="rtl"] .system-status-counter__status-icon { - border-inline-end: 1px solid #e6e4df; - border-inline-start: 0; +[dir="rtl"] .system-status-counter__status-icon::before { + background-position: left center; } .system-status-counter__status-icon--error::before { background-image: var(--system-status-counter-status-icon-error); diff --git a/core/themes/claro/css/components/system-status-counter.pcss.css b/core/themes/claro/css/components/system-status-counter.pcss.css index 11257f288689a55436acd2f8df1c3978dcb08886..a5b139eabe470bac691538ba7cf2ca63a313ab04 100644 --- a/core/themes/claro/css/components/system-status-counter.pcss.css +++ b/core/themes/claro/css/components/system-status-counter.pcss.css @@ -37,11 +37,10 @@ mask-position: right center; mask-size: 40px; } - } - @nest [dir="rtl"] & { - border-inline-end: 1px solid #e6e4df; - border-inline-start: 0; + @nest [dir="rtl"] & { + background-position: left center; + } } } diff --git a/core/themes/claro/css/components/tables.css b/core/themes/claro/css/components/tables.css index aac1a6bd13dc1872d8ac9077484ef78749896af2..1dce46bd4602a20ee4514b52c8eed466acf5d65c 100644 --- a/core/themes/claro/css/components/tables.css +++ b/core/themes/claro/css/components/tables.css @@ -30,6 +30,7 @@ th { height: var(--space-xl); padding: var(--space-xs) var(--space-m); text-align: start; + vertical-align: top; color: var(--color-text); background: var(--color-gray-050); line-height: 1.25rem; /* 20px */ @@ -162,6 +163,7 @@ td { height: 4rem; padding: var(--space-xs) var(--space-m); text-align: start; + vertical-align: top; } td .item-list ul { diff --git a/core/themes/claro/css/components/tables.pcss.css b/core/themes/claro/css/components/tables.pcss.css index 14a0388054a6d3d54b7faf88348133db47a0d953..faef4934e55e00d1985301a27f86eecd09cbe370 100644 --- a/core/themes/claro/css/components/tables.pcss.css +++ b/core/themes/claro/css/components/tables.pcss.css @@ -23,6 +23,7 @@ th { height: var(--space-xl); padding: var(--space-xs) var(--space-m); text-align: start; + vertical-align: top; color: var(--color-text); background: var(--color-gray-050); line-height: 1.25rem; /* 20px */ @@ -138,6 +139,7 @@ td { height: 4rem; padding: var(--space-xs) var(--space-m); text-align: start; + vertical-align: top; & .item-list ul { margin: 0; diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine index 45a95cae786326c6f714c7d9e7b7ccdcd1fc60b1..d8a5a65dc55bf525e18759740b272152df972a38 100644 --- a/core/themes/engines/twig/twig.engine +++ b/core/themes/engines/twig/twig.engine @@ -12,7 +12,7 @@ /** * Implements hook_theme(). */ -function twig_theme($existing, $type, $theme, $path) { +function twig_theme($existing, $type, $theme, $path): array { return drupal_find_theme_templates($existing, '.html.twig', $path); } diff --git a/core/themes/olivero/css/components/form.css b/core/themes/olivero/css/components/form.css index bf7ba606c4b474aa2d3c30c0b1ea5e3b8c9f163a..5f8675898806e93dad078188a9378a27e38ab80d 100644 --- a/core/themes/olivero/css/components/form.css +++ b/core/themes/olivero/css/components/form.css @@ -47,6 +47,9 @@ tr .form-item, .form-item__label { display: block; margin-block: var(--sp0-5); + font-size: var(--font-size-s); + font-weight: bold; + line-height: var(--line-height-s); } .container-inline .form-item__label { @@ -158,6 +161,10 @@ tr .form-item, margin-block: var(--sp0-5); } +.form-actions > .form-wrapper { + margin-inline-end: var(--sp1); +} + .form-actions .ajax-progress--throbber { align-self: center; } diff --git a/core/themes/olivero/css/components/form.pcss.css b/core/themes/olivero/css/components/form.pcss.css index 2566c45a7e3fb056c375c03cf81f87f68ca3bb6a..09628fbfd89aabddd2b492b3b6ff4850ddff9627 100644 --- a/core/themes/olivero/css/components/form.pcss.css +++ b/core/themes/olivero/css/components/form.pcss.css @@ -39,6 +39,9 @@ tr .form-item, .form-item__label { display: block; margin-block: var(--sp0-5); + font-size: var(--font-size-s); + font-weight: bold; + line-height: var(--line-height-s); } .container-inline .form-item__label { @@ -139,6 +142,10 @@ tr .form-item, margin-block: var(--sp0-5); } +.form-actions > .form-wrapper { + margin-inline-end: var(--sp1); +} + .form-actions .ajax-progress--throbber { align-self: center; } diff --git a/core/themes/olivero/css/layout/layout-builder-fourcol-section.css b/core/themes/olivero/css/layout/layout-builder-fourcol-section.css index c607c6f0ec89d3c310eebaba5dbb22c216b7599d..e32faf7df91262c522fc22e401a2462c0e44cfc7 100644 --- a/core/themes/olivero/css/layout/layout-builder-fourcol-section.css +++ b/core/themes/olivero/css/layout/layout-builder-fourcol-section.css @@ -11,65 +11,23 @@ */ .layout--fourcol-section { - display: flex; - flex-wrap: wrap; -} - -.layout--fourcol-section > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); -} - -@media (min-width: 43.75rem) { - .layout--fourcol-section > .layout__region { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-fourcol-grid); } /* Two column layout. */ @media (min-width: 43.75rem) { - .layout--fourcol-section > .layout__region--first, - .layout--fourcol-section > .layout__region--second { - margin-block-end: var(--grid-gap); - } - - .layout--fourcol-section > .layout__region--first, - .layout--fourcol-section > .layout__region--third { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - .layout--fourcol-section > .layout__region--second, - .layout--fourcol-section > .layout__region--fourth { - margin-inline-start: calc(var(--grid-gap) * 0.5); + .layout--fourcol-section { + --layout-fourcol-grid: repeat(2, minmax(0, 1fr)); } } /* Four column layout. */ @media (min-width: 62.5rem) { - .layout--fourcol-section > .layout__region { - flex-basis: calc(25% - (var(--grid-gap) * 0.75)); - } - - .layout--fourcol-section > .layout__region--first, - .layout--fourcol-section > .layout__region--second { - margin-block-end: 0; - } - - .layout--fourcol-section > .layout__region--first { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - .layout--fourcol-section > .layout__region--second, - .layout--fourcol-section > .layout__region--third { - margin-inline: calc(var(--grid-gap) * 0.5); - } - - .layout--fourcol-section > .layout__region--fourth { - margin-inline-start: calc(var(--grid-gap) * 0.5); + .layout--fourcol-section { + --layout-fourcol-grid: repeat(4, minmax(0, 1fr)); } } diff --git a/core/themes/olivero/css/layout/layout-builder-fourcol-section.pcss.css b/core/themes/olivero/css/layout/layout-builder-fourcol-section.pcss.css index 012c2437cbe94cbdfaa59ef66a882d6fe9e2c962..b55d3f42c3b9d3e9deb9204ef573bfab9d966ad9 100644 --- a/core/themes/olivero/css/layout/layout-builder-fourcol-section.pcss.css +++ b/core/themes/olivero/css/layout/layout-builder-fourcol-section.pcss.css @@ -6,61 +6,21 @@ @import "../base/media-queries.pcss.css"; .layout--fourcol-section { - display: flex; - flex-wrap: wrap; - - & > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); - - @media (--md) { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } - } - - /* Two column layout. */ - @media (--md) { - & > .layout__region--first, - & > .layout__region--second { - margin-block-end: var(--grid-gap); - } - - & > .layout__region--first, - & > .layout__region--third { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-fourcol-grid); +} - & > .layout__region--second, - & > .layout__region--fourth { - margin-inline-start: calc(var(--grid-gap) * 0.5); - } +/* Two column layout. */ +@media (--md) { + .layout--fourcol-section { + --layout-fourcol-grid: repeat(2, minmax(0, 1fr)); } +} - /* Four column layout. */ - @media (--lg) { - & > .layout__region { - flex-basis: calc(25% - (var(--grid-gap) * 0.75)); - } - - & > .layout__region--first, - & > .layout__region--second { - margin-block-end: 0; - } - - & > .layout__region--first { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - & > .layout__region--second, - & > .layout__region--third { - margin-inline: calc(var(--grid-gap) * 0.5); - } - - & > .layout__region--fourth { - margin-inline-start: calc(var(--grid-gap) * 0.5); - } +/* Four column layout. */ +@media (--lg) { + .layout--fourcol-section { + --layout-fourcol-grid: repeat(4, minmax(0, 1fr)); } } diff --git a/core/themes/olivero/css/layout/layout-builder-threecol-section.css b/core/themes/olivero/css/layout/layout-builder-threecol-section.css index df66d8b2739dda0b20b24d12014bdda747f5fad1..0830a1fafbc679d90dacae3436ae679a731c9809 100644 --- a/core/themes/olivero/css/layout/layout-builder-threecol-section.css +++ b/core/themes/olivero/css/layout/layout-builder-threecol-section.css @@ -11,62 +11,40 @@ */ .layout--threecol-section { - display: flex; - flex-wrap: wrap; + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-threecol-grid); } -.layout--threecol-section > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); +.layout--threecol-section > .layout__region--first { + grid-column: var(--layout-threecol-grid__first); } -@media (min-width: 62.5rem) { - .layout--threecol-section > .layout__region { - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } +.layout--threecol-section > .layout__region--second { + grid-column: var(--layout-threecol-grid__second); } -@media (min-width: 62.5rem) { - .layout--threecol-section > .layout__region--first { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - .layout--threecol-section > .layout__region--second { - margin-inline: calc(var(--grid-gap) * 0.5); - } +.layout--threecol-section > .layout__region--third { + grid-column: var(--layout-threecol-grid__third); +} - .layout--threecol-section > .layout__region--third { - margin-inline-start: calc(var(--grid-gap) * 0.5); - } - .layout--threecol-section--25-50-25 > .layout__region--first, - .layout--threecol-section--25-50-25 > .layout__region--third { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); +@media (min-width: 62.5rem) { + .layout--threecol-section--25-50-25 { + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__second: span 2; } - .layout--threecol-section--25-50-25 > .layout__region--second { - flex-basis: calc(50% - var(--grid-gap)); - } - .layout--threecol-section--25-25-50 > .layout__region--first, - .layout--threecol-section--25-25-50 > .layout__region--second { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); + .layout--threecol-section--25-25-50 { + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__third: span 2; } - .layout--threecol-section--25-25-50 > .layout__region--third { - flex-basis: calc(50% - var(--grid-gap)); - } - .layout--threecol-section--50-25-25 > .layout__region--first { - flex-basis: calc(50% - var(--grid-gap)); + .layout--threecol-section--50-25-25 { + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__first: span 2; } - .layout--threecol-section--50-25-25 > .layout__region--second, - .layout--threecol-section--50-25-25 > .layout__region--third { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); - } - .layout--threecol-section--33-34-33 > .layout__region--first, - .layout--threecol-section--33-34-33 > .layout__region--second, - .layout--threecol-section--33-34-33 > .layout__region--third { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.667)); + .layout--threecol-section--33-34-33 { + --layout-threecol-grid: repeat(3, minmax(0, 1fr)); } } diff --git a/core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css b/core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css index afb669c67e921be1a26804d97b3a6fcb899e24ac..52227827a5e1b03541d73998889c511ac386edef 100644 --- a/core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css +++ b/core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css @@ -6,74 +6,40 @@ @import "../base/media-queries.pcss.css"; .layout--threecol-section { - display: flex; - flex-wrap: wrap; + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-threecol-grid); - & > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); - - @media (--lg) { - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } + & > .layout__region--first { + grid-column: var(--layout-threecol-grid__first); } -} -@media (--lg) { - .layout--threecol-section { - & > .layout__region--first { - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - & > .layout__region--second { - margin-inline: calc(var(--grid-gap) * 0.5); - } + & > .layout__region--second { + grid-column: var(--layout-threecol-grid__second); + } - & > .layout__region--third { - margin-inline-start: calc(var(--grid-gap) * 0.5); - } + & > .layout__region--third { + grid-column: var(--layout-threecol-grid__third); } +} +@media (--lg) { .layout--threecol-section--25-50-25 { - & > .layout__region--first, - & > .layout__region--third { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); - } - - & > .layout__region--second { - flex-basis: calc(50% - var(--grid-gap)); - } + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__second: span 2; } .layout--threecol-section--25-25-50 { - & > .layout__region--first, - & > .layout__region--second { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); - } - - & > .layout__region--third { - flex-basis: calc(50% - var(--grid-gap)); - } + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__third: span 2; } .layout--threecol-section--50-25-25 { - & > .layout__region--first { - flex-basis: calc(50% - var(--grid-gap)); - } - - & > .layout__region--second, - & > .layout__region--third { - flex-basis: calc(25% - (var(--grid-gap) * 0.5)); - } + --layout-threecol-grid: repeat(4, minmax(0, 1fr)); + --layout-threecol-grid__first: span 2; } .layout--threecol-section--33-34-33 { - & > .layout__region--first, - & > .layout__region--second, - & > .layout__region--third { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.667)); - } + --layout-threecol-grid: repeat(3, minmax(0, 1fr)); } } diff --git a/core/themes/olivero/css/layout/layout-builder-twocol-section.css b/core/themes/olivero/css/layout/layout-builder-twocol-section.css index 43dfb2b736e8d8e123c14238579d111e5a3a7580..3516dc64d7a1dcc799e931ff1317e00ac3a788eb 100644 --- a/core/themes/olivero/css/layout/layout-builder-twocol-section.css +++ b/core/themes/olivero/css/layout/layout-builder-twocol-section.css @@ -11,67 +11,41 @@ */ .layout--twocol-section { - display: flex; - flex-wrap: wrap; + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-twocol-grid); } -.layout--twocol-section > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); +.layout--twocol-section > .layout__region--first { + grid-column: var(--layout-twocol-grid__first); } -@media (min-width: 43.75rem) { - .layout--twocol-section > .layout__region { - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } +.layout--twocol-section > .layout__region--second { + grid-column: var(--layout-twocol-grid__second); } @media (min-width: 43.75rem) { - .layout--twocol-section--50-50 > .layout__region--first { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - .layout--twocol-section--50-50 > .layout__region--second { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - margin-inline-start: calc(var(--grid-gap) * 0.5); - } - .layout--twocol-section--33-67 > .layout__region--first { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.3333)); - margin-inline-end: calc(var(--grid-gap) * 0.3333); + .layout--twocol-section--50-50 { + --layout-twocol-grid: repeat(2, minmax(0, 1fr)); } - .layout--twocol-section--33-67 > .layout__region--second { - flex-basis: calc(66.66% - (var(--grid-gap) * 0.6666)); - margin-inline-start: calc(var(--grid-gap) * 0.6666); - } - .layout--twocol-section--67-33 > .layout__region--first { - flex-basis: calc(66.66% - (var(--grid-gap) * 0.6666)); - margin-inline-end: calc(var(--grid-gap) * 0.6666); + .layout--twocol-section--33-67 { + --layout-twocol-grid: repeat(3, minmax(0, 1fr)); + --layout-twocol-grid__second: span 2; } - .layout--twocol-section--67-33 > .layout__region--second { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.3333)); - margin-inline-start: calc(var(--grid-gap) * 0.3333); - } - .layout--twocol-section--25-75 > .layout__region--first { - flex-basis: calc(25% - (var(--grid-gap) * 0.25)); - margin-inline-end: calc(var(--grid-gap) * 0.25); + .layout--twocol-section--67-33 { + --layout-twocol-grid: repeat(3, minmax(0, 1fr)); + --layout-twocol-grid__first: span 2; } - .layout--twocol-section--25-75 > .layout__region--second { - flex-basis: calc(75% - (var(--grid-gap) * 0.75)); - margin-inline-start: calc(var(--grid-gap) * 0.75); - } - .layout--twocol-section--75-25 > .layout__region--first { - flex-basis: calc(75% - (var(--grid-gap) * 0.75)); - margin-inline-end: calc(var(--grid-gap) * 0.75); + .layout--twocol-section--25-75 { + --layout-twocol-grid: repeat(4, minmax(0, 1fr)); + --layout-twocol-grid__second: span 3; } - .layout--twocol-section--75-25 > .layout__region--second { - flex-basis: calc(25% - (var(--grid-gap) * 0.25)); - margin-inline-start: calc(var(--grid-gap) * 0.25); + .layout--twocol-section--75-25 { + --layout-twocol-grid: repeat(4, minmax(0, 1fr)); + --layout-twocol-grid__first: span 3; } } diff --git a/core/themes/olivero/css/layout/layout-builder-twocol-section.pcss.css b/core/themes/olivero/css/layout/layout-builder-twocol-section.pcss.css index ea05bc6a6044293e284755bbbc33d245a04368c7..67545e1a6c5df4d1e855d5fb4c6888119468c0c4 100644 --- a/core/themes/olivero/css/layout/layout-builder-twocol-section.pcss.css +++ b/core/themes/olivero/css/layout/layout-builder-twocol-section.pcss.css @@ -6,79 +6,41 @@ @import "../base/media-queries.pcss.css"; .layout--twocol-section { - display: flex; - flex-wrap: wrap; + display: grid; + gap: var(--grid-gap); + grid-template-columns: var(--layout-twocol-grid); - & > .layout__region { - flex: 1 0 100%; - margin-block-end: var(--grid-gap); + & > .layout__region--first { + grid-column: var(--layout-twocol-grid__first); + } - @media (--md) { - flex-grow: 0; - flex-shrink: 0; - margin-block-end: 0; - } + & > .layout__region--second { + grid-column: var(--layout-twocol-grid__second); } } @media (--md) { .layout--twocol-section--50-50 { - & > .layout__region--first { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - margin-inline-end: calc(var(--grid-gap) * 0.5); - } - - & > .layout__region--second { - flex-basis: calc(50% - (var(--grid-gap) * 0.5)); - margin-inline-start: calc(var(--grid-gap) * 0.5); - } + --layout-twocol-grid: repeat(2, minmax(0, 1fr)); } .layout--twocol-section--33-67 { - & > .layout__region--first { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.3333)); - margin-inline-end: calc(var(--grid-gap) * 0.3333); - } - - & > .layout__region--second { - flex-basis: calc(66.66% - (var(--grid-gap) * 0.6666)); - margin-inline-start: calc(var(--grid-gap) * 0.6666); - } + --layout-twocol-grid: repeat(3, minmax(0, 1fr)); + --layout-twocol-grid__second: span 2; } .layout--twocol-section--67-33 { - & > .layout__region--first { - flex-basis: calc(66.66% - (var(--grid-gap) * 0.6666)); - margin-inline-end: calc(var(--grid-gap) * 0.6666); - } - - & > .layout__region--second { - flex-basis: calc(33.33% - (var(--grid-gap) * 0.3333)); - margin-inline-start: calc(var(--grid-gap) * 0.3333); - } + --layout-twocol-grid: repeat(3, minmax(0, 1fr)); + --layout-twocol-grid__first: span 2; } .layout--twocol-section--25-75 { - & > .layout__region--first { - flex-basis: calc(25% - (var(--grid-gap) * 0.25)); - margin-inline-end: calc(var(--grid-gap) * 0.25); - } - - & > .layout__region--second { - flex-basis: calc(75% - (var(--grid-gap) * 0.75)); - margin-inline-start: calc(var(--grid-gap) * 0.75); - } + --layout-twocol-grid: repeat(4, minmax(0, 1fr)); + --layout-twocol-grid__second: span 3; } .layout--twocol-section--75-25 { - & > .layout__region--first { - flex-basis: calc(75% - (var(--grid-gap) * 0.75)); - margin-inline-end: calc(var(--grid-gap) * 0.75); - } - - & > .layout__region--second { - flex-basis: calc(25% - (var(--grid-gap) * 0.25)); - margin-inline-start: calc(var(--grid-gap) * 0.25); - } + --layout-twocol-grid: repeat(4, minmax(0, 1fr)); + --layout-twocol-grid__first: span 3; } } diff --git a/core/themes/olivero/olivero.post_update.php b/core/themes/olivero/olivero.post_update.php index 93228708fb8928f9340566a70ebe7deb8fdc3b86..1974ef83e623f040c8a6b19b7a40c31692f8cd66 100644 --- a/core/themes/olivero/olivero.post_update.php +++ b/core/themes/olivero/olivero.post_update.php @@ -8,7 +8,7 @@ /** * Implements hook_removed_post_updates(). */ -function olivero_removed_post_updates() { +function olivero_removed_post_updates(): array { return [ 'olivero_post_update_add_olivero_primary_color' => '11.0.0', ]; diff --git a/core/themes/olivero/olivero.theme b/core/themes/olivero/olivero.theme index a2219be3e8681dd8d3c2ba24369d3de204f599ab..7a7b2dedb84e18ef6e6a8a076a6ba047ad37d072 100644 --- a/core/themes/olivero/olivero.theme +++ b/core/themes/olivero/olivero.theme @@ -192,7 +192,7 @@ function olivero_theme_suggestions_form_alter(array &$suggestions, array $variab /** * Implements hook_form_alter() for adding classes and placeholder text to the search forms. */ -function olivero_form_alter(&$form, FormStateInterface $form_state, $form_id) { +function olivero_form_alter(&$form, FormStateInterface $form_state, $form_id): void { if (isset($form['actions']['submit']) && (count($form['actions'])) <= 2) { $form['actions']['submit']['#attributes']['class'][] = 'button--primary'; } @@ -503,7 +503,7 @@ function olivero_preprocess_filter_caption(&$variables) { /** * Implements hook_form_FORM_ID_alter(). */ -function olivero_form_node_preview_form_select_alter(&$form, FormStateInterface $form_state, $form_id) { +function olivero_form_node_preview_form_select_alter(&$form, FormStateInterface $form_state, $form_id): void { $form['backlink']['#options']['attributes']['class'][] = 'button'; $form['backlink']['#options']['attributes']['class'][] = 'button--small'; $form['backlink']['#options']['attributes']['class'][] = 'button--icon-back'; @@ -620,7 +620,7 @@ function olivero_preprocess_table(&$variables) { /** * Implements hook_form_views_exposed_form_alter(). */ -function olivero_form_views_exposed_form_alter(&$form) { +function olivero_form_views_exposed_form_alter(&$form): void { $form['#attributes']['class'][] = 'form--inline'; } diff --git a/core/themes/olivero/theme-settings.php b/core/themes/olivero/theme-settings.php index 849df4c11d5d0f5c9b35c6d47d9e90fac000854f..4f04410ef67647e8c6952cf220511b29cd9248de 100644 --- a/core/themes/olivero/theme-settings.php +++ b/core/themes/olivero/theme-settings.php @@ -10,7 +10,7 @@ /** * Implements hook_form_FORM_ID_alter() for system_theme_settings. */ -function olivero_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) { +function olivero_form_system_theme_settings_alter(&$form, FormStateInterface $form_state): void { $form['#attached']['library'][] = 'olivero/color-picker'; $color_config = [ diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml index ba416885b93d5b8ea284b23b69dfb01d4ac01771..1243d06008988bc493548e8f4396ba4bf513376f 100644 --- a/sites/default/default.services.yml +++ b/sites/default/default.services.yml @@ -51,23 +51,6 @@ parameters: # information. # @default no value cookie_samesite: Lax - # - # 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 # By default, Drupal generates a session cookie name based on the full # domain name. Set the name_suffix to a short random string to ensure this # session cookie name is unique on different installations on the same